diff --git a/.buildkite/scripts/build_kibana.sh b/.buildkite/scripts/build_kibana.sh
index 90f9da8ac8de4..2757c956920f7 100755
--- a/.buildkite/scripts/build_kibana.sh
+++ b/.buildkite/scripts/build_kibana.sh
@@ -10,6 +10,7 @@ echo "--- Build Kibana Distribution"
BUILD_ARGS=""
is_pr_with_label "ci:build-all-platforms" && BUILD_ARGS="--all-platforms"
+is_pr_with_label "ci:build-example-plugins" && BUILD_ARGS="$BUILD_ARGS --example-plugins"
is_pr_with_label "ci:build-docker-cross-compile" && BUILD_ARG="$BUILD_ARGS --docker-cross-compile"
is_pr_with_label "ci:build-os-packages" || BUILD_ARGS="$BUILD_ARGS --skip-os-packages"
is_pr_with_label "ci:build-canvas-shareable-runtime" || BUILD_ARGS="$BUILD_ARGS --skip-canvas-shareable-runtime"
diff --git a/.buildkite/scripts/common/util.sh b/.buildkite/scripts/common/util.sh
index 1ce05856ec6b7..748babfc0650b 100755
--- a/.buildkite/scripts/common/util.sh
+++ b/.buildkite/scripts/common/util.sh
@@ -39,6 +39,7 @@ check_for_changed_files() {
C_RESET='\033[0m' # Reset color
SHOULD_AUTO_COMMIT_CHANGES="${2:-}"
+ CUSTOM_FIX_MESSAGE="${3:-}"
GIT_CHANGES="$(git ls-files --modified -- . ':!:.bazelrc')"
if [ "$GIT_CHANGES" ]; then
@@ -75,7 +76,11 @@ check_for_changed_files() {
else
echo -e "\n${RED}ERROR: '$1' caused changes to the following files:${C_RESET}\n"
echo -e "$GIT_CHANGES\n"
- echo -e "\n${YELLOW}TO FIX: Run '$1' locally, commit the changes and push to your branch${C_RESET}\n"
+ if [ "$CUSTOM_FIX_MESSAGE" ]; then
+ echo "$CUSTOM_FIX_MESSAGE"
+ else
+ echo -e "\n${YELLOW}TO FIX: Run '$1' locally, commit the changes and push to your branch${C_RESET}\n"
+ fi
exit 1
fi
fi
diff --git a/.buildkite/scripts/download_build_artifacts.sh b/.buildkite/scripts/download_build_artifacts.sh
index dd0ae660543a8..1e793346da33b 100755
--- a/.buildkite/scripts/download_build_artifacts.sh
+++ b/.buildkite/scripts/download_build_artifacts.sh
@@ -15,6 +15,13 @@ if [[ ! -d "$KIBANA_BUILD_LOCATION/bin" ]]; then
mkdir -p "$KIBANA_BUILD_LOCATION"
tar -xzf kibana-default.tar.gz -C "$KIBANA_BUILD_LOCATION" --strip=1
+ if is_pr_with_label "ci:build-example-plugins"; then
+ # Testing against an example plugin distribution is not supported,
+ # mostly due to snapshot failures when testing UI element lists
+ rm -rf "$KIBANA_BUILD_LOCATION/plugins"
+ mkdir "$KIBANA_BUILD_LOCATION/plugins"
+ fi
+
cd "$KIBANA_DIR"
tar -xzf ../kibana-default-plugins.tar.gz
diff --git a/.buildkite/scripts/steps/checks.sh b/.buildkite/scripts/steps/checks.sh
index 4af63d318c804..0e11ac04eea1d 100755
--- a/.buildkite/scripts/steps/checks.sh
+++ b/.buildkite/scripts/steps/checks.sh
@@ -8,6 +8,7 @@ export DISABLE_BOOTSTRAP_VALIDATION=false
.buildkite/scripts/steps/checks/precommit_hook.sh
.buildkite/scripts/steps/checks/ftr_configs.sh
.buildkite/scripts/steps/checks/bazel_packages.sh
+.buildkite/scripts/steps/checks/event_log.sh
.buildkite/scripts/steps/checks/telemetry.sh
.buildkite/scripts/steps/checks/ts_projects.sh
.buildkite/scripts/steps/checks/jest_configs.sh
diff --git a/.buildkite/scripts/steps/checks/event_log.sh b/.buildkite/scripts/steps/checks/event_log.sh
new file mode 100755
index 0000000000000..dc9c01902c010
--- /dev/null
+++ b/.buildkite/scripts/steps/checks/event_log.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+source .buildkite/scripts/common/util.sh
+
+echo --- Check Event Log Schema
+
+# event log schema is pinned to a specific version of ECS
+ECS_STABLE_VERSION=1.8
+git clone --depth 1 -b $ECS_STABLE_VERSION https://github.com/elastic/ecs.git ../ecs
+
+node x-pack/plugins/event_log/scripts/create_schemas.js
+
+check_for_changed_files 'node x-pack/plugins/event_log/scripts/create_schemas.js' false 'Follow the directions in x-pack/plugins/event_log/generated/README.md to make schema changes for the event log.'
diff --git a/.buildkite/scripts/steps/demo_env/Dockerfile b/.buildkite/scripts/steps/demo_env/Dockerfile
index a0b1c3311dc8c..4e841c04bbf42 100644
--- a/.buildkite/scripts/steps/demo_env/Dockerfile
+++ b/.buildkite/scripts/steps/demo_env/Dockerfile
@@ -1,4 +1,2 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
-COPY ./* /var/lib/example_plugins
-RUN find /var/lib/example_plugins/ -type f -name '*.zip' | xargs -I % /usr/share/kibana/bin/kibana-plugin install 'file://%'
diff --git a/.buildkite/scripts/steps/storybooks/build_and_upload.ts b/.buildkite/scripts/steps/storybooks/build_and_upload.ts
index 8575ee683d82f..945f85a820971 100644
--- a/.buildkite/scripts/steps/storybooks/build_and_upload.ts
+++ b/.buildkite/scripts/steps/storybooks/build_and_upload.ts
@@ -15,7 +15,7 @@ const STORYBOOKS = [
'apm',
'canvas',
'ci_composite',
- 'cloud',
+ 'cloud_chat',
'coloring',
'chart_icons',
'controls',
@@ -41,6 +41,7 @@ const STORYBOOKS = [
'presentation',
'security_solution',
'shared_ux',
+ 'triggers_actions_ui',
'ui_actions_enhanced',
'unified_search',
];
diff --git a/.eslintrc.js b/.eslintrc.js
index df107348cfafc..902643dbe5066 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1314,7 +1314,7 @@ module.exports = {
{
// typescript for front and back end
files: [
- 'x-pack/plugins/{alerting,stack_alerts,stack_connectors,actions,task_manager,event_log}/**/*.{ts,tsx}',
+ 'x-pack/plugins/{alerting,stack_alerts,actions,task_manager,event_log}/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
@@ -1322,7 +1322,7 @@ module.exports = {
},
{
// typescript only for back end
- files: ['x-pack/plugins/triggers_actions_ui/server/**/*.ts'],
+ files: ['x-pack/plugins/{stack_connectors,triggers_actions_ui}/server/**/*.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
},
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 63c5c8047c6b4..b7d588bc89269 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -132,6 +132,7 @@ x-pack/examples/files_example @elastic/kibana-app-services
/x-pack/test/fleet_api_integration @elastic/fleet
/x-pack/test/fleet_cypress @elastic/fleet
/x-pack/test/fleet_functional @elastic/fleet
+/src/dev/build/tasks/bundle_fleet_packages.ts
# APM
/x-pack/plugins/apm/ @elastic/apm-ui
@@ -331,7 +332,9 @@ x-pack/examples/files_example @elastic/kibana-app-services
/x-pack/plugins/event_log/ @elastic/response-ops
/x-pack/plugins/task_manager/ @elastic/response-ops
/x-pack/plugins/stack_connectors/ @elastic/response-ops
+/x-pack/plugins/stack_connectors/public/connector_types/stack/ @elastic/response-ops-execution
/x-pack/plugins/stack_connectors/server/connector_types/stack/ @elastic/response-ops-execution
+/x-pack/plugins/stack_connectors/public/connector_types/cases/ @elastic/response-ops-cases
/x-pack/plugins/stack_connectors/server/connector_types/cases/ @elastic/response-ops-cases
/x-pack/test/alerting_api_integration/ @elastic/response-ops
/x-pack/test/plugin_api_integration/test_suites/task_manager/ @elastic/response-ops
@@ -350,6 +353,7 @@ x-pack/examples/files_example @elastic/kibana-app-services
# Enterprise Search
/x-pack/plugins/enterprise_search @elastic/enterprise-search-frontend
/x-pack/test/functional_enterprise_search/ @elastic/enterprise-search-frontend
+/x-pack/plugins/enterprise_search/public/applications/shared/doc_links @elastic/ent-search-docs-team
# Management Experience - Deployment Management
/src/plugins/dev_tools/ @elastic/platform-deployment-management
@@ -739,6 +743,8 @@ packages/core/http/core-http-browser-mocks @elastic/kibana-core
packages/core/http/core-http-common @elastic/kibana-core
packages/core/http/core-http-context-server-internal @elastic/kibana-core
packages/core/http/core-http-context-server-mocks @elastic/kibana-core
+packages/core/http/core-http-request-handler-context-server @elastic/kibana-core
+packages/core/http/core-http-request-handler-context-server-internal @elastic/kibana-core
packages/core/http/core-http-router-server-internal @elastic/kibana-core
packages/core/http/core-http-router-server-mocks @elastic/kibana-core
packages/core/http/core-http-server @elastic/kibana-core
@@ -778,6 +784,7 @@ packages/core/notifications/core-notifications-browser-mocks @elastic/kibana-cor
packages/core/overlays/core-overlays-browser @elastic/kibana-core
packages/core/overlays/core-overlays-browser-internal @elastic/kibana-core
packages/core/overlays/core-overlays-browser-mocks @elastic/kibana-core
+packages/core/plugins/core-plugins-base-server-internal @elastic/kibana-core
packages/core/plugins/core-plugins-browser @elastic/kibana-core
packages/core/plugins/core-plugins-browser-internal @elastic/kibana-core
packages/core/plugins/core-plugins-browser-mocks @elastic/kibana-core
@@ -786,6 +793,8 @@ packages/core/preboot/core-preboot-server-internal @elastic/kibana-core
packages/core/preboot/core-preboot-server-mocks @elastic/kibana-core
packages/core/rendering/core-rendering-browser-internal @elastic/kibana-core
packages/core/rendering/core-rendering-browser-mocks @elastic/kibana-core
+packages/core/rendering/core-rendering-server-internal @elastic/kibana-core
+packages/core/rendering/core-rendering-server-mocks @elastic/kibana-core
packages/core/root/core-root-browser-internal @elastic/kibana-core
packages/core/saved-objects/core-saved-objects-api-browser @elastic/kibana-core
packages/core/saved-objects/core-saved-objects-api-server @elastic/kibana-core
@@ -909,6 +918,7 @@ packages/kbn-rule-data-utils @elastic/apm-ui
packages/kbn-safer-lodash-set @elastic/kibana-security
packages/kbn-securitysolution-autocomplete @elastic/security-solution-platform
packages/kbn-securitysolution-es-utils @elastic/security-solution-platform
+packages/kbn-securitysolution-exception-list-components @elastic/security-solution-platform
packages/kbn-securitysolution-hook-utils @elastic/security-solution-platform
packages/kbn-securitysolution-io-ts-alerting-types @elastic/security-solution-platform
packages/kbn-securitysolution-io-ts-list-types @elastic/security-solution-platform
diff --git a/.gitignore b/.gitignore
index 98b294dbd6dc2..82a13e661a5bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,7 @@ __tmp__
# Ignore example plugin builds
/examples/*/build
+/x-pack/examples/*/build
# Ignore certain functional test runner artifacts
/test/*/failure_debug
diff --git a/.i18nrc.json b/.i18nrc.json
index 20b2588ca2fab..462daff20de63 100644
--- a/.i18nrc.json
+++ b/.i18nrc.json
@@ -60,6 +60,7 @@
"kibana-react": "src/plugins/kibana_react",
"kibanaOverview": "src/plugins/kibana_overview",
"lists": "packages/kbn-securitysolution-list-utils/src",
+ "exceptionList-components": "packages/kbn-securitysolution-exception-list-components/src",
"management": ["src/legacy/core_plugins/management", "src/plugins/management"],
"monaco": "packages/kbn-monaco/src",
"navigation": "src/plugins/navigation",
diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx
index c298d8a395df6..f845dffebd44e 100644
--- a/api_docs/actions.mdx
+++ b/api_docs/actions.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
description: API docs for the actions plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx
index 6da505acae8b7..c624a6191fca4 100644
--- a/api_docs/advanced_settings.mdx
+++ b/api_docs/advanced_settings.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
description: API docs for the advancedSettings plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx
index 4e5199b31ef9c..bc33359fc9b04 100644
--- a/api_docs/aiops.mdx
+++ b/api_docs/aiops.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops
title: "aiops"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiops plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json
index a19bdb320740d..e0cc3c68239e4 100644
--- a/api_docs/alerting.devdocs.json
+++ b/api_docs/alerting.devdocs.json
@@ -2666,8 +2666,6 @@
"Alert",
"; scheduleActions: (actionGroup: ActionGroupIds, context?: Context) => ",
"Alert",
- "; scheduleActionsWithSubGroup: (actionGroup: ActionGroupIds, subgroup: string, context?: Context) => ",
- "Alert",
"; setContext: (context: Context) => ",
"Alert",
"; getContext: () => Context; hasContext: () => boolean; }"
@@ -2832,7 +2830,11 @@
"section": "def-common.IExecutionErrorsResult",
"text": "IExecutionErrorsResult"
},
- ">; bulkEdit: ; getGlobalExecutionKpiWithAuth: ({ dateStart, dateEnd, filter, }: ",
+ "GetGlobalExecutionKPIParams",
+ ") => Promise<{ success: number; unknown: number; failure: number; activeAlerts: number; newAlerts: number; recoveredAlerts: number; erroredActions: number; triggeredActions: number; }>; getRuleExecutionKPI: ({ id, dateStart, dateEnd, filter }: ",
+ "GetRuleExecutionKPIParams",
+ ") => Promise<{ success: number; unknown: number; failure: number; activeAlerts: number; newAlerts: number; recoveredAlerts: number; erroredActions: number; triggeredActions: number; }>; bulkEdit: ; }; observability: { setup: { getScopedAnnotationsClient: (requestContext: ",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
" & { licensing: Promise<",
{
"pluginId": "licensing",
@@ -5696,13 +5684,7 @@
"label": "context",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
" & { licensing: Promise<",
{
"pluginId": "licensing",
diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx
index 84c92a1ce8643..c5590b95953e3 100644
--- a/api_docs/apm.mdx
+++ b/api_docs/apm.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm
title: "apm"
image: https://source.unsplash.com/400x175/?github
description: API docs for the apm plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
---
import apmObj from './apm.devdocs.json';
diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx
index e10dd6028fafe..fde29f929d3e8 100644
--- a/api_docs/banners.mdx
+++ b/api_docs/banners.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners
title: "banners"
image: https://source.unsplash.com/400x175/?github
description: API docs for the banners plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners']
---
import bannersObj from './banners.devdocs.json';
diff --git a/api_docs/bfetch.devdocs.json b/api_docs/bfetch.devdocs.json
index 74f1cf1aee455..f060159bc0f3a 100644
--- a/api_docs/bfetch.devdocs.json
+++ b/api_docs/bfetch.devdocs.json
@@ -357,13 +357,7 @@
"(path: string, params: (request: ",
"KibanaRequest",
", context: ",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
") => ",
{
"pluginId": "bfetch",
@@ -375,13 +369,7 @@
", method?: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\" | undefined, pluginRouter?: ",
"IRouter",
"<",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
"> | undefined) => void"
],
"path": "src/plugins/bfetch/server/plugin.ts",
@@ -414,13 +402,7 @@
"(request: ",
"KibanaRequest",
", context: ",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
") => ",
{
"pluginId": "bfetch",
@@ -461,13 +443,7 @@
"signature": [
"IRouter",
"<",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
"> | undefined"
],
"path": "src/plugins/bfetch/server/plugin.ts",
diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx
index 504dc027276f0..1b66b97f34a98 100644
--- a/api_docs/bfetch.mdx
+++ b/api_docs/bfetch.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch
title: "bfetch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the bfetch plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch']
---
import bfetchObj from './bfetch.devdocs.json';
diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx
index 5dc73b2b9000b..72ab30c5fdb70 100644
--- a/api_docs/canvas.mdx
+++ b/api_docs/canvas.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas
title: "canvas"
image: https://source.unsplash.com/400x175/?github
description: API docs for the canvas plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas']
---
import canvasObj from './canvas.devdocs.json';
diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx
index aaa279d698443..2a80740fc9956 100644
--- a/api_docs/cases.mdx
+++ b/api_docs/cases.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases
title: "cases"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cases plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases']
---
import casesObj from './cases.devdocs.json';
diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx
index 5e129b2343ca0..18c757fc09259 100644
--- a/api_docs/charts.mdx
+++ b/api_docs/charts.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts
title: "charts"
image: https://source.unsplash.com/400x175/?github
description: API docs for the charts plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts']
---
import chartsObj from './charts.devdocs.json';
diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx
index 5c1a4fea8ca5c..dce65a128457b 100644
--- a/api_docs/cloud.mdx
+++ b/api_docs/cloud.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud
title: "cloud"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloud plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud']
---
import cloudObj from './cloud.devdocs.json';
diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx
index 6314cca4f901b..653ae1b77adef 100644
--- a/api_docs/cloud_experiments.mdx
+++ b/api_docs/cloud_experiments.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments
title: "cloudExperiments"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloudExperiments plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments']
---
import cloudExperimentsObj from './cloud_experiments.devdocs.json';
diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx
index 9c7112ee6e3ad..b3b220266009b 100644
--- a/api_docs/cloud_security_posture.mdx
+++ b/api_docs/cloud_security_posture.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture
title: "cloudSecurityPosture"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloudSecurityPosture plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture']
---
import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json';
diff --git a/api_docs/console.mdx b/api_docs/console.mdx
index a673eebc1e1c6..ac8e3d27f519b 100644
--- a/api_docs/console.mdx
+++ b/api_docs/console.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console
title: "console"
image: https://source.unsplash.com/400x175/?github
description: API docs for the console plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console']
---
import consoleObj from './console.devdocs.json';
diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx
index 849d5fc71f968..79cb9a68aae5d 100644
--- a/api_docs/controls.mdx
+++ b/api_docs/controls.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls
title: "controls"
image: https://source.unsplash.com/400x175/?github
description: API docs for the controls plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls']
---
import controlsObj from './controls.devdocs.json';
diff --git a/api_docs/core.devdocs.json b/api_docs/core.devdocs.json
index 08008a2bfe5c5..dc8c7cd70e377 100644
--- a/api_docs/core.devdocs.json
+++ b/api_docs/core.devdocs.json
@@ -584,6 +584,10 @@
"plugin": "@kbn/core-analytics-server-internal",
"path": "packages/core/analytics/core-analytics-server-internal/src/analytics_service.ts"
},
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.ts"
+ },
{
"plugin": "@kbn/core-status-server-internal",
"path": "packages/core/status/core-status-server-internal/src/status_service.ts"
@@ -620,6 +624,30 @@
"plugin": "@kbn/core-analytics-browser-mocks",
"path": "packages/core/analytics/core-analytics-browser-mocks/src/analytics_service.mock.ts"
},
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
{
"plugin": "@kbn/core-analytics-browser-mocks",
"path": "packages/core/analytics/core-analytics-browser-mocks/src/analytics_service.mock.ts"
@@ -10361,7 +10389,7 @@
"\nThe outcome for a successful `resolve` call is one of the following values:\n\n * `'exactMatch'` -- One document exactly matched the given ID.\n * `'aliasMatch'` -- One document with a legacy URL alias matched the given ID; in this case the `saved_object.id` field is different\n than the given ID.\n * `'conflict'` -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the\n `saved_object` object is the exact match, and the `saved_object.id` field is the same as the given ID."
],
"signature": [
- "\"exactMatch\" | \"aliasMatch\" | \"conflict\""
+ "\"conflict\" | \"exactMatch\" | \"aliasMatch\""
],
"path": "node_modules/@types/kbn__core-saved-objects-api-browser/index.d.ts",
"deprecated": false,
@@ -10822,6 +10850,14 @@
"plugin": "visualizations",
"path": "src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx"
},
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts"
+ },
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts"
+ },
{
"plugin": "infra",
"path": "x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx"
@@ -11156,11 +11192,15 @@
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts"
+ "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts"
+ },
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts"
+ "path": "src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts"
},
{
"plugin": "dashboard",
@@ -11204,43 +11244,35 @@
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "ml",
@@ -11250,6 +11282,14 @@
"plugin": "ml",
"path": "x-pack/plugins/ml/common/types/modules.ts"
},
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/save_dashboard_state_to_saved_object.ts"
+ },
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/save_dashboard_state_to_saved_object.ts"
+ },
{
"plugin": "@kbn/core-saved-objects-server-internal",
"path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.test.ts"
@@ -15328,9 +15368,9 @@
"label": "SavedObjectsFindOptions",
"description": [],
"signature": [
- "{ type: string | string[]; filter?: any; search?: string | undefined; aggs?: Record | undefined; fields?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; searchFields?: string[] | undefined; hasReference?: ",
+ "> | undefined; page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; searchFields?: string[] | undefined; hasReference?: ",
"SavedObjectsFindOptionsReference",
" | ",
"SavedObjectsFindOptionsReference",
@@ -19295,6 +19335,10 @@
"plugin": "@kbn/core-analytics-server-internal",
"path": "packages/core/analytics/core-analytics-server-internal/src/analytics_service.ts"
},
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.ts"
+ },
{
"plugin": "@kbn/core-status-server-internal",
"path": "packages/core/status/core-status-server-internal/src/status_service.ts"
@@ -19331,6 +19375,30 @@
"plugin": "@kbn/core-analytics-browser-mocks",
"path": "packages/core/analytics/core-analytics-browser-mocks/src/analytics_service.mock.ts"
},
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
+ {
+ "plugin": "@kbn/core-root-browser-internal",
+ "path": "packages/core/root/core-root-browser-internal/src/core_system.test.ts"
+ },
{
"plugin": "@kbn/core-analytics-browser-mocks",
"path": "packages/core/analytics/core-analytics-browser-mocks/src/analytics_service.mock.ts"
@@ -21478,13 +21546,7 @@
"signature": [
"HttpServicePreboot",
"<",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
">"
],
"path": "src/core/server/index.ts",
@@ -21519,7 +21581,10 @@
"description": [
"\nThe `core` context provided to route handler.\n\nProvides the following clients and services:\n - {@link SavedObjectsClient | savedObjects.client} - Saved Objects client\n which uses the credentials of the incoming request\n - {@link ISavedObjectTypeRegistry | savedObjects.typeRegistry} - Type registry containing\n all the registered types.\n - {@link IScopedClusterClient | elasticsearch.client} - Elasticsearch\n data client which uses the credentials of the incoming request\n - {@link IUiSettingsClient | uiSettings.client} - uiSettings client\n which uses the credentials of the incoming request"
],
- "path": "src/core/server/core_route_handler_context.ts",
+ "signature": [
+ "CoreRequestHandlerContext"
+ ],
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -21533,7 +21598,7 @@
"signature": [
"SavedObjectsRequestHandlerContext"
],
- "path": "src/core/server/core_route_handler_context.ts",
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
"deprecated": false,
"trackAdoption": false
},
@@ -21547,7 +21612,7 @@
"signature": [
"ElasticsearchRequestHandlerContext"
],
- "path": "src/core/server/core_route_handler_context.ts",
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
"deprecated": false,
"trackAdoption": false
},
@@ -21561,7 +21626,7 @@
"signature": [
"UiSettingsRequestHandlerContext"
],
- "path": "src/core/server/core_route_handler_context.ts",
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
"deprecated": false,
"trackAdoption": false
},
@@ -21575,7 +21640,7 @@
"signature": [
"DeprecationsRequestHandlerContext"
],
- "path": "src/core/server/core_route_handler_context.ts",
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -21746,13 +21811,7 @@
"signature": [
"HttpServiceSetup",
"<",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
"> & { resources: ",
{
"pluginId": "core",
@@ -25894,21 +25953,9 @@
],
"signature": [
"(route: ",
"RouteConfig",
"
, handler: ",
@@ -29338,36 +29385,6 @@
],
"initialIsOpen": false
},
- {
- "parentPluginId": "core",
- "id": "def-server.IRenderOptions",
- "type": "Interface",
- "tags": [],
- "label": "IRenderOptions",
- "description": [],
- "path": "src/core/server/rendering/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "core",
- "id": "def-server.IRenderOptions.isAnonymousPage",
- "type": "CompoundType",
- "tags": [],
- "label": "isAnonymousPage",
- "description": [
- "\nSet whether the page is anonymous, which determines what plugins are enabled and whether to output user settings in the page metadata.\n`false` by default."
- ],
- "signature": [
- "boolean | undefined"
- ],
- "path": "src/core/server/rendering/types.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ],
- "initialIsOpen": false
- },
{
"parentPluginId": "core",
"id": "def-server.IRouter",
@@ -39364,6 +39381,37 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "core",
+ "id": "def-server.PrebootCoreRequestHandlerContext",
+ "type": "Interface",
+ "tags": [],
+ "label": "PrebootCoreRequestHandlerContext",
+ "description": [],
+ "signature": [
+ "PrebootCoreRequestHandlerContext"
+ ],
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "core",
+ "id": "def-server.PrebootCoreRequestHandlerContext.uiSettings",
+ "type": "Object",
+ "tags": [],
+ "label": "uiSettings",
+ "description": [],
+ "signature": [
+ "PrebootUiSettingsRequestHandlerContext"
+ ],
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "core",
"id": "def-server.PrebootPlugin",
@@ -39467,6 +39515,41 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "core",
+ "id": "def-server.PrebootRequestHandlerContext",
+ "type": "Interface",
+ "tags": [],
+ "label": "PrebootRequestHandlerContext",
+ "description": [],
+ "signature": [
+ "PrebootRequestHandlerContext",
+ " extends ",
+ "RequestHandlerContextBase"
+ ],
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "core",
+ "id": "def-server.PrebootRequestHandlerContext.core",
+ "type": "Object",
+ "tags": [],
+ "label": "core",
+ "description": [],
+ "signature": [
+ "Promise<",
+ "PrebootCoreRequestHandlerContext",
+ ">"
+ ],
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "core",
"id": "def-server.RegisterDeprecationsConfig",
@@ -39532,17 +39615,11 @@
"\nBase context passed to a route handler, containing the `core` context part.\n"
],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
" extends ",
"RequestHandlerContextBase"
],
- "path": "src/core/server/index.ts",
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -39555,16 +39632,10 @@
"description": [],
"signature": [
"Promise<",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.CoreRequestHandlerContext",
- "text": "CoreRequestHandlerContext"
- },
+ "CoreRequestHandlerContext",
">"
],
- "path": "src/core/server/index.ts",
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -40431,6 +40502,14 @@
"plugin": "visualizations",
"path": "src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx"
},
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts"
+ },
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts"
+ },
{
"plugin": "infra",
"path": "x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx"
@@ -40765,11 +40844,15 @@
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts"
+ "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts"
+ },
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts"
+ "path": "src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts"
},
{
"plugin": "dashboard",
@@ -40813,43 +40896,35 @@
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/common/saved_dashboard_references.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts"
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts"
},
{
"plugin": "ml",
@@ -40859,6 +40934,14 @@
"plugin": "ml",
"path": "x-pack/plugins/ml/common/types/modules.ts"
},
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/save_dashboard_state_to_saved_object.ts"
+ },
+ {
+ "plugin": "dashboard",
+ "path": "src/plugins/dashboard/public/services/dashboard_saved_object/lib/save_dashboard_state_to_saved_object.ts"
+ },
{
"plugin": "@kbn/core-saved-objects-server-internal",
"path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/legacy_import_export/lib/collect_references_deep.test.ts"
@@ -45678,11 +45761,11 @@
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/server/saved_objects/migrations_730.ts"
+ "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts"
},
{
"plugin": "dashboard",
- "path": "src/plugins/dashboard/server/saved_objects/migrations_730.ts"
+ "path": "src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts"
},
{
"plugin": "@kbn/core-saved-objects-migration-server-internal",
@@ -46663,7 +46746,7 @@
"\nThe outcome for a successful `resolve` call is one of the following values:\n\n * `'exactMatch'` -- One document exactly matched the given ID.\n * `'aliasMatch'` -- One document with a legacy URL alias matched the given ID; in this case the `saved_object.id` field is different\n than the given ID.\n * `'conflict'` -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the\n `saved_object` object is the exact match, and the `saved_object.id` field is the same as the given ID."
],
"signature": [
- "\"exactMatch\" | \"aliasMatch\" | \"conflict\""
+ "\"conflict\" | \"exactMatch\" | \"aliasMatch\""
],
"path": "node_modules/@types/kbn__core-saved-objects-api-server/index.d.ts",
"deprecated": false,
@@ -50120,16 +50203,10 @@
"\nMixin allowing plugins to define their own request handler contexts.\n"
],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
" & { [Key in keyof T]: T[Key] extends Promise ? T[Key] : Promise; }"
],
- "path": "src/core/server/index.ts",
+ "path": "node_modules/@types/kbn__core-http-request-handler-context-server/index.d.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
@@ -53606,9 +53683,9 @@
"label": "SavedObjectsCreatePointInTimeFinderOptions",
"description": [],
"signature": [
- "{ type: string | string[]; filter?: any; search?: string | undefined; aggs?: Record | undefined; fields?: string[] | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ",
+ "> | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ",
"SortOrder",
" | undefined; searchFields?: string[] | undefined; rootSearchFields?: string[] | undefined; hasReference?: ",
"SavedObjectsFindOptionsReference",
diff --git a/api_docs/core.mdx b/api_docs/core.mdx
index d63230e7ed586..48204394f0a85 100644
--- a/api_docs/core.mdx
+++ b/api_docs/core.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/core
title: "core"
image: https://source.unsplash.com/400x175/?github
description: API docs for the core plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'core']
---
import coreObj from './core.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) for que
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 2684 | 0 | 35 | 0 |
+| 2686 | 0 | 29 | 0 |
## Client
diff --git a/api_docs/custom_integrations.devdocs.json b/api_docs/custom_integrations.devdocs.json
index 7a339106c7a6d..44611a9497dfc 100644
--- a/api_docs/custom_integrations.devdocs.json
+++ b/api_docs/custom_integrations.devdocs.json
@@ -298,7 +298,7 @@
"label": "languageClientsUiComponents",
"description": [],
"signature": [
- "Map>"
+ "{ [x: string]: React.FC<{}>; }"
],
"path": "src/plugins/custom_integrations/public/types.ts",
"deprecated": false,
@@ -438,7 +438,7 @@
"label": "categories",
"description": [],
"signature": [
- "(\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\")[]"
+ "(\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"infrastructure\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\")[]"
],
"path": "src/plugins/custom_integrations/common/index.ts",
"deprecated": false,
@@ -488,7 +488,7 @@
"\nA category applicable to an Integration."
],
"signature": [
- "\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\""
+ "\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"infrastructure\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\""
],
"path": "src/plugins/custom_integrations/common/index.ts",
"deprecated": false,
@@ -728,7 +728,7 @@
"label": "categories",
"description": [],
"signature": [
- "(\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\")[]"
+ "(\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"infrastructure\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\")[]"
],
"path": "src/plugins/custom_integrations/common/index.ts",
"deprecated": false,
@@ -838,7 +838,7 @@
"label": "id",
"description": [],
"signature": [
- "\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\""
+ "\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"infrastructure\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\""
],
"path": "src/plugins/custom_integrations/common/index.ts",
"deprecated": false,
@@ -860,7 +860,7 @@
"\nThe list of all available categories."
],
"signature": [
- "(\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\")[]"
+ "(\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"infrastructure\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\")[]"
],
"path": "src/plugins/custom_integrations/common/index.ts",
"deprecated": false,
@@ -877,7 +877,7 @@
"\nA category applicable to an Integration."
],
"signature": [
- "\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\""
+ "\"custom\" | \"enterprise_search\" | \"sample_data\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"infrastructure\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"microsoft_365\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\" | \"communications\" | \"file_storage\" | \"language_client\" | \"upload_file\" | \"website_search\" | \"geo\""
],
"path": "src/plugins/custom_integrations/common/index.ts",
"deprecated": false,
@@ -1097,6 +1097,17 @@
"deprecated": false,
"trackAdoption": false
},
+ {
+ "parentPluginId": "customIntegrations",
+ "id": "def-common.INTEGRATION_CATEGORY_DISPLAY.infrastructure",
+ "type": "string",
+ "tags": [],
+ "label": "infrastructure",
+ "description": [],
+ "path": "src/plugins/custom_integrations/common/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
{
"parentPluginId": "customIntegrations",
"id": "def-common.INTEGRATION_CATEGORY_DISPLAY.kubernetes",
diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx
index 7c8ab77b2d5ac..dc07d39503245 100644
--- a/api_docs/custom_integrations.mdx
+++ b/api_docs/custom_integrations.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations
title: "customIntegrations"
image: https://source.unsplash.com/400x175/?github
description: API docs for the customIntegrations plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations']
---
import customIntegrationsObj from './custom_integrations.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 103 | 0 | 84 | 1 |
+| 104 | 0 | 85 | 1 |
## Client
diff --git a/api_docs/dashboard.devdocs.json b/api_docs/dashboard.devdocs.json
index 447c0d0af07ee..c185507fd9101 100644
--- a/api_docs/dashboard.devdocs.json
+++ b/api_docs/dashboard.devdocs.json
@@ -1,33 +1,99 @@
{
"id": "dashboard",
"client": {
- "classes": [
+ "classes": [],
+ "functions": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer",
- "type": "Class",
+ "id": "def-public.cleanEmptyKeys",
+ "type": "Function",
"tags": [],
- "label": "DashboardContainer",
+ "label": "cleanEmptyKeys",
"description": [],
"signature": [
+ "(stateObj: Record) => Record"
+ ],
+ "path": "src/plugins/dashboard/public/locator.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainer",
- "text": "DashboardContainer"
- },
- " extends ",
+ "parentPluginId": "dashboard",
+ "id": "def-public.cleanEmptyKeys.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "stateObj",
+ "description": [],
+ "signature": [
+ "Record"
+ ],
+ "path": "src/plugins/dashboard/public/locator.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.createDashboardEditUrl",
+ "type": "Function",
+ "tags": [],
+ "label": "createDashboardEditUrl",
+ "description": [],
+ "signature": [
+ "(id: string | undefined, editMode: boolean | undefined) => string"
+ ],
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.Container",
- "text": "Container"
+ "parentPluginId": "dashboard",
+ "id": "def-public.createDashboardEditUrl.$1",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": false
},
- "<",
- "InheritedChildInput",
- ", ",
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.createDashboardEditUrl.$2",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "editMode",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": false
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardContainerInput",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardContainerInput",
+ "description": [],
+ "signature": [
{
"pluginId": "dashboard",
"scope": "public",
@@ -35,1674 +101,1479 @@
"section": "def-public.DashboardContainerInput",
"text": "DashboardContainerInput"
},
- ", ",
+ " extends ",
{
"pluginId": "embeddable",
"scope": "public",
"docId": "kibEmbeddablePluginApi",
- "section": "def-public.ContainerOutput",
- "text": "ContainerOutput"
+ "section": "def-public.ContainerInput",
+ "text": "ContainerInput"
},
- ">"
+ "<{}>"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.type",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "\"dashboard\""
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.controlGroup",
+ "id": "def-public.DashboardContainerInput.controlGroupInput",
"type": "Object",
"tags": [],
- "label": "controlGroup",
+ "label": "controlGroupInput",
"description": [],
"signature": [
{
"pluginId": "controls",
- "scope": "public",
+ "scope": "common",
"docId": "kibControlsPluginApi",
- "section": "def-public.ControlGroupContainer",
- "text": "ControlGroupContainer"
+ "section": "def-common.PersistableControlGroupInput",
+ "text": "PersistableControlGroupInput"
},
" | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.getAllDataViews",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.refreshConfig",
+ "type": "Object",
"tags": [],
- "label": "getAllDataViews",
- "description": [
- "\nGets all the dataviews that are actively being used in the dashboard"
- ],
+ "label": "refreshConfig",
+ "description": [],
"signature": [
- "() => ",
{
- "pluginId": "dataViews",
+ "pluginId": "data",
"scope": "common",
- "docId": "kibDataViewsPluginApi",
- "section": "def-common.DataView",
- "text": "DataView"
+ "docId": "kibDataQueryPluginApi",
+ "section": "def-common.RefreshInterval",
+ "text": "RefreshInterval"
},
- "[]"
+ " | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": [
- "An array of dataviews"
- ]
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.setAllDataViews",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.isEmbeddedExternally",
+ "type": "CompoundType",
"tags": [],
- "label": "setAllDataViews",
- "description": [
- "\nUse this to set the dataviews that are used in the dashboard when they change/update"
- ],
+ "label": "isEmbeddedExternally",
+ "description": [],
"signature": [
- "(newDataViews: ",
- {
- "pluginId": "dataViews",
- "scope": "common",
- "docId": "kibDataViewsPluginApi",
- "section": "def-common.DataView",
- "text": "DataView"
- },
- "[]) => void"
+ "boolean | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.setAllDataViews.$1",
- "type": "Array",
- "tags": [],
- "label": "newDataViews",
- "description": [
- "The new array of dataviews that will overwrite the old dataviews array"
- ],
- "signature": [
- {
- "pluginId": "dataViews",
- "scope": "common",
- "docId": "kibDataViewsPluginApi",
- "section": "def-common.DataView",
- "text": "DataView"
- },
- "[]"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.getPanelCount",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.isFullScreenMode",
+ "type": "boolean",
"tags": [],
- "label": "getPanelCount",
+ "label": "isFullScreenMode",
"description": [],
- "signature": [
- "() => number"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.getPanelTitles",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.expandedPanelId",
+ "type": "string",
"tags": [],
- "label": "getPanelTitles",
+ "label": "expandedPanelId",
"description": [],
"signature": [
- "() => Promise"
+ "string | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.Unnamed",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.timeRange",
+ "type": "Object",
"tags": [],
- "label": "Constructor",
+ "label": "timeRange",
"description": [],
"signature": [
- "any"
+ "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.Unnamed.$1",
- "type": "Object",
- "tags": [],
- "label": "initialInput",
- "description": [],
- "signature": [
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainerInput",
- "text": "DashboardContainerInput"
- }
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.Unnamed.$2",
- "type": "Object",
- "tags": [],
- "label": "parent",
- "description": [],
- "signature": [
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.Container",
- "text": "Container"
- },
- "<{}, ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.ContainerInput",
- "text": "ContainerInput"
- },
- "<{}>, ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.ContainerOutput",
- "text": "ContainerOutput"
- },
- "> | undefined"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.Unnamed.$3",
- "type": "CompoundType",
- "tags": [],
- "label": "controlGroup",
- "description": [],
- "signature": [
- {
- "pluginId": "controls",
- "scope": "public",
- "docId": "kibControlsPluginApi",
- "section": "def-public.ControlGroupContainer",
- "text": "ControlGroupContainer"
- },
- " | ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.ErrorEmbeddable",
- "text": "ErrorEmbeddable"
- },
- " | undefined"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- }
- ],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.createNewPanelState",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.timeslice",
+ "type": "Object",
"tags": [],
- "label": "createNewPanelState",
+ "label": "timeslice",
"description": [],
"signature": [
- ">(factory: ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.EmbeddableFactory",
- "text": "EmbeddableFactory"
- },
- ", partial?: Partial) => ",
- "DashboardPanelState",
- ""
+ "[number, number] | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.createNewPanelState.$1",
- "type": "Object",
- "tags": [],
- "label": "factory",
- "description": [],
- "signature": [
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.EmbeddableFactory",
- "text": "EmbeddableFactory"
- },
- ""
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.createNewPanelState.$2",
- "type": "Object",
- "tags": [],
- "label": "partial",
- "description": [],
- "signature": [
- "Partial"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.showPlaceholderUntil",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.timeRestore",
+ "type": "boolean",
"tags": [],
- "label": "showPlaceholderUntil",
+ "label": "timeRestore",
"description": [],
- "signature": [
- "(newStateComplete: Promise>>, placementMethod?: ",
- "PanelPlacementMethod",
- " | undefined, placementArgs?: TPlacementMethodArgs | undefined) => void"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.showPlaceholderUntil.$1",
- "type": "Object",
- "tags": [],
- "label": "newStateComplete",
- "description": [],
- "signature": [
- "Promise>>"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.showPlaceholderUntil.$2",
- "type": "Function",
- "tags": [],
- "label": "placementMethod",
- "description": [],
- "signature": [
- "PanelPlacementMethod",
- " | undefined"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.showPlaceholderUntil.$3",
- "type": "Uncategorized",
- "tags": [],
- "label": "placementArgs",
- "description": [],
- "signature": [
- "TPlacementMethodArgs | undefined"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- }
- ],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.replacePanel",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.description",
+ "type": "string",
"tags": [],
- "label": "replacePanel",
+ "label": "description",
"description": [],
"signature": [
- "(previousPanelState: ",
- "DashboardPanelState",
- "<",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableInput",
- "text": "EmbeddableInput"
- },
- ">, newPanelState: Partial<",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.PanelState",
- "text": "PanelState"
- },
- "<{ id: string; }>>, generateNewId?: boolean | undefined) => void"
+ "string | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.replacePanel.$1",
- "type": "Object",
- "tags": [],
- "label": "previousPanelState",
- "description": [],
- "signature": [
- "DashboardPanelState",
- "<",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableInput",
- "text": "EmbeddableInput"
- },
- ">"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.replacePanel.$2",
- "type": "Object",
- "tags": [],
- "label": "newPanelState",
- "description": [],
- "signature": [
- "Partial<",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.PanelState",
- "text": "PanelState"
- },
- "<{ id: string; }>>"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.replacePanel.$3",
- "type": "CompoundType",
- "tags": [],
- "label": "generateNewId",
- "description": [],
- "signature": [
- "boolean | undefined"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- }
- ],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.addOrUpdateEmbeddable",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.useMargins",
+ "type": "boolean",
"tags": [],
- "label": "addOrUpdateEmbeddable",
+ "label": "useMargins",
"description": [],
- "signature": [
- " = ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.IEmbeddable",
- "text": "IEmbeddable"
- },
- ">(type: string, explicitInput: Partial, embeddableId?: string | undefined) => Promise"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.addOrUpdateEmbeddable.$1",
- "type": "string",
- "tags": [],
- "label": "type",
- "description": [],
- "signature": [
- "string"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.addOrUpdateEmbeddable.$2",
- "type": "Object",
- "tags": [],
- "label": "explicitInput",
- "description": [],
- "signature": [
- "Partial"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.addOrUpdateEmbeddable.$3",
- "type": "string",
- "tags": [],
- "label": "embeddableId",
- "description": [],
- "signature": [
- "string | undefined"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- }
- ],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.render",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.syncColors",
+ "type": "CompoundType",
"tags": [],
- "label": "render",
+ "label": "syncColors",
"description": [],
"signature": [
- "(dom: HTMLElement) => void"
+ "boolean | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.render.$1",
- "type": "Object",
- "tags": [],
- "label": "dom",
- "description": [],
- "signature": [
- "HTMLElement"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.destroy",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.syncTooltips",
+ "type": "CompoundType",
"tags": [],
- "label": "destroy",
+ "label": "syncTooltips",
"description": [],
"signature": [
- "() => void"
+ "boolean | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.getInheritedInput",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.viewMode",
+ "type": "Enum",
"tags": [],
- "label": "getInheritedInput",
+ "label": "viewMode",
"description": [],
"signature": [
- "(id: string) => ",
- "InheritedChildInput"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
{
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainer.getInheritedInput.$1",
- "type": "string",
- "tags": [],
- "label": "id",
- "description": [],
- "signature": [
- "string"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.ViewMode",
+ "text": "ViewMode"
}
],
- "returnComment": []
- }
- ],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition",
- "type": "Class",
- "tags": [],
- "label": "DashboardContainerFactoryDefinition",
- "description": [],
- "signature": [
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainerFactoryDefinition",
- "text": "DashboardContainerFactoryDefinition"
- },
- " implements ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.EmbeddableFactoryDefinition",
- "text": "EmbeddableFactoryDefinition"
- },
- "<",
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainerInput",
- "text": "DashboardContainerInput"
- },
- ", ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.ContainerOutput",
- "text": "ContainerOutput"
- },
- ", ",
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainer",
- "text": "DashboardContainer"
+ "path": "src/plugins/dashboard/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
},
- ", unknown>"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.isContainerType",
- "type": "boolean",
+ "id": "def-public.DashboardContainerInput.filters",
+ "type": "Array",
"tags": [],
- "label": "isContainerType",
+ "label": "filters",
"description": [],
"signature": [
- "true"
+ "Filter",
+ "[]"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.type",
+ "id": "def-public.DashboardContainerInput.title",
"type": "string",
"tags": [],
- "label": "type",
+ "label": "title",
"description": [],
- "signature": [
- "\"dashboard\""
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.inject",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.query",
+ "type": "Object",
"tags": [],
- "label": "inject",
+ "label": "query",
"description": [],
"signature": [
- "(state: ",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableStateWithType",
- "text": "EmbeddableStateWithType"
- },
- ", references: ",
- "SavedObjectReference",
- "[]) => ",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableStateWithType",
- "text": "EmbeddableStateWithType"
- }
+ "{ query: string | { [key: string]: any; }; language: string; }"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.inject.$1",
- "type": "Uncategorized",
- "tags": [],
- "label": "state",
- "description": [],
- "signature": [
- "P"
- ],
- "path": "src/plugins/kibana_utils/common/persistable_state/types.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.inject.$2",
- "type": "Array",
- "tags": [],
- "label": "references",
- "description": [],
- "signature": [
- "SavedObjectReference",
- "[]"
- ],
- "path": "src/plugins/kibana_utils/common/persistable_state/types.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.extract",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.panels",
+ "type": "Object",
"tags": [],
- "label": "extract",
+ "label": "panels",
"description": [],
"signature": [
- "(state: ",
+ "{ [panelId: string]: ",
{
- "pluginId": "embeddable",
+ "pluginId": "dashboard",
"scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableStateWithType",
- "text": "EmbeddableStateWithType"
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelState",
+ "text": "DashboardPanelState"
},
- ") => { state: ",
+ "<",
{
"pluginId": "embeddable",
"scope": "common",
"docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableStateWithType",
- "text": "EmbeddableStateWithType"
+ "section": "def-common.EmbeddableInput",
+ "text": "EmbeddableInput"
},
- "; references: ",
- "SavedObjectReference",
- "[]; }"
+ " & { [k: string]: unknown; }>; }"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.extract.$1",
- "type": "Uncategorized",
- "tags": [],
- "label": "state",
- "description": [],
- "signature": [
- "P"
- ],
- "path": "src/plugins/kibana_utils/common/persistable_state/types.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.Unnamed",
- "type": "Function",
+ "id": "def-public.DashboardContainerInput.executionContext",
+ "type": "Object",
"tags": [],
- "label": "Constructor",
+ "label": "executionContext",
"description": [],
"signature": [
- "any"
+ "KibanaExecutionContext",
+ " | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
+ "path": "src/plugins/dashboard/public/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.Unnamed.$1",
- "type": "Object",
- "tags": [],
- "label": "persistableStateService",
- "description": [],
- "signature": [
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddablePersistableStateService",
- "text": "EmbeddablePersistableStateService"
- }
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardFeatureFlagConfig",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardFeatureFlagConfig",
+ "description": [],
+ "path": "src/plugins/dashboard/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardFeatureFlagConfig.allowByValueEmbeddables",
+ "type": "boolean",
+ "tags": [],
+ "label": "allowByValueEmbeddables",
+ "description": [],
+ "path": "src/plugins/dashboard/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.SavedDashboardPanel",
+ "type": "Interface",
+ "tags": [],
+ "label": "SavedDashboardPanel",
+ "description": [
+ "\nA saved dashboard panel parsed directly from the Dashboard Attributes panels JSON"
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.SavedDashboardPanel.embeddableConfig",
+ "type": "Object",
+ "tags": [],
+ "label": "embeddableConfig",
+ "description": [],
+ "signature": [
+ "{ [key: string]: ",
+ "Serializable",
+ "; }"
],
- "returnComment": []
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.isEditable",
- "type": "Function",
+ "id": "def-public.SavedDashboardPanel.id",
+ "type": "string",
"tags": [],
- "label": "isEditable",
+ "label": "id",
"description": [],
"signature": [
- "() => Promise"
+ "string | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.SavedDashboardPanel.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.getDisplayName",
- "type": "Function",
+ "id": "def-public.SavedDashboardPanel.panelRefName",
+ "type": "string",
"tags": [],
- "label": "getDisplayName",
+ "label": "panelRefName",
"description": [],
"signature": [
- "() => string"
+ "string | undefined"
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.getDefaultInput",
- "type": "Function",
+ "id": "def-public.SavedDashboardPanel.gridData",
+ "type": "Object",
"tags": [],
- "label": "getDefaultInput",
+ "label": "gridData",
"description": [],
"signature": [
- "() => Partial<",
{
"pluginId": "dashboard",
- "scope": "public",
+ "scope": "common",
"docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainerInput",
- "text": "DashboardContainerInput"
- },
- ">"
+ "section": "def-common.GridData",
+ "text": "GridData"
+ }
],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.create",
- "type": "Function",
+ "id": "def-public.SavedDashboardPanel.panelIndex",
+ "type": "string",
"tags": [],
- "label": "create",
+ "label": "panelIndex",
"description": [],
- "signature": [
- "(initialInput: ",
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainerInput",
- "text": "DashboardContainerInput"
- },
- ", parent?: ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.Container",
- "text": "Container"
- },
- "<{}, ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.ContainerInput",
- "text": "ContainerInput"
- },
- "<{}>, ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.ContainerOutput",
- "text": "ContainerOutput"
- },
- "> | undefined) => Promise<",
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainer",
- "text": "DashboardContainer"
- },
- " | ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.ErrorEmbeddable",
- "text": "ErrorEmbeddable"
- },
- ">"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.create.$1",
- "type": "Object",
- "tags": [],
- "label": "initialInput",
- "description": [],
- "signature": [
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainerInput",
- "text": "DashboardContainerInput"
- }
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerFactoryDefinition.create.$2",
- "type": "Object",
- "tags": [],
- "label": "parent",
- "description": [],
- "signature": [
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.Container",
- "text": "Container"
- },
- "<{}, ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.ContainerInput",
- "text": "ContainerInput"
- },
- "<{}>, ",
- {
- "pluginId": "embeddable",
- "scope": "public",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-public.ContainerOutput",
- "text": "ContainerOutput"
- },
- "> | undefined"
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- }
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.SavedDashboardPanel.version",
+ "type": "string",
+ "tags": [],
+ "label": "version",
+ "description": [],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.SavedDashboardPanel.title",
+ "type": "string",
+ "tags": [],
+ "label": "title",
+ "description": [],
+ "signature": [
+ "string | undefined"
],
- "returnComment": []
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
}
],
"initialIsOpen": false
}
],
- "functions": [
+ "enums": [],
+ "misc": [
{
"parentPluginId": "dashboard",
- "id": "def-public.cleanEmptyKeys",
- "type": "Function",
+ "id": "def-public.DASHBOARD_CONTAINER_TYPE",
+ "type": "string",
"tags": [],
- "label": "cleanEmptyKeys",
+ "label": "DASHBOARD_CONTAINER_TYPE",
"description": [],
"signature": [
- "(stateObj: Record) => Record"
+ "\"dashboard\""
],
- "path": "src/plugins/dashboard/public/locator.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.cleanEmptyKeys.$1",
- "type": "Object",
- "tags": [],
- "label": "stateObj",
- "description": [],
- "signature": [
- "Record"
- ],
- "path": "src/plugins/dashboard/public/locator.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.createDashboardEditUrl",
- "type": "Function",
+ "id": "def-public.DashboardAppLocator",
+ "type": "Type",
"tags": [],
- "label": "createDashboardEditUrl",
+ "label": "DashboardAppLocator",
"description": [],
"signature": [
- "(id: string | undefined, editMode: boolean | undefined) => string"
- ],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
{
- "parentPluginId": "dashboard",
- "id": "def-public.createDashboardEditUrl.$1",
- "type": "string",
- "tags": [],
- "label": "id",
- "description": [],
- "signature": [
- "string | undefined"
- ],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
+ "pluginId": "share",
+ "scope": "common",
+ "docId": "kibSharePluginApi",
+ "section": "def-common.LocatorPublic",
+ "text": "LocatorPublic"
},
+ "<",
{
- "parentPluginId": "dashboard",
- "id": "def-public.createDashboardEditUrl.$2",
- "type": "CompoundType",
- "tags": [],
- "label": "editMode",
- "description": [],
- "signature": [
- "boolean | undefined"
- ],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- }
+ "pluginId": "dashboard",
+ "scope": "public",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-public.DashboardAppLocatorParams",
+ "text": "DashboardAppLocatorParams"
+ },
+ ">"
],
- "returnComment": [],
+ "path": "src/plugins/dashboard/public/locator.ts",
+ "deprecated": false,
+ "trackAdoption": false,
"initialIsOpen": false
- }
- ],
- "interfaces": [
+ },
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput",
- "type": "Interface",
+ "id": "def-public.DashboardAppLocatorParams",
+ "type": "Type",
"tags": [],
- "label": "DashboardContainerInput",
- "description": [],
+ "label": "DashboardAppLocatorParams",
+ "description": [
+ "\nWe use `type` instead of `interface` to avoid having to extend this type with\n`SerializableRecord`. See https://github.com/microsoft/TypeScript/issues/15300."
+ ],
"signature": [
+ "{ dashboardId?: string | undefined; timeRange?: ",
+ "TimeRange",
+ " | undefined; refreshInterval?: ",
{
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardContainerInput",
- "text": "DashboardContainerInput"
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataQueryPluginApi",
+ "section": "def-common.RefreshInterval",
+ "text": "RefreshInterval"
},
- " extends ",
+ " | undefined; filters?: ",
+ "Filter",
+ "[] | undefined; query?: ",
+ "Query",
+ " | undefined; useHash?: boolean | undefined; preserveSavedFilters?: boolean | undefined; viewMode?: ",
{
"pluginId": "embeddable",
- "scope": "public",
+ "scope": "common",
"docId": "kibEmbeddablePluginApi",
- "section": "def-public.ContainerInput",
- "text": "ContainerInput"
+ "section": "def-common.ViewMode",
+ "text": "ViewMode"
},
- "<{}>"
+ " | undefined; searchSessionId?: string | undefined; panels?: (",
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.SavedDashboardPanel",
+ "text": "SavedDashboardPanel"
+ },
+ " & ",
+ "SerializableRecord",
+ ")[] | undefined; savedQuery?: string | undefined; tags?: string[] | undefined; options?: ",
+ "DashboardOptions",
+ " | undefined; controlGroupInput?: ",
+ {
+ "pluginId": "controls",
+ "scope": "common",
+ "docId": "kibControlsPluginApi",
+ "section": "def-common.SerializableControlGroupInput",
+ "text": "SerializableControlGroupInput"
+ },
+ " | undefined; }"
],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/locator.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardConstants",
+ "type": "Object",
+ "tags": [],
+ "label": "DashboardConstants",
+ "description": [],
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.controlGroupInput",
- "type": "Object",
+ "id": "def-public.DashboardConstants.LANDING_PAGE_PATH",
+ "type": "string",
"tags": [],
- "label": "controlGroupInput",
+ "label": "LANDING_PAGE_PATH",
"description": [],
- "signature": [
- {
- "pluginId": "controls",
- "scope": "common",
- "docId": "kibControlsPluginApi",
- "section": "def-common.PersistableControlGroupInput",
- "text": "PersistableControlGroupInput"
- },
- " | undefined"
- ],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.refreshConfig",
- "type": "Object",
+ "id": "def-public.DashboardConstants.CREATE_NEW_DASHBOARD_URL",
+ "type": "string",
"tags": [],
- "label": "refreshConfig",
+ "label": "CREATE_NEW_DASHBOARD_URL",
"description": [],
- "signature": [
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataQueryPluginApi",
- "section": "def-common.RefreshInterval",
- "text": "RefreshInterval"
- },
- " | undefined"
- ],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.isEmbeddedExternally",
- "type": "CompoundType",
+ "id": "def-public.DashboardConstants.VIEW_DASHBOARD_URL",
+ "type": "string",
"tags": [],
- "label": "isEmbeddedExternally",
+ "label": "VIEW_DASHBOARD_URL",
"description": [],
- "signature": [
- "boolean | undefined"
- ],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.isFullScreenMode",
- "type": "boolean",
+ "id": "def-public.DashboardConstants.PRINT_DASHBOARD_URL",
+ "type": "string",
"tags": [],
- "label": "isFullScreenMode",
+ "label": "PRINT_DASHBOARD_URL",
"description": [],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.expandedPanelId",
+ "id": "def-public.DashboardConstants.ADD_EMBEDDABLE_ID",
"type": "string",
"tags": [],
- "label": "expandedPanelId",
+ "label": "ADD_EMBEDDABLE_ID",
"description": [],
- "signature": [
- "string | undefined"
- ],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.timeRange",
- "type": "Object",
+ "id": "def-public.DashboardConstants.ADD_EMBEDDABLE_TYPE",
+ "type": "string",
"tags": [],
- "label": "timeRange",
+ "label": "ADD_EMBEDDABLE_TYPE",
"description": [],
- "signature": [
- "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }"
- ],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.timeslice",
- "type": "Object",
+ "id": "def-public.DashboardConstants.DASHBOARDS_ID",
+ "type": "string",
"tags": [],
- "label": "timeslice",
+ "label": "DASHBOARDS_ID",
"description": [],
- "signature": [
- "[number, number] | undefined"
- ],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.timeRestore",
- "type": "boolean",
+ "id": "def-public.DashboardConstants.DASHBOARD_ID",
+ "type": "string",
"tags": [],
- "label": "timeRestore",
+ "label": "DASHBOARD_ID",
"description": [],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.description",
+ "id": "def-public.DashboardConstants.DASHBOARD_SAVED_OBJECT_TYPE",
"type": "string",
"tags": [],
- "label": "description",
+ "label": "DASHBOARD_SAVED_OBJECT_TYPE",
"description": [],
- "signature": [
- "string | undefined"
- ],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.useMargins",
- "type": "boolean",
+ "id": "def-public.DashboardConstants.SEARCH_SESSION_ID",
+ "type": "string",
"tags": [],
- "label": "useMargins",
+ "label": "SEARCH_SESSION_ID",
"description": [],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.syncColors",
- "type": "CompoundType",
+ "id": "def-public.DashboardConstants.CHANGE_CHECK_DEBOUNCE",
+ "type": "number",
"tags": [],
- "label": "syncColors",
+ "label": "CHANGE_CHECK_DEBOUNCE",
"description": [],
- "signature": [
- "boolean | undefined"
- ],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.syncTooltips",
- "type": "CompoundType",
+ "id": "def-public.DashboardConstants.CHANGE_APPLY_DEBOUNCE",
+ "type": "number",
"tags": [],
- "label": "syncTooltips",
+ "label": "CHANGE_APPLY_DEBOUNCE",
"description": [],
- "signature": [
- "boolean | undefined"
- ],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/public/dashboard_constants.ts",
"deprecated": false,
"trackAdoption": false
- },
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "setup": {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardSetup",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardSetup",
+ "description": [],
+ "path": "src/plugins/dashboard/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardSetup.locator",
+ "type": "Object",
+ "tags": [],
+ "label": "locator",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "dashboard",
+ "scope": "public",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-public.DashboardAppLocator",
+ "text": "DashboardAppLocator"
+ },
+ " | undefined"
+ ],
+ "path": "src/plugins/dashboard/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "lifecycle": "setup",
+ "initialIsOpen": true
+ },
+ "start": {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardStart",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardStart",
+ "description": [],
+ "path": "src/plugins/dashboard/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardStart.getDashboardContainerByValueRenderer",
+ "type": "Function",
+ "tags": [],
+ "label": "getDashboardContainerByValueRenderer",
+ "description": [],
+ "signature": [
+ "() => React.FC"
+ ],
+ "path": "src/plugins/dashboard/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardStart.locator",
+ "type": "Object",
+ "tags": [],
+ "label": "locator",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "dashboard",
+ "scope": "public",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-public.DashboardAppLocator",
+ "text": "DashboardAppLocator"
+ },
+ " | undefined"
+ ],
+ "path": "src/plugins/dashboard/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-public.DashboardStart.dashboardFeatureFlagConfig",
+ "type": "Object",
+ "tags": [],
+ "label": "dashboardFeatureFlagConfig",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "dashboard",
+ "scope": "public",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-public.DashboardFeatureFlagConfig",
+ "text": "DashboardFeatureFlagConfig"
+ }
+ ],
+ "path": "src/plugins/dashboard/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "lifecycle": "start",
+ "initialIsOpen": true
+ }
+ },
+ "server": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-server.findByValueEmbeddables",
+ "type": "Function",
+ "tags": [],
+ "label": "findByValueEmbeddables",
+ "description": [],
+ "signature": [
+ "(savedObjectClient: Pick<",
+ "ISavedObjectsRepository",
+ ", \"find\">, embeddableType: string) => Promise<{ [key: string]: ",
+ "Serializable",
+ "; }[]>"
+ ],
+ "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.viewMode",
- "type": "Enum",
+ "id": "def-server.findByValueEmbeddables.$1",
+ "type": "Object",
"tags": [],
- "label": "viewMode",
+ "label": "savedObjectClient",
"description": [],
"signature": [
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.ViewMode",
- "text": "ViewMode"
- }
+ "Pick<",
+ "ISavedObjectsRepository",
+ ", \"find\">"
],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "isRequired": true
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.filters",
- "type": "Array",
+ "id": "def-server.findByValueEmbeddables.$2",
+ "type": "string",
"tags": [],
- "label": "filters",
+ "label": "embeddableType",
"description": [],
"signature": [
- "Filter",
- "[]"
+ "string"
],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": [],
+ "setup": {
+ "parentPluginId": "dashboard",
+ "id": "def-server.DashboardPluginSetup",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardPluginSetup",
+ "description": [],
+ "path": "src/plugins/dashboard/server/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "lifecycle": "setup",
+ "initialIsOpen": true
+ },
+ "start": {
+ "parentPluginId": "dashboard",
+ "id": "def-server.DashboardPluginStart",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardPluginStart",
+ "description": [],
+ "path": "src/plugins/dashboard/server/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "lifecycle": "start",
+ "initialIsOpen": true
+ }
+ },
+ "common": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.convertPanelMapToSavedPanels",
+ "type": "Function",
+ "tags": [],
+ "label": "convertPanelMapToSavedPanels",
+ "description": [],
+ "signature": [
+ "(panels: ",
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelMap",
+ "text": "DashboardPanelMap"
+ },
+ ", version: string) => ",
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.SavedDashboardPanel",
+ "text": "SavedDashboardPanel"
},
+ "[]"
+ ],
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.title",
- "type": "string",
+ "id": "def-common.convertPanelMapToSavedPanels.$1",
+ "type": "Object",
"tags": [],
- "label": "title",
+ "label": "panels",
"description": [],
- "path": "src/plugins/dashboard/public/types.ts",
+ "signature": [
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelMap",
+ "text": "DashboardPanelMap"
+ }
+ ],
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "isRequired": true
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.query",
- "type": "Object",
+ "id": "def-common.convertPanelMapToSavedPanels.$2",
+ "type": "string",
"tags": [],
- "label": "query",
+ "label": "version",
"description": [],
"signature": [
- "{ query: string | { [key: string]: any; }; language: string; }"
+ "string"
],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.convertPanelStateToSavedDashboardPanel",
+ "type": "Function",
+ "tags": [],
+ "label": "convertPanelStateToSavedDashboardPanel",
+ "description": [],
+ "signature": [
+ "(panelState: ",
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelState",
+ "text": "DashboardPanelState"
+ },
+ "<",
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.SavedObjectEmbeddableInput",
+ "text": "SavedObjectEmbeddableInput"
},
+ ">, version: string) => ",
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.SavedDashboardPanel",
+ "text": "SavedDashboardPanel"
+ }
+ ],
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.panels",
+ "id": "def-common.convertPanelStateToSavedDashboardPanel.$1",
"type": "Object",
"tags": [],
- "label": "panels",
+ "label": "panelState",
"description": [],
"signature": [
- "{ [panelId: string]: ",
- "DashboardPanelState",
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelState",
+ "text": "DashboardPanelState"
+ },
"<",
{
"pluginId": "embeddable",
"scope": "common",
"docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableInput",
- "text": "EmbeddableInput"
+ "section": "def-common.SavedObjectEmbeddableInput",
+ "text": "SavedObjectEmbeddableInput"
},
- " & { [k: string]: unknown; }>; }"
+ ">"
],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "isRequired": true
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardContainerInput.executionContext",
- "type": "Object",
+ "id": "def-common.convertPanelStateToSavedDashboardPanel.$2",
+ "type": "string",
"tags": [],
- "label": "executionContext",
+ "label": "version",
"description": [],
"signature": [
- "KibanaExecutionContext",
- " | undefined"
+ "string"
],
- "path": "src/plugins/dashboard/public/types.ts",
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "isRequired": true
}
],
+ "returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardFeatureFlagConfig",
- "type": "Interface",
+ "id": "def-common.convertSavedDashboardPanelToPanelState",
+ "type": "Function",
"tags": [],
- "label": "DashboardFeatureFlagConfig",
+ "label": "convertSavedDashboardPanelToPanelState",
"description": [],
- "path": "src/plugins/dashboard/public/plugin.tsx",
+ "signature": [
+ "(savedDashboardPanel: ",
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.SavedDashboardPanel",
+ "text": "SavedDashboardPanel"
+ },
+ ") => ",
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelState",
+ "text": "DashboardPanelState"
+ },
+ ""
+ ],
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardFeatureFlagConfig.allowByValueEmbeddables",
- "type": "boolean",
+ "id": "def-common.convertSavedDashboardPanelToPanelState.$1",
+ "type": "Object",
"tags": [],
- "label": "allowByValueEmbeddables",
+ "label": "savedDashboardPanel",
"description": [],
- "path": "src/plugins/dashboard/public/plugin.tsx",
+ "signature": [
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.SavedDashboardPanel",
+ "text": "SavedDashboardPanel"
+ }
+ ],
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "isRequired": true
}
],
+ "returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject",
- "type": "Interface",
+ "id": "def-common.convertSavedPanelsToPanelMap",
+ "type": "Function",
"tags": [],
- "label": "DashboardSavedObject",
+ "label": "convertSavedPanelsToPanelMap",
"description": [],
"signature": [
+ "(panels?: ",
{
"pluginId": "dashboard",
- "scope": "public",
+ "scope": "common",
"docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardSavedObject",
- "text": "DashboardSavedObject"
+ "section": "def-common.SavedDashboardPanel",
+ "text": "SavedDashboardPanel"
},
- " extends ",
+ "[] | undefined) => ",
{
- "pluginId": "savedObjects",
- "scope": "public",
- "docId": "kibSavedObjectsPluginApi",
- "section": "def-public.SavedObject",
- "text": "SavedObject"
- },
- "<",
- "SavedObjectAttributes",
- ">"
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelMap",
+ "text": "DashboardPanelMap"
+ }
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.id",
- "type": "string",
+ "id": "def-common.convertSavedPanelsToPanelMap.$1",
+ "type": "Array",
"tags": [],
- "label": "id",
+ "label": "panels",
"description": [],
"signature": [
- "string | undefined"
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.SavedDashboardPanel",
+ "text": "SavedDashboardPanel"
+ },
+ "[] | undefined"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/lib/dashboard_panel_converters.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "isRequired": false
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.createExtract",
+ "type": "Function",
+ "tags": [],
+ "label": "createExtract",
+ "description": [],
+ "signature": [
+ "(persistableStateService: ",
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddablePersistableStateService",
+ "text": "EmbeddablePersistableStateService"
},
+ ") => (state: ",
{
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.timeRestore",
- "type": "boolean",
- "tags": [],
- "label": "timeRestore",
- "description": [],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
- "deprecated": false,
- "trackAdoption": false
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddableStateWithType",
+ "text": "EmbeddableStateWithType"
+ },
+ ") => { state: ",
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddableStateWithType",
+ "text": "EmbeddableStateWithType"
},
+ "; references: ",
+ "SavedObjectReference",
+ "[]; }"
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.timeTo",
- "type": "string",
+ "id": "def-common.createExtract.$1",
+ "type": "Object",
"tags": [],
- "label": "timeTo",
+ "label": "persistableStateService",
"description": [],
"signature": [
- "string | undefined"
- ],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
- "deprecated": false,
- "trackAdoption": false
- },
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddablePersistableStateService",
+ "text": "EmbeddablePersistableStateService"
+ }
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.createInject",
+ "type": "Function",
+ "tags": [],
+ "label": "createInject",
+ "description": [],
+ "signature": [
+ "(persistableStateService: ",
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddablePersistableStateService",
+ "text": "EmbeddablePersistableStateService"
+ },
+ ") => (state: ",
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddableStateWithType",
+ "text": "EmbeddableStateWithType"
+ },
+ ", references: ",
+ "SavedObjectReference",
+ "[]) => ",
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddableStateWithType",
+ "text": "EmbeddableStateWithType"
+ }
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.timeFrom",
- "type": "string",
+ "id": "def-common.createInject.$1",
+ "type": "Object",
"tags": [],
- "label": "timeFrom",
+ "label": "persistableStateService",
"description": [],
"signature": [
- "string | undefined"
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddablePersistableStateService",
+ "text": "EmbeddablePersistableStateService"
+ }
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.extractReferences",
+ "type": "Function",
+ "tags": [],
+ "label": "extractReferences",
+ "description": [],
+ "signature": [
+ "({ attributes, references = [] }: SavedObjectAttributesAndReferences, deps: ",
+ "ExtractDeps",
+ ") => SavedObjectAttributesAndReferences"
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.extractReferences.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{ attributes, references = [] }",
+ "description": [],
+ "signature": [
+ "SavedObjectAttributesAndReferences"
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.extractReferences.$2",
+ "type": "Object",
+ "tags": [],
+ "label": "deps",
+ "description": [],
+ "signature": [
+ "ExtractDeps"
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.injectReferences",
+ "type": "Function",
+ "tags": [],
+ "label": "injectReferences",
+ "description": [],
+ "signature": [
+ "({ attributes, references = [] }: SavedObjectAttributesAndReferences, deps: ",
+ "InjectDeps",
+ ") => ",
+ "SavedObjectAttributes"
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.injectReferences.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{ attributes, references = [] }",
+ "description": [],
+ "signature": [
+ "SavedObjectAttributesAndReferences"
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.injectReferences.$2",
+ "type": "Object",
+ "tags": [],
+ "label": "deps",
+ "description": [],
+ "signature": [
+ "InjectDeps"
+ ],
+ "path": "src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardAttributes",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardAttributes",
+ "description": [
+ "\nThe attributes of the dashboard saved object. This interface should be the\nsource of truth for the latest dashboard attributes shape after all migrations."
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardAttributes.controlGroupInput",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "controlGroupInput",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "controls",
+ "scope": "common",
+ "docId": "kibControlsPluginApi",
+ "section": "def-common.RawControlGroupAttributes",
+ "text": "RawControlGroupAttributes"
+ },
+ " | undefined"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.description",
- "type": "string",
+ "id": "def-common.DashboardAttributes.refreshInterval",
+ "type": "Object",
"tags": [],
- "label": "description",
+ "label": "refreshInterval",
"description": [],
"signature": [
- "string | undefined"
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataQueryPluginApi",
+ "section": "def-common.RefreshInterval",
+ "text": "RefreshInterval"
+ },
+ " | undefined"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.panelsJSON",
- "type": "string",
+ "id": "def-common.DashboardAttributes.timeRestore",
+ "type": "boolean",
"tags": [],
- "label": "panelsJSON",
+ "label": "timeRestore",
"description": [],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.optionsJSON",
+ "id": "def-common.DashboardAttributes.optionsJSON",
"type": "string",
"tags": [],
"label": "optionsJSON",
@@ -1710,687 +1581,501 @@
"signature": [
"string | undefined"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardAttributes.useMargins",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "useMargins",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardAttributes.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardAttributes.panelsJSON",
+ "type": "string",
+ "tags": [],
+ "label": "panelsJSON",
+ "description": [],
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.uiStateJSON",
+ "id": "def-common.DashboardAttributes.timeFrom",
"type": "string",
"tags": [],
- "label": "uiStateJSON",
+ "label": "timeFrom",
"description": [],
"signature": [
"string | undefined"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.lastSavedTitle",
- "type": "string",
+ "id": "def-common.DashboardAttributes.version",
+ "type": "number",
"tags": [],
- "label": "lastSavedTitle",
+ "label": "version",
"description": [],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.refreshInterval",
- "type": "Object",
+ "id": "def-common.DashboardAttributes.timeTo",
+ "type": "string",
"tags": [],
- "label": "refreshInterval",
+ "label": "timeTo",
"description": [],
"signature": [
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataQueryPluginApi",
- "section": "def-common.RefreshInterval",
- "text": "RefreshInterval"
- },
- " | undefined"
+ "string | undefined"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardAttributes.title",
+ "type": "string",
+ "tags": [],
+ "label": "title",
+ "description": [],
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.searchSource",
+ "id": "def-common.DashboardAttributes.kibanaSavedObjectMeta",
"type": "Object",
"tags": [],
- "label": "searchSource",
+ "label": "kibanaSavedObjectMeta",
"description": [],
"signature": [
- "{ create: () => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSource",
- "text": "SearchSource"
- },
- "; history: ",
- "SearchRequest",
- "[]; setOverwriteDataViewType: (overwriteType: string | false | undefined) => void; setField: (field: K, value: ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSourceFields",
- "text": "SearchSourceFields"
- },
- "[K]) => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSource",
- "text": "SearchSource"
- },
- "; removeField: (field: K) => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSource",
- "text": "SearchSource"
- },
- "; setFields: (newFields: ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSourceFields",
- "text": "SearchSourceFields"
- },
- ") => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSource",
- "text": "SearchSource"
- },
- "; getId: () => string; getFields: () => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSourceFields",
- "text": "SearchSourceFields"
- },
- "; getField: (field: K, recurse?: boolean) => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSourceFields",
- "text": "SearchSourceFields"
- },
- "[K]; getActiveIndexFilter: () => string[]; getOwnField: (field: K) => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSourceFields",
- "text": "SearchSourceFields"
- },
- "[K]; createCopy: () => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSource",
- "text": "SearchSource"
- },
- "; createChild: (options?: {}) => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSource",
- "text": "SearchSource"
- },
- "; setParent: (parent?: ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.ISearchSource",
- "text": "ISearchSource"
- },
- " | undefined, options?: ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSourceOptions",
- "text": "SearchSourceOptions"
- },
- ") => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSource",
- "text": "SearchSource"
- },
- "; getParent: () => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSource",
- "text": "SearchSource"
- },
- " | undefined; fetch$: (options?: ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSourceSearchOptions",
- "text": "SearchSourceSearchOptions"
- },
- ") => ",
- "Observable",
- "<",
+ "{ searchSourceJSON: string; }"
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardContainerStateWithType",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardContainerStateWithType",
+ "description": [
+ "--------------------------------------------------------------------\nDashboard container types\n -----------------------------------------------------------------------\n\nTypes below this line are copied here because so many important types are tied up in public. These types should be\nmoved from public into common."
+ ],
+ "signature": [
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardContainerStateWithType",
+ "text": "DashboardContainerStateWithType"
+ },
+ " extends ",
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddableStateWithType",
+ "text": "EmbeddableStateWithType"
+ }
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardContainerStateWithType.panels",
+ "type": "Object",
+ "tags": [],
+ "label": "panels",
+ "description": [],
+ "signature": [
+ "{ [panelId: string]: ",
{
- "pluginId": "data",
+ "pluginId": "dashboard",
"scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.IKibanaSearchResponse",
- "text": "IKibanaSearchResponse"
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelState",
+ "text": "DashboardPanelState"
},
"<",
- "SearchResponse",
- ">>>; fetch: (options?: ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSourceSearchOptions",
- "text": "SearchSourceSearchOptions"
- },
- ") => Promise<",
- "SearchResponse",
- ">>; onRequestStart: (handler: (searchSource: ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSource",
- "text": "SearchSource"
- },
- ", options?: ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SearchSourceSearchOptions",
- "text": "SearchSourceSearchOptions"
- },
- " | undefined) => Promise) => void; getSearchRequestBody: () => any; destroy: () => void; getSerializedFields: (recurse?: boolean) => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SerializedSearchSourceFields",
- "text": "SerializedSearchSourceFields"
- },
- "; serialize: () => { searchSourceJSON: string; references: ",
- "SavedObjectReference",
- "[]; }; toExpressionAst: ({ asDatatable }?: ExpressionAstOptions) => ",
{
- "pluginId": "expressions",
+ "pluginId": "embeddable",
"scope": "common",
- "docId": "kibExpressionsPluginApi",
- "section": "def-common.ExpressionAstExpression",
- "text": "ExpressionAstExpression"
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.EmbeddableInput",
+ "text": "EmbeddableInput"
},
- "; parseActiveIndexPatternFromQueryString: (queryString: string) => string[]; }"
+ " & { [k: string]: unknown; }>; }"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.getQuery",
- "type": "Function",
+ "id": "def-common.DashboardContainerStateWithType.controlGroupInput",
+ "type": "Object",
"tags": [],
- "label": "getQuery",
+ "label": "controlGroupInput",
"description": [],
"signature": [
- "() => ",
- "Query"
+ {
+ "pluginId": "controls",
+ "scope": "common",
+ "docId": "kibControlsPluginApi",
+ "section": "def-common.PersistableControlGroupInput",
+ "text": "PersistableControlGroupInput"
+ },
+ " | undefined"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- },
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardPanelMap",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardPanelMap",
+ "description": [],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.getFilters",
- "type": "Function",
+ "id": "def-common.DashboardPanelMap.Unnamed",
+ "type": "IndexSignature",
"tags": [],
- "label": "getFilters",
+ "label": "[key: string]: DashboardPanelState",
"description": [],
"signature": [
- "() => ",
- "Filter",
- "[]"
+ "[key: string]: ",
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelState",
+ "text": "DashboardPanelState"
+ },
+ "<",
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.SavedObjectEmbeddableInput",
+ "text": "SavedObjectEmbeddableInput"
+ },
+ ">"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.DashboardPanelState",
+ "type": "Interface",
+ "tags": [],
+ "label": "DashboardPanelState",
+ "description": [
+ "--------------------------------------------------------------------\nDashboard panel types\n -----------------------------------------------------------------------\n\nThe dashboard panel format expected by the embeddable container."
+ ],
+ "signature": [
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.DashboardPanelState",
+ "text": "DashboardPanelState"
},
+ " extends ",
+ {
+ "pluginId": "embeddable",
+ "scope": "common",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-common.PanelState",
+ "text": "PanelState"
+ },
+ ""
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.getFullEditPath",
- "type": "Function",
+ "id": "def-common.DashboardPanelState.gridData",
+ "type": "Object",
"tags": [],
- "label": "getFullEditPath",
+ "label": "gridData",
"description": [],
"signature": [
- "(editMode?: boolean | undefined) => string"
- ],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
{
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.getFullEditPath.$1",
- "type": "CompoundType",
- "tags": [],
- "label": "editMode",
- "description": [],
- "signature": [
- "boolean | undefined"
- ],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.GridData",
+ "text": "GridData"
}
],
- "returnComment": []
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.outcome",
- "type": "CompoundType",
+ "id": "def-common.DashboardPanelState.panelRefName",
+ "type": "string",
"tags": [],
- "label": "outcome",
+ "label": "panelRefName",
"description": [],
"signature": [
- "\"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined"
+ "string | undefined"
],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
- },
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dashboard",
+ "id": "def-common.GridData",
+ "type": "Interface",
+ "tags": [],
+ "label": "GridData",
+ "description": [
+ "\nGrid type for React Grid Layout"
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.aliasId",
- "type": "string",
+ "id": "def-common.GridData.w",
+ "type": "number",
"tags": [],
- "label": "aliasId",
+ "label": "w",
"description": [],
- "signature": [
- "string | undefined"
- ],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.aliasPurpose",
- "type": "CompoundType",
+ "id": "def-common.GridData.h",
+ "type": "number",
"tags": [],
- "label": "aliasPurpose",
+ "label": "h",
"description": [],
- "signature": [
- "\"savedObjectConversion\" | \"savedObjectImport\" | undefined"
- ],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardSavedObject.controlGroupInput",
- "type": "Object",
+ "id": "def-common.GridData.x",
+ "type": "number",
"tags": [],
- "label": "controlGroupInput",
+ "label": "x",
"description": [],
- "signature": [
- "Omit<",
- {
- "pluginId": "controls",
- "scope": "common",
- "docId": "kibControlsPluginApi",
- "section": "def-common.RawControlGroupAttributes",
- "text": "RawControlGroupAttributes"
- },
- ", \"id\"> | undefined"
- ],
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
- }
- ],
- "initialIsOpen": false
- }
- ],
- "enums": [],
- "misc": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DASHBOARD_CONTAINER_TYPE",
- "type": "string",
- "tags": [],
- "label": "DASHBOARD_CONTAINER_TYPE",
- "description": [],
- "signature": [
- "\"dashboard\""
- ],
- "path": "src/plugins/dashboard/public/application/embeddable/dashboard_constants.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardAppLocator",
- "type": "Type",
- "tags": [],
- "label": "DashboardAppLocator",
- "description": [],
- "signature": [
- {
- "pluginId": "share",
- "scope": "common",
- "docId": "kibSharePluginApi",
- "section": "def-common.LocatorPublic",
- "text": "LocatorPublic"
- },
- "<",
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardAppLocatorParams",
- "text": "DashboardAppLocatorParams"
- },
- ">"
- ],
- "path": "src/plugins/dashboard/public/locator.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardAppLocatorParams",
- "type": "Type",
- "tags": [],
- "label": "DashboardAppLocatorParams",
- "description": [
- "\nWe use `type` instead of `interface` to avoid having to extend this type with\n`SerializableRecord`. See https://github.com/microsoft/TypeScript/issues/15300."
- ],
- "signature": [
- "{ dashboardId?: string | undefined; timeRange?: ",
- "TimeRange",
- " | undefined; refreshInterval?: ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataQueryPluginApi",
- "section": "def-common.RefreshInterval",
- "text": "RefreshInterval"
- },
- " | undefined; filters?: ",
- "Filter",
- "[] | undefined; query?: ",
- "Query",
- " | undefined; useHash?: boolean | undefined; preserveSavedFilters?: boolean | undefined; viewMode?: ",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.ViewMode",
- "text": "ViewMode"
},
- " | undefined; searchSessionId?: string | undefined; panels?: ",
{
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.SavedDashboardPanel730ToLatest",
- "text": "SavedDashboardPanel730ToLatest"
+ "parentPluginId": "dashboard",
+ "id": "def-common.GridData.y",
+ "type": "number",
+ "tags": [],
+ "label": "y",
+ "description": [],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
},
- "[] | undefined; savedQuery?: string | undefined; tags?: string[] | undefined; options?: ",
- "DashboardOptions",
- " | undefined; controlGroupInput?: ",
{
- "pluginId": "controls",
- "scope": "common",
- "docId": "kibControlsPluginApi",
- "section": "def-common.SerializableControlGroupInput",
- "text": "SerializableControlGroupInput"
- },
- " | undefined; }"
+ "parentPluginId": "dashboard",
+ "id": "def-common.GridData.i",
+ "type": "string",
+ "tags": [],
+ "label": "i",
+ "description": [],
+ "path": "src/plugins/dashboard/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
],
- "path": "src/plugins/dashboard/public/locator.ts",
- "deprecated": false,
- "trackAdoption": false,
"initialIsOpen": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.SavedDashboardPanel",
- "type": "Type",
+ "id": "def-common.SavedDashboardPanel",
+ "type": "Interface",
"tags": [],
"label": "SavedDashboardPanel",
"description": [
- "\nThis should always represent the latest dashboard panel shape, after all possible migrations."
- ],
- "signature": [
- "Pick<",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.RawSavedDashboardPanel730ToLatest",
- "text": "RawSavedDashboardPanel730ToLatest"
- },
- ", \"type\" | \"title\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\" | \"panelRefName\"> & { readonly id?: string | undefined; readonly type: string; }"
+ "\nA saved dashboard panel parsed directly from the Dashboard Attributes panels JSON"
],
"path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false,
- "initialIsOpen": false
- }
- ],
- "objects": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants",
- "type": "Object",
- "tags": [],
- "label": "DashboardConstants",
- "description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
- "deprecated": false,
- "trackAdoption": false,
"children": [
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.LANDING_PAGE_PATH",
- "type": "string",
- "tags": [],
- "label": "LANDING_PAGE_PATH",
- "description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.CREATE_NEW_DASHBOARD_URL",
- "type": "string",
+ "id": "def-common.SavedDashboardPanel.embeddableConfig",
+ "type": "Object",
"tags": [],
- "label": "CREATE_NEW_DASHBOARD_URL",
+ "label": "embeddableConfig",
"description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "signature": [
+ "{ [key: string]: ",
+ "Serializable",
+ "; }"
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.VIEW_DASHBOARD_URL",
+ "id": "def-common.SavedDashboardPanel.id",
"type": "string",
"tags": [],
- "label": "VIEW_DASHBOARD_URL",
+ "label": "id",
"description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.PRINT_DASHBOARD_URL",
+ "id": "def-common.SavedDashboardPanel.type",
"type": "string",
"tags": [],
- "label": "PRINT_DASHBOARD_URL",
+ "label": "type",
"description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.ADD_EMBEDDABLE_ID",
+ "id": "def-common.SavedDashboardPanel.panelRefName",
"type": "string",
"tags": [],
- "label": "ADD_EMBEDDABLE_ID",
+ "label": "panelRefName",
"description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.ADD_EMBEDDABLE_TYPE",
- "type": "string",
+ "id": "def-common.SavedDashboardPanel.gridData",
+ "type": "Object",
"tags": [],
- "label": "ADD_EMBEDDABLE_TYPE",
+ "label": "gridData",
"description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "signature": [
+ {
+ "pluginId": "dashboard",
+ "scope": "common",
+ "docId": "kibDashboardPluginApi",
+ "section": "def-common.GridData",
+ "text": "GridData"
+ }
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.DASHBOARDS_ID",
+ "id": "def-common.SavedDashboardPanel.panelIndex",
"type": "string",
"tags": [],
- "label": "DASHBOARDS_ID",
+ "label": "panelIndex",
"description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.DASHBOARD_ID",
+ "id": "def-common.SavedDashboardPanel.version",
"type": "string",
"tags": [],
- "label": "DASHBOARD_ID",
+ "label": "version",
"description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.SEARCH_SESSION_ID",
+ "id": "def-common.SavedDashboardPanel.title",
"type": "string",
"tags": [],
- "label": "SEARCH_SESSION_ID",
- "description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.CHANGE_CHECK_DEBOUNCE",
- "type": "number",
- "tags": [],
- "label": "CHANGE_CHECK_DEBOUNCE",
- "description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardConstants.CHANGE_APPLY_DEBOUNCE",
- "type": "number",
- "tags": [],
- "label": "CHANGE_APPLY_DEBOUNCE",
+ "label": "title",
"description": [],
- "path": "src/plugins/dashboard/public/dashboard_constants.ts",
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/dashboard/common/types.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -2398,674 +2083,8 @@
"initialIsOpen": false
}
],
- "setup": {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardSetup",
- "type": "Interface",
- "tags": [],
- "label": "DashboardSetup",
- "description": [],
- "path": "src/plugins/dashboard/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardSetup.locator",
- "type": "Object",
- "tags": [],
- "label": "locator",
- "description": [],
- "signature": [
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardAppLocator",
- "text": "DashboardAppLocator"
- },
- " | undefined"
- ],
- "path": "src/plugins/dashboard/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false
- }
- ],
- "lifecycle": "setup",
- "initialIsOpen": true
- },
- "start": {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardStart",
- "type": "Interface",
- "tags": [],
- "label": "DashboardStart",
- "description": [],
- "path": "src/plugins/dashboard/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardStart.getSavedDashboardLoader",
- "type": "Function",
- "tags": [],
- "label": "getSavedDashboardLoader",
- "description": [],
- "signature": [
- "() => ",
- "SavedObjectLoader"
- ],
- "path": "src/plugins/dashboard/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardStart.getDashboardContainerByValueRenderer",
- "type": "Function",
- "tags": [],
- "label": "getDashboardContainerByValueRenderer",
- "description": [],
- "signature": [
- "() => React.FC"
- ],
- "path": "src/plugins/dashboard/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardStart.locator",
- "type": "Object",
- "tags": [],
- "label": "locator",
- "description": [],
- "signature": [
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardAppLocator",
- "text": "DashboardAppLocator"
- },
- " | undefined"
- ],
- "path": "src/plugins/dashboard/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-public.DashboardStart.dashboardFeatureFlagConfig",
- "type": "Object",
- "tags": [],
- "label": "dashboardFeatureFlagConfig",
- "description": [],
- "signature": [
- {
- "pluginId": "dashboard",
- "scope": "public",
- "docId": "kibDashboardPluginApi",
- "section": "def-public.DashboardFeatureFlagConfig",
- "text": "DashboardFeatureFlagConfig"
- }
- ],
- "path": "src/plugins/dashboard/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false
- }
- ],
- "lifecycle": "start",
- "initialIsOpen": true
- }
- },
- "server": {
- "classes": [],
- "functions": [
- {
- "parentPluginId": "dashboard",
- "id": "def-server.findByValueEmbeddables",
- "type": "Function",
- "tags": [],
- "label": "findByValueEmbeddables",
- "description": [],
- "signature": [
- "(savedObjectClient: Pick<",
- "ISavedObjectsRepository",
- ", \"find\">, embeddableType: string) => Promise<{ [key: string]: ",
- "Serializable",
- "; }[]>"
- ],
- "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-server.findByValueEmbeddables.$1",
- "type": "Object",
- "tags": [],
- "label": "savedObjectClient",
- "description": [],
- "signature": [
- "Pick<",
- "ISavedObjectsRepository",
- ", \"find\">"
- ],
- "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-server.findByValueEmbeddables.$2",
- "type": "string",
- "tags": [],
- "label": "embeddableType",
- "description": [],
- "signature": [
- "string"
- ],
- "path": "src/plugins/dashboard/server/usage/find_by_value_embeddables.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- }
- ],
- "interfaces": [],
"enums": [],
"misc": [],
- "objects": [],
- "setup": {
- "parentPluginId": "dashboard",
- "id": "def-server.DashboardPluginSetup",
- "type": "Interface",
- "tags": [],
- "label": "DashboardPluginSetup",
- "description": [],
- "path": "src/plugins/dashboard/server/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "lifecycle": "setup",
- "initialIsOpen": true
- },
- "start": {
- "parentPluginId": "dashboard",
- "id": "def-server.DashboardPluginStart",
- "type": "Interface",
- "tags": [],
- "label": "DashboardPluginStart",
- "description": [],
- "path": "src/plugins/dashboard/server/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "lifecycle": "start",
- "initialIsOpen": true
- }
- },
- "common": {
- "classes": [],
- "functions": [
- {
- "parentPluginId": "dashboard",
- "id": "def-common.migratePanelsTo730",
- "type": "Function",
- "tags": [],
- "label": "migratePanelsTo730",
- "description": [],
- "signature": [
- "(panels: (",
- "RawSavedDashboardPanelTo60",
- " | ",
- "RawSavedDashboardPanel610",
- " | ",
- "RawSavedDashboardPanel620",
- " | ",
- "RawSavedDashboardPanel640To720",
- " | ",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.SavedDashboardPanelTo60",
- "text": "SavedDashboardPanelTo60"
- },
- " | ",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.SavedDashboardPanel610",
- "text": "SavedDashboardPanel610"
- },
- " | ",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.SavedDashboardPanel620",
- "text": "SavedDashboardPanel620"
- },
- " | ",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.SavedDashboardPanel630",
- "text": "SavedDashboardPanel630"
- },
- ")[], version: string, useMargins: boolean, uiState: { [key: string]: ",
- "SerializableRecord",
- "; } | undefined) => ",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.RawSavedDashboardPanel730ToLatest",
- "text": "RawSavedDashboardPanel730ToLatest"
- },
- "[]"
- ],
- "path": "src/plugins/dashboard/common/migrate_to_730_panels.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-common.migratePanelsTo730.$1",
- "type": "Array",
- "tags": [],
- "label": "panels",
- "description": [],
- "signature": [
- "(",
- "RawSavedDashboardPanelTo60",
- " | ",
- "RawSavedDashboardPanel610",
- " | ",
- "RawSavedDashboardPanel620",
- " | ",
- "RawSavedDashboardPanel640To720",
- " | ",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.SavedDashboardPanelTo60",
- "text": "SavedDashboardPanelTo60"
- },
- " | ",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.SavedDashboardPanel610",
- "text": "SavedDashboardPanel610"
- },
- " | ",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.SavedDashboardPanel620",
- "text": "SavedDashboardPanel620"
- },
- " | ",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.SavedDashboardPanel630",
- "text": "SavedDashboardPanel630"
- },
- ")[]"
- ],
- "path": "src/plugins/dashboard/common/migrate_to_730_panels.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.migratePanelsTo730.$2",
- "type": "string",
- "tags": [],
- "label": "version",
- "description": [],
- "signature": [
- "string"
- ],
- "path": "src/plugins/dashboard/common/migrate_to_730_panels.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.migratePanelsTo730.$3",
- "type": "boolean",
- "tags": [],
- "label": "useMargins",
- "description": [],
- "signature": [
- "boolean"
- ],
- "path": "src/plugins/dashboard/common/migrate_to_730_panels.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.migratePanelsTo730.$4",
- "type": "Object",
- "tags": [],
- "label": "uiState",
- "description": [],
- "path": "src/plugins/dashboard/common/migrate_to_730_panels.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-common.migratePanelsTo730.$4.Unnamed",
- "type": "IndexSignature",
- "tags": [],
- "label": "[key: string]: SerializableRecord",
- "description": [],
- "signature": [
- "[key: string]: ",
- "SerializableRecord"
- ],
- "path": "src/plugins/dashboard/common/migrate_to_730_panels.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- }
- ],
- "interfaces": [
- {
- "parentPluginId": "dashboard",
- "id": "def-common.DashboardContainerStateWithType",
- "type": "Interface",
- "tags": [],
- "label": "DashboardContainerStateWithType",
- "description": [],
- "signature": [
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.DashboardContainerStateWithType",
- "text": "DashboardContainerStateWithType"
- },
- " extends ",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableStateWithType",
- "text": "EmbeddableStateWithType"
- }
- ],
- "path": "src/plugins/dashboard/common/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "dashboard",
- "id": "def-common.DashboardContainerStateWithType.panels",
- "type": "Object",
- "tags": [],
- "label": "panels",
- "description": [],
- "signature": [
- "{ [panelId: string]: ",
- "DashboardPanelState",
- "<",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableInput",
- "text": "EmbeddableInput"
- },
- " & { [k: string]: unknown; }>; }"
- ],
- "path": "src/plugins/dashboard/common/types.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.DashboardContainerStateWithType.controlGroupInput",
- "type": "Object",
- "tags": [],
- "label": "controlGroupInput",
- "description": [],
- "signature": [
- {
- "pluginId": "controls",
- "scope": "common",
- "docId": "kibControlsPluginApi",
- "section": "def-common.PersistableControlGroupInput",
- "text": "PersistableControlGroupInput"
- },
- " | undefined"
- ],
- "path": "src/plugins/dashboard/common/types.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ],
- "initialIsOpen": false
- }
- ],
- "enums": [],
- "misc": [
- {
- "parentPluginId": "dashboard",
- "id": "def-common.DashboardDoc700To720",
- "type": "Type",
- "tags": [],
- "label": "DashboardDoc700To720",
- "description": [],
- "signature": [
- "Doc"
- ],
- "path": "src/plugins/dashboard/common/bwc/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.DashboardDoc730ToLatest",
- "type": "Type",
- "tags": [],
- "label": "DashboardDoc730ToLatest",
- "description": [],
- "signature": [
- "Doc"
- ],
- "path": "src/plugins/dashboard/common/bwc/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.DashboardDocPre700",
- "type": "Type",
- "tags": [],
- "label": "DashboardDocPre700",
- "description": [],
- "signature": [
- "DocPre700"
- ],
- "path": "src/plugins/dashboard/common/bwc/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.GridData",
- "type": "Type",
- "tags": [],
- "label": "GridData",
- "description": [],
- "signature": [
- "{ w: number; h: number; x: number; y: number; i: string; }"
- ],
- "path": "src/plugins/dashboard/common/embeddable/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.RawSavedDashboardPanel730ToLatest",
- "type": "Type",
- "tags": [],
- "label": "RawSavedDashboardPanel730ToLatest",
- "description": [],
- "signature": [
- "Pick<",
- "RawSavedDashboardPanel640To720",
- ", \"title\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\"> & { readonly type?: string | undefined; readonly name?: string | undefined; panelIndex: string; panelRefName?: string | undefined; }"
- ],
- "path": "src/plugins/dashboard/common/bwc/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.SavedDashboardPanel610",
- "type": "Type",
- "tags": [],
- "label": "SavedDashboardPanel610",
- "description": [],
- "signature": [
- "Pick<",
- "RawSavedDashboardPanel610",
- ", \"columns\" | \"title\" | \"sort\" | \"panelIndex\" | \"gridData\" | \"version\"> & { readonly id: string; readonly type: string; }"
- ],
- "path": "src/plugins/dashboard/common/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.SavedDashboardPanel620",
- "type": "Type",
- "tags": [],
- "label": "SavedDashboardPanel620",
- "description": [],
- "signature": [
- "Pick<",
- "RawSavedDashboardPanel620",
- ", \"columns\" | \"title\" | \"sort\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\"> & { readonly id: string; readonly type: string; }"
- ],
- "path": "src/plugins/dashboard/common/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.SavedDashboardPanel630",
- "type": "Type",
- "tags": [],
- "label": "SavedDashboardPanel630",
- "description": [],
- "signature": [
- "Pick<",
- "RawSavedDashboardPanel620",
- ", \"columns\" | \"title\" | \"sort\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\"> & { readonly id: string; readonly type: string; }"
- ],
- "path": "src/plugins/dashboard/common/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.SavedDashboardPanel640To720",
- "type": "Type",
- "tags": [],
- "label": "SavedDashboardPanel640To720",
- "description": [],
- "signature": [
- "Pick<",
- "RawSavedDashboardPanel640To720",
- ", \"title\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\"> & { readonly id: string; readonly type: string; }"
- ],
- "path": "src/plugins/dashboard/common/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.SavedDashboardPanel730ToLatest",
- "type": "Type",
- "tags": [],
- "label": "SavedDashboardPanel730ToLatest",
- "description": [],
- "signature": [
- "Pick<",
- {
- "pluginId": "dashboard",
- "scope": "common",
- "docId": "kibDashboardPluginApi",
- "section": "def-common.RawSavedDashboardPanel730ToLatest",
- "text": "RawSavedDashboardPanel730ToLatest"
- },
- ", \"type\" | \"title\" | \"panelIndex\" | \"gridData\" | \"version\" | \"embeddableConfig\" | \"panelRefName\"> & { readonly id?: string | undefined; readonly type: string; }"
- ],
- "path": "src/plugins/dashboard/common/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "dashboard",
- "id": "def-common.SavedDashboardPanelTo60",
- "type": "Type",
- "tags": [],
- "label": "SavedDashboardPanelTo60",
- "description": [],
- "signature": [
- "Pick<",
- "RawSavedDashboardPanelTo60",
- ", \"columns\" | \"title\" | \"sort\" | \"size_x\" | \"size_y\" | \"row\" | \"col\" | \"panelIndex\"> & { readonly id: string; readonly type: string; }"
- ],
- "path": "src/plugins/dashboard/common/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- }
- ],
"objects": [
{
"parentPluginId": "dashboard",
diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx
index 507845391c779..464789c8cd191 100644
--- a/api_docs/dashboard.mdx
+++ b/api_docs/dashboard.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard
title: "dashboard"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dashboard plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard']
---
import dashboardObj from './dashboard.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-prese
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 144 | 0 | 139 | 10 |
+| 120 | 0 | 113 | 3 |
## Client
@@ -37,9 +37,6 @@ Contact [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-prese
### Functions
-### Classes
-
-
### Interfaces
@@ -68,6 +65,3 @@ Contact [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-prese
### Interfaces
-### Consts, variables and types
-
-
diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx
index ef9680b1325db..5ad9b56b00576 100644
--- a/api_docs/dashboard_enhanced.mdx
+++ b/api_docs/dashboard_enhanced.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced
title: "dashboardEnhanced"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dashboardEnhanced plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced']
---
import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json';
diff --git a/api_docs/data.mdx b/api_docs/data.mdx
index f849f08374ded..f88ba52d6af1a 100644
--- a/api_docs/data.mdx
+++ b/api_docs/data.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data
title: "data"
image: https://source.unsplash.com/400x175/?github
description: API docs for the data plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data']
---
import dataObj from './data.devdocs.json';
@@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3211 | 33 | 2508 | 23 |
+| 3213 | 33 | 2509 | 23 |
## Client
diff --git a/api_docs/data_query.devdocs.json b/api_docs/data_query.devdocs.json
index 2507050e905fc..051270f939554 100644
--- a/api_docs/data_query.devdocs.json
+++ b/api_docs/data_query.devdocs.json
@@ -1855,14 +1855,6 @@
"plugin": "discover",
"path": "src/plugins/discover/public/application/main/services/discover_state.ts"
},
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts"
- },
{
"plugin": "maps",
"path": "x-pack/plugins/maps/public/routes/map_page/url_state/global_sync.ts"
@@ -3785,10 +3777,10 @@
},
{
"parentPluginId": "data",
- "id": "def-common.queryStateToExpressionAst",
+ "id": "def-common.textBasedQueryStateToAstWithValidation",
"type": "Function",
"tags": [],
- "label": "queryStateToExpressionAst",
+ "label": "textBasedQueryStateToAstWithValidation",
"description": [
"\nConverts QueryState to expression AST"
],
@@ -3801,15 +3793,15 @@
"section": "def-common.ExpressionAstExpression",
"text": "ExpressionAstExpression"
},
- ">"
+ " | undefined>"
],
- "path": "src/plugins/data/common/query/to_expression_ast.ts",
+ "path": "src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "data",
- "id": "def-common.queryStateToExpressionAst.$1",
+ "id": "def-common.textBasedQueryStateToAstWithValidation.$1",
"type": "Object",
"tags": [],
"label": "{\n filters,\n query,\n inputQuery,\n time,\n dataViewsService,\n}",
@@ -3817,7 +3809,49 @@
"signature": [
"Args"
],
- "path": "src/plugins/data/common/query/to_expression_ast.ts",
+ "path": "src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "data",
+ "id": "def-common.textBasedQueryStateToExpressionAst",
+ "type": "Function",
+ "tags": [],
+ "label": "textBasedQueryStateToExpressionAst",
+ "description": [
+ "\nConverts QueryState to expression AST"
+ ],
+ "signature": [
+ "({\n filters,\n query,\n inputQuery,\n time,\n timeFieldName,\n}: Args) => ",
+ {
+ "pluginId": "expressions",
+ "scope": "common",
+ "docId": "kibExpressionsPluginApi",
+ "section": "def-common.ExpressionAstExpression",
+ "text": "ExpressionAstExpression"
+ }
+ ],
+ "path": "src/plugins/data/common/query/text_based_query_state_to_ast.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "data",
+ "id": "def-common.textBasedQueryStateToExpressionAst.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n filters,\n query,\n inputQuery,\n time,\n timeFieldName,\n}",
+ "description": [],
+ "signature": [
+ "Args"
+ ],
+ "path": "src/plugins/data/common/query/text_based_query_state_to_ast.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx
index bb88b05d16a92..554f11d22eb36 100644
--- a/api_docs/data_query.mdx
+++ b/api_docs/data_query.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query
title: "data.query"
image: https://source.unsplash.com/400x175/?github
description: API docs for the data.query plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query']
---
import dataQueryObj from './data_query.devdocs.json';
@@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3211 | 33 | 2508 | 23 |
+| 3213 | 33 | 2509 | 23 |
## Client
diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json
index 415500b499045..3be2133617864 100644
--- a/api_docs/data_search.devdocs.json
+++ b/api_docs/data_search.devdocs.json
@@ -2794,9 +2794,9 @@
"label": "options",
"description": [],
"signature": [
- "{ filter?: any; search?: string | undefined; aggs?: Record | undefined; fields?: string[] | undefined; searchAfter?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ",
+ "> | undefined; searchAfter?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ",
"SortOrder",
" | undefined; searchFields?: string[] | undefined; rootSearchFields?: string[] | undefined; hasReference?: ",
"SavedObjectsFindOptionsReference",
@@ -3475,13 +3475,7 @@
"label": "DataRequestHandlerContext",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
" & { search: Promise<",
{
"pluginId": "data",
diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx
index 3cf065a957729..ef1fb301e167d 100644
--- a/api_docs/data_search.mdx
+++ b/api_docs/data_search.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search
title: "data.search"
image: https://source.unsplash.com/400x175/?github
description: API docs for the data.search plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search']
---
import dataSearchObj from './data_search.devdocs.json';
@@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3211 | 33 | 2508 | 23 |
+| 3213 | 33 | 2509 | 23 |
## Client
diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx
index 6fca87db82f91..96deb16679bb1 100644
--- a/api_docs/data_view_editor.mdx
+++ b/api_docs/data_view_editor.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor
title: "dataViewEditor"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dataViewEditor plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor']
---
import dataViewEditorObj from './data_view_editor.devdocs.json';
diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx
index 9e4d3deac15c4..7935fdee2a27e 100644
--- a/api_docs/data_view_field_editor.mdx
+++ b/api_docs/data_view_field_editor.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor
title: "dataViewFieldEditor"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dataViewFieldEditor plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor']
---
import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json';
diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx
index cf43b6fa9dd9e..18bcd0b3d6185 100644
--- a/api_docs/data_view_management.mdx
+++ b/api_docs/data_view_management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement
title: "dataViewManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dataViewManagement plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement']
---
import dataViewManagementObj from './data_view_management.devdocs.json';
diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json
index c868634158667..cc6bd0a259d02 100644
--- a/api_docs/data_views.devdocs.json
+++ b/api_docs/data_views.devdocs.json
@@ -4164,6 +4164,45 @@
"returnComment": [],
"children": []
},
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.DataViewsServicePublic.getIndices",
+ "type": "Function",
+ "tags": [],
+ "label": "getIndices",
+ "description": [],
+ "signature": [
+ "(props: { pattern: string; showAllIndices?: boolean | undefined; isRollupIndex: (indexName: string) => boolean; }) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "public",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-public.MatchedItem",
+ "text": "MatchedItem"
+ },
+ "[]>"
+ ],
+ "path": "src/plugins/data_views/public/data_views_service_public.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.DataViewsServicePublic.getIndices.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "{ pattern: string; showAllIndices?: boolean | undefined; isRollupIndex: (indexName: string) => boolean; }"
+ ],
+ "path": "src/plugins/data_views/public/data_views_service_public.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ },
{
"parentPluginId": "dataViews",
"id": "def-public.DataViewsServicePublic.hasData",
@@ -5398,6 +5437,101 @@
"path": "src/plugins/data_views/public/data_views_service_public.ts",
"deprecated": false,
"trackAdoption": false
+ },
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.DataViewsServicePublicDeps.getIndices",
+ "type": "Function",
+ "tags": [],
+ "label": "getIndices",
+ "description": [],
+ "signature": [
+ "(props: { pattern: string; showAllIndices?: boolean | undefined; isRollupIndex: (indexName: string) => boolean; }) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "public",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-public.MatchedItem",
+ "text": "MatchedItem"
+ },
+ "[]>"
+ ],
+ "path": "src/plugins/data_views/public/data_views_service_public.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.DataViewsServicePublicDeps.getIndices.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "path": "src/plugins/data_views/public/data_views_service_public.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.DataViewsServicePublicDeps.getIndices.$1.pattern",
+ "type": "string",
+ "tags": [],
+ "label": "pattern",
+ "description": [],
+ "path": "src/plugins/data_views/public/data_views_service_public.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.DataViewsServicePublicDeps.getIndices.$1.showAllIndices",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "showAllIndices",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "src/plugins/data_views/public/data_views_service_public.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.DataViewsServicePublicDeps.getIndices.$1.isRollupIndex",
+ "type": "Function",
+ "tags": [],
+ "label": "isRollupIndex",
+ "description": [],
+ "signature": [
+ "(indexName: string) => boolean"
+ ],
+ "path": "src/plugins/data_views/public/data_views_service_public.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.DataViewsServicePublicDeps.getIndices.$1.isRollupIndex.$1",
+ "type": "string",
+ "tags": [],
+ "label": "indexName",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "src/plugins/data_views/public/data_views_service_public.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ]
+ }
+ ],
+ "returnComment": []
}
],
"initialIsOpen": false
@@ -5906,6 +6040,68 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.MatchedItem",
+ "type": "Interface",
+ "tags": [],
+ "label": "MatchedItem",
+ "description": [],
+ "path": "src/plugins/data_views/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.MatchedItem.name",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "path": "src/plugins/data_views/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.MatchedItem.tags",
+ "type": "Array",
+ "tags": [],
+ "label": "tags",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "dataViews",
+ "scope": "public",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-public.Tag",
+ "text": "Tag"
+ },
+ "[]"
+ ],
+ "path": "src/plugins/data_views/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.MatchedItem.item",
+ "type": "Object",
+ "tags": [],
+ "label": "item",
+ "description": [],
+ "signature": [
+ "{ name: string; backing_indices?: string[] | undefined; timestamp_field?: string | undefined; indices?: string[] | undefined; aliases?: string[] | undefined; attributes?: ",
+ "ResolveIndexResponseItemIndexAttrs",
+ "[] | undefined; data_stream?: string | undefined; }"
+ ],
+ "path": "src/plugins/data_views/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "dataViews",
"id": "def-public.RuntimeField",
@@ -6339,6 +6535,53 @@
}
],
"initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.Tag",
+ "type": "Interface",
+ "tags": [],
+ "label": "Tag",
+ "description": [],
+ "path": "src/plugins/data_views/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.Tag.name",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "path": "src/plugins/data_views/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.Tag.key",
+ "type": "string",
+ "tags": [],
+ "label": "key",
+ "description": [],
+ "path": "src/plugins/data_views/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.Tag.color",
+ "type": "string",
+ "tags": [],
+ "label": "color",
+ "description": [],
+ "path": "src/plugins/data_views/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
}
],
"enums": [
@@ -6355,6 +6598,18 @@
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dataViews",
+ "id": "def-public.INDEX_PATTERN_TYPE",
+ "type": "Enum",
+ "tags": [],
+ "label": "INDEX_PATTERN_TYPE",
+ "description": [],
+ "path": "src/plugins/data_views/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
}
],
"misc": [
diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx
index a5ea60ca6db86..4f324ce195e16 100644
--- a/api_docs/data_views.mdx
+++ b/api_docs/data_views.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews
title: "dataViews"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dataViews plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews']
---
import dataViewsObj from './data_views.devdocs.json';
@@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 966 | 0 | 208 | 1 |
+| 983 | 0 | 225 | 2 |
## Client
diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx
index 797cd5596c31f..881f77c01491f 100644
--- a/api_docs/data_visualizer.mdx
+++ b/api_docs/data_visualizer.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer
title: "dataVisualizer"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dataVisualizer plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer']
---
import dataVisualizerObj from './data_visualizer.devdocs.json';
diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx
index ec45435a4e875..0f7512a8f4125 100644
--- a/api_docs/deprecations_by_api.mdx
+++ b/api_docs/deprecations_by_api.mdx
@@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi
slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api
title: Deprecated API usage by API
description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by.
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -24,9 +24,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | alerting, discover, securitySolution | - |
| | stackAlerts, alerting, securitySolution, inputControlVis | - |
| | actions, alerting | - |
-| | savedObjects, embeddable, fleet, visualizations, infra, canvas, graph, securitySolution, actions, alerting, enterpriseSearch, taskManager, dashboard, savedSearch, ml, @kbn/core-saved-objects-server-internal | - |
-| | savedObjects, embeddable, fleet, visualizations, infra, canvas, graph, securitySolution, actions, alerting, enterpriseSearch, taskManager, dashboard, savedSearch, ml, @kbn/core-saved-objects-server-internal | - |
-| | discover, dashboard, maps, monitoring | - |
+| | savedObjects, embeddable, fleet, visualizations, dashboard, infra, canvas, graph, securitySolution, actions, alerting, enterpriseSearch, taskManager, savedSearch, ml, @kbn/core-saved-objects-server-internal | - |
+| | savedObjects, embeddable, fleet, visualizations, dashboard, infra, canvas, graph, securitySolution, actions, alerting, enterpriseSearch, taskManager, savedSearch, ml, @kbn/core-saved-objects-server-internal | - |
+| | discover, maps, monitoring | - |
| | unifiedSearch, discover, maps, infra, graph, securitySolution, stackAlerts, inputControlVis, savedObjects | - |
| | data, discover, embeddable | - |
| | advancedSettings, discover | - |
@@ -34,7 +34,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | securitySolution | - |
| | encryptedSavedObjects, actions, data, cloud, ml, logstash, securitySolution | - |
| | dashboard, dataVisualizer, stackAlerts, expressionPartitionVis | - |
-| | dashboard | - |
| | dataViews, maps | - |
| | dataViews, maps | - |
| | maps | - |
@@ -43,6 +42,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | visTypeTimeseries, graph, dataViewManagement, dataViews | - |
| | visTypeTimeseries, graph, dataViewManagement, dataViews | - |
| | visTypeTimeseries, graph, dataViewManagement | - |
+| | dashboard | - |
| | observability, dataVisualizer, fleet, cloudSecurityPosture, discoverEnhanced, osquery, synthetics | - |
| | dataViewManagement, dataViews | - |
| | dataViews, dataViewManagement | - |
@@ -75,10 +75,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | apm, security, securitySolution | 8.8.0 |
| | visualizations, dashboard, lens, maps, ml, securitySolution, security, @kbn/core-application-browser-internal, @kbn/core-application-browser-mocks | 8.8.0 |
| | securitySolution, @kbn/core-application-browser-internal | 8.8.0 |
-| | savedObjectsTaggingOss, dashboard | 8.8.0 |
-| | dashboard | 8.8.0 |
| | maps, dashboard, @kbn/core-saved-objects-migration-server-internal | 8.8.0 |
| | monitoring, kibanaUsageCollection, @kbn/core-apps-browser-internal, @kbn/core-metrics-server-internal, @kbn/core-status-server-internal, @kbn/core-usage-data-server-internal | 8.8.0 |
+| | savedObjectsTaggingOss, dashboard | 8.8.0 |
| | security, fleet | 8.8.0 |
| | security, fleet | 8.8.0 |
| | security, fleet | 8.8.0 |
@@ -131,6 +130,7 @@ Safe to remove.
| | expressions |
| | expressions |
| | kibanaReact |
+| | savedObjects |
| | savedObjects |
| | licensing |
| | licensing |
diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx
index 430ba54813520..efddd344cdaca 100644
--- a/api_docs/deprecations_by_plugin.mdx
+++ b/api_docs/deprecations_by_plugin.mdx
@@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin
slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin
title: Deprecated API usage by plugin
description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by.
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -211,16 +211,14 @@ so TS and code-reference navigation might not highlight them. |
| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
-| | [sync_dashboard_filter_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts#:~:text=syncQueryStateWithUrl), [sync_dashboard_filter_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts#:~:text=syncQueryStateWithUrl) | - |
| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/data/types.ts#:~:text=fieldFormats), [data_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/data/data_service.ts#:~:text=fieldFormats) | - |
| | [dashboard_viewport.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx#:~:text=ExitFullScreenButton), [dashboard_viewport.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx#:~:text=ExitFullScreenButton), [dashboard_viewport.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx#:~:text=ExitFullScreenButton) | - |
| | [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 |
-| | [saved_object_loader.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject) | 8.8.0 |
-| | [saved_dashboard.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObjectClass) | 8.8.0 |
+| | [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject) | 8.8.0 |
| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 |
-| | [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=SavedObjectAttributes), [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes), [saved_dashboard_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/common/saved_dashboard_references.ts#:~:text=SavedObjectAttributes), [saved_dashboard_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/common/saved_dashboard_references.ts#:~:text=SavedObjectAttributes)+ 8 more | - |
-| | [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=SavedObjectAttributes), [dashboard_migrations.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes), [saved_dashboard_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/common/saved_dashboard_references.ts#:~:text=SavedObjectAttributes), [saved_dashboard_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/common/saved_dashboard_references.ts#:~:text=SavedObjectAttributes)+ 8 more | - |
-| | [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning) | 8.8.0 |
+| | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - |
+| | [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [load_dashboard_state_from_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [migrate_extract_panel_references.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry_collection_task.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [dashboard_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/dashboard_telemetry.ts#:~:text=SavedObjectAttributes), [find_by_value_embeddables.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts#:~:text=SavedObjectAttributes)+ 11 more | - |
+| | [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning) | 8.8.0 |
@@ -525,7 +523,7 @@ so TS and code-reference navigation might not highlight them. |
| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
-| | [pack_queries_status_table.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx#:~:text=indexPatternId), [pack_queries_status_table.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx#:~:text=indexPatternId), [use_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/common/hooks/use_discover_link.tsx#:~:text=indexPatternId) | - |
+| | [pack_queries_status_table.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx#:~:text=indexPatternId), [view_results_in_discover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx#:~:text=indexPatternId), [use_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/common/hooks/use_discover_link.tsx#:~:text=indexPatternId) | - |
| | [empty_state.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/components/empty_state.tsx#:~:text=KibanaPageTemplate), [empty_state.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/components/empty_state.tsx#:~:text=KibanaPageTemplate) | - |
diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx
index 30143657a7b1e..a3a41ce841cf8 100644
--- a/api_docs/deprecations_by_team.mdx
+++ b/api_docs/deprecations_by_team.mdx
@@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam
slug: /kibana-dev-docs/api-meta/deprecations-due-by-team
title: Deprecated APIs due to be removed, by team
description: Lists the teams that are referencing deprecated APIs with a remove by date.
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -89,10 +89,9 @@ so TS and code-reference navigation might not highlight them. |
| Plugin | Deprecated API | Reference location(s) | Remove By |
| --------|-------|-----------|-----------|
| dashboard | | [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [save_modal.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/top_nav/save_modal.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal), [saved_object_save_modal_dashboard.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/presentation_util/public/components/saved_object_save_modal_dashboard.tsx#:~:text=SavedObjectSaveModal) | 8.8.0 |
-| dashboard | | [saved_object_loader.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [saved_object_loader.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/services/saved_object_loader.ts#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [saved_dashboard.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject), [dashboard_tagging.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#:~:text=SavedObject) | 8.8.0 |
-| dashboard | | [saved_dashboard.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#:~:text=SavedObjectClass) | 8.8.0 |
+| dashboard | | [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject), [clone_panel_action.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#:~:text=SavedObject) | 8.8.0 |
| dashboard | | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/types.ts#:~:text=onAppLeave), [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/public/plugin.tsx#:~:text=onAppLeave) | 8.8.0 |
-| dashboard | | [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations_730.ts#:~:text=warning) | 8.8.0 |
+| dashboard | | [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning), [migrations_730.ts](https://github.com/elastic/kibana/tree/main/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts#:~:text=warning) | 8.8.0 |
diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx
index 95bc923cc9da0..d294a02405563 100644
--- a/api_docs/dev_tools.mdx
+++ b/api_docs/dev_tools.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools
title: "devTools"
image: https://source.unsplash.com/400x175/?github
description: API docs for the devTools plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools']
---
import devToolsObj from './dev_tools.devdocs.json';
diff --git a/api_docs/discover.devdocs.json b/api_docs/discover.devdocs.json
index 695319775e984..8c4a6308dd17b 100644
--- a/api_docs/discover.devdocs.json
+++ b/api_docs/discover.devdocs.json
@@ -346,7 +346,7 @@
},
{
"plugin": "osquery",
- "path": "x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx"
+ "path": "x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx"
},
{
"plugin": "osquery",
@@ -1101,7 +1101,7 @@
"label": "sharingSavedObjectProps",
"description": [],
"signature": [
- "{ outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined"
+ "{ outcome?: \"conflict\" | \"exactMatch\" | \"aliasMatch\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined"
],
"path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx
index 8f51330d8bc6d..ddbdd9e335bb0 100644
--- a/api_docs/discover.mdx
+++ b/api_docs/discover.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover
title: "discover"
image: https://source.unsplash.com/400x175/?github
description: API docs for the discover plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover']
---
import discoverObj from './discover.devdocs.json';
diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx
index 7263ed936315a..4cb08ffc96f64 100644
--- a/api_docs/discover_enhanced.mdx
+++ b/api_docs/discover_enhanced.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced
title: "discoverEnhanced"
image: https://source.unsplash.com/400x175/?github
description: API docs for the discoverEnhanced plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced']
---
import discoverEnhancedObj from './discover_enhanced.devdocs.json';
diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx
index f5d8586e5194b..1559a8abc24e3 100644
--- a/api_docs/embeddable.mdx
+++ b/api_docs/embeddable.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable
title: "embeddable"
image: https://source.unsplash.com/400x175/?github
description: API docs for the embeddable plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable']
---
import embeddableObj from './embeddable.devdocs.json';
diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx
index 326d612509b6c..ecf61f0f91ce3 100644
--- a/api_docs/embeddable_enhanced.mdx
+++ b/api_docs/embeddable_enhanced.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced
title: "embeddableEnhanced"
image: https://source.unsplash.com/400x175/?github
description: API docs for the embeddableEnhanced plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced']
---
import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json';
diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx
index e5a8bb47a0520..ba3a3d8c876df 100644
--- a/api_docs/encrypted_saved_objects.mdx
+++ b/api_docs/encrypted_saved_objects.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects
title: "encryptedSavedObjects"
image: https://source.unsplash.com/400x175/?github
description: API docs for the encryptedSavedObjects plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects']
---
import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json';
diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx
index 23ae523bade64..276207b2a393d 100644
--- a/api_docs/enterprise_search.mdx
+++ b/api_docs/enterprise_search.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch
title: "enterpriseSearch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the enterpriseSearch plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch']
---
import enterpriseSearchObj from './enterprise_search.devdocs.json';
diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx
index d5982b5a2a865..43d88ac7e1ed8 100644
--- a/api_docs/es_ui_shared.mdx
+++ b/api_docs/es_ui_shared.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared
title: "esUiShared"
image: https://source.unsplash.com/400x175/?github
description: API docs for the esUiShared plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared']
---
import esUiSharedObj from './es_ui_shared.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-ma
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 114 | 3 | 110 | 3 |
+| 114 | 3 | 110 | 5 |
## Client
diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx
index 705fa73b04c1d..73c8ebf1471bd 100644
--- a/api_docs/event_annotation.mdx
+++ b/api_docs/event_annotation.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation
title: "eventAnnotation"
image: https://source.unsplash.com/400x175/?github
description: API docs for the eventAnnotation plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation']
---
import eventAnnotationObj from './event_annotation.devdocs.json';
diff --git a/api_docs/event_log.devdocs.json b/api_docs/event_log.devdocs.json
index f821ced3a76e0..b4c0370096cc2 100644
--- a/api_docs/event_log.devdocs.json
+++ b/api_docs/event_log.devdocs.json
@@ -1312,7 +1312,7 @@
"label": "data",
"description": [],
"signature": [
- "(Readonly<{ error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ name?: string | undefined; description?: string | undefined; category?: string | undefined; id?: string | undefined; version?: string | undefined; license?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; category?: string[] | undefined; type?: string[] | undefined; id?: string | undefined; outcome?: string | undefined; created?: string | undefined; end?: string | undefined; original?: string | undefined; duration?: string | number | undefined; code?: string | undefined; url?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined)[]"
+ "(Readonly<{ error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ active?: string | number | undefined; recovered?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ name?: string | undefined; description?: string | undefined; category?: string | undefined; id?: string | undefined; version?: string | undefined; license?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; category?: string[] | undefined; type?: string[] | undefined; id?: string | undefined; created?: string | undefined; outcome?: string | undefined; end?: string | undefined; original?: string | undefined; duration?: string | number | undefined; code?: string | undefined; url?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined)[]"
],
"path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts",
"deprecated": false,
@@ -1332,7 +1332,7 @@
"label": "IEvent",
"description": [],
"signature": [
- "DeepPartial | undefined; tags?: string[] | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ name?: string | undefined; description?: string | undefined; category?: string | undefined; id?: string | undefined; version?: string | undefined; license?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; category?: string[] | undefined; type?: string[] | undefined; id?: string | undefined; outcome?: string | undefined; created?: string | undefined; end?: string | undefined; original?: string | undefined; duration?: string | number | undefined; code?: string | undefined; url?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}>>> | undefined"
+ "DeepPartial | undefined; tags?: string[] | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ active?: string | number | undefined; recovered?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ name?: string | undefined; description?: string | undefined; category?: string | undefined; id?: string | undefined; version?: string | undefined; license?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; category?: string[] | undefined; type?: string[] | undefined; id?: string | undefined; created?: string | undefined; outcome?: string | undefined; end?: string | undefined; original?: string | undefined; duration?: string | number | undefined; code?: string | undefined; url?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}>>> | undefined"
],
"path": "x-pack/plugins/event_log/generated/schemas.ts",
"deprecated": false,
@@ -1347,7 +1347,7 @@
"label": "IValidatedEvent",
"description": [],
"signature": [
- "Readonly<{ error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ name?: string | undefined; description?: string | undefined; category?: string | undefined; id?: string | undefined; version?: string | undefined; license?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; category?: string[] | undefined; type?: string[] | undefined; id?: string | undefined; outcome?: string | undefined; created?: string | undefined; end?: string | undefined; original?: string | undefined; duration?: string | number | undefined; code?: string | undefined; url?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined"
+ "Readonly<{ error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; tags?: string[] | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; message?: string | undefined; kibana?: Readonly<{ alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; execution?: Readonly<{ status?: string | undefined; metrics?: Readonly<{ number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ active?: string | number | undefined; recovered?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_searches?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; es_search_duration_ms?: string | number | undefined; total_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; uuid?: string | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; rule?: Readonly<{ name?: string | undefined; description?: string | undefined; category?: string | undefined; id?: string | undefined; version?: string | undefined; license?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; event?: Readonly<{ start?: string | undefined; category?: string[] | undefined; type?: string[] | undefined; id?: string | undefined; created?: string | undefined; outcome?: string | undefined; end?: string | undefined; original?: string | undefined; duration?: string | number | undefined; code?: string | undefined; url?: string | undefined; action?: string | undefined; kind?: string | undefined; hash?: string | undefined; severity?: string | number | undefined; dataset?: string | undefined; ingested?: string | undefined; module?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; timezone?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; } & {}> | undefined"
],
"path": "x-pack/plugins/event_log/generated/schemas.ts",
"deprecated": false,
diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx
index 53b40226f0d78..140f35dea7cc4 100644
--- a/api_docs/event_log.mdx
+++ b/api_docs/event_log.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog
title: "eventLog"
image: https://source.unsplash.com/400x175/?github
description: API docs for the eventLog plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog']
---
import eventLogObj from './event_log.devdocs.json';
diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx
index 51a1fd22bc039..5d2d5c6c99e07 100644
--- a/api_docs/expression_error.mdx
+++ b/api_docs/expression_error.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError
title: "expressionError"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionError plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError']
---
import expressionErrorObj from './expression_error.devdocs.json';
diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx
index c23d6a727bb38..184191c6cd298 100644
--- a/api_docs/expression_gauge.mdx
+++ b/api_docs/expression_gauge.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge
title: "expressionGauge"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionGauge plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge']
---
import expressionGaugeObj from './expression_gauge.devdocs.json';
diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx
index 1196f07945026..205be987e15e5 100644
--- a/api_docs/expression_heatmap.mdx
+++ b/api_docs/expression_heatmap.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap
title: "expressionHeatmap"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionHeatmap plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap']
---
import expressionHeatmapObj from './expression_heatmap.devdocs.json';
diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx
index 046b3c31f107b..9d60a46814616 100644
--- a/api_docs/expression_image.mdx
+++ b/api_docs/expression_image.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage
title: "expressionImage"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionImage plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage']
---
import expressionImageObj from './expression_image.devdocs.json';
diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx
index 9a3e6bd0dc825..b44d904cdc0e5 100644
--- a/api_docs/expression_legacy_metric_vis.mdx
+++ b/api_docs/expression_legacy_metric_vis.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis
title: "expressionLegacyMetricVis"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionLegacyMetricVis plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis']
---
import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json';
diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx
index 76fd8a4068f19..22fc0e2475ccd 100644
--- a/api_docs/expression_metric.mdx
+++ b/api_docs/expression_metric.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric
title: "expressionMetric"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionMetric plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric']
---
import expressionMetricObj from './expression_metric.devdocs.json';
diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx
index 337717de0a65a..fd1807af21b02 100644
--- a/api_docs/expression_metric_vis.mdx
+++ b/api_docs/expression_metric_vis.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis
title: "expressionMetricVis"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionMetricVis plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis']
---
import expressionMetricVisObj from './expression_metric_vis.devdocs.json';
diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx
index 32c3971bd0909..e0264ca7b2d72 100644
--- a/api_docs/expression_partition_vis.mdx
+++ b/api_docs/expression_partition_vis.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis
title: "expressionPartitionVis"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionPartitionVis plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis']
---
import expressionPartitionVisObj from './expression_partition_vis.devdocs.json';
diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx
index ca6a5be21ec3a..071e730b126d5 100644
--- a/api_docs/expression_repeat_image.mdx
+++ b/api_docs/expression_repeat_image.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage
title: "expressionRepeatImage"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionRepeatImage plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage']
---
import expressionRepeatImageObj from './expression_repeat_image.devdocs.json';
diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx
index 90854571dc71c..b964071af3c95 100644
--- a/api_docs/expression_reveal_image.mdx
+++ b/api_docs/expression_reveal_image.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage
title: "expressionRevealImage"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionRevealImage plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage']
---
import expressionRevealImageObj from './expression_reveal_image.devdocs.json';
diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx
index 898224f9aba1a..3fb4a8e6e6545 100644
--- a/api_docs/expression_shape.mdx
+++ b/api_docs/expression_shape.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape
title: "expressionShape"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionShape plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape']
---
import expressionShapeObj from './expression_shape.devdocs.json';
diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx
index f6686201cb138..4c84f9b680739 100644
--- a/api_docs/expression_tagcloud.mdx
+++ b/api_docs/expression_tagcloud.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud
title: "expressionTagcloud"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionTagcloud plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud']
---
import expressionTagcloudObj from './expression_tagcloud.devdocs.json';
diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx
index c090283f69746..8b894b45d78d9 100644
--- a/api_docs/expression_x_y.mdx
+++ b/api_docs/expression_x_y.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY
title: "expressionXY"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressionXY plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY']
---
import expressionXYObj from './expression_x_y.devdocs.json';
diff --git a/api_docs/expressions.devdocs.json b/api_docs/expressions.devdocs.json
index cf0d00e1dd478..dfc68e39dd9c9 100644
--- a/api_docs/expressions.devdocs.json
+++ b/api_docs/expressions.devdocs.json
@@ -363,7 +363,7 @@
"label": "invokeChain",
"description": [],
"signature": [
- "(chainArr: ",
+ "([head, ...tail]: ",
{
"pluginId": "expressions",
"scope": "common",
@@ -373,7 +373,15 @@
},
"[], input: unknown) => ",
"Observable",
- ""
+ "<",
+ {
+ "pluginId": "expressions",
+ "scope": "common",
+ "docId": "kibExpressionsPluginApi",
+ "section": "def-common.ExpressionValueError",
+ "text": "ExpressionValueError"
+ },
+ " | ChainOutput>"
],
"path": "src/plugins/expressions/common/execution/execution.ts",
"deprecated": false,
@@ -384,7 +392,7 @@
"id": "def-public.Execution.invokeChain.$1",
"type": "Array",
"tags": [],
- "label": "chainArr",
+ "label": "[head, ...tail]",
"description": [],
"signature": [
{
@@ -11507,7 +11515,7 @@
"\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES"
],
"signature": [
- "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\""
+ "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"histogram\""
],
"path": "src/plugins/expressions/common/expression_types/specs/datatable.ts",
"deprecated": false,
@@ -13369,7 +13377,7 @@
"label": "invokeChain",
"description": [],
"signature": [
- "(chainArr: ",
+ "([head, ...tail]: ",
{
"pluginId": "expressions",
"scope": "common",
@@ -13379,7 +13387,15 @@
},
"[], input: unknown) => ",
"Observable",
- ""
+ "<",
+ {
+ "pluginId": "expressions",
+ "scope": "common",
+ "docId": "kibExpressionsPluginApi",
+ "section": "def-common.ExpressionValueError",
+ "text": "ExpressionValueError"
+ },
+ " | ChainOutput>"
],
"path": "src/plugins/expressions/common/execution/execution.ts",
"deprecated": false,
@@ -13390,7 +13406,7 @@
"id": "def-server.Execution.invokeChain.$1",
"type": "Array",
"tags": [],
- "label": "chainArr",
+ "label": "[head, ...tail]",
"description": [],
"signature": [
{
@@ -21037,7 +21053,7 @@
"\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES"
],
"signature": [
- "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\""
+ "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"histogram\""
],
"path": "src/plugins/expressions/common/expression_types/specs/datatable.ts",
"deprecated": false,
@@ -22158,7 +22174,7 @@
"label": "invokeChain",
"description": [],
"signature": [
- "(chainArr: ",
+ "([head, ...tail]: ",
{
"pluginId": "expressions",
"scope": "common",
@@ -22168,7 +22184,15 @@
},
"[], input: unknown) => ",
"Observable",
- ""
+ "<",
+ {
+ "pluginId": "expressions",
+ "scope": "common",
+ "docId": "kibExpressionsPluginApi",
+ "section": "def-common.ExpressionValueError",
+ "text": "ExpressionValueError"
+ },
+ " | ChainOutput>"
],
"path": "src/plugins/expressions/common/execution/execution.ts",
"deprecated": false,
@@ -22179,7 +22203,7 @@
"id": "def-common.Execution.invokeChain.$1",
"type": "Array",
"tags": [],
- "label": "chainArr",
+ "label": "[head, ...tail]",
"description": [],
"signature": [
{
@@ -29210,7 +29234,7 @@
"label": "type",
"description": [],
"signature": [
- "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\""
+ "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"histogram\""
],
"path": "src/plugins/expressions/common/expression_types/specs/datatable.ts",
"deprecated": false,
@@ -35226,7 +35250,7 @@
"\nThis type represents the `type` of any `DatatableColumn` in a `Datatable`.\nits duplicated from KBN_FIELD_TYPES"
],
"signature": [
- "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"conflict\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"histogram\""
+ "\"string\" | \"number\" | \"boolean\" | \"object\" | \"date\" | \"null\" | \"ip\" | \"nested\" | \"_source\" | \"attachment\" | \"geo_point\" | \"geo_shape\" | \"murmur3\" | \"unknown\" | \"conflict\" | \"histogram\""
],
"path": "src/plugins/expressions/common/expression_types/specs/datatable.ts",
"deprecated": false,
diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx
index cc0dfccc59154..050f57af12aab 100644
--- a/api_docs/expressions.mdx
+++ b/api_docs/expressions.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions
title: "expressions"
image: https://source.unsplash.com/400x175/?github
description: API docs for the expressions plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions']
---
import expressionsObj from './expressions.devdocs.json';
diff --git a/api_docs/features.devdocs.json b/api_docs/features.devdocs.json
index a6e9773502284..7f9018f5e89ce 100644
--- a/api_docs/features.devdocs.json
+++ b/api_docs/features.devdocs.json
@@ -64,7 +64,7 @@
"section": "def-common.SubFeaturePrivilegeGroupType",
"text": "SubFeaturePrivilegeGroupType"
},
- "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>"
+ "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>"
],
"path": "x-pack/plugins/features/common/kibana_feature.ts",
"deprecated": false,
@@ -1193,7 +1193,7 @@
"section": "def-common.SubFeaturePrivilegeGroupType",
"text": "SubFeaturePrivilegeGroupType"
},
- "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>"
+ "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>"
],
"path": "x-pack/plugins/features/common/kibana_feature.ts",
"deprecated": false,
@@ -2872,7 +2872,7 @@
"section": "def-common.SubFeaturePrivilegeGroupType",
"text": "SubFeaturePrivilegeGroupType"
},
- "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>"
+ "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>"
],
"path": "x-pack/plugins/features/common/kibana_feature.ts",
"deprecated": false,
@@ -3122,7 +3122,7 @@
"section": "def-common.SubFeaturePrivilegeGroupType",
"text": "SubFeaturePrivilegeGroupType"
},
- "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>"
+ "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>"
],
"path": "x-pack/plugins/features/common/sub_feature.ts",
"deprecated": false,
@@ -3159,7 +3159,7 @@
"section": "def-common.SubFeaturePrivilegeGroupType",
"text": "SubFeaturePrivilegeGroupType"
},
- "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]"
+ "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]"
],
"path": "x-pack/plugins/features/common/sub_feature.ts",
"deprecated": false,
@@ -3181,7 +3181,7 @@
"section": "def-common.SubFeaturePrivilegeGroupType",
"text": "SubFeaturePrivilegeGroupType"
},
- "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }"
+ "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }"
],
"path": "x-pack/plugins/features/common/sub_feature.ts",
"deprecated": false,
diff --git a/api_docs/features.mdx b/api_docs/features.mdx
index 116d58a6218b9..513017f35056a 100644
--- a/api_docs/features.mdx
+++ b/api_docs/features.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features
title: "features"
image: https://source.unsplash.com/400x175/?github
description: API docs for the features plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features']
---
import featuresObj from './features.devdocs.json';
diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx
index dbb19f977cc78..b49361795cb22 100644
--- a/api_docs/field_formats.mdx
+++ b/api_docs/field_formats.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats
title: "fieldFormats"
image: https://source.unsplash.com/400x175/?github
description: API docs for the fieldFormats plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats']
---
import fieldFormatsObj from './field_formats.devdocs.json';
diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx
index 31c1b78e94389..c431e9780deb9 100644
--- a/api_docs/file_upload.mdx
+++ b/api_docs/file_upload.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload
title: "fileUpload"
image: https://source.unsplash.com/400x175/?github
description: API docs for the fileUpload plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload']
---
import fileUploadObj from './file_upload.devdocs.json';
diff --git a/api_docs/files.devdocs.json b/api_docs/files.devdocs.json
index 358859310c797..7c94fcdac9025 100644
--- a/api_docs/files.devdocs.json
+++ b/api_docs/files.devdocs.json
@@ -438,10 +438,10 @@
"tags": [],
"label": "getDownloadHref",
"description": [
- "\nGet a string for downloading a file that can be passed to a button element's\nhref for download."
+ "\nGet a string for downloading a file that can be passed to a button element's\nhref for download.\n"
],
"signature": [
- "(file: ",
+ "(args: Pick<",
{
"pluginId": "files",
"scope": "common",
@@ -449,7 +449,7 @@
"section": "def-common.FileJSON",
"text": "FileJSON"
},
- ") => string"
+ ", \"id\" | \"fileKind\">) => string"
],
"path": "x-pack/plugins/files/public/types.ts",
"deprecated": false,
@@ -460,9 +460,12 @@
"id": "def-public.FilesClient.getDownloadHref.$1",
"type": "Object",
"tags": [],
- "label": "file",
- "description": [],
+ "label": "args",
+ "description": [
+ "- get download URL args"
+ ],
"signature": [
+ "Pick<",
{
"pluginId": "files",
"scope": "common",
@@ -470,7 +473,7 @@
"section": "def-common.FileJSON",
"text": "FileJSON"
},
- ""
+ ", \"id\" | \"fileKind\">"
],
"path": "x-pack/plugins/files/public/types.ts",
"deprecated": false,
@@ -1129,7 +1132,7 @@
"section": "def-common.FileJSON",
"text": "FileJSON"
},
- "; }>; upload: (arg: Omit & Readonly<{ selfDestructOnAbort?: boolean | undefined; } & {}> & { body: unknown; kind: string; abortSignal?: AbortSignal | undefined; contentType?: string | undefined; }, \"kind\">) => Promise<{ ok: true; size: number; }>; download: (arg: Omit & { kind: string; }, \"kind\">) => Promise; getDownloadHref: (arg: Omit<",
+ "; }>; upload: (arg: Omit & Readonly<{ selfDestructOnAbort?: boolean | undefined; } & {}> & { body: unknown; kind: string; abortSignal?: AbortSignal | undefined; contentType?: string | undefined; }, \"kind\">) => Promise<{ ok: true; size: number; }>; download: (arg: Omit & { kind: string; }, \"kind\">) => Promise; getDownloadHref: (arg: Omit, \"kind\">) => string; share: (arg: Omit & Readonly<{} & { fileId: string; }> & { kind: string; }, \"kind\">) => Promise<",
+ ", \"id\" | \"fileKind\">, \"kind\">) => string; share: (arg: Omit & Readonly<{} & { fileId: string; }> & { kind: string; }, \"kind\">) => Promise<",
{
"pluginId": "files",
"scope": "common",
diff --git a/api_docs/files.mdx b/api_docs/files.mdx
index 149bec1a8acb5..ee3ba1cdfdacf 100644
--- a/api_docs/files.mdx
+++ b/api_docs/files.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files
title: "files"
image: https://source.unsplash.com/400x175/?github
description: API docs for the files plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files']
---
import filesObj from './files.devdocs.json';
@@ -21,7 +21,7 @@ Contact [@elastic/kibana-app-services](https://github.com/orgs/elastic/teams/tea
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 263 | 0 | 15 | 2 |
+| 263 | 0 | 14 | 2 |
## Client
diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json
index a35508ec3930f..76458c52782a6 100644
--- a/api_docs/fleet.devdocs.json
+++ b/api_docs/fleet.devdocs.json
@@ -1225,6 +1225,146 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "fleet",
+ "id": "def-public.PackagePolicyCreateMultiStepExtension",
+ "type": "Interface",
+ "tags": [],
+ "label": "PackagePolicyCreateMultiStepExtension",
+ "description": [
+ "Extension point registration contract for Integration Policy Create views in multi-step onboarding"
+ ],
+ "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "fleet",
+ "id": "def-public.PackagePolicyCreateMultiStepExtension.package",
+ "type": "string",
+ "tags": [],
+ "label": "package",
+ "description": [],
+ "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "fleet",
+ "id": "def-public.PackagePolicyCreateMultiStepExtension.view",
+ "type": "string",
+ "tags": [],
+ "label": "view",
+ "description": [],
+ "signature": [
+ "\"package-policy-create-multi-step\""
+ ],
+ "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "fleet",
+ "id": "def-public.PackagePolicyCreateMultiStepExtension.Component",
+ "type": "Function",
+ "tags": [],
+ "label": "Component",
+ "description": [],
+ "signature": [
+ "React.ExoticComponent<(",
+ {
+ "pluginId": "fleet",
+ "scope": "public",
+ "docId": "kibFleetPluginApi",
+ "section": "def-public.PackagePolicyCreateMultiStepExtensionComponentProps",
+ "text": "PackagePolicyCreateMultiStepExtensionComponentProps"
+ },
+ " & React.RefAttributes>) | (",
+ {
+ "pluginId": "fleet",
+ "scope": "public",
+ "docId": "kibFleetPluginApi",
+ "section": "def-public.PackagePolicyCreateMultiStepExtensionComponentProps",
+ "text": "PackagePolicyCreateMultiStepExtensionComponentProps"
+ },
+ " & { children?: React.ReactNode; })> & { readonly _result: ",
+ {
+ "pluginId": "fleet",
+ "scope": "public",
+ "docId": "kibFleetPluginApi",
+ "section": "def-public.PackagePolicyCreateMultiStepExtensionComponent",
+ "text": "PackagePolicyCreateMultiStepExtensionComponent"
+ },
+ "; }"
+ ],
+ "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "fleet",
+ "id": "def-public.PackagePolicyCreateMultiStepExtension.Component.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "fleet",
+ "id": "def-public.PackagePolicyCreateMultiStepExtensionComponentProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "PackagePolicyCreateMultiStepExtensionComponentProps",
+ "description": [],
+ "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "fleet",
+ "id": "def-public.PackagePolicyCreateMultiStepExtensionComponentProps.newPolicy",
+ "type": "Object",
+ "tags": [],
+ "label": "newPolicy",
+ "description": [
+ "The integration policy being created"
+ ],
+ "signature": [
+ {
+ "pluginId": "fleet",
+ "scope": "common",
+ "docId": "kibFleetPluginApi",
+ "section": "def-common.NewPackagePolicy",
+ "text": "NewPackagePolicy"
+ }
+ ],
+ "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "fleet",
"id": "def-public.PackagePolicyEditExtension",
@@ -1925,10 +2065,10 @@
"id": "def-public.UIExtensionsStorage.Unnamed",
"type": "IndexSignature",
"tags": [],
- "label": "[key: string]: Partial>",
+ "label": "[key: string]: Partial>",
"description": [],
"signature": [
- "[key: string]: Partial | React.FunctionComponent<",
+ {
+ "pluginId": "fleet",
+ "scope": "public",
+ "docId": "kibFleetPluginApi",
+ "section": "def-public.PackagePolicyCreateMultiStepExtensionComponentProps",
+ "text": "PackagePolicyCreateMultiStepExtensionComponentProps"
+ },
+ ">"
+ ],
+ "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "fleet",
"id": "def-public.PackagePolicyEditExtensionComponent",
@@ -2269,6 +2442,14 @@
"docId": "kibFleetPluginApi",
"section": "def-public.AgentEnrollmentFlyoutFinalStepExtension",
"text": "AgentEnrollmentFlyoutFinalStepExtension"
+ },
+ " | ",
+ {
+ "pluginId": "fleet",
+ "scope": "public",
+ "docId": "kibFleetPluginApi",
+ "section": "def-public.PackagePolicyCreateMultiStepExtension",
+ "text": "PackagePolicyCreateMultiStepExtension"
}
],
"path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
@@ -2365,6 +2546,14 @@
"docId": "kibFleetPluginApi",
"section": "def-public.AgentEnrollmentFlyoutFinalStepExtension",
"text": "AgentEnrollmentFlyoutFinalStepExtension"
+ },
+ " | ",
+ {
+ "pluginId": "fleet",
+ "scope": "public",
+ "docId": "kibFleetPluginApi",
+ "section": "def-public.PackagePolicyCreateMultiStepExtension",
+ "text": "PackagePolicyCreateMultiStepExtension"
}
],
"path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
@@ -3725,6 +3914,14 @@
"docId": "kibFleetPluginApi",
"section": "def-public.AgentEnrollmentFlyoutFinalStepExtension",
"text": "AgentEnrollmentFlyoutFinalStepExtension"
+ },
+ " | ",
+ {
+ "pluginId": "fleet",
+ "scope": "public",
+ "docId": "kibFleetPluginApi",
+ "section": "def-public.PackagePolicyCreateMultiStepExtension",
+ "text": "PackagePolicyCreateMultiStepExtension"
}
],
"path": "x-pack/plugins/fleet/public/types/ui_extensions.ts",
@@ -6227,7 +6424,7 @@
"section": "def-common.AuthenticatedUser",
"text": "AuthenticatedUser"
},
- " | undefined; force?: boolean | undefined; } | undefined, currentVersion?: string | undefined) => Promise<",
+ " | undefined; force?: boolean | undefined; skipUniqueNameVerification?: boolean | undefined; } | undefined, currentVersion?: string | undefined) => Promise<",
{
"pluginId": "fleet",
"scope": "common",
@@ -6352,6 +6549,20 @@
"path": "x-pack/plugins/fleet/server/services/package_policy_service.ts",
"deprecated": false,
"trackAdoption": false
+ },
+ {
+ "parentPluginId": "fleet",
+ "id": "def-server.PackagePolicyClient.update.$5.skipUniqueNameVerification",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "skipUniqueNameVerification",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "x-pack/plugins/fleet/server/services/package_policy_service.ts",
+ "deprecated": false,
+ "trackAdoption": false
}
]
},
@@ -6959,13 +7170,7 @@
"text": "NewPackagePolicy"
},
", context: ",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
", request: ",
"KibanaRequest",
") => Promise) => Promise<",
@@ -7400,13 +7593,7 @@
"label": "context",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- }
+ "RequestHandlerContext"
],
"path": "x-pack/plugins/fleet/server/types/extensions.ts",
"deprecated": false,
@@ -7498,13 +7685,7 @@
"text": "PackagePolicy"
},
", context: ",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
", request: ",
"KibanaRequest",
") => Promise<",
@@ -7550,13 +7731,7 @@
"label": "context",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- }
+ "RequestHandlerContext"
],
"path": "x-pack/plugins/fleet/server/types/extensions.ts",
"deprecated": false,
@@ -7597,13 +7772,7 @@
"text": "UpdatePackagePolicy"
},
", context: ",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
", request: ",
"KibanaRequest",
") => Promise<",
@@ -7649,13 +7818,7 @@
"label": "context",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- }
+ "RequestHandlerContext"
],
"path": "x-pack/plugins/fleet/server/types/extensions.ts",
"deprecated": false,
@@ -8227,7 +8390,7 @@
"label": "status",
"description": [],
"signature": [
- "\"active\" | \"inactive\""
+ "\"inactive\" | \"active\""
],
"path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts",
"deprecated": false,
@@ -9276,14 +9439,14 @@
{
"parentPluginId": "fleet",
"id": "def-common.FleetServerAgent.upgraded_at",
- "type": "string",
+ "type": "CompoundType",
"tags": [],
"label": "upgraded_at",
"description": [
"\nDate/time the Elastic Agent was last upgraded"
],
"signature": [
- "string | undefined"
+ "string | null | undefined"
],
"path": "x-pack/plugins/fleet/common/types/models/agent.ts",
"deprecated": false,
@@ -9305,22 +9468,6 @@
"deprecated": false,
"trackAdoption": false
},
- {
- "parentPluginId": "fleet",
- "id": "def-common.FleetServerAgent.upgrade_status",
- "type": "CompoundType",
- "tags": [],
- "label": "upgrade_status",
- "description": [
- "\nUpgrade status"
- ],
- "signature": [
- "\"completed\" | \"started\" | undefined"
- ],
- "path": "x-pack/plugins/fleet/common/types/models/agent.ts",
- "deprecated": false,
- "trackAdoption": false
- },
{
"parentPluginId": "fleet",
"id": "def-common.FleetServerAgent.access_api_key_id",
@@ -9498,6 +9645,22 @@
"deprecated": false,
"trackAdoption": false
},
+ {
+ "parentPluginId": "fleet",
+ "id": "def-common.FleetServerAgent.last_checkin_message",
+ "type": "string",
+ "tags": [],
+ "label": "last_checkin_message",
+ "description": [
+ "\nLast checkin message"
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/fleet/common/types/models/agent.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
{
"parentPluginId": "fleet",
"id": "def-common.FleetServerAgent.default_api_key_id",
@@ -14202,21 +14365,6 @@
"trackAdoption": false,
"initialIsOpen": false
},
- {
- "parentPluginId": "fleet",
- "id": "def-common.ENDPOINT_PRIVILEGES",
- "type": "Array",
- "tags": [],
- "label": "ENDPOINT_PRIVILEGES",
- "description": [],
- "signature": [
- "string[]"
- ],
- "path": "x-pack/plugins/fleet/common/constants/authz.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
{
"parentPluginId": "fleet",
"id": "def-common.EsAssetReference",
@@ -15112,7 +15260,7 @@
"label": "PackageSpecCategory",
"description": [],
"signature": [
- "\"custom\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\""
+ "\"custom\" | \"aws\" | \"azure\" | \"cloud\" | \"config_management\" | \"containers\" | \"crm\" | \"datastore\" | \"elastic_stack\" | \"google_cloud\" | \"infrastructure\" | \"kubernetes\" | \"languages\" | \"message_queue\" | \"monitoring\" | \"network\" | \"notification\" | \"os_system\" | \"productivity\" | \"security\" | \"support\" | \"threat_intel\" | \"ticketing\" | \"version_control\" | \"web\""
],
"path": "x-pack/plugins/fleet/common/types/models/package_spec.ts",
"deprecated": false,
@@ -16546,6 +16694,21 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "fleet",
+ "id": "def-common.ENDPOINT_PRIVILEGES",
+ "type": "Object",
+ "tags": [],
+ "label": "ENDPOINT_PRIVILEGES",
+ "description": [],
+ "signature": [
+ "readonly [\"writeEndpointList\", \"readEndpointList\", \"writeTrustedApplications\", \"readTrustedApplications\", \"writeHostIsolationExceptions\", \"readHostIsolationExceptions\", \"writeBlocklist\", \"readBlocklist\", \"writeEventFilters\", \"readEventFilters\", \"writePolicyManagement\", \"readPolicyManagement\", \"writeActionsLogManagement\", \"readActionsLogManagement\", \"writeHostIsolation\", \"writeProcessOperations\", \"writeFileOperations\"]"
+ ],
+ "path": "x-pack/plugins/fleet/common/constants/authz.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "fleet",
"id": "def-common.EPM_API_ROUTES",
diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx
index 173f9f76092f4..0dc50255cea65 100644
--- a/api_docs/fleet.mdx
+++ b/api_docs/fleet.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet
title: "fleet"
image: https://source.unsplash.com/400x175/?github
description: API docs for the fleet plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet']
---
import fleetObj from './fleet.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Fleet](https://github.com/orgs/elastic/teams/fleet) for questions regar
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 988 | 3 | 888 | 17 |
+| 997 | 3 | 893 | 17 |
## Client
diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx
index c689891e7444b..b4fff902dfabe 100644
--- a/api_docs/global_search.mdx
+++ b/api_docs/global_search.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch
title: "globalSearch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the globalSearch plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch']
---
import globalSearchObj from './global_search.devdocs.json';
diff --git a/api_docs/guided_onboarding.devdocs.json b/api_docs/guided_onboarding.devdocs.json
index 27b0b8446a7d8..8b44efa700b66 100644
--- a/api_docs/guided_onboarding.devdocs.json
+++ b/api_docs/guided_onboarding.devdocs.json
@@ -6,44 +6,111 @@
"interfaces": [
{
"parentPluginId": "guidedOnboarding",
- "id": "def-public.GuidedOnboardingState",
+ "id": "def-public.GuideState",
"type": "Interface",
"tags": [],
- "label": "GuidedOnboardingState",
+ "label": "GuideState",
"description": [],
- "path": "src/plugins/guided_onboarding/public/types.ts",
+ "path": "src/plugins/guided_onboarding/common/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "guidedOnboarding",
- "id": "def-public.GuidedOnboardingState.activeGuide",
+ "id": "def-public.GuideState.guideId",
"type": "CompoundType",
"tags": [],
- "label": "activeGuide",
+ "label": "guideId",
"description": [],
"signature": [
- {
- "pluginId": "guidedOnboarding",
- "scope": "public",
- "docId": "kibGuidedOnboardingPluginApi",
- "section": "def-public.UseCase",
- "text": "UseCase"
- },
- " | \"unset\""
+ "\"search\" | \"security\" | \"observability\""
],
- "path": "src/plugins/guided_onboarding/public/types.ts",
+ "path": "src/plugins/guided_onboarding/common/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "guidedOnboarding",
- "id": "def-public.GuidedOnboardingState.activeStep",
- "type": "string",
+ "id": "def-public.GuideState.status",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "status",
+ "description": [],
+ "signature": [
+ "\"complete\" | \"in_progress\" | \"ready_to_complete\""
+ ],
+ "path": "src/plugins/guided_onboarding/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.GuideState.isActive",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "isActive",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "src/plugins/guided_onboarding/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.GuideState.steps",
+ "type": "Array",
+ "tags": [],
+ "label": "steps",
+ "description": [],
+ "signature": [
+ "GuideStep",
+ "[]"
+ ],
+ "path": "src/plugins/guided_onboarding/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.GuideStep",
+ "type": "Interface",
+ "tags": [],
+ "label": "GuideStep",
+ "description": [],
+ "path": "src/plugins/guided_onboarding/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.GuideStep.id",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "signature": [
+ "\"add_data\" | \"view_dashboard\" | \"tour_observability\" | \"rules\" | \"alerts\" | \"cases\" | \"browse_docs\" | \"search_experience\""
+ ],
+ "path": "src/plugins/guided_onboarding/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.GuideStep.status",
+ "type": "CompoundType",
"tags": [],
- "label": "activeStep",
+ "label": "status",
"description": [],
- "path": "src/plugins/guided_onboarding/public/types.ts",
+ "signature": [
+ "\"complete\" | \"in_progress\" | \"inactive\" | \"active\""
+ ],
+ "path": "src/plugins/guided_onboarding/common/types.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -55,21 +122,93 @@
"misc": [
{
"parentPluginId": "guidedOnboarding",
- "id": "def-public.UseCase",
+ "id": "def-public.GuideId",
"type": "Type",
"tags": [],
- "label": "UseCase",
+ "label": "GuideId",
"description": [],
"signature": [
"\"search\" | \"security\" | \"observability\""
],
- "path": "src/plugins/guided_onboarding/public/types.ts",
+ "path": "src/plugins/guided_onboarding/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.GuideStepIds",
+ "type": "Type",
+ "tags": [],
+ "label": "GuideStepIds",
+ "description": [],
+ "signature": [
+ "\"add_data\" | \"view_dashboard\" | \"tour_observability\" | \"rules\" | \"alerts\" | \"cases\" | \"browse_docs\" | \"search_experience\""
+ ],
+ "path": "src/plugins/guided_onboarding/common/types.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
}
],
- "objects": [],
+ "objects": [
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.guidesConfig",
+ "type": "Object",
+ "tags": [],
+ "label": "guidesConfig",
+ "description": [],
+ "path": "src/plugins/guided_onboarding/public/constants/guides_config/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.guidesConfig.security",
+ "type": "Object",
+ "tags": [],
+ "label": "security",
+ "description": [],
+ "signature": [
+ "GuideConfig"
+ ],
+ "path": "src/plugins/guided_onboarding/public/constants/guides_config/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.guidesConfig.observability",
+ "type": "Object",
+ "tags": [],
+ "label": "observability",
+ "description": [],
+ "signature": [
+ "GuideConfig"
+ ],
+ "path": "src/plugins/guided_onboarding/public/constants/guides_config/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "guidedOnboarding",
+ "id": "def-public.guidesConfig.search",
+ "type": "Object",
+ "tags": [],
+ "label": "search",
+ "description": [],
+ "signature": [
+ "GuideConfig"
+ ],
+ "path": "src/plugins/guided_onboarding/public/constants/guides_config/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
"setup": {
"parentPluginId": "guidedOnboarding",
"id": "def-public.GuidedOnboardingPluginSetup",
@@ -156,53 +295,7 @@
"functions": [],
"interfaces": [],
"enums": [],
- "misc": [
- {
- "parentPluginId": "guidedOnboarding",
- "id": "def-common.API_BASE_PATH",
- "type": "string",
- "tags": [],
- "label": "API_BASE_PATH",
- "description": [],
- "signature": [
- "\"/api/guided_onboarding\""
- ],
- "path": "src/plugins/guided_onboarding/common/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "guidedOnboarding",
- "id": "def-common.PLUGIN_ID",
- "type": "string",
- "tags": [],
- "label": "PLUGIN_ID",
- "description": [],
- "signature": [
- "\"guidedOnboarding\""
- ],
- "path": "src/plugins/guided_onboarding/common/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "guidedOnboarding",
- "id": "def-common.PLUGIN_NAME",
- "type": "string",
- "tags": [],
- "label": "PLUGIN_NAME",
- "description": [],
- "signature": [
- "\"guidedOnboarding\""
- ],
- "path": "src/plugins/guided_onboarding/common/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- }
- ],
+ "misc": [],
"objects": []
}
}
\ No newline at end of file
diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx
index 5dfb91864c060..9aa86b82df100 100644
--- a/api_docs/guided_onboarding.mdx
+++ b/api_docs/guided_onboarding.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding
title: "guidedOnboarding"
image: https://source.unsplash.com/400x175/?github
description: API docs for the guidedOnboarding plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding']
---
import guidedOnboardingObj from './guided_onboarding.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onbo
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 12 | 0 | 12 | 1 |
+| 19 | 0 | 19 | 3 |
## Client
@@ -31,6 +31,9 @@ Contact [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onbo
### Start
+### Objects
+
+
### Interfaces
@@ -45,8 +48,3 @@ Contact [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onbo
### Start
-## Common
-
-### Consts, variables and types
-
-
diff --git a/api_docs/home.mdx b/api_docs/home.mdx
index 62db97259ee59..4c129f6d92a48 100644
--- a/api_docs/home.mdx
+++ b/api_docs/home.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home
title: "home"
image: https://source.unsplash.com/400x175/?github
description: API docs for the home plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home']
---
import homeObj from './home.devdocs.json';
diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx
index 87bd3e83a63b9..d6393f4b44397 100644
--- a/api_docs/index_lifecycle_management.mdx
+++ b/api_docs/index_lifecycle_management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement
title: "indexLifecycleManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the indexLifecycleManagement plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement']
---
import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json';
diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx
index eee8cda64e245..b7f14de7ee103 100644
--- a/api_docs/index_management.mdx
+++ b/api_docs/index_management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement
title: "indexManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the indexManagement plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement']
---
import indexManagementObj from './index_management.devdocs.json';
diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx
index fd32cbab99193..ea6ecce3d4d9b 100644
--- a/api_docs/infra.mdx
+++ b/api_docs/infra.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra
title: "infra"
image: https://source.unsplash.com/400x175/?github
description: API docs for the infra plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra']
---
import infraObj from './infra.devdocs.json';
diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx
index 00175e67b30b5..c30aea80c5cb0 100644
--- a/api_docs/inspector.mdx
+++ b/api_docs/inspector.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector
title: "inspector"
image: https://source.unsplash.com/400x175/?github
description: API docs for the inspector plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector']
---
import inspectorObj from './inspector.devdocs.json';
diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx
index 33ee5123bb5cd..f4a2df60fa9ea 100644
--- a/api_docs/interactive_setup.mdx
+++ b/api_docs/interactive_setup.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup
title: "interactiveSetup"
image: https://source.unsplash.com/400x175/?github
description: API docs for the interactiveSetup plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup']
---
import interactiveSetupObj from './interactive_setup.devdocs.json';
diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx
index bf08287ddc424..0dcbd76b6b451 100644
--- a/api_docs/kbn_ace.mdx
+++ b/api_docs/kbn_ace.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace
title: "@kbn/ace"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ace plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace']
---
import kbnAceObj from './kbn_ace.devdocs.json';
diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx
index d4cb51aa5139f..ac530589f0fb0 100644
--- a/api_docs/kbn_aiops_components.mdx
+++ b/api_docs/kbn_aiops_components.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components
title: "@kbn/aiops-components"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/aiops-components plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components']
---
import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json';
diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx
index 389117150bd55..c87bec0a9bb9d 100644
--- a/api_docs/kbn_aiops_utils.mdx
+++ b/api_docs/kbn_aiops_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils
title: "@kbn/aiops-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/aiops-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils']
---
import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json';
diff --git a/api_docs/kbn_alerts.mdx b/api_docs/kbn_alerts.mdx
index 749a781cf0e47..eb196b2621aed 100644
--- a/api_docs/kbn_alerts.mdx
+++ b/api_docs/kbn_alerts.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts
title: "@kbn/alerts"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/alerts plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts']
---
import kbnAlertsObj from './kbn_alerts.devdocs.json';
diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx
index c0f7031e47a7a..bc4a0560544de 100644
--- a/api_docs/kbn_analytics.mdx
+++ b/api_docs/kbn_analytics.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics
title: "@kbn/analytics"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/analytics plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics']
---
import kbnAnalyticsObj from './kbn_analytics.devdocs.json';
diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx
index 1595bab913e80..a86d78bf6e573 100644
--- a/api_docs/kbn_analytics_client.mdx
+++ b/api_docs/kbn_analytics_client.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client
title: "@kbn/analytics-client"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/analytics-client plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client']
---
import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json';
diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx
index ba7823ee64ac1..42bf70404bb69 100644
--- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx
+++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser
title: "@kbn/analytics-shippers-elastic-v3-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser']
---
import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json';
diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx
index 105ff1b565b71..a3faccdf22fce 100644
--- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx
+++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common
title: "@kbn/analytics-shippers-elastic-v3-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common']
---
import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json';
diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx
index ef9a534fa3470..263d6af109410 100644
--- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx
+++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server
title: "@kbn/analytics-shippers-elastic-v3-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server']
---
import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json';
diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx
index 6a263b0defbb9..1f272ffdf3eca 100644
--- a/api_docs/kbn_analytics_shippers_fullstory.mdx
+++ b/api_docs/kbn_analytics_shippers_fullstory.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory
title: "@kbn/analytics-shippers-fullstory"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/analytics-shippers-fullstory plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory']
---
import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json';
diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx
index defb49cbe69ea..9137a34ac7cf5 100644
--- a/api_docs/kbn_apm_config_loader.mdx
+++ b/api_docs/kbn_apm_config_loader.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader
title: "@kbn/apm-config-loader"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/apm-config-loader plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader']
---
import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json';
diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx
index 0a80a8f9d7c64..69b4ee9c3bd01 100644
--- a/api_docs/kbn_apm_synthtrace.mdx
+++ b/api_docs/kbn_apm_synthtrace.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace
title: "@kbn/apm-synthtrace"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/apm-synthtrace plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace']
---
import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json';
diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx
index f87f80a173bee..e8948c5151a3e 100644
--- a/api_docs/kbn_apm_utils.mdx
+++ b/api_docs/kbn_apm_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils
title: "@kbn/apm-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/apm-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils']
---
import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json';
diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx
index 465473d3ef7cd..1660f71a7d421 100644
--- a/api_docs/kbn_axe_config.mdx
+++ b/api_docs/kbn_axe_config.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config
title: "@kbn/axe-config"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/axe-config plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config']
---
import kbnAxeConfigObj from './kbn_axe_config.devdocs.json';
diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx
index 8bc8181b1c666..548fc0c4f7426 100644
--- a/api_docs/kbn_chart_icons.mdx
+++ b/api_docs/kbn_chart_icons.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons
title: "@kbn/chart-icons"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/chart-icons plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons']
---
import kbnChartIconsObj from './kbn_chart_icons.devdocs.json';
diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx
index 26ac1ad8da546..b57e2abe5c1d7 100644
--- a/api_docs/kbn_ci_stats_core.mdx
+++ b/api_docs/kbn_ci_stats_core.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core
title: "@kbn/ci-stats-core"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ci-stats-core plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core']
---
import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json';
diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx
index 79c65aec69dbb..f8182e50d0e14 100644
--- a/api_docs/kbn_ci_stats_performance_metrics.mdx
+++ b/api_docs/kbn_ci_stats_performance_metrics.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics
title: "@kbn/ci-stats-performance-metrics"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ci-stats-performance-metrics plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics']
---
import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json';
diff --git a/api_docs/kbn_ci_stats_reporter.devdocs.json b/api_docs/kbn_ci_stats_reporter.devdocs.json
index f831ac502a939..18389c93d07ca 100644
--- a/api_docs/kbn_ci_stats_reporter.devdocs.json
+++ b/api_docs/kbn_ci_stats_reporter.devdocs.json
@@ -654,7 +654,7 @@
"\nOverall result of this test group"
],
"signature": [
- "\"fail\" | \"pass\" | \"skip\""
+ "\"skip\" | \"fail\" | \"pass\""
],
"path": "packages/kbn-ci-stats-reporter/src/ci_stats_test_group_types.ts",
"deprecated": false,
@@ -755,7 +755,7 @@
"\n\"fail\", \"pass\" or \"skip\", the result of the tests"
],
"signature": [
- "\"fail\" | \"pass\" | \"skip\""
+ "\"skip\" | \"fail\" | \"pass\""
],
"path": "packages/kbn-ci-stats-reporter/src/ci_stats_test_group_types.ts",
"deprecated": false,
@@ -1041,7 +1041,7 @@
"label": "CiStatsTestResult",
"description": [],
"signature": [
- "\"fail\" | \"pass\" | \"skip\""
+ "\"skip\" | \"fail\" | \"pass\""
],
"path": "packages/kbn-ci-stats-reporter/src/ci_stats_test_group_types.ts",
"deprecated": false,
diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx
index 4b5645cc4b132..87058eea7d0c7 100644
--- a/api_docs/kbn_ci_stats_reporter.mdx
+++ b/api_docs/kbn_ci_stats_reporter.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter
title: "@kbn/ci-stats-reporter"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ci-stats-reporter plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter']
---
import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json';
diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx
index fb74c109385e8..399bb2c474d90 100644
--- a/api_docs/kbn_cli_dev_mode.mdx
+++ b/api_docs/kbn_cli_dev_mode.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode
title: "@kbn/cli-dev-mode"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/cli-dev-mode plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode']
---
import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json';
diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx
index 6dfdbdc6a7e19..d3a842a24ce84 100644
--- a/api_docs/kbn_coloring.mdx
+++ b/api_docs/kbn_coloring.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring
title: "@kbn/coloring"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/coloring plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring']
---
import kbnColoringObj from './kbn_coloring.devdocs.json';
diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx
index e5787da85b661..8a6f64ea706cc 100644
--- a/api_docs/kbn_config.mdx
+++ b/api_docs/kbn_config.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config
title: "@kbn/config"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/config plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config']
---
import kbnConfigObj from './kbn_config.devdocs.json';
diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx
index 9f30996b585d7..175a3130aaf9c 100644
--- a/api_docs/kbn_config_mocks.mdx
+++ b/api_docs/kbn_config_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks
title: "@kbn/config-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/config-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks']
---
import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json';
diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx
index 97256b7516108..d369d314f87e1 100644
--- a/api_docs/kbn_config_schema.mdx
+++ b/api_docs/kbn_config_schema.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema
title: "@kbn/config-schema"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/config-schema plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema']
---
import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json';
diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx
index 12779749648df..9dba4bbf3a309 100644
--- a/api_docs/kbn_content_management_table_list.mdx
+++ b/api_docs/kbn_content_management_table_list.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list
title: "@kbn/content-management-table-list"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/content-management-table-list plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list']
---
import kbnContentManagementTableListObj from './kbn_content_management_table_list.devdocs.json';
diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx
index 89fc744b1c703..3220f4f43ec66 100644
--- a/api_docs/kbn_core_analytics_browser.mdx
+++ b/api_docs/kbn_core_analytics_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser
title: "@kbn/core-analytics-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-analytics-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser']
---
import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json';
diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx
index bad36ac54b215..bc77e3013d70c 100644
--- a/api_docs/kbn_core_analytics_browser_internal.mdx
+++ b/api_docs/kbn_core_analytics_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal
title: "@kbn/core-analytics-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-analytics-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal']
---
import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx
index 5db786b7754f0..fe9a5a7a8033b 100644
--- a/api_docs/kbn_core_analytics_browser_mocks.mdx
+++ b/api_docs/kbn_core_analytics_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks
title: "@kbn/core-analytics-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-analytics-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks']
---
import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx
index 0141718a2ccd2..8ba5c5458189a 100644
--- a/api_docs/kbn_core_analytics_server.mdx
+++ b/api_docs/kbn_core_analytics_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server
title: "@kbn/core-analytics-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-analytics-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server']
---
import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json';
diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx
index 2d21be701e133..b32913e076b17 100644
--- a/api_docs/kbn_core_analytics_server_internal.mdx
+++ b/api_docs/kbn_core_analytics_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal
title: "@kbn/core-analytics-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-analytics-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal']
---
import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx
index 1dc30aff04e5d..ad1626e300d32 100644
--- a/api_docs/kbn_core_analytics_server_mocks.mdx
+++ b/api_docs/kbn_core_analytics_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks
title: "@kbn/core-analytics-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-analytics-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks']
---
import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx
index 7e999f21f3e1a..cb8729ded12a4 100644
--- a/api_docs/kbn_core_application_browser.mdx
+++ b/api_docs/kbn_core_application_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser
title: "@kbn/core-application-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-application-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser']
---
import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json';
diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx
index c957561aa4eca..01f8418de314e 100644
--- a/api_docs/kbn_core_application_browser_internal.mdx
+++ b/api_docs/kbn_core_application_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal
title: "@kbn/core-application-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-application-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal']
---
import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx
index 6ba6188770d4c..8325f55e3db44 100644
--- a/api_docs/kbn_core_application_browser_mocks.mdx
+++ b/api_docs/kbn_core_application_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks
title: "@kbn/core-application-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-application-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks']
---
import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx
index 09bb2339c9782..bcd417fbc9ede 100644
--- a/api_docs/kbn_core_application_common.mdx
+++ b/api_docs/kbn_core_application_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common
title: "@kbn/core-application-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-application-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common']
---
import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json';
diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx
index a036a5bb51c0e..507b0ccfcab40 100644
--- a/api_docs/kbn_core_apps_browser_internal.mdx
+++ b/api_docs/kbn_core_apps_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal
title: "@kbn/core-apps-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-apps-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal']
---
import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx
index 42db1a2581375..0a3625bef9425 100644
--- a/api_docs/kbn_core_apps_browser_mocks.mdx
+++ b/api_docs/kbn_core_apps_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks
title: "@kbn/core-apps-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-apps-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks']
---
import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx
index cd0875458844d..178a8ff27c8eb 100644
--- a/api_docs/kbn_core_base_browser_mocks.mdx
+++ b/api_docs/kbn_core_base_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks
title: "@kbn/core-base-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-base-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks']
---
import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx
index 468ebd13bf1b3..e634f6c30bfca 100644
--- a/api_docs/kbn_core_base_common.mdx
+++ b/api_docs/kbn_core_base_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common
title: "@kbn/core-base-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-base-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common']
---
import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json';
diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx
index c986f9acf0ef3..1c4445244f836 100644
--- a/api_docs/kbn_core_base_server_internal.mdx
+++ b/api_docs/kbn_core_base_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal
title: "@kbn/core-base-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-base-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal']
---
import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx
index d6cd91c67140a..84bb74021f2bd 100644
--- a/api_docs/kbn_core_base_server_mocks.mdx
+++ b/api_docs/kbn_core_base_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks
title: "@kbn/core-base-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-base-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks']
---
import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx
index 7a6ba37310aaf..52fe8e2820310 100644
--- a/api_docs/kbn_core_capabilities_browser_mocks.mdx
+++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks
title: "@kbn/core-capabilities-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-capabilities-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks']
---
import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx
index 24b234f7f811d..f2e9fe632436f 100644
--- a/api_docs/kbn_core_capabilities_common.mdx
+++ b/api_docs/kbn_core_capabilities_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common
title: "@kbn/core-capabilities-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-capabilities-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common']
---
import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json';
diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx
index c5359e8345a38..b2f4b911b54fc 100644
--- a/api_docs/kbn_core_capabilities_server.mdx
+++ b/api_docs/kbn_core_capabilities_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server
title: "@kbn/core-capabilities-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-capabilities-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server']
---
import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json';
diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx
index b847a51cd7a0d..dd0bc1fd746ea 100644
--- a/api_docs/kbn_core_capabilities_server_mocks.mdx
+++ b/api_docs/kbn_core_capabilities_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks
title: "@kbn/core-capabilities-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-capabilities-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks']
---
import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx
index cc02f6073ea91..598dc54038877 100644
--- a/api_docs/kbn_core_chrome_browser.mdx
+++ b/api_docs/kbn_core_chrome_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser
title: "@kbn/core-chrome-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-chrome-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser']
---
import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json';
diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx
index b1d46f4e5fe8c..a5854e8359bc1 100644
--- a/api_docs/kbn_core_chrome_browser_mocks.mdx
+++ b/api_docs/kbn_core_chrome_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks
title: "@kbn/core-chrome-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-chrome-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks']
---
import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx
index ee601e6352e35..b189b4cda1ce5 100644
--- a/api_docs/kbn_core_config_server_internal.mdx
+++ b/api_docs/kbn_core_config_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal
title: "@kbn/core-config-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-config-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal']
---
import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx
index 6eec129fe2615..89d13dd6c05e3 100644
--- a/api_docs/kbn_core_deprecations_browser.mdx
+++ b/api_docs/kbn_core_deprecations_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser
title: "@kbn/core-deprecations-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-deprecations-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser']
---
import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json';
diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx
index 983047e82691a..0ca986ec796b5 100644
--- a/api_docs/kbn_core_deprecations_browser_internal.mdx
+++ b/api_docs/kbn_core_deprecations_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal
title: "@kbn/core-deprecations-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-deprecations-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal']
---
import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx
index 0190b56cf9739..54f912532a0f0 100644
--- a/api_docs/kbn_core_deprecations_browser_mocks.mdx
+++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks
title: "@kbn/core-deprecations-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-deprecations-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks']
---
import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx
index 60d444ced08da..41e3c5f4eb0d8 100644
--- a/api_docs/kbn_core_deprecations_common.mdx
+++ b/api_docs/kbn_core_deprecations_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common
title: "@kbn/core-deprecations-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-deprecations-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common']
---
import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json';
diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx
index e9f8e03e21a24..0511dc3c9909f 100644
--- a/api_docs/kbn_core_deprecations_server.mdx
+++ b/api_docs/kbn_core_deprecations_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server
title: "@kbn/core-deprecations-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-deprecations-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server']
---
import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json';
diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx
index cd76ecc1e5de7..451bb29fe60c8 100644
--- a/api_docs/kbn_core_deprecations_server_internal.mdx
+++ b/api_docs/kbn_core_deprecations_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal
title: "@kbn/core-deprecations-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-deprecations-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal']
---
import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx
index adcf635bd0895..9d72c4c54543e 100644
--- a/api_docs/kbn_core_deprecations_server_mocks.mdx
+++ b/api_docs/kbn_core_deprecations_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks
title: "@kbn/core-deprecations-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-deprecations-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks']
---
import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx
index d8f11b0a78906..9640ef186485d 100644
--- a/api_docs/kbn_core_doc_links_browser.mdx
+++ b/api_docs/kbn_core_doc_links_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser
title: "@kbn/core-doc-links-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-doc-links-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser']
---
import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json';
diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx
index 04891d7eee772..f5bb1f42b22ab 100644
--- a/api_docs/kbn_core_doc_links_browser_mocks.mdx
+++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks
title: "@kbn/core-doc-links-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-doc-links-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks']
---
import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx
index a211477391f89..efae931fc186b 100644
--- a/api_docs/kbn_core_doc_links_server.mdx
+++ b/api_docs/kbn_core_doc_links_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server
title: "@kbn/core-doc-links-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-doc-links-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server']
---
import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json';
diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx
index cabbd8bcaf86c..2af154133867a 100644
--- a/api_docs/kbn_core_doc_links_server_mocks.mdx
+++ b/api_docs/kbn_core_doc_links_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks
title: "@kbn/core-doc-links-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-doc-links-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks']
---
import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx
index c6a7f734219d8..1454820b8fa46 100644
--- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx
+++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal
title: "@kbn/core-elasticsearch-client-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal']
---
import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx
index 7af48bcbf5f1b..1385f7dc0e1f4 100644
--- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx
+++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks
title: "@kbn/core-elasticsearch-client-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks']
---
import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx
index ca2a47bc99331..1deae83f65870 100644
--- a/api_docs/kbn_core_elasticsearch_server.mdx
+++ b/api_docs/kbn_core_elasticsearch_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server
title: "@kbn/core-elasticsearch-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-elasticsearch-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server']
---
import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json';
diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx
index 5c6a4b84856c7..15117157d71df 100644
--- a/api_docs/kbn_core_elasticsearch_server_internal.mdx
+++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal
title: "@kbn/core-elasticsearch-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-elasticsearch-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal']
---
import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx
index dd0e97e30fc7c..493f5c036f9a1 100644
--- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx
+++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks
title: "@kbn/core-elasticsearch-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-elasticsearch-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks']
---
import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx
index 2d4f36ed093a2..9910a744c62da 100644
--- a/api_docs/kbn_core_environment_server_internal.mdx
+++ b/api_docs/kbn_core_environment_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal
title: "@kbn/core-environment-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-environment-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal']
---
import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx
index 587243bb64061..b9c83fd476328 100644
--- a/api_docs/kbn_core_environment_server_mocks.mdx
+++ b/api_docs/kbn_core_environment_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks
title: "@kbn/core-environment-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-environment-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks']
---
import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx
index 96b79793ed095..e152e5bb83a2f 100644
--- a/api_docs/kbn_core_execution_context_browser.mdx
+++ b/api_docs/kbn_core_execution_context_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser
title: "@kbn/core-execution-context-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-execution-context-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser']
---
import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json';
diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx
index d8cfe4d9f349d..9392cffe6209d 100644
--- a/api_docs/kbn_core_execution_context_browser_internal.mdx
+++ b/api_docs/kbn_core_execution_context_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal
title: "@kbn/core-execution-context-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-execution-context-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal']
---
import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx
index fe90efd441051..3e511fafa9451 100644
--- a/api_docs/kbn_core_execution_context_browser_mocks.mdx
+++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks
title: "@kbn/core-execution-context-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-execution-context-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks']
---
import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx
index e7b47436fa761..ec1debc1c012a 100644
--- a/api_docs/kbn_core_execution_context_common.mdx
+++ b/api_docs/kbn_core_execution_context_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common
title: "@kbn/core-execution-context-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-execution-context-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common']
---
import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json';
diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx
index 8fa86908f719d..eed2089898a81 100644
--- a/api_docs/kbn_core_execution_context_server.mdx
+++ b/api_docs/kbn_core_execution_context_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server
title: "@kbn/core-execution-context-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-execution-context-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server']
---
import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json';
diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx
index 76ca7ae6c111b..87ae45af703ac 100644
--- a/api_docs/kbn_core_execution_context_server_internal.mdx
+++ b/api_docs/kbn_core_execution_context_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal
title: "@kbn/core-execution-context-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-execution-context-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal']
---
import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx
index 3e17e9ed94637..b77bce9a27dbf 100644
--- a/api_docs/kbn_core_execution_context_server_mocks.mdx
+++ b/api_docs/kbn_core_execution_context_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks
title: "@kbn/core-execution-context-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-execution-context-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks']
---
import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx
index 01d683396e2b7..bfc781548810f 100644
--- a/api_docs/kbn_core_fatal_errors_browser.mdx
+++ b/api_docs/kbn_core_fatal_errors_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser
title: "@kbn/core-fatal-errors-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-fatal-errors-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser']
---
import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json';
diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx
index 891c8d8767547..6f305680273e2 100644
--- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx
+++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks
title: "@kbn/core-fatal-errors-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks']
---
import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx
index a935d019adeb4..22b6b9c666339 100644
--- a/api_docs/kbn_core_http_browser.mdx
+++ b/api_docs/kbn_core_http_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser
title: "@kbn/core-http-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser']
---
import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json';
diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx
index 04f71c530c9a5..579277f0e7c5b 100644
--- a/api_docs/kbn_core_http_browser_internal.mdx
+++ b/api_docs/kbn_core_http_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal
title: "@kbn/core-http-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal']
---
import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx
index 53f1d9fe670a0..45b83d9e361cd 100644
--- a/api_docs/kbn_core_http_browser_mocks.mdx
+++ b/api_docs/kbn_core_http_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks
title: "@kbn/core-http-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks']
---
import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx
index f8ff0087dbbfc..b063b1ec8777e 100644
--- a/api_docs/kbn_core_http_common.mdx
+++ b/api_docs/kbn_core_http_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common
title: "@kbn/core-http-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common']
---
import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json';
diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx
index c93bb2546524b..e42402eeb736e 100644
--- a/api_docs/kbn_core_http_context_server_mocks.mdx
+++ b/api_docs/kbn_core_http_context_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks
title: "@kbn/core-http-context-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-context-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks']
---
import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_http_request_handler_context_server.devdocs.json b/api_docs/kbn_core_http_request_handler_context_server.devdocs.json
new file mode 100644
index 0000000000000..ebf6567c0a8b4
--- /dev/null
+++ b/api_docs/kbn_core_http_request_handler_context_server.devdocs.json
@@ -0,0 +1,283 @@
+{
+ "id": "@kbn/core-http-request-handler-context-server",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.CoreRequestHandlerContext",
+ "type": "Interface",
+ "tags": [],
+ "label": "CoreRequestHandlerContext",
+ "description": [
+ "\nThe `core` context provided to route handler.\n\nProvides the following clients and services:\n - {@link SavedObjectsClient | savedObjects.client} - Saved Objects client\n which uses the credentials of the incoming request\n - {@link ISavedObjectTypeRegistry | savedObjects.typeRegistry} - Type registry containing\n all the registered types.\n - {@link IScopedClusterClient | elasticsearch.client} - Elasticsearch\n data client which uses the credentials of the incoming request\n - {@link IUiSettingsClient | uiSettings.client} - uiSettings client\n which uses the credentials of the incoming request"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.CoreRequestHandlerContext.savedObjects",
+ "type": "Object",
+ "tags": [],
+ "label": "savedObjects",
+ "description": [],
+ "signature": [
+ "SavedObjectsRequestHandlerContext"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.CoreRequestHandlerContext.elasticsearch",
+ "type": "Object",
+ "tags": [],
+ "label": "elasticsearch",
+ "description": [],
+ "signature": [
+ "ElasticsearchRequestHandlerContext"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.CoreRequestHandlerContext.uiSettings",
+ "type": "Object",
+ "tags": [],
+ "label": "uiSettings",
+ "description": [],
+ "signature": [
+ "UiSettingsRequestHandlerContext"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.CoreRequestHandlerContext.deprecations",
+ "type": "Object",
+ "tags": [],
+ "label": "deprecations",
+ "description": [],
+ "signature": [
+ "DeprecationsRequestHandlerContext"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.PrebootCoreRequestHandlerContext",
+ "type": "Interface",
+ "tags": [],
+ "label": "PrebootCoreRequestHandlerContext",
+ "description": [],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/preboot_request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.PrebootCoreRequestHandlerContext.uiSettings",
+ "type": "Object",
+ "tags": [],
+ "label": "uiSettings",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/core-http-request-handler-context-server",
+ "scope": "server",
+ "docId": "kibKbnCoreHttpRequestHandlerContextServerPluginApi",
+ "section": "def-server.PrebootUiSettingsRequestHandlerContext",
+ "text": "PrebootUiSettingsRequestHandlerContext"
+ }
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/preboot_request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.PrebootRequestHandlerContext",
+ "type": "Interface",
+ "tags": [],
+ "label": "PrebootRequestHandlerContext",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/core-http-request-handler-context-server",
+ "scope": "server",
+ "docId": "kibKbnCoreHttpRequestHandlerContextServerPluginApi",
+ "section": "def-server.PrebootRequestHandlerContext",
+ "text": "PrebootRequestHandlerContext"
+ },
+ " extends ",
+ "RequestHandlerContextBase"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/preboot_request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.PrebootRequestHandlerContext.core",
+ "type": "Object",
+ "tags": [],
+ "label": "core",
+ "description": [],
+ "signature": [
+ "Promise<",
+ {
+ "pluginId": "@kbn/core-http-request-handler-context-server",
+ "scope": "server",
+ "docId": "kibKbnCoreHttpRequestHandlerContextServerPluginApi",
+ "section": "def-server.PrebootCoreRequestHandlerContext",
+ "text": "PrebootCoreRequestHandlerContext"
+ },
+ ">"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/preboot_request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.PrebootUiSettingsRequestHandlerContext",
+ "type": "Interface",
+ "tags": [],
+ "label": "PrebootUiSettingsRequestHandlerContext",
+ "description": [],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/preboot_request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.PrebootUiSettingsRequestHandlerContext.client",
+ "type": "Object",
+ "tags": [],
+ "label": "client",
+ "description": [],
+ "signature": [
+ "IUiSettingsClient"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/preboot_request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.RequestHandlerContext",
+ "type": "Interface",
+ "tags": [],
+ "label": "RequestHandlerContext",
+ "description": [
+ "\nBase context passed to a route handler, containing the `core` context part.\n"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/core-http-request-handler-context-server",
+ "scope": "server",
+ "docId": "kibKbnCoreHttpRequestHandlerContextServerPluginApi",
+ "section": "def-server.RequestHandlerContext",
+ "text": "RequestHandlerContext"
+ },
+ " extends ",
+ "RequestHandlerContextBase"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.RequestHandlerContext.core",
+ "type": "Object",
+ "tags": [],
+ "label": "core",
+ "description": [],
+ "signature": [
+ "Promise<",
+ {
+ "pluginId": "@kbn/core-http-request-handler-context-server",
+ "scope": "server",
+ "docId": "kibKbnCoreHttpRequestHandlerContextServerPluginApi",
+ "section": "def-server.CoreRequestHandlerContext",
+ "text": "CoreRequestHandlerContext"
+ },
+ ">"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "enums": [],
+ "misc": [
+ {
+ "parentPluginId": "@kbn/core-http-request-handler-context-server",
+ "id": "def-server.CustomRequestHandlerContext",
+ "type": "Type",
+ "tags": [],
+ "label": "CustomRequestHandlerContext",
+ "description": [
+ "\nMixin allowing plugins to define their own request handler contexts.\n"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/core-http-request-handler-context-server",
+ "scope": "server",
+ "docId": "kibKbnCoreHttpRequestHandlerContextServerPluginApi",
+ "section": "def-server.RequestHandlerContext",
+ "text": "RequestHandlerContext"
+ },
+ " & { [Key in keyof T]: T[Key] extends Promise ? T[Key] : Promise; }"
+ ],
+ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx
new file mode 100644
index 0000000000000..d636450713c72
--- /dev/null
+++ b/api_docs/kbn_core_http_request_handler_context_server.mdx
@@ -0,0 +1,33 @@
+---
+####
+#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system.
+#### Reach out in #docs-engineering for more info.
+####
+id: kibKbnCoreHttpRequestHandlerContextServerPluginApi
+slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server
+title: "@kbn/core-http-request-handler-context-server"
+image: https://source.unsplash.com/400x175/?github
+description: API docs for the @kbn/core-http-request-handler-context-server plugin
+date: 2022-10-04
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server']
+---
+import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json';
+
+
+
+Contact Kibana Core for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 14 | 0 | 11 | 0 |
+
+## Server
+
+### Interfaces
+
+
+### Consts, variables and types
+
+
diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx
index 6121b09f8c1b4..5691276cc4c86 100644
--- a/api_docs/kbn_core_http_router_server_internal.mdx
+++ b/api_docs/kbn_core_http_router_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal
title: "@kbn/core-http-router-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-router-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal']
---
import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx
index 49dffda39dcc6..5d087fbc12590 100644
--- a/api_docs/kbn_core_http_router_server_mocks.mdx
+++ b/api_docs/kbn_core_http_router_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks
title: "@kbn/core-http-router-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-router-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks']
---
import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx
index 74c3216b75ebc..87f06ed8d63e4 100644
--- a/api_docs/kbn_core_http_server.mdx
+++ b/api_docs/kbn_core_http_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server
title: "@kbn/core-http-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server']
---
import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json';
diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx
index 50ebcbe4058b9..266b3696995f8 100644
--- a/api_docs/kbn_core_http_server_internal.mdx
+++ b/api_docs/kbn_core_http_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal
title: "@kbn/core-http-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal']
---
import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx
index c7649dcf597cf..c2e9cef4a3f10 100644
--- a/api_docs/kbn_core_http_server_mocks.mdx
+++ b/api_docs/kbn_core_http_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks
title: "@kbn/core-http-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks']
---
import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx
index 7e8106d7e3c66..23d1612d624c8 100644
--- a/api_docs/kbn_core_i18n_browser.mdx
+++ b/api_docs/kbn_core_i18n_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser
title: "@kbn/core-i18n-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-i18n-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser']
---
import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json';
diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx
index 32e6b9184dbe1..2809246ccc670 100644
--- a/api_docs/kbn_core_i18n_browser_mocks.mdx
+++ b/api_docs/kbn_core_i18n_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks
title: "@kbn/core-i18n-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-i18n-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks']
---
import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx
index 4e5cbf65974a7..d8a8f0c780f5b 100644
--- a/api_docs/kbn_core_i18n_server.mdx
+++ b/api_docs/kbn_core_i18n_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server
title: "@kbn/core-i18n-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-i18n-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server']
---
import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json';
diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx
index 93c620cca65a7..34bcc3c6cdcfb 100644
--- a/api_docs/kbn_core_i18n_server_internal.mdx
+++ b/api_docs/kbn_core_i18n_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal
title: "@kbn/core-i18n-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-i18n-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal']
---
import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx
index 13734215059b0..0616e05e00234 100644
--- a/api_docs/kbn_core_i18n_server_mocks.mdx
+++ b/api_docs/kbn_core_i18n_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks
title: "@kbn/core-i18n-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-i18n-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks']
---
import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_injected_metadata_browser.mdx b/api_docs/kbn_core_injected_metadata_browser.mdx
index 08dbe296b4323..d494ce28acb14 100644
--- a/api_docs/kbn_core_injected_metadata_browser.mdx
+++ b/api_docs/kbn_core_injected_metadata_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser
title: "@kbn/core-injected-metadata-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-injected-metadata-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser']
---
import kbnCoreInjectedMetadataBrowserObj from './kbn_core_injected_metadata_browser.devdocs.json';
diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx
index b88675d50c204..30217e2fc3ff4 100644
--- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx
+++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks
title: "@kbn/core-injected-metadata-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks']
---
import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx
index fc53dc77eda1c..5e7ba108a654c 100644
--- a/api_docs/kbn_core_integrations_browser_internal.mdx
+++ b/api_docs/kbn_core_integrations_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal
title: "@kbn/core-integrations-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-integrations-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal']
---
import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx
index 2526e6dc2b6b9..a6e9fb32a00b7 100644
--- a/api_docs/kbn_core_integrations_browser_mocks.mdx
+++ b/api_docs/kbn_core_integrations_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks
title: "@kbn/core-integrations-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-integrations-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks']
---
import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx
index 8b557e2e502b2..531b5b53a8295 100644
--- a/api_docs/kbn_core_lifecycle_browser.mdx
+++ b/api_docs/kbn_core_lifecycle_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser
title: "@kbn/core-lifecycle-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-lifecycle-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser']
---
import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json';
diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx
index 74231286ffe09..2e32f2efcec21 100644
--- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx
+++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks
title: "@kbn/core-lifecycle-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-lifecycle-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks']
---
import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx
index a4e8cb4241bef..15c79e1a0db38 100644
--- a/api_docs/kbn_core_logging_server.mdx
+++ b/api_docs/kbn_core_logging_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server
title: "@kbn/core-logging-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-logging-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server']
---
import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json';
diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx
index f56eecbd69552..cd7319b284fb7 100644
--- a/api_docs/kbn_core_logging_server_internal.mdx
+++ b/api_docs/kbn_core_logging_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal
title: "@kbn/core-logging-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-logging-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal']
---
import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx
index 2067fdbc72fda..93667b80ba7f8 100644
--- a/api_docs/kbn_core_logging_server_mocks.mdx
+++ b/api_docs/kbn_core_logging_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks
title: "@kbn/core-logging-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-logging-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks']
---
import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx
index a7e7a11ae05ea..649123ca8c6a9 100644
--- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx
+++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal
title: "@kbn/core-metrics-collectors-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-metrics-collectors-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal']
---
import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx
index febc5d3038933..21c886d8ce972 100644
--- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx
+++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks
title: "@kbn/core-metrics-collectors-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks']
---
import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx
index 47cc583e2df0e..a3b481458c975 100644
--- a/api_docs/kbn_core_metrics_server.mdx
+++ b/api_docs/kbn_core_metrics_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server
title: "@kbn/core-metrics-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-metrics-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server']
---
import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json';
diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx
index 9e16d8304decd..b78cf2f752e5e 100644
--- a/api_docs/kbn_core_metrics_server_internal.mdx
+++ b/api_docs/kbn_core_metrics_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal
title: "@kbn/core-metrics-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-metrics-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal']
---
import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx
index 5db83c7383b67..bcb29c53743cb 100644
--- a/api_docs/kbn_core_metrics_server_mocks.mdx
+++ b/api_docs/kbn_core_metrics_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks
title: "@kbn/core-metrics-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-metrics-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks']
---
import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx
index 8fafac5831639..530ca8138c755 100644
--- a/api_docs/kbn_core_mount_utils_browser.mdx
+++ b/api_docs/kbn_core_mount_utils_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser
title: "@kbn/core-mount-utils-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-mount-utils-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser']
---
import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json';
diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx
index 9fbffa9c5df93..0c5982822b6bd 100644
--- a/api_docs/kbn_core_node_server.mdx
+++ b/api_docs/kbn_core_node_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server
title: "@kbn/core-node-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-node-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server']
---
import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json';
diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx
index d253278b97f15..ce0799c8a57e1 100644
--- a/api_docs/kbn_core_node_server_internal.mdx
+++ b/api_docs/kbn_core_node_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal
title: "@kbn/core-node-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-node-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal']
---
import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx
index 5dd3d790c3eaa..ff9aa9bab3b16 100644
--- a/api_docs/kbn_core_node_server_mocks.mdx
+++ b/api_docs/kbn_core_node_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks
title: "@kbn/core-node-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-node-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks']
---
import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx
index ed0c7c4e240ce..45e5581a7df10 100644
--- a/api_docs/kbn_core_notifications_browser.mdx
+++ b/api_docs/kbn_core_notifications_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser
title: "@kbn/core-notifications-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-notifications-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser']
---
import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json';
diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx
index 5c44022f60828..4b5730a85899c 100644
--- a/api_docs/kbn_core_notifications_browser_internal.mdx
+++ b/api_docs/kbn_core_notifications_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal
title: "@kbn/core-notifications-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-notifications-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal']
---
import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx
index ef4b9a440b592..e0dc054651702 100644
--- a/api_docs/kbn_core_notifications_browser_mocks.mdx
+++ b/api_docs/kbn_core_notifications_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks
title: "@kbn/core-notifications-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-notifications-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks']
---
import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx
index 559df72a076e4..b8f43851ff074 100644
--- a/api_docs/kbn_core_overlays_browser.mdx
+++ b/api_docs/kbn_core_overlays_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser
title: "@kbn/core-overlays-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-overlays-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser']
---
import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json';
diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx
index 6160c98032fef..3f88938a7d71c 100644
--- a/api_docs/kbn_core_overlays_browser_internal.mdx
+++ b/api_docs/kbn_core_overlays_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal
title: "@kbn/core-overlays-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-overlays-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal']
---
import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx
index 5765d85478d62..c0846ed65f58f 100644
--- a/api_docs/kbn_core_overlays_browser_mocks.mdx
+++ b/api_docs/kbn_core_overlays_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks
title: "@kbn/core-overlays-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-overlays-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks']
---
import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx
index 09d09fe708575..70c9fbee9c49a 100644
--- a/api_docs/kbn_core_plugins_browser.mdx
+++ b/api_docs/kbn_core_plugins_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser
title: "@kbn/core-plugins-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-plugins-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser']
---
import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json';
diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx
index 5416044cac958..4ebd8410d827d 100644
--- a/api_docs/kbn_core_plugins_browser_mocks.mdx
+++ b/api_docs/kbn_core_plugins_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks
title: "@kbn/core-plugins-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-plugins-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks']
---
import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx
index 962d718e0042b..96f2610b0eb18 100644
--- a/api_docs/kbn_core_preboot_server.mdx
+++ b/api_docs/kbn_core_preboot_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server
title: "@kbn/core-preboot-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-preboot-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server']
---
import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json';
diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx
index 07d55b8bdc9ad..876c2f5e25d90 100644
--- a/api_docs/kbn_core_preboot_server_mocks.mdx
+++ b/api_docs/kbn_core_preboot_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks
title: "@kbn/core-preboot-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-preboot-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks']
---
import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx
index f31451fde9e77..31744f9615bb9 100644
--- a/api_docs/kbn_core_rendering_browser_mocks.mdx
+++ b/api_docs/kbn_core_rendering_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks
title: "@kbn/core-rendering-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-rendering-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks']
---
import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_rendering_server_internal.devdocs.json b/api_docs/kbn_core_rendering_server_internal.devdocs.json
new file mode 100644
index 0000000000000..d765832debee1
--- /dev/null
+++ b/api_docs/kbn_core_rendering_server_internal.devdocs.json
@@ -0,0 +1,61 @@
+{
+ "id": "@kbn/core-rendering-server-internal",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/core-rendering-server-internal",
+ "id": "def-server.Fonts",
+ "type": "Function",
+ "tags": [],
+ "label": "Fonts",
+ "description": [],
+ "signature": [
+ "({ url }: React.PropsWithChildren) => JSX.Element"
+ ],
+ "path": "packages/core/rendering/core-rendering-server-internal/src/views/fonts.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-rendering-server-internal",
+ "id": "def-server.Fonts.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{ url }",
+ "description": [],
+ "signature": [
+ "React.PropsWithChildren"
+ ],
+ "path": "packages/core/rendering/core-rendering-server-internal/src/views/fonts.tsx",
+ "deprecated": false,
+ "trackAdoption": 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_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx
new file mode 100644
index 0000000000000..000dd0d4cedb8
--- /dev/null
+++ b/api_docs/kbn_core_rendering_server_internal.mdx
@@ -0,0 +1,30 @@
+---
+####
+#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system.
+#### Reach out in #docs-engineering for more info.
+####
+id: kibKbnCoreRenderingServerInternalPluginApi
+slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal
+title: "@kbn/core-rendering-server-internal"
+image: https://source.unsplash.com/400x175/?github
+description: API docs for the @kbn/core-rendering-server-internal plugin
+date: 2022-10-04
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal']
+---
+import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.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 | 2 | 0 |
+
+## Server
+
+### Functions
+
+
diff --git a/api_docs/kbn_core_rendering_server_mocks.devdocs.json b/api_docs/kbn_core_rendering_server_mocks.devdocs.json
new file mode 100644
index 0000000000000..fc43829e9518e
--- /dev/null
+++ b/api_docs/kbn_core_rendering_server_mocks.devdocs.json
@@ -0,0 +1,95 @@
+{
+ "id": "@kbn/core-rendering-server-mocks",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": [
+ {
+ "parentPluginId": "@kbn/core-rendering-server-mocks",
+ "id": "def-server.renderingServiceMock",
+ "type": "Object",
+ "tags": [],
+ "label": "renderingServiceMock",
+ "description": [],
+ "path": "packages/core/rendering/core-rendering-server-mocks/src/rendering_service.mock.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/core-rendering-server-mocks",
+ "id": "def-server.renderingServiceMock.create",
+ "type": "Function",
+ "tags": [],
+ "label": "create",
+ "description": [],
+ "signature": [
+ "() => ",
+ "RenderingServiceMock"
+ ],
+ "path": "packages/core/rendering/core-rendering-server-mocks/src/rendering_service.mock.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": []
+ },
+ {
+ "parentPluginId": "@kbn/core-rendering-server-mocks",
+ "id": "def-server.renderingServiceMock.createPrebootContract",
+ "type": "Function",
+ "tags": [],
+ "label": "createPrebootContract",
+ "description": [],
+ "signature": [
+ "() => jest.Mocked<",
+ "InternalRenderingServiceSetup",
+ ">"
+ ],
+ "path": "packages/core/rendering/core-rendering-server-mocks/src/rendering_service.mock.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": []
+ },
+ {
+ "parentPluginId": "@kbn/core-rendering-server-mocks",
+ "id": "def-server.renderingServiceMock.createSetupContract",
+ "type": "Function",
+ "tags": [],
+ "label": "createSetupContract",
+ "description": [],
+ "signature": [
+ "() => jest.Mocked<",
+ "InternalRenderingServiceSetup",
+ ">"
+ ],
+ "path": "packages/core/rendering/core-rendering-server-mocks/src/rendering_service.mock.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": []
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ]
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx
new file mode 100644
index 0000000000000..7de298d846759
--- /dev/null
+++ b/api_docs/kbn_core_rendering_server_mocks.mdx
@@ -0,0 +1,30 @@
+---
+####
+#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system.
+#### Reach out in #docs-engineering for more info.
+####
+id: kibKbnCoreRenderingServerMocksPluginApi
+slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks
+title: "@kbn/core-rendering-server-mocks"
+image: https://source.unsplash.com/400x175/?github
+description: API docs for the @kbn/core-rendering-server-mocks plugin
+date: 2022-10-04
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks']
+---
+import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json';
+
+
+
+Contact Kibana Core for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 4 | 0 | 4 | 1 |
+
+## Server
+
+### Objects
+
+
diff --git a/api_docs/kbn_core_saved_objects_api_browser.devdocs.json b/api_docs/kbn_core_saved_objects_api_browser.devdocs.json
index b12a698b21606..bc6024dea788e 100644
--- a/api_docs/kbn_core_saved_objects_api_browser.devdocs.json
+++ b/api_docs/kbn_core_saved_objects_api_browser.devdocs.json
@@ -76,7 +76,7 @@
"\nThe outcome for a successful `resolve` call is one of the following values:\n\n * `'exactMatch'` -- One document exactly matched the given ID.\n * `'aliasMatch'` -- One document with a legacy URL alias matched the given ID; in this case the `saved_object.id` field is different\n than the given ID.\n * `'conflict'` -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the\n `saved_object` object is the exact match, and the `saved_object.id` field is the same as the given ID."
],
"signature": [
- "\"exactMatch\" | \"aliasMatch\" | \"conflict\""
+ "\"conflict\" | \"exactMatch\" | \"aliasMatch\""
],
"path": "packages/core/saved-objects/core-saved-objects-api-browser/src/apis/resolve.ts",
"deprecated": false,
@@ -1974,9 +1974,9 @@
"label": "SavedObjectsFindOptions",
"description": [],
"signature": [
- "{ type: string | string[]; filter?: any; search?: string | undefined; aggs?: Record | undefined; fields?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; searchFields?: string[] | undefined; hasReference?: ",
+ "> | undefined; page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; searchFields?: string[] | undefined; hasReference?: ",
"SavedObjectsFindOptionsReference",
" | ",
"SavedObjectsFindOptionsReference",
diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx
index 97d1f20eba7af..51698a7096343 100644
--- a/api_docs/kbn_core_saved_objects_api_browser.mdx
+++ b/api_docs/kbn_core_saved_objects_api_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser
title: "@kbn/core-saved-objects-api-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-api-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser']
---
import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_api_server.devdocs.json b/api_docs/kbn_core_saved_objects_api_server.devdocs.json
index 0e040b72d2d3d..1bff25681bdbf 100644
--- a/api_docs/kbn_core_saved_objects_api_server.devdocs.json
+++ b/api_docs/kbn_core_saved_objects_api_server.devdocs.json
@@ -5949,7 +5949,7 @@
"\nThe outcome for a successful `resolve` call is one of the following values:\n\n * `'exactMatch'` -- One document exactly matched the given ID.\n * `'aliasMatch'` -- One document with a legacy URL alias matched the given ID; in this case the `saved_object.id` field is different\n than the given ID.\n * `'conflict'` -- Two documents matched the given ID, one was an exact match and another with a legacy URL alias; in this case the\n `saved_object` object is the exact match, and the `saved_object.id` field is the same as the given ID."
],
"signature": [
- "\"exactMatch\" | \"aliasMatch\" | \"conflict\""
+ "\"conflict\" | \"exactMatch\" | \"aliasMatch\""
],
"path": "packages/core/saved-objects/core-saved-objects-api-server/src/apis/resolve.ts",
"deprecated": false,
@@ -6427,9 +6427,9 @@
"label": "SavedObjectsCreatePointInTimeFinderOptions",
"description": [],
"signature": [
- "{ type: string | string[]; filter?: any; search?: string | undefined; aggs?: Record | undefined; fields?: string[] | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ",
+ "> | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: ",
"SortOrder",
" | undefined; searchFields?: string[] | undefined; rootSearchFields?: string[] | undefined; hasReference?: ",
{
diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx
index 1c1ec6407d249..c8639a4b9c453 100644
--- a/api_docs/kbn_core_saved_objects_api_server.mdx
+++ b/api_docs/kbn_core_saved_objects_api_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server
title: "@kbn/core-saved-objects-api-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-api-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server']
---
import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_api_server_internal.mdx b/api_docs/kbn_core_saved_objects_api_server_internal.mdx
index 678cf37d24e81..f14120830006f 100644
--- a/api_docs/kbn_core_saved_objects_api_server_internal.mdx
+++ b/api_docs/kbn_core_saved_objects_api_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-internal
title: "@kbn/core-saved-objects-api-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-api-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-internal']
---
import kbnCoreSavedObjectsApiServerInternalObj from './kbn_core_saved_objects_api_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx
index da93d1e0b8552..6b0c824029fc3 100644
--- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx
+++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks
title: "@kbn/core-saved-objects-api-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks']
---
import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx
index 73d6c70c1a9ac..9e232227f556c 100644
--- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx
+++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal
title: "@kbn/core-saved-objects-base-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-base-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal']
---
import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx
index 2b499a47657b8..66a94ba868430 100644
--- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx
+++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks
title: "@kbn/core-saved-objects-base-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks']
---
import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx
index fcec7c16e5f85..eb654c74cca2e 100644
--- a/api_docs/kbn_core_saved_objects_browser.mdx
+++ b/api_docs/kbn_core_saved_objects_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser
title: "@kbn/core-saved-objects-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser']
---
import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx
index 197152a6dae02..f077ed64b63e2 100644
--- a/api_docs/kbn_core_saved_objects_browser_internal.mdx
+++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal
title: "@kbn/core-saved-objects-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal']
---
import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx
index 80320e7312485..29da15ed698f8 100644
--- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx
+++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks
title: "@kbn/core-saved-objects-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks']
---
import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx
index 63fa1e47ac1bf..ac4e60624dcb7 100644
--- a/api_docs/kbn_core_saved_objects_common.mdx
+++ b/api_docs/kbn_core_saved_objects_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common
title: "@kbn/core-saved-objects-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common']
---
import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx
index 127679f751476..bebe1281e0ade 100644
--- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx
+++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal
title: "@kbn/core-saved-objects-import-export-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal']
---
import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx
index f633f52c6174d..4b0e97d192ea3 100644
--- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx
+++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks
title: "@kbn/core-saved-objects-import-export-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks']
---
import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx
index bc446d004b249..aed14d7466d26 100644
--- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx
+++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal
title: "@kbn/core-saved-objects-migration-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal']
---
import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx
index ecbb1447d1e5c..8d8eb4b06ad7a 100644
--- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx
+++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks
title: "@kbn/core-saved-objects-migration-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks']
---
import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx
index c694b3c9f6584..2a8902a1e5184 100644
--- a/api_docs/kbn_core_saved_objects_server.mdx
+++ b/api_docs/kbn_core_saved_objects_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server
title: "@kbn/core-saved-objects-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server']
---
import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx
index 39099151043aa..9bd945299b18d 100644
--- a/api_docs/kbn_core_saved_objects_server_internal.mdx
+++ b/api_docs/kbn_core_saved_objects_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal
title: "@kbn/core-saved-objects-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal']
---
import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx
index 73e0b05504386..6a53d6086266f 100644
--- a/api_docs/kbn_core_saved_objects_server_mocks.mdx
+++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks
title: "@kbn/core-saved-objects-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks']
---
import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx
index 0012db4e553fb..3747e6c419527 100644
--- a/api_docs/kbn_core_saved_objects_utils_server.mdx
+++ b/api_docs/kbn_core_saved_objects_utils_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server
title: "@kbn/core-saved-objects-utils-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-saved-objects-utils-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server']
---
import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json';
diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx
index 1ef8c6abfc97a..093798e431c32 100644
--- a/api_docs/kbn_core_status_common.mdx
+++ b/api_docs/kbn_core_status_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common
title: "@kbn/core-status-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-status-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common']
---
import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json';
diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx
index 7c9440c92271b..3232d2d6e8099 100644
--- a/api_docs/kbn_core_status_common_internal.mdx
+++ b/api_docs/kbn_core_status_common_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal
title: "@kbn/core-status-common-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-status-common-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal']
---
import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json';
diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx
index bd5556b6ce877..6dc392f2f16c7 100644
--- a/api_docs/kbn_core_status_server.mdx
+++ b/api_docs/kbn_core_status_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server
title: "@kbn/core-status-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-status-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server']
---
import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json';
diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx
index 364b20ab80d66..b2d57509addeb 100644
--- a/api_docs/kbn_core_status_server_internal.mdx
+++ b/api_docs/kbn_core_status_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal
title: "@kbn/core-status-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-status-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal']
---
import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx
index aa7990a556b57..d5e62a33ea077 100644
--- a/api_docs/kbn_core_status_server_mocks.mdx
+++ b/api_docs/kbn_core_status_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks
title: "@kbn/core-status-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-status-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks']
---
import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx
index d4a0a789572fb..2341795744ee2 100644
--- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx
+++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters
title: "@kbn/core-test-helpers-deprecations-getters"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters']
---
import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json';
diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx
index 826ee5d1b3459..1bdb4be978f3b 100644
--- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx
+++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser
title: "@kbn/core-test-helpers-http-setup-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser']
---
import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json';
diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx
index e68a43d0ce9fe..8c1171396e641 100644
--- a/api_docs/kbn_core_theme_browser.mdx
+++ b/api_docs/kbn_core_theme_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser
title: "@kbn/core-theme-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-theme-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser']
---
import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json';
diff --git a/api_docs/kbn_core_theme_browser_internal.mdx b/api_docs/kbn_core_theme_browser_internal.mdx
index 8c938db4082e1..38293fb7bd7ed 100644
--- a/api_docs/kbn_core_theme_browser_internal.mdx
+++ b/api_docs/kbn_core_theme_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-internal
title: "@kbn/core-theme-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-theme-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-internal']
---
import kbnCoreThemeBrowserInternalObj from './kbn_core_theme_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx
index 0cbb8955ac42e..f0b9a5dcf855d 100644
--- a/api_docs/kbn_core_theme_browser_mocks.mdx
+++ b/api_docs/kbn_core_theme_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks
title: "@kbn/core-theme-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-theme-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks']
---
import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx
index 67a42c6099d97..b4a0a55091a4f 100644
--- a/api_docs/kbn_core_ui_settings_browser.mdx
+++ b/api_docs/kbn_core_ui_settings_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser
title: "@kbn/core-ui-settings-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-ui-settings-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser']
---
import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json';
diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx
index 791006e8cea6b..09b0a2dc57320 100644
--- a/api_docs/kbn_core_ui_settings_browser_internal.mdx
+++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal
title: "@kbn/core-ui-settings-browser-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-ui-settings-browser-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal']
---
import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json';
diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx
index b1ae46812b1d2..31d7e5da5da67 100644
--- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx
+++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks
title: "@kbn/core-ui-settings-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-ui-settings-browser-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks']
---
import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx
index ef778256b7997..5b6eb33ecc40a 100644
--- a/api_docs/kbn_core_ui_settings_common.mdx
+++ b/api_docs/kbn_core_ui_settings_common.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common
title: "@kbn/core-ui-settings-common"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-ui-settings-common plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common']
---
import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json';
diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx
index 545b597ef2b8b..812a5a98b6200 100644
--- a/api_docs/kbn_core_ui_settings_server.mdx
+++ b/api_docs/kbn_core_ui_settings_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server
title: "@kbn/core-ui-settings-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-ui-settings-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server']
---
import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json';
diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx
index 99402f8c657ce..b4098d7a68294 100644
--- a/api_docs/kbn_core_ui_settings_server_internal.mdx
+++ b/api_docs/kbn_core_ui_settings_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal
title: "@kbn/core-ui-settings-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-ui-settings-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal']
---
import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx
index a5081a8a512eb..6350fd7ee5068 100644
--- a/api_docs/kbn_core_ui_settings_server_mocks.mdx
+++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks
title: "@kbn/core-ui-settings-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-ui-settings-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks']
---
import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx
index b490e18b99885..54fc17cd96f04 100644
--- a/api_docs/kbn_core_usage_data_server.mdx
+++ b/api_docs/kbn_core_usage_data_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server
title: "@kbn/core-usage-data-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-usage-data-server plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server']
---
import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json';
diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx
index 01b13b900344a..7722ffd3f68a5 100644
--- a/api_docs/kbn_core_usage_data_server_internal.mdx
+++ b/api_docs/kbn_core_usage_data_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal
title: "@kbn/core-usage-data-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-usage-data-server-internal plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal']
---
import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx
index 90ea1b666c8aa..131c2f323331b 100644
--- a/api_docs/kbn_core_usage_data_server_mocks.mdx
+++ b/api_docs/kbn_core_usage_data_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks
title: "@kbn/core-usage-data-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-usage-data-server-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks']
---
import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx
index a9fb17b3cd06f..6ca5ba080918c 100644
--- a/api_docs/kbn_crypto.mdx
+++ b/api_docs/kbn_crypto.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto
title: "@kbn/crypto"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/crypto plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto']
---
import kbnCryptoObj from './kbn_crypto.devdocs.json';
diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx
index 0afac1bca8d36..7da4515e5c5da 100644
--- a/api_docs/kbn_crypto_browser.mdx
+++ b/api_docs/kbn_crypto_browser.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser
title: "@kbn/crypto-browser"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/crypto-browser plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser']
---
import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json';
diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx
index d2e4558115131..c0ab47b943fe5 100644
--- a/api_docs/kbn_datemath.mdx
+++ b/api_docs/kbn_datemath.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath
title: "@kbn/datemath"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/datemath plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath']
---
import kbnDatemathObj from './kbn_datemath.devdocs.json';
diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx
index 42e02f9783509..81afcdef5fadb 100644
--- a/api_docs/kbn_dev_cli_errors.mdx
+++ b/api_docs/kbn_dev_cli_errors.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors
title: "@kbn/dev-cli-errors"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/dev-cli-errors plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors']
---
import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json';
diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx
index 5169411f49a2a..1e541a024defe 100644
--- a/api_docs/kbn_dev_cli_runner.mdx
+++ b/api_docs/kbn_dev_cli_runner.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner
title: "@kbn/dev-cli-runner"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/dev-cli-runner plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner']
---
import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json';
diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx
index 5872d911b8f47..c9e8aeb0cceea 100644
--- a/api_docs/kbn_dev_proc_runner.mdx
+++ b/api_docs/kbn_dev_proc_runner.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner
title: "@kbn/dev-proc-runner"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/dev-proc-runner plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner']
---
import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json';
diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx
index 8f8299fb3972b..83bf4e00c6541 100644
--- a/api_docs/kbn_dev_utils.mdx
+++ b/api_docs/kbn_dev_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils
title: "@kbn/dev-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/dev-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils']
---
import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json';
diff --git a/api_docs/kbn_doc_links.devdocs.json b/api_docs/kbn_doc_links.devdocs.json
index d74d520ff8430..0cf3b152d8668 100644
--- a/api_docs/kbn_doc_links.devdocs.json
+++ b/api_docs/kbn_doc_links.devdocs.json
@@ -546,7 +546,7 @@
"label": "securitySolution",
"description": [],
"signature": [
- "{ readonly trustedApps: string; readonly eventFilters: string; readonly blocklist: string; readonly policyResponseTroubleshooting: { full_disk_access: string; macos_system_ext: string; linux_deadlock: string; }; readonly packageActionTroubleshooting: { es_connection: string; }; readonly threatIntelInt: string; readonly responseActions: string; }"
+ "{ readonly trustedApps: string; readonly eventFilters: string; readonly blocklist: string; readonly endpointArtifacts: string; readonly policyResponseTroubleshooting: { full_disk_access: string; macos_system_ext: string; linux_deadlock: string; }; readonly packageActionTroubleshooting: { es_connection: string; }; readonly threatIntelInt: string; readonly responseActions: string; }"
],
"path": "packages/kbn-doc-links/src/types.ts",
"deprecated": false,
diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx
index 93faea017a0fb..f20c5c3e4621f 100644
--- a/api_docs/kbn_doc_links.mdx
+++ b/api_docs/kbn_doc_links.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links
title: "@kbn/doc-links"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/doc-links plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links']
---
import kbnDocLinksObj from './kbn_doc_links.devdocs.json';
diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx
index f29fe40eb21d1..c92f20d4e82eb 100644
--- a/api_docs/kbn_docs_utils.mdx
+++ b/api_docs/kbn_docs_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils
title: "@kbn/docs-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/docs-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils']
---
import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json';
diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx
index 2d7b26292e0e8..f301c7fde5a81 100644
--- a/api_docs/kbn_ebt_tools.mdx
+++ b/api_docs/kbn_ebt_tools.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools
title: "@kbn/ebt-tools"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ebt-tools plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools']
---
import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json';
diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx
index da7db13bb38b1..1fd6cb7fc92bc 100644
--- a/api_docs/kbn_es_archiver.mdx
+++ b/api_docs/kbn_es_archiver.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver
title: "@kbn/es-archiver"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/es-archiver plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver']
---
import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json';
diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx
index 3d7f8993dd9fb..0c2ba2f9d4488 100644
--- a/api_docs/kbn_es_errors.mdx
+++ b/api_docs/kbn_es_errors.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors
title: "@kbn/es-errors"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/es-errors plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors']
---
import kbnEsErrorsObj from './kbn_es_errors.devdocs.json';
diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx
index db9354454f22f..7b7bc93b57313 100644
--- a/api_docs/kbn_es_query.mdx
+++ b/api_docs/kbn_es_query.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query
title: "@kbn/es-query"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/es-query plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query']
---
import kbnEsQueryObj from './kbn_es_query.devdocs.json';
diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx
index 5bee2fdbf5f66..fe461a5b010f5 100644
--- a/api_docs/kbn_es_types.mdx
+++ b/api_docs/kbn_es_types.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types
title: "@kbn/es-types"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/es-types plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types']
---
import kbnEsTypesObj from './kbn_es_types.devdocs.json';
diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx
index f6c2a308c267e..facb9ad743434 100644
--- a/api_docs/kbn_eslint_plugin_imports.mdx
+++ b/api_docs/kbn_eslint_plugin_imports.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports
title: "@kbn/eslint-plugin-imports"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/eslint-plugin-imports plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports']
---
import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json';
diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx
index 52dcd1a4217e9..af6a78abd324a 100644
--- a/api_docs/kbn_field_types.mdx
+++ b/api_docs/kbn_field_types.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types
title: "@kbn/field-types"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/field-types plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types']
---
import kbnFieldTypesObj from './kbn_field_types.devdocs.json';
diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx
index e8d91e141f195..81929ed2bb345 100644
--- a/api_docs/kbn_find_used_node_modules.mdx
+++ b/api_docs/kbn_find_used_node_modules.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules
title: "@kbn/find-used-node-modules"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/find-used-node-modules plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules']
---
import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json';
diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx
index 93882b49ca42b..9c5b2b494ed5f 100644
--- a/api_docs/kbn_ftr_common_functional_services.mdx
+++ b/api_docs/kbn_ftr_common_functional_services.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services
title: "@kbn/ftr-common-functional-services"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ftr-common-functional-services plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services']
---
import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json';
diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx
index 5955c7f01158f..cbe8ec573dfd5 100644
--- a/api_docs/kbn_generate.mdx
+++ b/api_docs/kbn_generate.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate
title: "@kbn/generate"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/generate plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate']
---
import kbnGenerateObj from './kbn_generate.devdocs.json';
diff --git a/api_docs/kbn_get_repo_files.mdx b/api_docs/kbn_get_repo_files.mdx
index e50741bdb3a60..0958cd3c3ebf7 100644
--- a/api_docs/kbn_get_repo_files.mdx
+++ b/api_docs/kbn_get_repo_files.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-get-repo-files
title: "@kbn/get-repo-files"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/get-repo-files plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files']
---
import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json';
diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx
index 24eedfb0387a4..2ec2679987952 100644
--- a/api_docs/kbn_handlebars.mdx
+++ b/api_docs/kbn_handlebars.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars
title: "@kbn/handlebars"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/handlebars plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars']
---
import kbnHandlebarsObj from './kbn_handlebars.devdocs.json';
diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx
index 1d4fddcc02250..7f42b8a468d7e 100644
--- a/api_docs/kbn_hapi_mocks.mdx
+++ b/api_docs/kbn_hapi_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks
title: "@kbn/hapi-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/hapi-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks']
---
import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json';
diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx
index 59d37e8a5d09f..d4e8d54488ba4 100644
--- a/api_docs/kbn_home_sample_data_card.mdx
+++ b/api_docs/kbn_home_sample_data_card.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card
title: "@kbn/home-sample-data-card"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/home-sample-data-card plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card']
---
import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json';
diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx
index 5e218789e57f1..a0b43f842438b 100644
--- a/api_docs/kbn_home_sample_data_tab.mdx
+++ b/api_docs/kbn_home_sample_data_tab.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab
title: "@kbn/home-sample-data-tab"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/home-sample-data-tab plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab']
---
import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json';
diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx
index 15647319a90f0..7b9d043059c71 100644
--- a/api_docs/kbn_i18n.mdx
+++ b/api_docs/kbn_i18n.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n
title: "@kbn/i18n"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/i18n plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n']
---
import kbnI18nObj from './kbn_i18n.devdocs.json';
diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx
index 56039851af766..d11c22a74ecda 100644
--- a/api_docs/kbn_import_resolver.mdx
+++ b/api_docs/kbn_import_resolver.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver
title: "@kbn/import-resolver"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/import-resolver plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver']
---
import kbnImportResolverObj from './kbn_import_resolver.devdocs.json';
diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx
index 807a82e9cbff7..39f9d65660d07 100644
--- a/api_docs/kbn_interpreter.mdx
+++ b/api_docs/kbn_interpreter.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter
title: "@kbn/interpreter"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/interpreter plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter']
---
import kbnInterpreterObj from './kbn_interpreter.devdocs.json';
diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx
index dfb4aea12e2d7..19a46d0750ca6 100644
--- a/api_docs/kbn_io_ts_utils.mdx
+++ b/api_docs/kbn_io_ts_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils
title: "@kbn/io-ts-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/io-ts-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils']
---
import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json';
diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx
index 28487fab71400..7e5e0932af67d 100644
--- a/api_docs/kbn_jest_serializers.mdx
+++ b/api_docs/kbn_jest_serializers.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers
title: "@kbn/jest-serializers"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/jest-serializers plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers']
---
import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json';
diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx
index 01244be181bf2..f4c9aec83599f 100644
--- a/api_docs/kbn_journeys.mdx
+++ b/api_docs/kbn_journeys.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys
title: "@kbn/journeys"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/journeys plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys']
---
import kbnJourneysObj from './kbn_journeys.devdocs.json';
diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx
index 7d70916d448e4..2ab7c2cad23dd 100644
--- a/api_docs/kbn_kibana_manifest_schema.mdx
+++ b/api_docs/kbn_kibana_manifest_schema.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema
title: "@kbn/kibana-manifest-schema"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/kibana-manifest-schema plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema']
---
import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json';
diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx
index 63d9dc96362af..4c78e0d66ea73 100644
--- a/api_docs/kbn_logging.mdx
+++ b/api_docs/kbn_logging.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging
title: "@kbn/logging"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/logging plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging']
---
import kbnLoggingObj from './kbn_logging.devdocs.json';
diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx
index 6b1049cee9be2..5cc97dbc4f9de 100644
--- a/api_docs/kbn_logging_mocks.mdx
+++ b/api_docs/kbn_logging_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks
title: "@kbn/logging-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/logging-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks']
---
import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json';
diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx
index a175904d02573..110b3b19a0fa8 100644
--- a/api_docs/kbn_managed_vscode_config.mdx
+++ b/api_docs/kbn_managed_vscode_config.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config
title: "@kbn/managed-vscode-config"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/managed-vscode-config plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config']
---
import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json';
diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx
index ca5e2566d884c..11c646693dc0b 100644
--- a/api_docs/kbn_mapbox_gl.mdx
+++ b/api_docs/kbn_mapbox_gl.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl
title: "@kbn/mapbox-gl"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/mapbox-gl plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl']
---
import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json';
diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx
index 78c0d9fbb8369..ccb0243714c5a 100644
--- a/api_docs/kbn_ml_agg_utils.mdx
+++ b/api_docs/kbn_ml_agg_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils
title: "@kbn/ml-agg-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ml-agg-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils']
---
import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json';
diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx
index ffdc48a0fb0d3..9e756982a3c4b 100644
--- a/api_docs/kbn_ml_is_populated_object.mdx
+++ b/api_docs/kbn_ml_is_populated_object.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object
title: "@kbn/ml-is-populated-object"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ml-is-populated-object plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object']
---
import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json';
diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx
index a1f168d3fc91d..5a08b38fdc366 100644
--- a/api_docs/kbn_ml_string_hash.mdx
+++ b/api_docs/kbn_ml_string_hash.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash
title: "@kbn/ml-string-hash"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ml-string-hash plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash']
---
import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json';
diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx
index 7da86649ddf39..13902cebdc873 100644
--- a/api_docs/kbn_monaco.mdx
+++ b/api_docs/kbn_monaco.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco
title: "@kbn/monaco"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/monaco plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco']
---
import kbnMonacoObj from './kbn_monaco.devdocs.json';
diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx
index 29b3596a8bc29..60b2e27c0fc5e 100644
--- a/api_docs/kbn_optimizer.mdx
+++ b/api_docs/kbn_optimizer.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer
title: "@kbn/optimizer"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/optimizer plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer']
---
import kbnOptimizerObj from './kbn_optimizer.devdocs.json';
diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx
index fb729fc0747ed..805c9413ad27f 100644
--- a/api_docs/kbn_optimizer_webpack_helpers.mdx
+++ b/api_docs/kbn_optimizer_webpack_helpers.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers
title: "@kbn/optimizer-webpack-helpers"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/optimizer-webpack-helpers plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers']
---
import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json';
diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx
index 54d57200bd5a1..a2a0a87619793 100644
--- a/api_docs/kbn_osquery_io_ts_types.mdx
+++ b/api_docs/kbn_osquery_io_ts_types.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types
title: "@kbn/osquery-io-ts-types"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/osquery-io-ts-types plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types']
---
import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json';
diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx
index ba91201a52c6c..66b4513e3e93d 100644
--- a/api_docs/kbn_performance_testing_dataset_extractor.mdx
+++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor
title: "@kbn/performance-testing-dataset-extractor"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/performance-testing-dataset-extractor plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor']
---
import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json';
diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx
index 493ca235ab7a9..d0487d7546b1e 100644
--- a/api_docs/kbn_plugin_generator.mdx
+++ b/api_docs/kbn_plugin_generator.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator
title: "@kbn/plugin-generator"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/plugin-generator plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator']
---
import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json';
diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx
index b16b234ee0f50..fe379e3b837c0 100644
--- a/api_docs/kbn_plugin_helpers.mdx
+++ b/api_docs/kbn_plugin_helpers.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers
title: "@kbn/plugin-helpers"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/plugin-helpers plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers']
---
import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json';
diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx
index f7d3bada225b9..d1b5eb542c882 100644
--- a/api_docs/kbn_react_field.mdx
+++ b/api_docs/kbn_react_field.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field
title: "@kbn/react-field"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/react-field plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field']
---
import kbnReactFieldObj from './kbn_react_field.devdocs.json';
diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx
index 65a1a0d424f15..6d2caad781235 100644
--- a/api_docs/kbn_repo_source_classifier.mdx
+++ b/api_docs/kbn_repo_source_classifier.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier
title: "@kbn/repo-source-classifier"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/repo-source-classifier plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier']
---
import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json';
diff --git a/api_docs/kbn_rule_data_utils.devdocs.json b/api_docs/kbn_rule_data_utils.devdocs.json
index c30477647a1ce..8db17c376261c 100644
--- a/api_docs/kbn_rule_data_utils.devdocs.json
+++ b/api_docs/kbn_rule_data_utils.devdocs.json
@@ -912,7 +912,7 @@
"label": "AlertConsumers",
"description": [],
"signature": [
- "\"observability\" | \"logs\" | \"apm\" | \"uptime\" | \"siem\" | \"infrastructure\""
+ "\"infrastructure\" | \"observability\" | \"logs\" | \"apm\" | \"uptime\" | \"siem\""
],
"path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts",
"deprecated": false,
@@ -942,7 +942,7 @@
"label": "AlertStatus",
"description": [],
"signature": [
- "\"recovered\" | \"active\""
+ "\"active\" | \"recovered\""
],
"path": "packages/kbn-rule-data-utils/src/alerts_as_data_status.ts",
"deprecated": false,
@@ -1077,7 +1077,7 @@
"label": "TechnicalRuleDataFieldName",
"description": [],
"signature": [
- "\"tags\" | \"kibana\" | \"@timestamp\" | \"event.action\" | \"kibana.alert.rule.parameters\" | \"kibana.alert.rule.rule_type_id\" | \"kibana.alert.rule.consumer\" | \"kibana.alert.rule.producer\" | \"kibana.space_ids\" | \"kibana.alert.uuid\" | \"kibana.alert.instance.id\" | \"kibana.alert.start\" | \"kibana.alert.end\" | \"kibana.alert.duration.us\" | \"kibana.alert.severity\" | \"kibana.alert.status\" | \"kibana.version\" | \"ecs.version\" | \"kibana.alert.risk_score\" | \"kibana.alert.workflow_status\" | \"kibana.alert.workflow_user\" | \"kibana.alert.workflow_reason\" | \"kibana.alert.system_status\" | \"kibana.alert.action_group\" | \"kibana.alert.reason\" | \"kibana.alert.rule.author\" | \"kibana.alert.rule.category\" | \"kibana.alert.rule.uuid\" | \"kibana.alert.rule.created_at\" | \"kibana.alert.rule.created_by\" | \"kibana.alert.rule.description\" | \"kibana.alert.rule.enabled\" | \"kibana.alert.rule.execution.uuid\" | \"kibana.alert.rule.from\" | \"kibana.alert.rule.interval\" | \"kibana.alert.rule.license\" | \"kibana.alert.rule.name\" | \"kibana.alert.rule.note\" | \"kibana.alert.rule.references\" | \"kibana.alert.rule.rule_id\" | \"kibana.alert.rule.rule_name_override\" | \"kibana.alert.rule.tags\" | \"kibana.alert.rule.to\" | \"kibana.alert.rule.type\" | \"kibana.alert.rule.updated_at\" | \"kibana.alert.rule.updated_by\" | \"kibana.alert.rule.version\" | \"event.kind\" | \"event.module\" | \"kibana.alert.evaluation.threshold\" | \"kibana.alert.evaluation.value\" | \"kibana.alert.building_block_type\" | \"kibana.alert.rule.exceptions_list\" | \"kibana.alert.rule.namespace\" | \"kibana.alert\" | \"kibana.alert.rule\""
+ "\"tags\" | \"kibana\" | \"@timestamp\" | \"kibana.alert.rule.rule_type_id\" | \"kibana.alert.rule.consumer\" | \"event.action\" | \"kibana.alert.rule.execution.uuid\" | \"kibana.alert.rule.parameters\" | \"kibana.alert.rule.producer\" | \"kibana.space_ids\" | \"kibana.alert.uuid\" | \"kibana.alert.instance.id\" | \"kibana.alert.start\" | \"kibana.alert.end\" | \"kibana.alert.duration.us\" | \"kibana.alert.severity\" | \"kibana.alert.status\" | \"kibana.version\" | \"ecs.version\" | \"kibana.alert.risk_score\" | \"kibana.alert.workflow_status\" | \"kibana.alert.workflow_user\" | \"kibana.alert.workflow_reason\" | \"kibana.alert.system_status\" | \"kibana.alert.action_group\" | \"kibana.alert.reason\" | \"kibana.alert.rule.author\" | \"kibana.alert.rule.category\" | \"kibana.alert.rule.uuid\" | \"kibana.alert.rule.created_at\" | \"kibana.alert.rule.created_by\" | \"kibana.alert.rule.description\" | \"kibana.alert.rule.enabled\" | \"kibana.alert.rule.from\" | \"kibana.alert.rule.interval\" | \"kibana.alert.rule.license\" | \"kibana.alert.rule.name\" | \"kibana.alert.rule.note\" | \"kibana.alert.rule.references\" | \"kibana.alert.rule.rule_id\" | \"kibana.alert.rule.rule_name_override\" | \"kibana.alert.rule.tags\" | \"kibana.alert.rule.to\" | \"kibana.alert.rule.type\" | \"kibana.alert.rule.updated_at\" | \"kibana.alert.rule.updated_by\" | \"kibana.alert.rule.version\" | \"event.kind\" | \"event.module\" | \"kibana.alert.evaluation.threshold\" | \"kibana.alert.evaluation.value\" | \"kibana.alert.building_block_type\" | \"kibana.alert.rule.exceptions_list\" | \"kibana.alert.rule.namespace\" | \"kibana.alert\" | \"kibana.alert.rule\""
],
"path": "packages/kbn-rule-data-utils/src/technical_field_names.ts",
"deprecated": false,
@@ -1107,7 +1107,7 @@
"label": "ValidFeatureId",
"description": [],
"signature": [
- "\"observability\" | \"logs\" | \"apm\" | \"uptime\" | \"siem\" | \"infrastructure\""
+ "\"infrastructure\" | \"observability\" | \"logs\" | \"apm\" | \"uptime\" | \"siem\""
],
"path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts",
"deprecated": false,
diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx
index ef453ad073e4f..2e861a2bd3a13 100644
--- a/api_docs/kbn_rule_data_utils.mdx
+++ b/api_docs/kbn_rule_data_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils
title: "@kbn/rule-data-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/rule-data-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils']
---
import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx
index f441cc10aa506..3d11d856ffe07 100644
--- a/api_docs/kbn_securitysolution_autocomplete.mdx
+++ b/api_docs/kbn_securitysolution_autocomplete.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete
title: "@kbn/securitysolution-autocomplete"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-autocomplete plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete']
---
import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx
index c81350b38632b..4ce360705125a 100644
--- a/api_docs/kbn_securitysolution_es_utils.mdx
+++ b/api_docs/kbn_securitysolution_es_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils
title: "@kbn/securitysolution-es-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-es-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils']
---
import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_exception_list_components.devdocs.json b/api_docs/kbn_securitysolution_exception_list_components.devdocs.json
new file mode 100644
index 0000000000000..97b711804af12
--- /dev/null
+++ b/api_docs/kbn_securitysolution_exception_list_components.devdocs.json
@@ -0,0 +1,1209 @@
+{
+ "id": "@kbn/securitysolution-exception-list-components",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.EmptyViewerState",
+ "type": "Function",
+ "tags": [],
+ "label": "EmptyViewerState",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.EmptyViewerState.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCard",
+ "type": "Function",
+ "tags": [],
+ "label": "ExceptionItemCard",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent<",
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.ExceptionItemProps",
+ "text": "ExceptionItemProps"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCard.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardComments",
+ "type": "Function",
+ "tags": [],
+ "label": "ExceptionItemCardComments",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent<",
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.ExceptionItemCardCommentsProps",
+ "text": "ExceptionItemCardCommentsProps"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardComments.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardConditions",
+ "type": "Function",
+ "tags": [],
+ "label": "ExceptionItemCardConditions",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent<",
+ "CriteriaConditionsProps",
+ ">"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardConditions.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardHeader",
+ "type": "Function",
+ "tags": [],
+ "label": "ExceptionItemCardHeader",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent<",
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.ExceptionItemCardHeaderProps",
+ "text": "ExceptionItemCardHeaderProps"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardHeader.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardMetaInfo",
+ "type": "Function",
+ "tags": [],
+ "label": "ExceptionItemCardMetaInfo",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent<",
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.ExceptionItemCardMetaInfoProps",
+ "text": "ExceptionItemCardMetaInfoProps"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardMetaInfo.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItems",
+ "type": "Function",
+ "tags": [],
+ "label": "ExceptionItems",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItems.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.Pagination",
+ "type": "Function",
+ "tags": [],
+ "label": "Pagination",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent<",
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.PaginationProps",
+ "text": "PaginationProps"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.Pagination.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.SearchBar",
+ "type": "Function",
+ "tags": [],
+ "label": "SearchBar",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.SearchBar.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ValueWithSpaceWarning",
+ "type": "Function",
+ "tags": [],
+ "label": "ValueWithSpaceWarning",
+ "description": [],
+ "signature": [
+ "({ value, tooltipIconType, tooltipIconText, }: React.PropsWithChildren) => JSX.Element | null"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ValueWithSpaceWarning.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{\n value,\n tooltipIconType = 'iInCircle',\n tooltipIconText,\n}",
+ "description": [],
+ "signature": [
+ "React.PropsWithChildren"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardCommentsProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "ExceptionItemCardCommentsProps",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardCommentsProps.comments",
+ "type": "Array",
+ "tags": [],
+ "label": "comments",
+ "description": [],
+ "signature": [
+ "EuiCommentProps",
+ "[]"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardHeaderProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "ExceptionItemCardHeaderProps",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardHeaderProps.item",
+ "type": "Object",
+ "tags": [],
+ "label": "item",
+ "description": [],
+ "signature": [
+ "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardHeaderProps.actions",
+ "type": "Array",
+ "tags": [],
+ "label": "actions",
+ "description": [],
+ "signature": [
+ "{ key: string; icon: string; label: string | boolean; onClick: () => void; }[]"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardHeaderProps.disableActions",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "disableActions",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardHeaderProps.dataTestSubj",
+ "type": "string",
+ "tags": [],
+ "label": "dataTestSubj",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardMetaInfoProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "ExceptionItemCardMetaInfoProps",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardMetaInfoProps.item",
+ "type": "Object",
+ "tags": [],
+ "label": "item",
+ "description": [],
+ "signature": [
+ "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardMetaInfoProps.references",
+ "type": "Array",
+ "tags": [],
+ "label": "references",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.RuleReference",
+ "text": "RuleReference"
+ },
+ "[]"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardMetaInfoProps.dataTestSubj",
+ "type": "string",
+ "tags": [],
+ "label": "dataTestSubj",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardMetaInfoProps.formattedDateComponent",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "formattedDateComponent",
+ "description": [],
+ "signature": [
+ "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"source\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"big\" | \"sub\" | \"sup\" | \"animate\" | \"progress\" | \"view\" | \"output\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"article\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\""
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemCardMetaInfoProps.securityLinkAnchorComponent",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "securityLinkAnchorComponent",
+ "description": [],
+ "signature": [
+ "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"source\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"big\" | \"sub\" | \"sup\" | \"animate\" | \"progress\" | \"view\" | \"output\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"article\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\""
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "ExceptionItemProps",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.dataTestSubj",
+ "type": "string",
+ "tags": [],
+ "label": "dataTestSubj",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.disableActions",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "disableActions",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.exceptionItem",
+ "type": "Object",
+ "tags": [],
+ "label": "exceptionItem",
+ "description": [],
+ "signature": [
+ "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.listType",
+ "type": "Enum",
+ "tags": [],
+ "label": "listType",
+ "description": [],
+ "signature": [
+ "ExceptionListTypeEnum"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.ruleReferences",
+ "type": "Array",
+ "tags": [],
+ "label": "ruleReferences",
+ "description": [],
+ "signature": [
+ "any[]"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.editActionLabel",
+ "type": "string",
+ "tags": [],
+ "label": "editActionLabel",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.deleteActionLabel",
+ "type": "string",
+ "tags": [],
+ "label": "deleteActionLabel",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.securityLinkAnchorComponent",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "securityLinkAnchorComponent",
+ "description": [],
+ "signature": [
+ "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"source\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"big\" | \"sub\" | \"sup\" | \"animate\" | \"progress\" | \"view\" | \"output\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"article\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\""
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.formattedDateComponent",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "formattedDateComponent",
+ "description": [],
+ "signature": [
+ "\"symbol\" | \"object\" | React.ComponentType | \"body\" | \"path\" | \"circle\" | \"filter\" | \"data\" | \"line\" | \"area\" | \"time\" | \"label\" | \"legend\" | \"image\" | \"link\" | \"menu\" | \"stop\" | \"base\" | \"text\" | \"title\" | \"s\" | \"small\" | \"svg\" | \"meta\" | \"script\" | \"summary\" | \"source\" | \"desc\" | \"q\" | \"pattern\" | \"mask\" | \"input\" | \"slot\" | \"style\" | \"head\" | \"section\" | \"big\" | \"sub\" | \"sup\" | \"animate\" | \"progress\" | \"view\" | \"output\" | \"var\" | \"map\" | \"html\" | \"a\" | \"img\" | \"audio\" | \"form\" | \"main\" | \"abbr\" | \"address\" | \"article\" | \"aside\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"canvas\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"select\" | \"span\" | \"strong\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"video\" | \"wbr\" | \"webview\" | \"animateMotion\" | \"animateTransform\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\""
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.getFormattedComments",
+ "type": "Function",
+ "tags": [],
+ "label": "getFormattedComments",
+ "description": [],
+ "signature": [
+ "(comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]) => ",
+ "EuiCommentProps",
+ "[]"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.getFormattedComments.$1",
+ "type": "Array",
+ "tags": [],
+ "label": "comments",
+ "description": [],
+ "signature": [
+ "({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.onDeleteException",
+ "type": "Function",
+ "tags": [],
+ "label": "onDeleteException",
+ "description": [],
+ "signature": [
+ "(arg: ",
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.ExceptionListItemIdentifiers",
+ "text": "ExceptionListItemIdentifiers"
+ },
+ ") => void"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.onDeleteException.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "arg",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.ExceptionListItemIdentifiers",
+ "text": "ExceptionListItemIdentifiers"
+ }
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.onEditException",
+ "type": "Function",
+ "tags": [],
+ "label": "onEditException",
+ "description": [],
+ "signature": [
+ "(item: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }) => void"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionItemProps.onEditException.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "item",
+ "description": [],
+ "signature": [
+ "{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"ip\" | \"text\" | \"geo_point\" | \"geo_shape\" | \"date_nanos\" | \"long\" | \"double\" | \"date_range\" | \"ip_range\" | \"shape\" | \"short\" | \"binary\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionListItemIdentifiers",
+ "type": "Interface",
+ "tags": [],
+ "label": "ExceptionListItemIdentifiers",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionListItemIdentifiers.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionListItemIdentifiers.name",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionListItemIdentifiers.namespaceType",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "namespaceType",
+ "description": [],
+ "signature": [
+ "\"single\" | \"agnostic\""
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionListSummaryProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "ExceptionListSummaryProps",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionListSummaryProps.pagination",
+ "type": "Object",
+ "tags": [],
+ "label": "pagination",
+ "description": [],
+ "signature": [
+ "Pagination"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ExceptionListSummaryProps.lastUpdated",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "lastUpdated",
+ "description": [],
+ "signature": [
+ "string | number | null"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.GetExceptionItemProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "GetExceptionItemProps",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.GetExceptionItemProps.pagination",
+ "type": "Object",
+ "tags": [],
+ "label": "pagination",
+ "description": [],
+ "signature": [
+ "Pagination",
+ " | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.GetExceptionItemProps.search",
+ "type": "string",
+ "tags": [],
+ "label": "search",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.GetExceptionItemProps.filters",
+ "type": "string",
+ "tags": [],
+ "label": "filters",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.PaginationProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "PaginationProps",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.PaginationProps.dataTestSubj",
+ "type": "string",
+ "tags": [],
+ "label": "dataTestSubj",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.PaginationProps.ariaLabel",
+ "type": "string",
+ "tags": [],
+ "label": "ariaLabel",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.PaginationProps.pagination",
+ "type": "Object",
+ "tags": [],
+ "label": "pagination",
+ "description": [],
+ "signature": [
+ "Pagination"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.PaginationProps.onPaginationChange",
+ "type": "Function",
+ "tags": [],
+ "label": "onPaginationChange",
+ "description": [],
+ "signature": [
+ "(arg: ",
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.GetExceptionItemProps",
+ "text": "GetExceptionItemProps"
+ },
+ ") => void"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.PaginationProps.onPaginationChange.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "arg",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/securitysolution-exception-list-components",
+ "scope": "common",
+ "docId": "kibKbnSecuritysolutionExceptionListComponentsPluginApi",
+ "section": "def-common.GetExceptionItemProps",
+ "text": "GetExceptionItemProps"
+ }
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.RuleReference",
+ "type": "Interface",
+ "tags": [],
+ "label": "RuleReference",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.RuleReference.name",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.RuleReference.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.RuleReference.ruleId",
+ "type": "string",
+ "tags": [],
+ "label": "ruleId",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.RuleReference.exceptionLists",
+ "type": "Array",
+ "tags": [],
+ "label": "exceptionLists",
+ "description": [],
+ "signature": [
+ "{ _version: string | undefined; created_at: string; created_by: string; description: string; id: string; immutable: boolean; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; updated_at: string; updated_by: string; version: number; }[]"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.RuleReferences",
+ "type": "Interface",
+ "tags": [],
+ "label": "RuleReferences",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.RuleReferences.Unnamed",
+ "type": "IndexSignature",
+ "tags": [],
+ "label": "[key: string]: any[]",
+ "description": [],
+ "signature": [
+ "[key: string]: any[]"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "enums": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ListTypeText",
+ "type": "Enum",
+ "tags": [],
+ "label": "ListTypeText",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ViewerStatus",
+ "type": "Enum",
+ "tags": [],
+ "label": "ViewerStatus",
+ "description": [],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ }
+ ],
+ "misc": [
+ {
+ "parentPluginId": "@kbn/securitysolution-exception-list-components",
+ "id": "def-common.ViewerFlyoutName",
+ "type": "Type",
+ "tags": [],
+ "label": "ViewerFlyoutName",
+ "description": [],
+ "signature": [
+ "\"addException\" | \"editException\" | null"
+ ],
+ "path": "packages/kbn-securitysolution-exception-list-components/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx
new file mode 100644
index 0000000000000..fe34878dde867
--- /dev/null
+++ b/api_docs/kbn_securitysolution_exception_list_components.mdx
@@ -0,0 +1,39 @@
+---
+####
+#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system.
+#### Reach out in #docs-engineering for more info.
+####
+id: kibKbnSecuritysolutionExceptionListComponentsPluginApi
+slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components
+title: "@kbn/securitysolution-exception-list-components"
+image: https://source.unsplash.com/400x175/?github
+description: API docs for the @kbn/securitysolution-exception-list-components plugin
+date: 2022-10-04
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components']
+---
+import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json';
+
+
+
+Contact [Owner missing] for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 76 | 0 | 67 | 1 |
+
+## Common
+
+### Functions
+
+
+### Interfaces
+
+
+### Enums
+
+
+### Consts, variables and types
+
+
diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx
index 8e6bdc15f9807..b7857cb66e9ec 100644
--- a/api_docs/kbn_securitysolution_hook_utils.mdx
+++ b/api_docs/kbn_securitysolution_hook_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils
title: "@kbn/securitysolution-hook-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-hook-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils']
---
import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.devdocs.json b/api_docs/kbn_securitysolution_io_ts_alerting_types.devdocs.json
index b42cebbc4fb84..f9869d88c91cd 100644
--- a/api_docs/kbn_securitysolution_io_ts_alerting_types.devdocs.json
+++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.devdocs.json
@@ -877,21 +877,6 @@
"trackAdoption": false,
"initialIsOpen": false
},
- {
- "parentPluginId": "@kbn/securitysolution-io-ts-alerting-types",
- "id": "def-common.ThrottleOrUndefinedOrNull",
- "type": "Type",
- "tags": [],
- "label": "ThrottleOrUndefinedOrNull",
- "description": [],
- "signature": [
- "string | null | undefined"
- ],
- "path": "packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
{
"parentPluginId": "@kbn/securitysolution-io-ts-alerting-types",
"id": "def-common.Type",
@@ -1383,24 +1368,6 @@
"trackAdoption": false,
"initialIsOpen": false
},
- {
- "parentPluginId": "@kbn/securitysolution-io-ts-alerting-types",
- "id": "def-common.DefaultThrottleNull",
- "type": "Object",
- "tags": [],
- "label": "DefaultThrottleNull",
- "description": [
- "\nTypes the DefaultThrottleNull as:\n - If null or undefined, then a null will be set"
- ],
- "signature": [
- "Type",
- ""
- ],
- "path": "packages/kbn-securitysolution-io-ts-alerting-types/src/default_throttle_null/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
{
"parentPluginId": "@kbn/securitysolution-io-ts-alerting-types",
"id": "def-common.DefaultToString",
@@ -2921,7 +2888,14 @@
"label": "throttle",
"description": [],
"signature": [
- "StringC"
+ "UnionC",
+ "<[",
+ "LiteralC",
+ "<\"no_actions\">, ",
+ "LiteralC",
+ "<\"rule\">, ",
+ "Type",
+ "]>"
],
"path": "packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts",
"deprecated": false,
@@ -2938,31 +2912,15 @@
"signature": [
"UnionC",
"<[",
- "StringC",
- ", ",
- "NullC",
- "]>"
- ],
- "path": "packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/securitysolution-io-ts-alerting-types",
- "id": "def-common.throttleOrNullOrUndefined",
- "type": "Object",
- "tags": [],
- "label": "throttleOrNullOrUndefined",
- "description": [],
- "signature": [
"UnionC",
"<[",
- "StringC",
- ", ",
+ "LiteralC",
+ "<\"no_actions\">, ",
+ "LiteralC",
+ "<\"rule\">, ",
+ "Type",
+ "]>, ",
"NullC",
- ", ",
- "UndefinedC",
"]>"
],
"path": "packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts",
diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx
index 4066f50c33520..9f0b39175cdd0 100644
--- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx
+++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types
title: "@kbn/securitysolution-io-ts-alerting-types"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types']
---
import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin.
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 148 | 0 | 129 | 0 |
+| 145 | 0 | 127 | 0 |
## Common
diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx
index 720ede9fa9e87..bf6b60393ec53 100644
--- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx
+++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types
title: "@kbn/securitysolution-io-ts-list-types"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-io-ts-list-types plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types']
---
import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_io_ts_types.devdocs.json b/api_docs/kbn_securitysolution_io_ts_types.devdocs.json
index 2ec94e9e8c1c0..ef934492d28ef 100644
--- a/api_docs/kbn_securitysolution_io_ts_types.devdocs.json
+++ b/api_docs/kbn_securitysolution_io_ts_types.devdocs.json
@@ -405,6 +405,41 @@
],
"returnComment": [],
"initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/securitysolution-io-ts-types",
+ "id": "def-common.TimeDuration",
+ "type": "Function",
+ "tags": [],
+ "label": "TimeDuration",
+ "description": [],
+ "signature": [
+ "({ allowedUnits, allowedDurations }: TimeDurationType) => ",
+ "Type",
+ ""
+ ],
+ "path": "packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-io-ts-types",
+ "id": "def-common.TimeDuration.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{ allowedUnits, allowedDurations }",
+ "description": [],
+ "signature": [
+ "TimeDurationType"
+ ],
+ "path": "packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
}
],
"interfaces": [],
@@ -644,12 +679,30 @@
"label": "TimeDurationC",
"description": [],
"signature": [
+ "({ allowedUnits, allowedDurations }: TimeDurationType) => ",
"Type",
""
],
"path": "packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts",
"deprecated": false,
"trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/securitysolution-io-ts-types",
+ "id": "def-common.TimeDurationC.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "__0",
+ "description": [],
+ "signature": [
+ "TimeDurationWithAllowedDurations | TimeDurationWithAllowedUnits"
+ ],
+ "path": "packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
"initialIsOpen": false
},
{
@@ -1042,24 +1095,6 @@
"trackAdoption": false,
"initialIsOpen": false
},
- {
- "parentPluginId": "@kbn/securitysolution-io-ts-types",
- "id": "def-common.TimeDuration",
- "type": "Object",
- "tags": [],
- "label": "TimeDuration",
- "description": [
- "\nTypes the TimeDuration as:\n - A string that is not empty, and composed of a positive integer greater than 0 followed by a unit of time\n - in the format {safe_integer}{timeUnit}, e.g. \"30s\", \"1m\", \"2h\""
- ],
- "signature": [
- "Type",
- ""
- ],
- "path": "packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
{
"parentPluginId": "@kbn/securitysolution-io-ts-types",
"id": "def-common.UUID",
diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx
index f2220252df9f4..ccbb90b450959 100644
--- a/api_docs/kbn_securitysolution_io_ts_types.mdx
+++ b/api_docs/kbn_securitysolution_io_ts_types.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types
title: "@kbn/securitysolution-io-ts-types"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-io-ts-types plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types']
---
import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin.
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 63 | 0 | 33 | 0 |
+| 65 | 0 | 36 | 0 |
## Common
diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx
index 4ddd805beceec..2b3c7663b879f 100644
--- a/api_docs/kbn_securitysolution_io_ts_utils.mdx
+++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils
title: "@kbn/securitysolution-io-ts-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-io-ts-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils']
---
import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx
index 837b102f35b7c..a5e08ee825fae 100644
--- a/api_docs/kbn_securitysolution_list_api.mdx
+++ b/api_docs/kbn_securitysolution_list_api.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api
title: "@kbn/securitysolution-list-api"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-list-api plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api']
---
import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx
index 5e117e7fdd5ff..7b169ce42760c 100644
--- a/api_docs/kbn_securitysolution_list_constants.mdx
+++ b/api_docs/kbn_securitysolution_list_constants.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants
title: "@kbn/securitysolution-list-constants"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-list-constants plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants']
---
import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx
index a0d87f4a94bbb..5c977abb1b280 100644
--- a/api_docs/kbn_securitysolution_list_hooks.mdx
+++ b/api_docs/kbn_securitysolution_list_hooks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks
title: "@kbn/securitysolution-list-hooks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-list-hooks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks']
---
import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx
index a42cbdfe87318..768c6cf059b57 100644
--- a/api_docs/kbn_securitysolution_list_utils.mdx
+++ b/api_docs/kbn_securitysolution_list_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils
title: "@kbn/securitysolution-list-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-list-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils']
---
import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx
index c978507107c7d..3496eef3b6346 100644
--- a/api_docs/kbn_securitysolution_rules.mdx
+++ b/api_docs/kbn_securitysolution_rules.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules
title: "@kbn/securitysolution-rules"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-rules plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules']
---
import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx
index d7cd694497c7f..2d25ede3c66ec 100644
--- a/api_docs/kbn_securitysolution_t_grid.mdx
+++ b/api_docs/kbn_securitysolution_t_grid.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid
title: "@kbn/securitysolution-t-grid"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-t-grid plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid']
---
import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx
index c6c4f053e9525..26c6aa46ba082 100644
--- a/api_docs/kbn_securitysolution_utils.mdx
+++ b/api_docs/kbn_securitysolution_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils
title: "@kbn/securitysolution-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils']
---
import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json';
diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx
index fc18c7757d1d9..16eac1230f6d8 100644
--- a/api_docs/kbn_server_http_tools.mdx
+++ b/api_docs/kbn_server_http_tools.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools
title: "@kbn/server-http-tools"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/server-http-tools plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools']
---
import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json';
diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx
index 2c9d51b468868..675a4f7818c66 100644
--- a/api_docs/kbn_server_route_repository.mdx
+++ b/api_docs/kbn_server_route_repository.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository
title: "@kbn/server-route-repository"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/server-route-repository plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository']
---
import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json';
diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx
index 1a40ade046a8a..bda0bfc9746fa 100644
--- a/api_docs/kbn_shared_svg.mdx
+++ b/api_docs/kbn_shared_svg.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg
title: "@kbn/shared-svg"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-svg plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg']
---
import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx
index 6d9064ab9d9ac..23abaffe3cc78 100644
--- a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx
+++ b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-user-profile-components
title: "@kbn/shared-ux-avatar-user-profile-components"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-avatar-user-profile-components plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-user-profile-components']
---
import kbnSharedUxAvatarUserProfileComponentsObj from './kbn_shared_ux_avatar_user_profile_components.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx
index e28b92febd738..e553b3a2c6c5f 100644
--- a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx
+++ b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen-mocks
title: "@kbn/shared-ux-button-exit-full-screen-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-button-exit-full-screen-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen-mocks']
---
import kbnSharedUxButtonExitFullScreenMocksObj from './kbn_shared_ux_button_exit_full_screen_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx
index 3515b5ee35bf4..6465028feeb17 100644
--- a/api_docs/kbn_shared_ux_button_toolbar.mdx
+++ b/api_docs/kbn_shared_ux_button_toolbar.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar
title: "@kbn/shared-ux-button-toolbar"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-button-toolbar plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar']
---
import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx
index ba2f64392e72c..c570628e0e331 100644
--- a/api_docs/kbn_shared_ux_card_no_data.mdx
+++ b/api_docs/kbn_shared_ux_card_no_data.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data
title: "@kbn/shared-ux-card-no-data"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-card-no-data plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data']
---
import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx
index 6942dcbd38fca..82c15083cc996 100644
--- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx
+++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks
title: "@kbn/shared-ux-card-no-data-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks']
---
import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx
index 69a6794fbccd5..56afa671aa65c 100644
--- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx
+++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks
title: "@kbn/shared-ux-link-redirect-app-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks']
---
import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx
index a8465df7126e6..557e698f2e512 100644
--- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx
+++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data
title: "@kbn/shared-ux-page-analytics-no-data"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data']
---
import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx
index 9e930a85deb81..352a0014b2cc0 100644
--- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx
+++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks
title: "@kbn/shared-ux-page-analytics-no-data-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks']
---
import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx
index d96c9079cf5fd..b28052e80a11d 100644
--- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx
+++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data
title: "@kbn/shared-ux-page-kibana-no-data"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data']
---
import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx
index 86595fb7cfb1f..15a591c9aecdf 100644
--- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx
+++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks
title: "@kbn/shared-ux-page-kibana-no-data-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks']
---
import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx
index 9132796651764..4c476350996e4 100644
--- a/api_docs/kbn_shared_ux_page_kibana_template.mdx
+++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template
title: "@kbn/shared-ux-page-kibana-template"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-kibana-template plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template']
---
import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx
index e5b6a7845bbeb..2e4fc87798604 100644
--- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx
+++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks
title: "@kbn/shared-ux-page-kibana-template-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks']
---
import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx
index 09f6ed5cf1fa0..f22caeb920fc5 100644
--- a/api_docs/kbn_shared_ux_page_no_data.mdx
+++ b/api_docs/kbn_shared_ux_page_no_data.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data
title: "@kbn/shared-ux-page-no-data"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-no-data plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data']
---
import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx
index ef0e7d2b60bf3..0f95fd61f2579 100644
--- a/api_docs/kbn_shared_ux_page_no_data_config.mdx
+++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config
title: "@kbn/shared-ux-page-no-data-config"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-no-data-config plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config']
---
import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx
index 43ef0de76bb28..80f6cf9b8f34d 100644
--- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx
+++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks
title: "@kbn/shared-ux-page-no-data-config-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks']
---
import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx
index eecbe82f148c7..fadea535b8245 100644
--- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx
+++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks
title: "@kbn/shared-ux-page-no-data-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks']
---
import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx
index 001790b9086e2..aa9686f1314b2 100644
--- a/api_docs/kbn_shared_ux_page_solution_nav.mdx
+++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav
title: "@kbn/shared-ux-page-solution-nav"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-page-solution-nav plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav']
---
import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx
index 42efbc3a489cc..95295947ea4c3 100644
--- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx
+++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views
title: "@kbn/shared-ux-prompt-no-data-views"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views']
---
import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx
index 71404d9e00a6f..a136219cf2d8c 100644
--- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx
+++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks
title: "@kbn/shared-ux-prompt-no-data-views-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks']
---
import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx
index a24b3d7d985a9..cbcc71d025c8b 100644
--- a/api_docs/kbn_shared_ux_router.mdx
+++ b/api_docs/kbn_shared_ux_router.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router
title: "@kbn/shared-ux-router"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-router plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router']
---
import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx
index b833764dfacbc..40896d72b0dc8 100644
--- a/api_docs/kbn_shared_ux_router_mocks.mdx
+++ b/api_docs/kbn_shared_ux_router_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks
title: "@kbn/shared-ux-router-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-router-mocks plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks']
---
import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx
index bf5525e9d8ea8..133cbe3bb9994 100644
--- a/api_docs/kbn_shared_ux_storybook_config.mdx
+++ b/api_docs/kbn_shared_ux_storybook_config.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config
title: "@kbn/shared-ux-storybook-config"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-storybook-config plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config']
---
import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx
index 16c867044187d..443625c76310c 100644
--- a/api_docs/kbn_shared_ux_storybook_mock.mdx
+++ b/api_docs/kbn_shared_ux_storybook_mock.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock
title: "@kbn/shared-ux-storybook-mock"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-storybook-mock plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock']
---
import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx
index ef2f54962c583..1182906621731 100644
--- a/api_docs/kbn_shared_ux_utility.mdx
+++ b/api_docs/kbn_shared_ux_utility.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility
title: "@kbn/shared-ux-utility"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-utility plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility']
---
import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json';
diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx
index 8fa73d4c68dad..ea558aa9e073b 100644
--- a/api_docs/kbn_some_dev_log.mdx
+++ b/api_docs/kbn_some_dev_log.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log
title: "@kbn/some-dev-log"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/some-dev-log plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log']
---
import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json';
diff --git a/api_docs/kbn_sort_package_json.mdx b/api_docs/kbn_sort_package_json.mdx
index 8a049d4872b72..e3a9c03528b20 100644
--- a/api_docs/kbn_sort_package_json.mdx
+++ b/api_docs/kbn_sort_package_json.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-package-json
title: "@kbn/sort-package-json"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/sort-package-json plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-package-json']
---
import kbnSortPackageJsonObj from './kbn_sort_package_json.devdocs.json';
diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx
index f1ba970a48042..e5c5d241941bd 100644
--- a/api_docs/kbn_std.mdx
+++ b/api_docs/kbn_std.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std
title: "@kbn/std"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/std plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std']
---
import kbnStdObj from './kbn_std.devdocs.json';
diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx
index 2ff62c2d04f35..1d5e0e3792587 100644
--- a/api_docs/kbn_stdio_dev_helpers.mdx
+++ b/api_docs/kbn_stdio_dev_helpers.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers
title: "@kbn/stdio-dev-helpers"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/stdio-dev-helpers plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers']
---
import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json';
diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx
index b77c7bfc44e93..49592c87fc217 100644
--- a/api_docs/kbn_storybook.mdx
+++ b/api_docs/kbn_storybook.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook
title: "@kbn/storybook"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/storybook plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook']
---
import kbnStorybookObj from './kbn_storybook.devdocs.json';
diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx
index f81111a502799..548085afb06a6 100644
--- a/api_docs/kbn_telemetry_tools.mdx
+++ b/api_docs/kbn_telemetry_tools.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools
title: "@kbn/telemetry-tools"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/telemetry-tools plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools']
---
import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json';
diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx
index eaf2d94c9a05d..130c68213d1dc 100644
--- a/api_docs/kbn_test.mdx
+++ b/api_docs/kbn_test.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test
title: "@kbn/test"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/test plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test']
---
import kbnTestObj from './kbn_test.devdocs.json';
diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx
index 96f5d4d6ab2a7..c9b070d08edf9 100644
--- a/api_docs/kbn_test_jest_helpers.mdx
+++ b/api_docs/kbn_test_jest_helpers.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers
title: "@kbn/test-jest-helpers"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/test-jest-helpers plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers']
---
import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json';
diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx
index db3273ea8883f..e93c241e2cdac 100644
--- a/api_docs/kbn_test_subj_selector.mdx
+++ b/api_docs/kbn_test_subj_selector.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector
title: "@kbn/test-subj-selector"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/test-subj-selector plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector']
---
import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json';
diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx
index fe4e9cade439f..da5f83dd7a47b 100644
--- a/api_docs/kbn_tooling_log.mdx
+++ b/api_docs/kbn_tooling_log.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log
title: "@kbn/tooling-log"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/tooling-log plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log']
---
import kbnToolingLogObj from './kbn_tooling_log.devdocs.json';
diff --git a/api_docs/kbn_type_summarizer.mdx b/api_docs/kbn_type_summarizer.mdx
index 9744d7e40941f..9ce0e8072dec2 100644
--- a/api_docs/kbn_type_summarizer.mdx
+++ b/api_docs/kbn_type_summarizer.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer
title: "@kbn/type-summarizer"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/type-summarizer plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer']
---
import kbnTypeSummarizerObj from './kbn_type_summarizer.devdocs.json';
diff --git a/api_docs/kbn_type_summarizer_core.mdx b/api_docs/kbn_type_summarizer_core.mdx
index 5bf8d7c641755..d6c96609eee48 100644
--- a/api_docs/kbn_type_summarizer_core.mdx
+++ b/api_docs/kbn_type_summarizer_core.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-type-summarizer-core
title: "@kbn/type-summarizer-core"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/type-summarizer-core plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/type-summarizer-core']
---
import kbnTypeSummarizerCoreObj from './kbn_type_summarizer_core.devdocs.json';
diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx
index 24144f46636bc..365d565746dbc 100644
--- a/api_docs/kbn_typed_react_router_config.mdx
+++ b/api_docs/kbn_typed_react_router_config.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config
title: "@kbn/typed-react-router-config"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/typed-react-router-config plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config']
---
import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json';
diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx
index fe7f2f02b8192..d8a381bf82680 100644
--- a/api_docs/kbn_ui_theme.mdx
+++ b/api_docs/kbn_ui_theme.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme
title: "@kbn/ui-theme"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ui-theme plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme']
---
import kbnUiThemeObj from './kbn_ui_theme.devdocs.json';
diff --git a/api_docs/kbn_user_profile_components.devdocs.json b/api_docs/kbn_user_profile_components.devdocs.json
index d8cd0cfd94f9e..55ddd03b7d6d4 100644
--- a/api_docs/kbn_user_profile_components.devdocs.json
+++ b/api_docs/kbn_user_profile_components.devdocs.json
@@ -121,6 +121,57 @@
"returnComment": [],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserAvatarTip",
+ "type": "Function",
+ "tags": [],
+ "label": "UserAvatarTip",
+ "description": [
+ "\nRenders a user avatar with tooltip"
+ ],
+ "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_tip.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserAvatarTip.$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_tip.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "@kbn/user-profile-components",
"id": "def-common.UserProfilesPopover",
@@ -236,6 +287,57 @@
],
"returnComment": [],
"initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserToolTip",
+ "type": "Function",
+ "tags": [],
+ "label": "UserToolTip",
+ "description": [
+ "\nRenders a tooltip with user information"
+ ],
+ "signature": [
+ "({ user, avatar, ...rest }: React.PropsWithChildren<",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserToolTipProps",
+ "text": "UserToolTipProps"
+ },
+ ">) => JSX.Element"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_tooltip.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserToolTip.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{ user, avatar, ...rest }",
+ "description": [],
+ "signature": [
+ "React.PropsWithChildren<",
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserToolTipProps",
+ "text": "UserToolTipProps"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_tooltip.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
}
],
"interfaces": [
@@ -938,6 +1040,79 @@
}
],
"initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserToolTipProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "UserToolTipProps",
+ "description": [
+ "\nProps of {@link UserToolTip} component"
+ ],
+ "signature": [
+ {
+ "pluginId": "@kbn/user-profile-components",
+ "scope": "common",
+ "docId": "kibKbnUserProfileComponentsPluginApi",
+ "section": "def-common.UserToolTipProps",
+ "text": "UserToolTipProps"
+ },
+ " extends Omit<",
+ "EuiToolTipProps",
+ ", \"title\" | \"content\">"
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_tooltip.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserToolTipProps.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"
+ }
+ ],
+ "path": "packages/kbn-user-profile-components/src/user_tooltip.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/user-profile-components",
+ "id": "def-common.UserToolTipProps.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_tooltip.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
}
],
"enums": [],
diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx
index 7855bb68d62db..1fb9abaf0ee8b 100644
--- a/api_docs/kbn_user_profile_components.mdx
+++ b/api_docs/kbn_user_profile_components.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components
title: "@kbn/user-profile-components"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/user-profile-components plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components']
---
import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin.
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 48 | 0 | 3 | 0 |
+| 55 | 0 | 5 | 0 |
## Common
diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx
index 5adb3b961a126..1dd233e2b3c7c 100644
--- a/api_docs/kbn_utility_types.mdx
+++ b/api_docs/kbn_utility_types.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types
title: "@kbn/utility-types"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/utility-types plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types']
---
import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json';
diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx
index 879d594892e8b..ffc882e7050cf 100644
--- a/api_docs/kbn_utility_types_jest.mdx
+++ b/api_docs/kbn_utility_types_jest.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest
title: "@kbn/utility-types-jest"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/utility-types-jest plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest']
---
import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json';
diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx
index 13a63d5a655f6..32d4e0b6f4f27 100644
--- a/api_docs/kbn_utils.mdx
+++ b/api_docs/kbn_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils
title: "@kbn/utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/utils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils']
---
import kbnUtilsObj from './kbn_utils.devdocs.json';
diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx
index 17c5bc67927ee..8321d021b0720 100644
--- a/api_docs/kbn_yarn_lock_validator.mdx
+++ b/api_docs/kbn_yarn_lock_validator.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator
title: "@kbn/yarn-lock-validator"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/yarn-lock-validator plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator']
---
import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json';
diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx
index 661dda80a0227..6ea90bb2df76a 100644
--- a/api_docs/kibana_overview.mdx
+++ b/api_docs/kibana_overview.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview
title: "kibanaOverview"
image: https://source.unsplash.com/400x175/?github
description: API docs for the kibanaOverview plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview']
---
import kibanaOverviewObj from './kibana_overview.devdocs.json';
diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx
index 3a54ee39d7116..1a43fddabf34d 100644
--- a/api_docs/kibana_react.mdx
+++ b/api_docs/kibana_react.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact
title: "kibanaReact"
image: https://source.unsplash.com/400x175/?github
description: API docs for the kibanaReact plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact']
---
import kibanaReactObj from './kibana_react.devdocs.json';
diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx
index 62af983d79330..7658f6b8dfa6c 100644
--- a/api_docs/kibana_utils.mdx
+++ b/api_docs/kibana_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils
title: "kibanaUtils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the kibanaUtils plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils']
---
import kibanaUtilsObj from './kibana_utils.devdocs.json';
diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx
index c101218ee3f45..f51fe23a0772a 100644
--- a/api_docs/kubernetes_security.mdx
+++ b/api_docs/kubernetes_security.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity
title: "kubernetesSecurity"
image: https://source.unsplash.com/400x175/?github
description: API docs for the kubernetesSecurity plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity']
---
import kubernetesSecurityObj from './kubernetes_security.devdocs.json';
diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json
index 4fc56c34842e9..d29c21bc24d31 100644
--- a/api_docs/lens.devdocs.json
+++ b/api_docs/lens.devdocs.json
@@ -1527,6 +1527,24 @@
"children": [],
"returnComment": []
},
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.DatasourcePublicAPI.isTextBasedLanguage",
+ "type": "Function",
+ "tags": [],
+ "label": "isTextBasedLanguage",
+ "description": [
+ "\nReturns true if this is a text based language datasource"
+ ],
+ "signature": [
+ "() => boolean"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ },
{
"parentPluginId": "lens",
"id": "def-public.DatasourcePublicAPI.getFilters",
@@ -4236,6 +4254,53 @@
],
"returnComment": []
},
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.getUsedDataView",
+ "type": "Function",
+ "tags": [],
+ "label": "getUsedDataView",
+ "description": [],
+ "signature": [
+ "((state: T, layerId: string) => string | undefined) | undefined"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.getUsedDataView.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "state",
+ "description": [],
+ "signature": [
+ "T"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.getUsedDataView.$2",
+ "type": "string",
+ "tags": [],
+ "label": "layerId",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
{
"parentPluginId": "lens",
"id": "def-public.Visualization.getUsedDataViews",
@@ -4514,7 +4579,15 @@
},
" | ",
"VisualizeEditorContext",
- " | undefined) => T) | undefined"
+ "<",
+ {
+ "pluginId": "visualizations",
+ "scope": "common",
+ "docId": "kibVisualizationsPluginApi",
+ "section": "def-common.Configuration",
+ "text": "Configuration"
+ },
+ "> | undefined) => T) | undefined"
],
"path": "x-pack/plugins/lens/public/types.ts",
"deprecated": false,
@@ -4568,7 +4641,15 @@
},
" | ",
"VisualizeEditorContext",
- " | undefined"
+ "<",
+ {
+ "pluginId": "visualizations",
+ "scope": "common",
+ "docId": "kibVisualizationsPluginApi",
+ "section": "def-common.Configuration",
+ "text": "Configuration"
+ },
+ "> | undefined"
],
"path": "x-pack/plugins/lens/public/types.ts",
"deprecated": false,
@@ -4960,13 +5041,84 @@
],
"returnComment": []
},
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.getSupportedActionsForLayer",
+ "type": "Function",
+ "tags": [],
+ "label": "getSupportedActionsForLayer",
+ "description": [
+ "\nreturns a list of custom actions supported by the visualization layer.\nDefault actions like delete/clear are not included in this list and are managed by the editor frame"
+ ],
+ "signature": [
+ "((layerId: string, state: T, setState: ",
+ "StateSetter",
+ ") => ",
+ "LayerAction",
+ "[]) | undefined"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.getSupportedActionsForLayer.$1",
+ "type": "string",
+ "tags": [],
+ "label": "layerId",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.getSupportedActionsForLayer.$2",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "state",
+ "description": [],
+ "signature": [
+ "T"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.getSupportedActionsForLayer.$3",
+ "type": "Function",
+ "tags": [],
+ "label": "setState",
+ "description": [],
+ "signature": [
+ "StateSetter",
+ ""
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
{
"parentPluginId": "lens",
"id": "def-public.Visualization.getLayerType",
"type": "Function",
"tags": [],
"label": "getLayerType",
- "description": [],
+ "description": [
+ "returns the type string of the given layer"
+ ],
"signature": [
"(layerId: string, state?: T | undefined) => ",
{
@@ -5460,6 +5612,43 @@
],
"returnComment": []
},
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.getDropProps",
+ "type": "Function",
+ "tags": [],
+ "label": "getDropProps",
+ "description": [],
+ "signature": [
+ "((dropProps: ",
+ "GetDropPropsArgs",
+ ") => { dropTypes: ",
+ "DropType",
+ "[]; nextLabel?: string | undefined; } | undefined) | undefined"
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "lens",
+ "id": "def-public.Visualization.getDropProps.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "dropProps",
+ "description": [],
+ "signature": [
+ "GetDropPropsArgs",
+ ""
+ ],
+ "path": "x-pack/plugins/lens/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
{
"parentPluginId": "lens",
"id": "def-public.Visualization.renderDimensionEditor",
@@ -6397,7 +6586,7 @@
"signature": [
"((props: VisualizationStateFromContextChangeProps) => ",
"Suggestion",
- ") | undefined"
+ " | undefined) | undefined"
],
"path": "x-pack/plugins/lens/public/types.ts",
"deprecated": false,
@@ -11347,6 +11536,21 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "lens",
+ "id": "def-common.ENABLE_SQL",
+ "type": "string",
+ "tags": [],
+ "label": "ENABLE_SQL",
+ "description": [],
+ "signature": [
+ "\"discover:enableSql\""
+ ],
+ "path": "x-pack/plugins/lens/common/constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "lens",
"id": "def-common.FormatFactory",
@@ -11495,6 +11699,21 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "lens",
+ "id": "def-common.OriginalColumn",
+ "type": "Type",
+ "tags": [],
+ "label": "OriginalColumn",
+ "description": [],
+ "signature": [
+ "{ id: string; label: string; } & ({ operationType: \"date_histogram\"; sourceField: string; } | { operationType: string; sourceField: never; })"
+ ],
+ "path": "x-pack/plugins/lens/common/expressions/map_to_columns/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "lens",
"id": "def-common.PieChartType",
diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx
index e6eb90ca75ba8..e930504ffaee4 100644
--- a/api_docs/lens.mdx
+++ b/api_docs/lens.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens
title: "lens"
image: https://source.unsplash.com/400x175/?github
description: API docs for the lens plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens']
---
import lensObj from './lens.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors)
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 646 | 0 | 558 | 42 |
+| 658 | 0 | 567 | 45 |
## Client
diff --git a/api_docs/license_api_guard.devdocs.json b/api_docs/license_api_guard.devdocs.json
index a554c2c4b7895..03acec45780d4 100644
--- a/api_docs/license_api_guard.devdocs.json
+++ b/api_docs/license_api_guard.devdocs.json
@@ -94,13 +94,7 @@
"description": [],
"signature": [
"(handler: ",
{
"pluginId": "core",
diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx
index 745b2e56c1c9d..14b1e5c6f4612 100644
--- a/api_docs/license_api_guard.mdx
+++ b/api_docs/license_api_guard.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard
title: "licenseApiGuard"
image: https://source.unsplash.com/400x175/?github
description: API docs for the licenseApiGuard plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard']
---
import licenseApiGuardObj from './license_api_guard.devdocs.json';
diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx
index 3aa129254bb54..b71a0f65fbba0 100644
--- a/api_docs/license_management.mdx
+++ b/api_docs/license_management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement
title: "licenseManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the licenseManagement plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement']
---
import licenseManagementObj from './license_management.devdocs.json';
diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx
index f4406dfe719d8..914e71d3130cf 100644
--- a/api_docs/licensing.mdx
+++ b/api_docs/licensing.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing
title: "licensing"
image: https://source.unsplash.com/400x175/?github
description: API docs for the licensing plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing']
---
import licensingObj from './licensing.devdocs.json';
diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx
index 6aa4f4f225193..014535d3acb8d 100644
--- a/api_docs/lists.mdx
+++ b/api_docs/lists.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists
title: "lists"
image: https://source.unsplash.com/400x175/?github
description: API docs for the lists plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists']
---
import listsObj from './lists.devdocs.json';
diff --git a/api_docs/management.mdx b/api_docs/management.mdx
index 92b5f7e806788..de79c0505493d 100644
--- a/api_docs/management.mdx
+++ b/api_docs/management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management
title: "management"
image: https://source.unsplash.com/400x175/?github
description: API docs for the management plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management']
---
import managementObj from './management.devdocs.json';
diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx
index 2e5da06f70dd9..0c1d388602858 100644
--- a/api_docs/maps.mdx
+++ b/api_docs/maps.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps
title: "maps"
image: https://source.unsplash.com/400x175/?github
description: API docs for the maps plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps']
---
import mapsObj from './maps.devdocs.json';
diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx
index a2dd183ea48bc..82536b7c87b8d 100644
--- a/api_docs/maps_ems.mdx
+++ b/api_docs/maps_ems.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms
title: "mapsEms"
image: https://source.unsplash.com/400x175/?github
description: API docs for the mapsEms plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms']
---
import mapsEmsObj from './maps_ems.devdocs.json';
diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx
index 55b3f0eff7da0..9d94398a882da 100644
--- a/api_docs/ml.mdx
+++ b/api_docs/ml.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml
title: "ml"
image: https://source.unsplash.com/400x175/?github
description: API docs for the ml plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml']
---
import mlObj from './ml.devdocs.json';
diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx
index dbf1d15ca06df..c76aac1bd57ad 100644
--- a/api_docs/monitoring.mdx
+++ b/api_docs/monitoring.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring
title: "monitoring"
image: https://source.unsplash.com/400x175/?github
description: API docs for the monitoring plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring']
---
import monitoringObj from './monitoring.devdocs.json';
diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx
index 16eb11d15bbf2..e59f472f07ee4 100644
--- a/api_docs/monitoring_collection.mdx
+++ b/api_docs/monitoring_collection.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection
title: "monitoringCollection"
image: https://source.unsplash.com/400x175/?github
description: API docs for the monitoringCollection plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection']
---
import monitoringCollectionObj from './monitoring_collection.devdocs.json';
diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx
index e9f3d869a2077..0dccfeb623a38 100644
--- a/api_docs/navigation.mdx
+++ b/api_docs/navigation.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation
title: "navigation"
image: https://source.unsplash.com/400x175/?github
description: API docs for the navigation plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation']
---
import navigationObj from './navigation.devdocs.json';
diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx
index 95e0ce94137e7..08394f81d45d8 100644
--- a/api_docs/newsfeed.mdx
+++ b/api_docs/newsfeed.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed
title: "newsfeed"
image: https://source.unsplash.com/400x175/?github
description: API docs for the newsfeed plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed']
---
import newsfeedObj from './newsfeed.devdocs.json';
diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json
index 7d399eaa890b1..08f23a62393da 100644
--- a/api_docs/observability.devdocs.json
+++ b/api_docs/observability.devdocs.json
@@ -738,7 +738,7 @@
},
" | undefined; list: () => string[]; }; selectedAlertId?: string | undefined; } & ",
"CommonProps",
- " & { as?: \"div\" | undefined; } & _EuiFlyoutProps & Omit, HTMLDivElement>, keyof _EuiFlyoutProps> & Omit, HTMLDivElement>, \"key\" | keyof React.HTMLAttributes | \"css\"> & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }, \"children\" | \"ref\" | \"type\" | \"onError\" | \"hidden\" | \"color\" | \"id\" | \"className\" | \"size\" | \"title\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"security\" | \"key\" | \"defaultValue\" | \"lang\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"onClose\" | \"data-test-subj\" | \"css\" | \"as\" | \"paddingSize\" | \"focusTrapProps\" | \"ownFocus\" | \"maxWidth\" | \"hideCloseButton\" | \"closeButtonAriaLabel\" | \"closeButtonProps\" | \"closeButtonPosition\" | \"maskProps\" | \"outsideClickCloses\" | \"side\" | \"pushMinBreakpoint\">, \"children\" | \"type\" | \"onError\" | \"hidden\" | \"color\" | \"id\" | \"alert\" | \"className\" | \"size\" | \"title\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"security\" | \"key\" | \"defaultValue\" | \"lang\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"onClose\" | \"data-test-subj\" | \"css\" | \"as\" | \"paddingSize\" | \"focusTrapProps\" | \"ownFocus\" | \"alerts\" | \"maxWidth\" | \"hideCloseButton\" | \"closeButtonAriaLabel\" | \"closeButtonProps\" | \"closeButtonPosition\" | \"maskProps\" | \"outsideClickCloses\" | \"side\" | \"pushMinBreakpoint\" | \"isInApp\" | \"observabilityRuleTypeRegistry\" | \"selectedAlertId\"> & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }> & { readonly _result: ({ alert, alerts, isInApp, observabilityRuleTypeRegistry, onClose, selectedAlertId, }: AlertsFlyoutProps) => JSX.Element | null; }"
+ " & { as?: \"div\" | undefined; } & _EuiFlyoutProps & Omit, HTMLDivElement>, keyof _EuiFlyoutProps> & Omit, HTMLDivElement>, \"key\" | keyof React.HTMLAttributes | \"css\"> & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }, \"children\" | \"ref\" | \"type\" | \"onError\" | \"hidden\" | \"color\" | \"id\" | \"className\" | \"size\" | \"title\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"security\" | \"key\" | \"defaultValue\" | \"lang\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"onClose\" | \"data-test-subj\" | \"css\" | \"as\" | \"paddingSize\" | \"focusTrapProps\" | \"ownFocus\" | \"maxWidth\" | \"hideCloseButton\" | \"closeButtonAriaLabel\" | \"closeButtonProps\" | \"closeButtonPosition\" | \"maskProps\" | \"outsideClickCloses\" | \"side\" | \"pushMinBreakpoint\">, \"children\" | \"type\" | \"onError\" | \"hidden\" | \"color\" | \"id\" | \"alert\" | \"className\" | \"size\" | \"title\" | \"onChange\" | \"onKeyDown\" | \"onClick\" | \"security\" | \"key\" | \"defaultValue\" | \"lang\" | \"defaultChecked\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"onClose\" | \"data-test-subj\" | \"css\" | \"as\" | \"alerts\" | \"paddingSize\" | \"focusTrapProps\" | \"ownFocus\" | \"maxWidth\" | \"hideCloseButton\" | \"closeButtonAriaLabel\" | \"closeButtonProps\" | \"closeButtonPosition\" | \"maskProps\" | \"outsideClickCloses\" | \"side\" | \"pushMinBreakpoint\" | \"isInApp\" | \"observabilityRuleTypeRegistry\" | \"selectedAlertId\"> & { ref?: React.RefObject | ((instance: HTMLDivElement | null) => void) | null | undefined; }> & { readonly _result: ({ alert, alerts, isInApp, observabilityRuleTypeRegistry, onClose, selectedAlertId, }: AlertsFlyoutProps) => JSX.Element | null; }"
],
"path": "x-pack/plugins/observability/public/index.ts",
"deprecated": false,
@@ -3704,11 +3704,29 @@
"description": [],
"signature": [
"{ get: (id: string) => ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
"; list: () => ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
"[]; register: (objectType: ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
") => void; has: (id: string) => boolean; }"
],
"path": "x-pack/plugins/observability/public/plugin.ts",
@@ -7595,13 +7613,7 @@
"label": "context",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
" & { licensing: Promise<",
{
"pluginId": "licensing",
@@ -7619,13 +7631,7 @@
"text": "AlertingApiRequestHandlerContext"
},
">; core: Promise<",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.CoreRequestHandlerContext",
- "text": "CoreRequestHandlerContext"
- },
+ "CoreRequestHandlerContext",
">; }"
],
"path": "x-pack/plugins/observability/server/routes/types.ts",
@@ -7926,7 +7932,7 @@
"label": "ObservabilityConfig",
"description": [],
"signature": [
- "{ readonly unsafe: Readonly<{} & { slo: Readonly<{} & { enabled: boolean; }>; alertDetails: Readonly<{} & { enabled: boolean; }>; }>; readonly annotations: Readonly<{} & { index: string; enabled: boolean; }>; }"
+ "{ readonly unsafe: Readonly<{} & { slo: Readonly<{} & { enabled: boolean; }>; alertDetails: Readonly<{} & { enabled: boolean; }>; }>; readonly annotations: Readonly<{} & { enabled: boolean; index: string; }>; }"
],
"path": "x-pack/plugins/observability/server/index.ts",
"deprecated": false,
@@ -9780,13 +9786,7 @@
"description": [],
"signature": [
"{ getScopedAnnotationsClient: (requestContext: ",
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
" & { licensing: Promise<",
{
"pluginId": "licensing",
diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx
index afdb6cd4fbb3c..aaa79beceb7aa 100644
--- a/api_docs/observability.mdx
+++ b/api_docs/observability.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability
title: "observability"
image: https://source.unsplash.com/400x175/?github
description: API docs for the observability plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability']
---
import observabilityObj from './observability.devdocs.json';
diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx
index a634c2e2206cc..e79c8673975d0 100644
--- a/api_docs/osquery.mdx
+++ b/api_docs/osquery.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery
title: "osquery"
image: https://source.unsplash.com/400x175/?github
description: API docs for the osquery plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery']
---
import osqueryObj from './osquery.devdocs.json';
diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx
index 00a92aa5b8132..655626fbdb653 100644
--- a/api_docs/plugin_directory.mdx
+++ b/api_docs/plugin_directory.mdx
@@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory
slug: /kibana-dev-docs/api-meta/plugin-api-directory
title: Directory
description: Directory of public APIs available through plugins or packages.
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| Count | Plugins or Packages with a public API | Number of teams |
|--------------|----------|------------------------|
-| 473 | 395 | 38 |
+| 480 | 399 | 38 |
### Public API health stats
| API Count | Any Count | Missing comments | Missing exports |
|--------------|----------|-----------------|--------|
-| 31772 | 179 | 21354 | 1002 |
+| 32043 | 179 | 21580 | 1010 |
## Plugin Directory
@@ -30,7 +30,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 214 | 0 | 209 | 19 |
| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 36 | 1 | 32 | 2 |
| | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 9 | 0 | 0 | 2 |
-| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 370 | 0 | 361 | 22 |
+| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 379 | 0 | 370 | 24 |
| | [APM UI](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 38 | 0 | 38 | 52 |
| | [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. | 80 | 1 | 71 | 2 |
@@ -42,16 +42,16 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [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 | 212 | 0 | 204 | 7 |
-| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2684 | 0 | 35 | 0 |
+| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2686 | 0 | 29 | 0 |
| 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 | 103 | 0 | 84 | 1 |
-| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 144 | 0 | 139 | 10 |
+| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 104 | 0 | 85 | 1 |
+| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 120 | 0 | 113 | 3 |
| | [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. | 3211 | 33 | 2508 | 23 |
+| | [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. | 3213 | 33 | 2509 | 23 |
| | [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 | 60 | 0 | 30 | 0 |
| | [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. | 966 | 0 | 208 | 1 |
+| | [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. | 983 | 0 | 225 | 2 |
| | [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. | 97 | 0 | 80 | 4 |
@@ -60,7 +60,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends embeddable plugin with more functionality | 14 | 0 | 14 | 0 |
| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 51 | 0 | 42 | 0 |
| | [Enterprise Search](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 9 | 0 | 9 | 0 |
-| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 114 | 3 | 110 | 3 |
+| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 114 | 3 | 110 | 5 |
| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | The Event Annotation service contains expressions for event annotations | 174 | 0 | 174 | 3 |
| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 106 | 0 | 106 | 10 |
| | [Kibana Presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'error' renderer to expressions | 17 | 0 | 15 | 2 |
@@ -80,14 +80,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 222 | 0 | 95 | 2 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Index pattern fields and ambiguous values formatters | 288 | 5 | 249 | 3 |
| | [Machine Learning UI](https://github.com/orgs/elastic/teams/ml-ui) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 |
-| | [@elastic/kibana-app-services](https://github.com/orgs/elastic/teams/team:AppServicesUx) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 263 | 0 | 15 | 2 |
-| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 988 | 3 | 888 | 17 |
+| | [@elastic/kibana-app-services](https://github.com/orgs/elastic/teams/team:AppServicesUx) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 263 | 0 | 14 | 2 |
+| | [Fleet](https://github.com/orgs/elastic/teams/fleet) | - | 997 | 3 | 893 | 17 |
| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 |
| globalSearchBar | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 |
| globalSearchProviders | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 |
| graph | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 0 | 0 | 0 | 0 |
| grokdebugger | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 |
-| | [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Guided onboarding framework | 12 | 0 | 12 | 1 |
+| | [Journey Onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Guided onboarding framework | 19 | 0 | 19 | 3 |
| | [Kibana Core](https://github.com/orgs/elastic/teams/kibana-core) | - | 143 | 0 | 104 | 0 |
| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 4 | 0 | 4 | 0 |
| | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 177 | 0 | 172 | 3 |
@@ -101,7 +101,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| 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 | 418 | 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. | 646 | 0 | 558 | 42 |
+| | [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. | 658 | 0 | 567 | 45 |
| | [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 |
@@ -134,7 +134,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | - | 32 | 0 | 13 | 0 |
| | [Kibana Reporting Services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 27 | 0 | 8 | 4 |
| searchprofiler | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 |
-| | [Platform Security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 247 | 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. | 250 | 0 | 90 | 0 |
| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 55 | 0 | 54 | 23 |
| | [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 |
@@ -148,15 +148,15 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 31 | 0 | 26 | 6 |
| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 1 | 0 | 1 | 0 |
| | [Kibana Telemetry](https://github.com/orgs/elastic/teams/kibana-telemetry) | - | 11 | 0 | 10 | 0 |
-| | [Protections Experience Team](https://github.com/orgs/elastic/teams/protections-experience) | Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats | 20 | 0 | 4 | 3 |
+| | [Protections Experience Team](https://github.com/orgs/elastic/teams/protections-experience) | Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats | 26 | 0 | 8 | 3 |
| | [Security solution](https://github.com/orgs/elastic/teams/security-solution) | - | 452 | 1 | 346 | 33 |
| | [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) | - | 437 | 1 | 416 | 45 |
-| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 132 | 0 | 91 | 11 |
+| | [Response Ops](https://github.com/orgs/elastic/teams/response-ops) | - | 512 | 1 | 485 | 48 |
+| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Adds UI Actions service to Kibana | 133 | 0 | 92 | 11 |
| | [App Services](https://github.com/orgs/elastic/teams/kibana-app-services) | Extends UI Actions plugin with more functionality | 206 | 0 | 142 | 9 |
| | [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list which can be integrated into apps | 61 | 0 | 59 | 2 |
-| | [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. | 125 | 2 | 99 | 17 |
+| | [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. | 128 | 2 | 102 | 17 |
| 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 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Registers the vega visualization. Is the elastic version of vega and vega-lite libraries. | 2 | 0 | 2 | 0 |
| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the vislib visualizations. These are the classical area/line/bar, pie, gauge/goal and heatmap charts. We want to replace them with elastic-charts. | 26 | 0 | 25 | 1 |
| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the new xy-axis chart using the elastic-charts library, which will eventually replace the vislib xy-axis charts including bar, area, and line. | 53 | 0 | 50 | 5 |
-| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 679 | 12 | 649 | 18 |
+| | [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 725 | 12 | 695 | 18 |
| watcher | [Stack Management](https://github.com/orgs/elastic/teams/kibana-stack-management) | - | 0 | 0 | 0 | 0 |
## Package Directory
@@ -261,6 +261,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | Kibana Core | - | 16 | 0 | 16 | 0 |
| | Kibana Core | - | 4 | 0 | 0 | 0 |
| | Kibana Core | - | 10 | 1 | 10 | 0 |
+| | Kibana Core | - | 14 | 0 | 11 | 0 |
| | Kibana Core | - | 25 | 5 | 25 | 1 |
| | Kibana Core | - | 7 | 0 | 7 | 1 |
| | Kibana Core | - | 392 | 1 | 154 | 0 |
@@ -300,6 +301,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | Kibana Core | - | 5 | 0 | 0 | 0 |
| | Kibana Core | - | 6 | 0 | 6 | 0 |
| | Kibana Core | - | 2 | 0 | 2 | 0 |
+| | Kibana Core | - | 2 | 0 | 2 | 0 |
+| | Kibana Core | - | 4 | 0 | 4 | 1 |
| | Kibana Core | - | 106 | 1 | 75 | 0 |
| | Kibana Core | - | 308 | 1 | 137 | 0 |
| | Kibana Core | - | 71 | 0 | 51 | 0 |
@@ -388,10 +391,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [Owner missing] | - | 74 | 0 | 71 | 0 |
| | [Owner missing] | Security Solution auto complete | 56 | 1 | 41 | 1 |
| | [Owner missing] | security solution elastic search utilities to use across plugins such lists, security_solution, cases, etc... | 67 | 0 | 61 | 1 |
+| | [Owner missing] | - | 76 | 0 | 67 | 1 |
| | [Owner missing] | Security Solution utilities for React hooks | 15 | 0 | 7 | 0 |
-| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 148 | 0 | 129 | 0 |
+| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 145 | 0 | 127 | 0 |
| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 505 | 1 | 492 | 0 |
-| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 63 | 0 | 33 | 0 |
+| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 65 | 0 | 36 | 0 |
| | [Owner missing] | io ts utilities and types to be shared with plugins from the security solution project | 28 | 0 | 21 | 0 |
| | [Owner missing] | security solution list REST API | 67 | 0 | 64 | 0 |
| | [Owner missing] | security solution list constants to use across plugins such lists, security_solution, cases, etc... | 33 | 0 | 17 | 0 |
@@ -441,7 +445,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [Owner missing] | - | 113 | 1 | 65 | 0 |
| | [Owner missing] | - | 83 | 0 | 83 | 1 |
| | [Owner missing] | - | 7 | 0 | 6 | 0 |
-| | [Owner missing] | - | 48 | 0 | 3 | 0 |
+| | [Owner missing] | - | 55 | 0 | 5 | 0 |
| | [Owner missing] | - | 34 | 0 | 14 | 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 971ed39aee0ed..7e399db93218d 100644
--- a/api_docs/presentation_util.mdx
+++ b/api_docs/presentation_util.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil
title: "presentationUtil"
image: https://source.unsplash.com/400x175/?github
description: API docs for the presentationUtil plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil']
---
import presentationUtilObj from './presentation_util.devdocs.json';
diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx
index 8d2be8c0f9dd7..7efed272b7261 100644
--- a/api_docs/profiling.mdx
+++ b/api_docs/profiling.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling
title: "profiling"
image: https://source.unsplash.com/400x175/?github
description: API docs for the profiling plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling']
---
import profilingObj from './profiling.devdocs.json';
diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx
index 916ffb9e1e4e0..f59d7c397918a 100644
--- a/api_docs/remote_clusters.mdx
+++ b/api_docs/remote_clusters.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters
title: "remoteClusters"
image: https://source.unsplash.com/400x175/?github
description: API docs for the remoteClusters plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters']
---
import remoteClustersObj from './remote_clusters.devdocs.json';
diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx
index aa8b69de45190..dbd1e74d06cd4 100644
--- a/api_docs/reporting.mdx
+++ b/api_docs/reporting.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting
title: "reporting"
image: https://source.unsplash.com/400x175/?github
description: API docs for the reporting plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting']
---
import reportingObj from './reporting.devdocs.json';
diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx
index 7ecab5c862bf0..397ea6ae4dc91 100644
--- a/api_docs/rollup.mdx
+++ b/api_docs/rollup.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup
title: "rollup"
image: https://source.unsplash.com/400x175/?github
description: API docs for the rollup plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup']
---
import rollupObj from './rollup.devdocs.json';
diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json
index 424057fd0db70..089f973bc0bf0 100644
--- a/api_docs/rule_registry.devdocs.json
+++ b/api_docs/rule_registry.devdocs.json
@@ -1917,7 +1917,7 @@
"\nID of the Kibana feature associated with the index.\nUsed by alerts-as-data RBAC.\n\nNote from @dhurley14\nThe purpose of the `feature` param is to force the user to update\nthe data structure which contains the mapping of consumers to alerts\nas data indices. The idea is it is typed such that it forces the\nuser to go to the code and modify it. At least until a better system\nis put in place or we move the alerts as data client out of rule registry.\n"
],
"signature": [
- "\"observability\" | \"logs\" | \"apm\" | \"uptime\" | \"siem\" | \"infrastructure\""
+ "\"infrastructure\" | \"observability\" | \"logs\" | \"apm\" | \"uptime\" | \"siem\""
],
"path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/index_options.ts",
"deprecated": false,
@@ -4270,7 +4270,7 @@
"label": "ParsedTechnicalFields",
"description": [],
"signature": [
- "{ readonly '@timestamp': string; readonly \"kibana.alert.rule.rule_type_id\": string; readonly \"kibana.alert.rule.consumer\": string; readonly \"kibana.alert.rule.producer\": string; readonly \"kibana.space_ids\": string[]; readonly \"kibana.alert.uuid\": string; readonly \"kibana.alert.instance.id\": string; readonly \"kibana.alert.status\": string; readonly \"kibana.alert.rule.category\": string; readonly \"kibana.alert.rule.uuid\": string; readonly \"kibana.alert.rule.name\": string; readonly tags?: string[] | undefined; readonly 'event.action'?: string | undefined; readonly \"kibana.alert.rule.parameters\"?: { [key: string]: unknown; } | undefined; readonly \"kibana.alert.start\"?: string | undefined; readonly \"kibana.alert.end\"?: string | undefined; readonly \"kibana.alert.duration.us\"?: number | undefined; readonly \"kibana.alert.severity\"?: string | undefined; readonly \"kibana.version\"?: string | undefined; readonly \"ecs.version\"?: string | undefined; readonly \"kibana.alert.risk_score\"?: number | undefined; readonly \"kibana.alert.workflow_status\"?: string | undefined; readonly \"kibana.alert.workflow_user\"?: string | undefined; readonly \"kibana.alert.workflow_reason\"?: string | undefined; readonly \"kibana.alert.system_status\"?: string | undefined; readonly \"kibana.alert.action_group\"?: string | undefined; readonly \"kibana.alert.reason\"?: string | undefined; readonly \"kibana.alert.rule.author\"?: string | undefined; readonly \"kibana.alert.rule.created_at\"?: string | undefined; readonly \"kibana.alert.rule.created_by\"?: string | undefined; readonly \"kibana.alert.rule.description\"?: string | undefined; readonly \"kibana.alert.rule.enabled\"?: string | undefined; readonly \"kibana.alert.rule.execution.uuid\"?: string | undefined; readonly \"kibana.alert.rule.from\"?: string | undefined; readonly \"kibana.alert.rule.interval\"?: string | undefined; readonly \"kibana.alert.rule.license\"?: string | undefined; readonly \"kibana.alert.rule.note\"?: string | undefined; readonly \"kibana.alert.rule.references\"?: string[] | undefined; readonly \"kibana.alert.rule.rule_id\"?: string | undefined; readonly \"kibana.alert.rule.rule_name_override\"?: string | undefined; readonly \"kibana.alert.rule.tags\"?: string[] | undefined; readonly \"kibana.alert.rule.to\"?: string | undefined; readonly \"kibana.alert.rule.type\"?: string | undefined; readonly \"kibana.alert.rule.updated_at\"?: string | undefined; readonly \"kibana.alert.rule.updated_by\"?: string | undefined; readonly \"kibana.alert.rule.version\"?: string | undefined; readonly 'event.kind'?: string | undefined; }"
+ "{ readonly '@timestamp': string; readonly \"kibana.alert.rule.rule_type_id\": string; readonly \"kibana.alert.rule.consumer\": string; readonly \"kibana.alert.rule.producer\": string; readonly \"kibana.space_ids\": string[]; readonly \"kibana.alert.uuid\": string; readonly \"kibana.alert.instance.id\": string; readonly \"kibana.alert.status\": string; readonly \"kibana.alert.rule.category\": string; readonly \"kibana.alert.rule.uuid\": string; readonly \"kibana.alert.rule.name\": string; readonly tags?: string[] | undefined; readonly 'event.action'?: string | undefined; readonly \"kibana.alert.rule.execution.uuid\"?: string | undefined; readonly \"kibana.alert.rule.parameters\"?: { [key: string]: unknown; } | undefined; readonly \"kibana.alert.start\"?: string | undefined; readonly \"kibana.alert.end\"?: string | undefined; readonly \"kibana.alert.duration.us\"?: number | undefined; readonly \"kibana.alert.severity\"?: string | undefined; readonly \"kibana.version\"?: string | undefined; readonly \"ecs.version\"?: string | undefined; readonly \"kibana.alert.risk_score\"?: number | undefined; readonly \"kibana.alert.workflow_status\"?: string | undefined; readonly \"kibana.alert.workflow_user\"?: string | undefined; readonly \"kibana.alert.workflow_reason\"?: string | undefined; readonly \"kibana.alert.system_status\"?: string | undefined; readonly \"kibana.alert.action_group\"?: string | undefined; readonly \"kibana.alert.reason\"?: string | undefined; readonly \"kibana.alert.rule.author\"?: string | undefined; readonly \"kibana.alert.rule.created_at\"?: string | undefined; readonly \"kibana.alert.rule.created_by\"?: string | undefined; readonly \"kibana.alert.rule.description\"?: string | undefined; readonly \"kibana.alert.rule.enabled\"?: string | undefined; readonly \"kibana.alert.rule.from\"?: string | undefined; readonly \"kibana.alert.rule.interval\"?: string | undefined; readonly \"kibana.alert.rule.license\"?: string | undefined; readonly \"kibana.alert.rule.note\"?: string | undefined; readonly \"kibana.alert.rule.references\"?: string[] | undefined; readonly \"kibana.alert.rule.rule_id\"?: string | undefined; readonly \"kibana.alert.rule.rule_name_override\"?: string | undefined; readonly \"kibana.alert.rule.tags\"?: string[] | undefined; readonly \"kibana.alert.rule.to\"?: string | undefined; readonly \"kibana.alert.rule.type\"?: string | undefined; readonly \"kibana.alert.rule.updated_at\"?: string | undefined; readonly \"kibana.alert.rule.updated_by\"?: string | undefined; readonly \"kibana.alert.rule.version\"?: string | undefined; readonly 'event.kind'?: string | undefined; }"
],
"path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts",
"deprecated": false,
diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx
index 42e1a51c2ed9f..f48194ae5bd14 100644
--- a/api_docs/rule_registry.mdx
+++ b/api_docs/rule_registry.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry
title: "ruleRegistry"
image: https://source.unsplash.com/400x175/?github
description: API docs for the ruleRegistry plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry']
---
import ruleRegistryObj from './rule_registry.devdocs.json';
diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx
index 4c4a4a4be8d7f..2be7beb68c708 100644
--- a/api_docs/runtime_fields.mdx
+++ b/api_docs/runtime_fields.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields
title: "runtimeFields"
image: https://source.unsplash.com/400x175/?github
description: API docs for the runtimeFields plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields']
---
import runtimeFieldsObj from './runtime_fields.devdocs.json';
diff --git a/api_docs/saved_objects.devdocs.json b/api_docs/saved_objects.devdocs.json
index 6d40e242e3cd5..71d53634b7540 100644
--- a/api_docs/saved_objects.devdocs.json
+++ b/api_docs/saved_objects.devdocs.json
@@ -1557,18 +1557,6 @@
"plugin": "savedObjectsTaggingOss",
"path": "src/plugins/saved_objects_tagging_oss/public/api.ts"
},
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/services/saved_object_loader.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/services/saved_object_loader.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/services/saved_object_loader.ts"
- },
{
"plugin": "dashboard",
"path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx"
@@ -1580,22 +1568,6 @@
{
"plugin": "dashboard",
"path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/application/lib/dashboard_tagging.ts"
- },
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/application/lib/dashboard_tagging.ts"
}
],
"children": [
@@ -3121,12 +3093,7 @@
"deprecated": true,
"removeBy": "8.8.0",
"trackAdoption": false,
- "references": [
- {
- "plugin": "dashboard",
- "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts"
- }
- ]
+ "references": []
},
{
"parentPluginId": "savedObjects",
diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx
index d180b9df678f8..d582458137cf9 100644
--- a/api_docs/saved_objects.mdx
+++ b/api_docs/saved_objects.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects
title: "savedObjects"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjects plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects']
---
import savedObjectsObj from './saved_objects.devdocs.json';
diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx
index d8ee1bd800f99..4e6d34158bb84 100644
--- a/api_docs/saved_objects_finder.mdx
+++ b/api_docs/saved_objects_finder.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder
title: "savedObjectsFinder"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjectsFinder plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder']
---
import savedObjectsFinderObj from './saved_objects_finder.devdocs.json';
diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx
index a57ba63fec003..7722b187a54d7 100644
--- a/api_docs/saved_objects_management.mdx
+++ b/api_docs/saved_objects_management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement
title: "savedObjectsManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjectsManagement plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement']
---
import savedObjectsManagementObj from './saved_objects_management.devdocs.json';
diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx
index 785d7f8ea6a32..c112fd930e4de 100644
--- a/api_docs/saved_objects_tagging.mdx
+++ b/api_docs/saved_objects_tagging.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging
title: "savedObjectsTagging"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjectsTagging plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging']
---
import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json';
diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx
index bf65a9aa5c648..5299c1ca0eaca 100644
--- a/api_docs/saved_objects_tagging_oss.mdx
+++ b/api_docs/saved_objects_tagging_oss.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss
title: "savedObjectsTaggingOss"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedObjectsTaggingOss plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss']
---
import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json';
diff --git a/api_docs/saved_search.devdocs.json b/api_docs/saved_search.devdocs.json
index df52fe959fea2..8e6b2e5503d3c 100644
--- a/api_docs/saved_search.devdocs.json
+++ b/api_docs/saved_search.devdocs.json
@@ -661,7 +661,7 @@
"label": "sharingSavedObjectProps",
"description": [],
"signature": [
- "{ outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined"
+ "{ outcome?: \"conflict\" | \"exactMatch\" | \"aliasMatch\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined"
],
"path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx
index 5e294d8d6ea59..06e4379d4afd9 100644
--- a/api_docs/saved_search.mdx
+++ b/api_docs/saved_search.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch
title: "savedSearch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the savedSearch plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch']
---
import savedSearchObj from './saved_search.devdocs.json';
diff --git a/api_docs/screenshot_mode.devdocs.json b/api_docs/screenshot_mode.devdocs.json
index c6be83e928479..ab834dfc733bc 100644
--- a/api_docs/screenshot_mode.devdocs.json
+++ b/api_docs/screenshot_mode.devdocs.json
@@ -139,13 +139,7 @@
"label": "ScreenshotModeRequestHandlerContext",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.RequestHandlerContext",
- "text": "RequestHandlerContext"
- },
+ "RequestHandlerContext",
" & { screenshotMode: Promise<{ isScreenshot: boolean; }>; }"
],
"path": "src/plugins/screenshot_mode/server/types.ts",
diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx
index 4c436c7b23e66..fda8615811c46 100644
--- a/api_docs/screenshot_mode.mdx
+++ b/api_docs/screenshot_mode.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode
title: "screenshotMode"
image: https://source.unsplash.com/400x175/?github
description: API docs for the screenshotMode plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode']
---
import screenshotModeObj from './screenshot_mode.devdocs.json';
diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx
index 5bc1fcd058003..f4735a3d7a260 100644
--- a/api_docs/screenshotting.mdx
+++ b/api_docs/screenshotting.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting
title: "screenshotting"
image: https://source.unsplash.com/400x175/?github
description: API docs for the screenshotting plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting']
---
import screenshottingObj from './screenshotting.devdocs.json';
diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json
index d400f91576d7d..1b69dcaad6959 100644
--- a/api_docs/security.devdocs.json
+++ b/api_docs/security.devdocs.json
@@ -125,6 +125,22 @@
"path": "x-pack/plugins/security/common/model/authenticated_user.ts",
"deprecated": false,
"trackAdoption": false
+ },
+ {
+ "parentPluginId": "security",
+ "id": "def-public.AuthenticatedUser.profile_uid",
+ "type": "string",
+ "tags": [],
+ "label": "profile_uid",
+ "description": [
+ "\nUser profile ID of this user."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/security/common/model/authenticated_user.ts",
+ "deprecated": false,
+ "trackAdoption": false
}
],
"initialIsOpen": false
@@ -1522,6 +1538,22 @@
"path": "x-pack/plugins/security/common/model/authenticated_user.ts",
"deprecated": false,
"trackAdoption": false
+ },
+ {
+ "parentPluginId": "security",
+ "id": "def-server.AuthenticatedUser.profile_uid",
+ "type": "string",
+ "tags": [],
+ "label": "profile_uid",
+ "description": [
+ "\nUser profile ID of this user."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/security/common/model/authenticated_user.ts",
+ "deprecated": false,
+ "trackAdoption": false
}
],
"initialIsOpen": false
@@ -3077,6 +3109,22 @@
"path": "x-pack/plugins/security/common/model/authenticated_user.ts",
"deprecated": false,
"trackAdoption": false
+ },
+ {
+ "parentPluginId": "security",
+ "id": "def-common.AuthenticatedUser.profile_uid",
+ "type": "string",
+ "tags": [],
+ "label": "profile_uid",
+ "description": [
+ "\nUser profile ID of this user."
+ ],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/security/common/model/authenticated_user.ts",
+ "deprecated": false,
+ "trackAdoption": false
}
],
"initialIsOpen": false
diff --git a/api_docs/security.mdx b/api_docs/security.mdx
index 952c20eac620f..2800db424ba6e 100644
--- a/api_docs/security.mdx
+++ b/api_docs/security.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security
title: "security"
image: https://source.unsplash.com/400x175/?github
description: API docs for the security plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security']
---
import securityObj from './security.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Platform Security](https://github.com/orgs/elastic/teams/kibana-securit
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 247 | 0 | 90 | 0 |
+| 250 | 0 | 90 | 0 |
## Client
diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json
index 8ad8f2f5fe218..c3ab461b2eb22 100644
--- a/api_docs/security_solution.devdocs.json
+++ b/api_docs/security_solution.devdocs.json
@@ -768,13 +768,7 @@
"label": "core",
"description": [],
"signature": [
- {
- "pluginId": "core",
- "scope": "server",
- "docId": "kibCorePluginApi",
- "section": "def-server.CoreRequestHandlerContext",
- "text": "CoreRequestHandlerContext"
- }
+ "CoreRequestHandlerContext"
],
"path": "x-pack/plugins/security_solution/server/types.ts",
"deprecated": false,
diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx
index 9cf5459a07a3e..3ddca540a2d16 100644
--- a/api_docs/security_solution.mdx
+++ b/api_docs/security_solution.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution
title: "securitySolution"
image: https://source.unsplash.com/400x175/?github
description: API docs for the securitySolution plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution']
---
import securitySolutionObj from './security_solution.devdocs.json';
diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx
index 23f8e18b5e278..e54037feb3552 100644
--- a/api_docs/session_view.mdx
+++ b/api_docs/session_view.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView
title: "sessionView"
image: https://source.unsplash.com/400x175/?github
description: API docs for the sessionView plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView']
---
import sessionViewObj from './session_view.devdocs.json';
diff --git a/api_docs/share.mdx b/api_docs/share.mdx
index 7ba452349a66b..976c243de6395 100644
--- a/api_docs/share.mdx
+++ b/api_docs/share.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share
title: "share"
image: https://source.unsplash.com/400x175/?github
description: API docs for the share plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share']
---
import shareObj from './share.devdocs.json';
diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx
index 194b818f081bf..f83be535a94bc 100644
--- a/api_docs/snapshot_restore.mdx
+++ b/api_docs/snapshot_restore.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore
title: "snapshotRestore"
image: https://source.unsplash.com/400x175/?github
description: API docs for the snapshotRestore plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore']
---
import snapshotRestoreObj from './snapshot_restore.devdocs.json';
diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx
index 95118ea8b8058..7b751efc3d1dc 100644
--- a/api_docs/spaces.mdx
+++ b/api_docs/spaces.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces
title: "spaces"
image: https://source.unsplash.com/400x175/?github
description: API docs for the spaces plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces']
---
import spacesObj from './spaces.devdocs.json';
diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx
index b3467e6a698dc..7c124256a7976 100644
--- a/api_docs/stack_alerts.mdx
+++ b/api_docs/stack_alerts.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts
title: "stackAlerts"
image: https://source.unsplash.com/400x175/?github
description: API docs for the stackAlerts plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts']
---
import stackAlertsObj from './stack_alerts.devdocs.json';
diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx
index aabbd1805b61d..7bf19fb25c36b 100644
--- a/api_docs/stack_connectors.mdx
+++ b/api_docs/stack_connectors.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors
title: "stackConnectors"
image: https://source.unsplash.com/400x175/?github
description: API docs for the stackConnectors plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors']
---
import stackConnectorsObj from './stack_connectors.devdocs.json';
diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx
index d35966ac57c9c..3cabbc8a83828 100644
--- a/api_docs/task_manager.mdx
+++ b/api_docs/task_manager.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager
title: "taskManager"
image: https://source.unsplash.com/400x175/?github
description: API docs for the taskManager plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager']
---
import taskManagerObj from './task_manager.devdocs.json';
diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx
index 1dbef1ee43f39..e3220b9e593a8 100644
--- a/api_docs/telemetry.mdx
+++ b/api_docs/telemetry.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry
title: "telemetry"
image: https://source.unsplash.com/400x175/?github
description: API docs for the telemetry plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry']
---
import telemetryObj from './telemetry.devdocs.json';
diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx
index 438e8d307b1de..03d8bceec41f2 100644
--- a/api_docs/telemetry_collection_manager.mdx
+++ b/api_docs/telemetry_collection_manager.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager
title: "telemetryCollectionManager"
image: https://source.unsplash.com/400x175/?github
description: API docs for the telemetryCollectionManager plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager']
---
import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json';
diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx
index f032f6eee5e0a..a3721f57358da 100644
--- a/api_docs/telemetry_collection_xpack.mdx
+++ b/api_docs/telemetry_collection_xpack.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack
title: "telemetryCollectionXpack"
image: https://source.unsplash.com/400x175/?github
description: API docs for the telemetryCollectionXpack plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack']
---
import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json';
diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx
index 0b1523b1a10d3..5c29d491cf1d1 100644
--- a/api_docs/telemetry_management_section.mdx
+++ b/api_docs/telemetry_management_section.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection
title: "telemetryManagementSection"
image: https://source.unsplash.com/400x175/?github
description: API docs for the telemetryManagementSection plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection']
---
import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json';
diff --git a/api_docs/threat_intelligence.devdocs.json b/api_docs/threat_intelligence.devdocs.json
index a29de53bf77a5..d5d35c60068c4 100644
--- a/api_docs/threat_intelligence.devdocs.json
+++ b/api_docs/threat_intelligence.devdocs.json
@@ -274,6 +274,103 @@
}
],
"returnComment": []
+ },
+ {
+ "parentPluginId": "threatIntelligence",
+ "id": "def-public.SecuritySolutionPluginContext.useQuery",
+ "type": "Function",
+ "tags": [],
+ "label": "useQuery",
+ "description": [],
+ "signature": [
+ "() => ",
+ "Query"
+ ],
+ "path": "x-pack/plugins/threat_intelligence/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "threatIntelligence",
+ "id": "def-public.SecuritySolutionPluginContext.useFilters",
+ "type": "Function",
+ "tags": [],
+ "label": "useFilters",
+ "description": [],
+ "signature": [
+ "() => ",
+ "Filter",
+ "[]"
+ ],
+ "path": "x-pack/plugins/threat_intelligence/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "threatIntelligence",
+ "id": "def-public.SecuritySolutionPluginContext.useGlobalTime",
+ "type": "Function",
+ "tags": [],
+ "label": "useGlobalTime",
+ "description": [],
+ "signature": [
+ "() => ",
+ "TimeRange"
+ ],
+ "path": "x-pack/plugins/threat_intelligence/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "threatIntelligence",
+ "id": "def-public.SecuritySolutionPluginContext.SiemSearchBar",
+ "type": "Function",
+ "tags": [],
+ "label": "SiemSearchBar",
+ "description": [],
+ "signature": [
+ "React.VoidFunctionComponent"
+ ],
+ "path": "x-pack/plugins/threat_intelligence/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "threatIntelligence",
+ "id": "def-public.SecuritySolutionPluginContext.SiemSearchBar.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "threatIntelligence",
+ "id": "def-public.SecuritySolutionPluginContext.SiemSearchBar.$2",
+ "type": "Any",
+ "tags": [],
+ "label": "context",
+ "description": [],
+ "signature": [
+ "any"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
}
],
"initialIsOpen": false
diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx
index b584556618afe..5834a118d4c1e 100644
--- a/api_docs/threat_intelligence.mdx
+++ b/api_docs/threat_intelligence.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence
title: "threatIntelligence"
image: https://source.unsplash.com/400x175/?github
description: API docs for the threatIntelligence plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence']
---
import threatIntelligenceObj from './threat_intelligence.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Protections Experience Team](https://github.com/orgs/elastic/teams/prot
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 20 | 0 | 4 | 3 |
+| 26 | 0 | 8 | 3 |
## Client
diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json
index 5875aa47c1309..4b5ec5ce28970 100644
--- a/api_docs/timelines.devdocs.json
+++ b/api_docs/timelines.devdocs.json
@@ -3192,7 +3192,7 @@
"IFieldSubType",
" | undefined; type?: string | undefined; })[]; id: string; title: string; filters?: ",
"Filter",
- "[] | undefined; dataViewId: string | null; sort: ",
+ "[] | undefined; dataViewId: string | null; savedObjectId: string | null; sort: ",
"SortColumnTimeline",
"[]; version: string | null; filterManager?: ",
{
@@ -3218,7 +3218,7 @@
},
"; description?: string | null | undefined; esTypes?: string[] | undefined; example?: string | number | null | undefined; format?: string | undefined; linkField?: string | undefined; placeholder?: string | undefined; subType?: ",
"IFieldSubType",
- " | undefined; type?: string | undefined; })[]; savedObjectId: string | null; isLoading: boolean; dataProviders: ",
+ " | undefined; type?: string | undefined; })[]; isLoading: boolean; dataProviders: ",
{
"pluginId": "timelines",
"scope": "common",
diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx
index 14ef93c594cc2..f33b1267f8f43 100644
--- a/api_docs/timelines.mdx
+++ b/api_docs/timelines.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines
title: "timelines"
image: https://source.unsplash.com/400x175/?github
description: API docs for the timelines plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines']
---
import timelinesObj from './timelines.devdocs.json';
diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx
index b66dc03b52acd..3237f674591f6 100644
--- a/api_docs/transform.mdx
+++ b/api_docs/transform.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform
title: "transform"
image: https://source.unsplash.com/400x175/?github
description: API docs for the transform plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform']
---
import transformObj from './transform.devdocs.json';
diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json
index 59be983bb00f5..d6351e414ae46 100644
--- a/api_docs/triggers_actions_ui.devdocs.json
+++ b/api_docs/triggers_actions_ui.devdocs.json
@@ -303,6 +303,38 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ButtonGroupField",
+ "type": "Function",
+ "tags": [],
+ "label": "ButtonGroupField",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/button_group_field.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ButtonGroupField.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.CreateConnectorFlyout",
@@ -832,6 +864,145 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.hasMustacheTokens",
+ "type": "Function",
+ "tags": [],
+ "label": "hasMustacheTokens",
+ "description": [],
+ "signature": [
+ "(str: string) => boolean"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/has_mustache_tokens.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.hasMustacheTokens.$1",
+ "type": "string",
+ "tags": [],
+ "label": "str",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/has_mustache_tokens.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.HiddenField",
+ "type": "Function",
+ "tags": [],
+ "label": "HiddenField",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent<",
+ "Props",
+ "> & { readonly type: (props: ",
+ "Props",
+ ") => JSX.Element; }"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/hidden_field.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.HiddenField.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.JsonEditorWithMessageVariables",
+ "type": "Function",
+ "tags": [],
+ "label": "JsonEditorWithMessageVariables",
+ "description": [],
+ "signature": [
+ "({ buttonTitle, messageVariables, paramsProperty, inputTargetValue, label, errors, areaLabel, onDocumentsChange, helpText, onBlur, showButtonTitle, euiCodeEditorProps, }: React.PropsWithChildren) => JSX.Element"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/json_editor_with_message_variables.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.JsonEditorWithMessageVariables.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{\n buttonTitle,\n messageVariables,\n paramsProperty,\n inputTargetValue,\n label,\n errors,\n areaLabel,\n onDocumentsChange,\n helpText,\n onBlur,\n showButtonTitle,\n euiCodeEditorProps = {},\n}",
+ "description": [],
+ "signature": [
+ "React.PropsWithChildren"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/json_editor_with_message_variables.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.JsonFieldWrapper",
+ "type": "Function",
+ "tags": [],
+ "label": "JsonFieldWrapper",
+ "description": [],
+ "signature": [
+ "({ field, ...rest }: Props) => JSX.Element"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/json_field_wrapper.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.JsonFieldWrapper.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{ field, ...rest }",
+ "description": [],
+ "signature": [
+ "Props"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/json_field_wrapper.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.loadActionErrorLog",
@@ -1398,6 +1569,39 @@
"returnComment": [],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.MustacheTextFieldWrapper",
+ "type": "Function",
+ "tags": [],
+ "label": "MustacheTextFieldWrapper",
+ "description": [],
+ "signature": [
+ "({ field, euiFieldProps, idAria, ...rest }: Props) => JSX.Element"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/mustache_text_field_wrapper.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.MustacheTextFieldWrapper.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{ field, euiFieldProps, idAria, ...rest }",
+ "description": [],
+ "signature": [
+ "Props"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/mustache_text_field_wrapper.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.muteRule",
@@ -1490,6 +1694,70 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.PasswordField",
+ "type": "Function",
+ "tags": [],
+ "label": "PasswordField",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/password_field.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.PasswordField.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.SimpleConnectorForm",
+ "type": "Function",
+ "tags": [],
+ "label": "SimpleConnectorForm",
+ "description": [],
+ "signature": [
+ "React.NamedExoticComponent"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/simple_connector_form.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.SimpleConnectorForm.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.snoozeRule",
@@ -1614,72 +1882,185 @@
},
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.ThresholdExpression",
+ "id": "def-public.templateActionVariable",
"type": "Function",
"tags": [],
- "label": "ThresholdExpression",
+ "label": "templateActionVariable",
"description": [],
"signature": [
- "(props: ",
- "ThresholdExpressionProps",
- ") => JSX.Element"
+ "(variable: ",
+ {
+ "pluginId": "alerting",
+ "scope": "common",
+ "docId": "kibAlertingPluginApi",
+ "section": "def-common.ActionVariable",
+ "text": "ActionVariable"
+ },
+ ") => string"
],
- "path": "x-pack/plugins/triggers_actions_ui/public/common/expression_items/index.ts",
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/template_action_variable.ts",
"deprecated": false,
"trackAdoption": false,
- "returnComment": [],
"children": [
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.ThresholdExpression.$1",
- "type": "Uncategorized",
+ "id": "def-public.templateActionVariable.$1",
+ "type": "Object",
"tags": [],
- "label": "props",
+ "label": "variable",
"description": [],
"signature": [
- "T"
+ {
+ "pluginId": "alerting",
+ "scope": "common",
+ "docId": "kibAlertingPluginApi",
+ "section": "def-common.ActionVariable",
+ "text": "ActionVariable"
+ }
],
- "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/suspended_component_with_props.tsx",
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/template_action_variable.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "isRequired": true
}
],
+ "returnComment": [],
"initialIsOpen": false
},
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.unmuteRule",
+ "id": "def-public.TextAreaWithMessageVariables",
"type": "Function",
"tags": [],
- "label": "unmuteRule",
+ "label": "TextAreaWithMessageVariables",
"description": [],
"signature": [
- "({ id, http }: { id: string; http: ",
- "HttpSetup",
- "; }) => Promise"
+ "({ messageVariables, paramsProperty, index, inputTargetValue, isDisabled, editAction, label, errors, }: React.PropsWithChildren) => JSX.Element"
],
- "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unmute.ts",
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/text_area_with_message_variables.tsx",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.unmuteRule.$1",
- "type": "Object",
+ "id": "def-public.TextAreaWithMessageVariables.$1",
+ "type": "CompoundType",
"tags": [],
- "label": "{ id, http }",
+ "label": "{\n messageVariables,\n paramsProperty,\n index,\n inputTargetValue,\n isDisabled = false,\n editAction,\n label,\n errors,\n}",
"description": [],
- "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unmute.ts",
+ "signature": [
+ "React.PropsWithChildren"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/text_area_with_message_variables.tsx",
"deprecated": false,
"trackAdoption": false,
- "children": [
- {
- "parentPluginId": "triggersActionsUi",
- "id": "def-public.unmuteRule.$1.id",
- "type": "string",
- "tags": [],
- "label": "id",
- "description": [],
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.TextFieldWithMessageVariables",
+ "type": "Function",
+ "tags": [],
+ "label": "TextFieldWithMessageVariables",
+ "description": [],
+ "signature": [
+ "({ buttonTitle, messageVariables, paramsProperty, index, inputTargetValue, editAction, errors, formRowProps, defaultValue, wrapField, showButtonTitle, }: React.PropsWithChildren) => JSX.Element"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/text_field_with_message_variables.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.TextFieldWithMessageVariables.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{\n buttonTitle,\n messageVariables,\n paramsProperty,\n index,\n inputTargetValue,\n editAction,\n errors,\n formRowProps,\n defaultValue,\n wrapField = false,\n showButtonTitle,\n}",
+ "description": [],
+ "signature": [
+ "React.PropsWithChildren"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/text_field_with_message_variables.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ThresholdExpression",
+ "type": "Function",
+ "tags": [],
+ "label": "ThresholdExpression",
+ "description": [],
+ "signature": [
+ "(props: ",
+ "ThresholdExpressionProps",
+ ") => JSX.Element"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/common/expression_items/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ThresholdExpression.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "T"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/suspended_component_with_props.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.unmuteRule",
+ "type": "Function",
+ "tags": [],
+ "label": "unmuteRule",
+ "description": [],
+ "signature": [
+ "({ id, http }: { id: string; http: ",
+ "HttpSetup",
+ "; }) => Promise"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unmute.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.unmuteRule.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{ id, http }",
+ "description": [],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unmute.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.unmuteRule.$1.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
"path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unmute.ts",
"deprecated": false,
"trackAdoption": false
@@ -1776,6 +2157,106 @@
"returnComment": [],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.updateActionConnector",
+ "type": "Function",
+ "tags": [],
+ "label": "updateActionConnector",
+ "description": [],
+ "signature": [
+ "({\n http,\n connector,\n id,\n}: { http: ",
+ "HttpSetup",
+ "; connector: Pick<",
+ "ActionConnectorWithoutId",
+ ", Record>, \"name\" | \"config\" | \"secrets\">; id: string; }) => Promise<",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionConnector",
+ "text": "ActionConnector"
+ },
+ ", Record>>"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/action_connector_api/update.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.updateActionConnector.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n http,\n connector,\n id,\n}",
+ "description": [],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/action_connector_api/update.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.updateActionConnector.$1.http",
+ "type": "Object",
+ "tags": [],
+ "label": "http",
+ "description": [],
+ "signature": [
+ "HttpSetup"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/action_connector_api/update.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.updateActionConnector.$1.connector",
+ "type": "Object",
+ "tags": [],
+ "label": "connector",
+ "description": [],
+ "signature": [
+ "{ name: string; config: Record; secrets: Record; }"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/action_connector_api/update.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.updateActionConnector.$1.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/action_connector_api/update.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.useConnectorContext",
+ "type": "Function",
+ "tags": [],
+ "label": "useConnectorContext",
+ "description": [],
+ "signature": [
+ "() => ",
+ "ConnectorContextValue"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/context/use_connector_context.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.useLoadRuleTypes",
@@ -1819,6 +2300,41 @@
"returnComment": [],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.useTypedKibana",
+ "type": "Function",
+ "tags": [],
+ "label": "useTypedKibana",
+ "description": [],
+ "signature": [
+ "() => ",
+ {
+ "pluginId": "kibanaReact",
+ "scope": "public",
+ "docId": "kibKibanaReactPluginApi",
+ "section": "def-public.KibanaReactContextValue",
+ "text": "KibanaReactContextValue"
+ },
+ " & ",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.TriggersAndActionsUiServices",
+ "text": "TriggersAndActionsUiServices"
+ },
+ ">"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/common/lib/kibana/kibana_react.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.ValueExpression",
@@ -1891,95 +2407,651 @@
"interfaces": [
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.ActionType",
+ "id": "def-public.ActionConnectorFieldsProps",
"type": "Interface",
"tags": [],
- "label": "ActionType",
+ "label": "ActionConnectorFieldsProps",
"description": [],
- "path": "x-pack/plugins/actions/common/types.ts",
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.ActionType.id",
- "type": "string",
- "tags": [],
- "label": "id",
- "description": [],
- "path": "x-pack/plugins/actions/common/types.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "triggersActionsUi",
- "id": "def-public.ActionType.name",
- "type": "string",
- "tags": [],
- "label": "name",
- "description": [],
- "path": "x-pack/plugins/actions/common/types.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "triggersActionsUi",
- "id": "def-public.ActionType.enabled",
+ "id": "def-public.ActionConnectorFieldsProps.readOnly",
"type": "boolean",
"tags": [],
- "label": "enabled",
+ "label": "readOnly",
"description": [],
- "path": "x-pack/plugins/actions/common/types.ts",
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.ActionType.enabledInConfig",
+ "id": "def-public.ActionConnectorFieldsProps.isEdit",
"type": "boolean",
"tags": [],
- "label": "enabledInConfig",
+ "label": "isEdit",
"description": [],
- "path": "x-pack/plugins/actions/common/types.ts",
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.ActionType.enabledInLicense",
- "type": "boolean",
+ "id": "def-public.ActionConnectorFieldsProps.registerPreSubmitValidator",
+ "type": "Function",
"tags": [],
- "label": "enabledInLicense",
+ "label": "registerPreSubmitValidator",
"description": [],
- "path": "x-pack/plugins/actions/common/types.ts",
+ "signature": [
+ "(validator: ",
+ "ConnectorValidationFunc",
+ ") => void"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionConnectorFieldsProps.registerPreSubmitValidator.$1",
+ "type": "Function",
+ "tags": [],
+ "label": "validator",
+ "description": [],
+ "signature": [
+ "ConnectorValidationFunc"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps",
+ "type": "Interface",
+ "tags": [],
+ "label": "ActionParamsProps",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionParamsProps",
+ "text": "ActionParamsProps"
+ },
+ ""
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.actionParams",
+ "type": "Object",
+ "tags": [],
+ "label": "actionParams",
+ "description": [],
+ "signature": [
+ "{ [P in keyof TParams]?: TParams[P] | undefined; }"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.index",
+ "type": "number",
+ "tags": [],
+ "label": "index",
+ "description": [],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.editAction",
+ "type": "Function",
+ "tags": [],
+ "label": "editAction",
+ "description": [],
+ "signature": [
+ "(key: string, value: ",
+ "SavedObjectAttribute",
+ ", index: number) => void"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.editAction.$1",
+ "type": "string",
+ "tags": [],
+ "label": "key",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.editAction.$2",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "value",
+ "description": [],
+ "signature": [
+ "SavedObjectAttribute"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.editAction.$3",
+ "type": "number",
+ "tags": [],
+ "label": "index",
+ "description": [],
+ "signature": [
+ "number"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.errors",
+ "type": "Object",
+ "tags": [],
+ "label": "errors",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.IErrorObject",
+ "text": "IErrorObject"
+ }
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.messageVariables",
+ "type": "Array",
+ "tags": [],
+ "label": "messageVariables",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "alerting",
+ "scope": "common",
+ "docId": "kibAlertingPluginApi",
+ "section": "def-common.ActionVariable",
+ "text": "ActionVariable"
+ },
+ "[] | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.defaultMessage",
+ "type": "string",
+ "tags": [],
+ "label": "defaultMessage",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.actionConnector",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "actionConnector",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionConnector",
+ "text": "ActionConnector"
+ },
+ ", Record> | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.isLoading",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "isLoading",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.isDisabled",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "isDisabled",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionParamsProps.showEmailSubjectAndMessage",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "showEmailSubjectAndMessage",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionType",
+ "type": "Interface",
+ "tags": [],
+ "label": "ActionType",
+ "description": [],
+ "path": "x-pack/plugins/actions/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionType.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "x-pack/plugins/actions/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionType.name",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "path": "x-pack/plugins/actions/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionType.enabled",
+ "type": "boolean",
+ "tags": [],
+ "label": "enabled",
+ "description": [],
+ "path": "x-pack/plugins/actions/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionType.enabledInConfig",
+ "type": "boolean",
+ "tags": [],
+ "label": "enabledInConfig",
+ "description": [],
+ "path": "x-pack/plugins/actions/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionType.enabledInLicense",
+ "type": "boolean",
+ "tags": [],
+ "label": "enabledInLicense",
+ "description": [],
+ "path": "x-pack/plugins/actions/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionType.minimumLicenseRequired",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "minimumLicenseRequired",
+ "description": [],
+ "signature": [
+ "\"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\""
+ ],
+ "path": "x-pack/plugins/actions/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionType.supportedFeatureIds",
+ "type": "Array",
+ "tags": [],
+ "label": "supportedFeatureIds",
+ "description": [],
+ "signature": [
+ "string[]"
+ ],
+ "path": "x-pack/plugins/actions/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel",
+ "type": "Interface",
+ "tags": [],
+ "label": "ActionTypeModel",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
+ ""
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.iconClass",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "iconClass",
+ "description": [],
+ "signature": [
+ "string | React.ComponentType<{}>"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.selectMessage",
+ "type": "string",
+ "tags": [],
+ "label": "selectMessage",
+ "description": [],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.actionTypeTitle",
+ "type": "string",
+ "tags": [],
+ "label": "actionTypeTitle",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.validateParams",
+ "type": "Function",
+ "tags": [],
+ "label": "validateParams",
+ "description": [],
+ "signature": [
+ "(actionParams: ActionParams) => Promise<",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.GenericValidationResult",
+ "text": "GenericValidationResult"
+ },
+ ">"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.validateParams.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "actionParams",
+ "description": [],
+ "signature": [
+ "ActionParams"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.actionConnectorFields",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "actionConnectorFields",
+ "description": [],
+ "signature": [
+ "React.LazyExoticComponent> | null"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.actionParamsFields",
+ "type": "Function",
+ "tags": [],
+ "label": "actionParamsFields",
+ "description": [],
+ "signature": [
+ "React.ExoticComponent<(",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionParamsProps",
+ "text": "ActionParamsProps"
+ },
+ " & React.RefAttributes, any, any>>) | (",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionParamsProps",
+ "text": "ActionParamsProps"
+ },
+ " & { children?: React.ReactNode; })> & { readonly _result: React.ComponentType<",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionParamsProps",
+ "text": "ActionParamsProps"
+ },
+ ">; }"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.actionParamsFields.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "props",
+ "description": [],
+ "signature": [
+ "P"
+ ],
+ "path": "node_modules/@types/react/index.d.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.defaultActionParams",
+ "type": "Object",
+ "tags": [],
+ "label": "defaultActionParams",
+ "description": [],
+ "signature": [
+ "Partial | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ActionTypeModel.defaultRecoveredActionParams",
+ "type": "Object",
+ "tags": [],
+ "label": "defaultRecoveredActionParams",
+ "description": [],
+ "signature": [
+ "Partial | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.ActionType.minimumLicenseRequired",
- "type": "CompoundType",
+ "id": "def-public.ActionTypeModel.customConnectorSelectItem",
+ "type": "Object",
"tags": [],
- "label": "minimumLicenseRequired",
+ "label": "customConnectorSelectItem",
"description": [],
"signature": [
- "\"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\""
+ "CustomConnectorSelectionItem | undefined"
],
- "path": "x-pack/plugins/actions/common/types.ts",
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "triggersActionsUi",
- "id": "def-public.ActionType.supportedFeatureIds",
- "type": "Array",
+ "id": "def-public.ActionTypeModel.isExperimental",
+ "type": "CompoundType",
"tags": [],
- "label": "supportedFeatureIds",
+ "label": "isExperimental",
"description": [],
"signature": [
- "string[]"
+ "boolean | undefined"
],
- "path": "x-pack/plugins/actions/common/types.ts",
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -2067,7 +3139,7 @@
"description": [],
"signature": [
"BasicFields",
- " & { tags?: string[] | undefined; kibana?: string[] | undefined; \"@timestamp\"?: string[] | undefined; \"event.action\"?: string[] | undefined; \"kibana.alert.rule.parameters\"?: string[] | undefined; \"kibana.alert.rule.rule_type_id\"?: string[] | undefined; \"kibana.alert.rule.consumer\"?: string[] | undefined; \"kibana.alert.rule.producer\"?: string[] | undefined; \"kibana.space_ids\"?: string[] | undefined; \"kibana.alert.uuid\"?: string[] | undefined; \"kibana.alert.instance.id\"?: string[] | undefined; \"kibana.alert.start\"?: string[] | undefined; \"kibana.alert.end\"?: string[] | undefined; \"kibana.alert.duration.us\"?: string[] | undefined; \"kibana.alert.severity\"?: string[] | undefined; \"kibana.alert.status\"?: string[] | undefined; \"kibana.version\"?: string[] | undefined; \"ecs.version\"?: string[] | undefined; \"kibana.alert.risk_score\"?: string[] | undefined; \"kibana.alert.workflow_status\"?: string[] | undefined; \"kibana.alert.workflow_user\"?: string[] | undefined; \"kibana.alert.workflow_reason\"?: string[] | undefined; \"kibana.alert.system_status\"?: string[] | undefined; \"kibana.alert.action_group\"?: string[] | undefined; \"kibana.alert.reason\"?: string[] | undefined; \"kibana.alert.rule.author\"?: string[] | undefined; \"kibana.alert.rule.category\"?: string[] | undefined; \"kibana.alert.rule.uuid\"?: string[] | undefined; \"kibana.alert.rule.created_at\"?: string[] | undefined; \"kibana.alert.rule.created_by\"?: string[] | undefined; \"kibana.alert.rule.description\"?: string[] | undefined; \"kibana.alert.rule.enabled\"?: string[] | undefined; \"kibana.alert.rule.execution.uuid\"?: string[] | undefined; \"kibana.alert.rule.from\"?: string[] | undefined; \"kibana.alert.rule.interval\"?: string[] | undefined; \"kibana.alert.rule.license\"?: string[] | undefined; \"kibana.alert.rule.name\"?: string[] | undefined; \"kibana.alert.rule.note\"?: string[] | undefined; \"kibana.alert.rule.references\"?: string[] | undefined; \"kibana.alert.rule.rule_id\"?: string[] | undefined; \"kibana.alert.rule.rule_name_override\"?: string[] | undefined; \"kibana.alert.rule.tags\"?: string[] | undefined; \"kibana.alert.rule.to\"?: string[] | undefined; \"kibana.alert.rule.type\"?: string[] | undefined; \"kibana.alert.rule.updated_at\"?: string[] | undefined; \"kibana.alert.rule.updated_by\"?: string[] | undefined; \"kibana.alert.rule.version\"?: string[] | undefined; \"event.kind\"?: string[] | undefined; \"event.module\"?: string[] | undefined; \"kibana.alert.evaluation.threshold\"?: string[] | undefined; \"kibana.alert.evaluation.value\"?: string[] | undefined; \"kibana.alert.building_block_type\"?: string[] | undefined; \"kibana.alert.rule.exceptions_list\"?: string[] | undefined; \"kibana.alert.rule.namespace\"?: string[] | undefined; \"kibana.alert\"?: string[] | undefined; \"kibana.alert.rule\"?: string[] | undefined; } & { [x: string]: unknown[]; }"
+ " & { tags?: string[] | undefined; kibana?: string[] | undefined; \"@timestamp\"?: string[] | undefined; \"kibana.alert.rule.rule_type_id\"?: string[] | undefined; \"kibana.alert.rule.consumer\"?: string[] | undefined; \"event.action\"?: string[] | undefined; \"kibana.alert.rule.execution.uuid\"?: string[] | undefined; \"kibana.alert.rule.parameters\"?: string[] | undefined; \"kibana.alert.rule.producer\"?: string[] | undefined; \"kibana.space_ids\"?: string[] | undefined; \"kibana.alert.uuid\"?: string[] | undefined; \"kibana.alert.instance.id\"?: string[] | undefined; \"kibana.alert.start\"?: string[] | undefined; \"kibana.alert.end\"?: string[] | undefined; \"kibana.alert.duration.us\"?: string[] | undefined; \"kibana.alert.severity\"?: string[] | undefined; \"kibana.alert.status\"?: string[] | undefined; \"kibana.version\"?: string[] | undefined; \"ecs.version\"?: string[] | undefined; \"kibana.alert.risk_score\"?: string[] | undefined; \"kibana.alert.workflow_status\"?: string[] | undefined; \"kibana.alert.workflow_user\"?: string[] | undefined; \"kibana.alert.workflow_reason\"?: string[] | undefined; \"kibana.alert.system_status\"?: string[] | undefined; \"kibana.alert.action_group\"?: string[] | undefined; \"kibana.alert.reason\"?: string[] | undefined; \"kibana.alert.rule.author\"?: string[] | undefined; \"kibana.alert.rule.category\"?: string[] | undefined; \"kibana.alert.rule.uuid\"?: string[] | undefined; \"kibana.alert.rule.created_at\"?: string[] | undefined; \"kibana.alert.rule.created_by\"?: string[] | undefined; \"kibana.alert.rule.description\"?: string[] | undefined; \"kibana.alert.rule.enabled\"?: string[] | undefined; \"kibana.alert.rule.from\"?: string[] | undefined; \"kibana.alert.rule.interval\"?: string[] | undefined; \"kibana.alert.rule.license\"?: string[] | undefined; \"kibana.alert.rule.name\"?: string[] | undefined; \"kibana.alert.rule.note\"?: string[] | undefined; \"kibana.alert.rule.references\"?: string[] | undefined; \"kibana.alert.rule.rule_id\"?: string[] | undefined; \"kibana.alert.rule.rule_name_override\"?: string[] | undefined; \"kibana.alert.rule.tags\"?: string[] | undefined; \"kibana.alert.rule.to\"?: string[] | undefined; \"kibana.alert.rule.type\"?: string[] | undefined; \"kibana.alert.rule.updated_at\"?: string[] | undefined; \"kibana.alert.rule.updated_by\"?: string[] | undefined; \"kibana.alert.rule.version\"?: string[] | undefined; \"event.kind\"?: string[] | undefined; \"event.module\"?: string[] | undefined; \"kibana.alert.evaluation.threshold\"?: string[] | undefined; \"kibana.alert.evaluation.value\"?: string[] | undefined; \"kibana.alert.building_block_type\"?: string[] | undefined; \"kibana.alert.rule.exceptions_list\"?: string[] | undefined; \"kibana.alert.rule.namespace\"?: string[] | undefined; \"kibana.alert\"?: string[] | undefined; \"kibana.alert.rule\"?: string[] | undefined; } & { [x: string]: unknown[]; }"
],
"path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
"deprecated": false,
@@ -2513,20 +3585,6 @@
"deprecated": false,
"trackAdoption": false
},
- {
- "parentPluginId": "triggersActionsUi",
- "id": "def-public.AlertStatus.actionSubgroup",
- "type": "string",
- "tags": [],
- "label": "actionSubgroup",
- "description": [],
- "signature": [
- "string | undefined"
- ],
- "path": "x-pack/plugins/alerting/common/alert_summary.ts",
- "deprecated": false,
- "trackAdoption": false
- },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.AlertStatus.activeStartDate",
@@ -2805,6 +3863,45 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ConfigFieldSchema",
+ "type": "Interface",
+ "tags": [],
+ "label": "ConfigFieldSchema",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ConfigFieldSchema",
+ "text": "ConfigFieldSchema"
+ },
+ " extends ",
+ "CommonFieldSchema"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/simple_connector_form.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ConfigFieldSchema.isUrlField",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "isUrlField",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/simple_connector_form.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.FieldBrowserOptions",
@@ -3010,6 +4107,44 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.GenericValidationResult",
+ "type": "Interface",
+ "tags": [],
+ "label": "GenericValidationResult",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.GenericValidationResult",
+ "text": "GenericValidationResult"
+ },
+ ""
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.GenericValidationResult.errors",
+ "type": "Object",
+ "tags": [],
+ "label": "errors",
+ "description": [],
+ "signature": [
+ "{ [P in Extract]: unknown; }"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.IErrorObject",
@@ -3218,11 +4353,29 @@
"description": [],
"signature": [
"{ get: (id: string) => ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
"; list: () => ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
"[]; register: (objectType: ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
") => void; has: (id: string) => boolean; }"
],
"path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
@@ -4147,6 +5300,45 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.SecretsFieldSchema",
+ "type": "Interface",
+ "tags": [],
+ "label": "SecretsFieldSchema",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.SecretsFieldSchema",
+ "text": "SecretsFieldSchema"
+ },
+ " extends ",
+ "CommonFieldSchema"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/simple_connector_form.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.SecretsFieldSchema.isPasswordField",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "isPasswordField",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/components/simple_connector_form.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.TriggersAndActionsUiServices",
@@ -4390,11 +5582,29 @@
"description": [],
"signature": [
"{ get: (id: string) => ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
"; list: () => ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
"[]; register: (objectType: ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
") => void; has: (id: string) => boolean; }"
],
"path": "x-pack/plugins/triggers_actions_ui/public/application/app.tsx",
@@ -4603,6 +5813,18 @@
}
],
"enums": [
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.AlertProvidedActionVariables",
+ "type": "Enum",
+ "tags": [],
+ "label": "AlertProvidedActionVariables",
+ "description": [],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/action_variables.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.COMPARATORS",
@@ -4690,11 +5912,29 @@
"description": [],
"signature": [
"{ get: (id: string) => ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
"; list: () => ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
"[]; register: (objectType: ",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
") => void; has: (id: string) => boolean; }"
],
"path": "x-pack/plugins/triggers_actions_ui/public/types.ts",
@@ -4717,6 +5957,63 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ALERT_HISTORY_PREFIX",
+ "type": "string",
+ "tags": [],
+ "label": "ALERT_HISTORY_PREFIX",
+ "description": [],
+ "signature": [
+ "\"kibana-alert-history-\""
+ ],
+ "path": "x-pack/plugins/actions/common/alert_history_schema.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.AlertHistoryDefaultIndexName",
+ "type": "string",
+ "tags": [],
+ "label": "AlertHistoryDefaultIndexName",
+ "description": [],
+ "path": "x-pack/plugins/actions/common/alert_history_schema.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.AlertHistoryDocumentTemplate",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "AlertHistoryDocumentTemplate",
+ "description": [],
+ "signature": [
+ "Readonly<{ event: { kind: string; }; kibana?: { alert: { actionGroupName?: string | undefined; actionGroup?: string | undefined; context?: { [x: string]: Record; } | undefined; id?: string | undefined; }; } | undefined; rule?: { type?: string | undefined; space?: string | undefined; params?: { [x: string]: Record; } | undefined; name?: string | undefined; id?: string | undefined; } | undefined; message?: unknown; tags?: string[] | undefined; '@timestamp': string; }> | null"
+ ],
+ "path": "x-pack/plugins/actions/common/alert_history_schema.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.AlertHistoryEsIndexConnectorId",
+ "type": "string",
+ "tags": [],
+ "label": "AlertHistoryEsIndexConnectorId",
+ "description": [],
+ "signature": [
+ "\"preconfigured-alert-history-es-index\""
+ ],
+ "path": "x-pack/plugins/actions/common/alert_history_schema.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.AlertsTableConfigurationRegistryContract",
@@ -4784,6 +6081,51 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.connectorDeprecatedMessage",
+ "type": "string",
+ "tags": [],
+ "label": "connectorDeprecatedMessage",
+ "description": [],
+ "path": "x-pack/plugins/triggers_actions_ui/public/common/connectors_selection.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.ConnectorFormSchema",
+ "type": "Type",
+ "tags": [],
+ "label": "ConnectorFormSchema",
+ "description": [
+ "\nThe following type is equivalent to:\n\ninterface ConnectorFormSchema {\n id?: string,\n name?: string,\n actionTypeId: string,\n isDeprecated: boolean,\n config: Config,\n secrets: Secrets,\n}"
+ ],
+ "signature": [
+ "Pick<",
+ "UserConfiguredActionConnector",
+ ", \"config\" | \"secrets\" | \"actionTypeId\" | \"isDeprecated\"> & Partial, \"name\" | \"id\">>"
+ ],
+ "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "triggersActionsUi",
+ "id": "def-public.deprecatedMessage",
+ "type": "string",
+ "tags": [],
+ "label": "deprecatedMessage",
+ "description": [],
+ "path": "x-pack/plugins/triggers_actions_ui/public/common/connectors_selection.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "triggersActionsUi",
"id": "def-public.GetRenderCellValue",
@@ -5801,7 +7143,13 @@
"signature": [
"TypeRegistry",
"<",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
">"
],
"path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts",
@@ -5873,7 +7221,13 @@
"signature": [
"TypeRegistry",
"<",
- "ActionTypeModel",
+ {
+ "pluginId": "triggersActionsUi",
+ "scope": "public",
+ "docId": "kibTriggersActionsUiPluginApi",
+ "section": "def-public.ActionTypeModel",
+ "text": "ActionTypeModel"
+ },
">"
],
"path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts",
diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx
index 0a3cbb630285f..5146401d1a6e8 100644
--- a/api_docs/triggers_actions_ui.mdx
+++ b/api_docs/triggers_actions_ui.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi
title: "triggersActionsUi"
image: https://source.unsplash.com/400x175/?github
description: API docs for the triggersActionsUi plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi']
---
import triggersActionsUiObj from './triggers_actions_ui.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Response Ops](https://github.com/orgs/elastic/teams/response-ops) for q
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 437 | 1 | 416 | 45 |
+| 512 | 1 | 485 | 48 |
## Client
diff --git a/api_docs/ui_actions.devdocs.json b/api_docs/ui_actions.devdocs.json
index 293aa53e4d804..d224e96cb9e8a 100644
--- a/api_docs/ui_actions.devdocs.json
+++ b/api_docs/ui_actions.devdocs.json
@@ -2191,6 +2191,21 @@
"path": "src/plugins/ui_actions/public/types.ts",
"deprecated": false,
"trackAdoption": false
+ },
+ {
+ "parentPluginId": "uiActions",
+ "id": "def-public.VisualizeFieldContext.query",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "query",
+ "description": [],
+ "signature": [
+ "AggregateQuery",
+ " | undefined"
+ ],
+ "path": "src/plugins/ui_actions/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
}
],
"initialIsOpen": false
diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx
index 2a01df283087a..3997d6297067a 100644
--- a/api_docs/ui_actions.mdx
+++ b/api_docs/ui_actions.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions
title: "uiActions"
image: https://source.unsplash.com/400x175/?github
description: API docs for the uiActions plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions']
---
import uiActionsObj from './ui_actions.devdocs.json';
@@ -21,7 +21,7 @@ Contact [App Services](https://github.com/orgs/elastic/teams/kibana-app-services
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 132 | 0 | 91 | 11 |
+| 133 | 0 | 92 | 11 |
## Client
diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx
index f46cdf9d62ee1..0644b977bc92c 100644
--- a/api_docs/ui_actions_enhanced.mdx
+++ b/api_docs/ui_actions_enhanced.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced
title: "uiActionsEnhanced"
image: https://source.unsplash.com/400x175/?github
description: API docs for the uiActionsEnhanced plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced']
---
import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json';
diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx
index f70e303ebe4d7..bfb157318d95b 100644
--- a/api_docs/unified_field_list.mdx
+++ b/api_docs/unified_field_list.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList
title: "unifiedFieldList"
image: https://source.unsplash.com/400x175/?github
description: API docs for the unifiedFieldList plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList']
---
import unifiedFieldListObj from './unified_field_list.devdocs.json';
diff --git a/api_docs/unified_search.devdocs.json b/api_docs/unified_search.devdocs.json
index 8a490ca91dd2b..5678db92f00cd 100644
--- a/api_docs/unified_search.devdocs.json
+++ b/api_docs/unified_search.devdocs.json
@@ -11,7 +11,7 @@
"label": "DataViewPicker",
"description": [],
"signature": [
- "({ isMissingCurrent, currentDataViewId, adHocDataViews, onChangeDataView, onAddField, onDataViewCreated, trigger, selectableProps, textBasedLanguages, onSaveTextLanguageQuery, onTextLangQuerySubmit, textBasedLanguage, isDisabled, }: ",
+ "({ isMissingCurrent, currentDataViewId, adHocDataViews, onChangeDataView, onAddField, onDataViewCreated, trigger, selectableProps, textBasedLanguages, onSaveTextLanguageQuery, onTextLangQuerySubmit, textBasedLanguage, onCreateDefaultAdHocDataView, isDisabled, }: ",
"DataViewPickerPropsExtended",
") => JSX.Element"
],
@@ -24,7 +24,7 @@
"id": "def-public.DataViewPicker.$1",
"type": "Object",
"tags": [],
- "label": "{\n isMissingCurrent,\n currentDataViewId,\n adHocDataViews,\n onChangeDataView,\n onAddField,\n onDataViewCreated,\n trigger,\n selectableProps,\n textBasedLanguages,\n onSaveTextLanguageQuery,\n onTextLangQuerySubmit,\n textBasedLanguage,\n isDisabled,\n}",
+ "label": "{\n isMissingCurrent,\n currentDataViewId,\n adHocDataViews,\n onChangeDataView,\n onAddField,\n onDataViewCreated,\n trigger,\n selectableProps,\n textBasedLanguages,\n onSaveTextLanguageQuery,\n onTextLangQuerySubmit,\n textBasedLanguage,\n onCreateDefaultAdHocDataView,\n isDisabled,\n}",
"description": [],
"signature": [
"DataViewPickerPropsExtended"
@@ -645,6 +645,38 @@
"children": [],
"returnComment": []
},
+ {
+ "parentPluginId": "unifiedSearch",
+ "id": "def-public.DataViewPickerProps.onCreateDefaultAdHocDataView",
+ "type": "Function",
+ "tags": [],
+ "label": "onCreateDefaultAdHocDataView",
+ "description": [],
+ "signature": [
+ "((pattern: string) => void) | undefined"
+ ],
+ "path": "src/plugins/unified_search/public/dataview_picker/index.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "unifiedSearch",
+ "id": "def-public.DataViewPickerProps.onCreateDefaultAdHocDataView.$1",
+ "type": "string",
+ "tags": [],
+ "label": "pattern",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "src/plugins/unified_search/public/dataview_picker/index.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
{
"parentPluginId": "unifiedSearch",
"id": "def-public.DataViewPickerProps.textBasedLanguages",
@@ -1058,6 +1090,26 @@
"deprecated": false,
"trackAdoption": false
},
+ {
+ "parentPluginId": "unifiedSearch",
+ "id": "def-public.IUnifiedSearchPluginServices.dataViews",
+ "type": "Object",
+ "tags": [],
+ "label": "dataViews",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "dataViews",
+ "scope": "public",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-public.DataViewsServicePublic",
+ "text": "DataViewsServicePublic"
+ }
+ ],
+ "path": "src/plugins/unified_search/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
{
"parentPluginId": "unifiedSearch",
"id": "def-public.IUnifiedSearchPluginServices.usageCollection",
diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx
index 2e10e0a54e2cd..7ea6ab07192c7 100644
--- a/api_docs/unified_search.mdx
+++ b/api_docs/unified_search.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch
title: "unifiedSearch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the unifiedSearch plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch']
---
import unifiedSearchObj from './unified_search.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-servic
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 125 | 2 | 99 | 17 |
+| 128 | 2 | 102 | 17 |
## Client
diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx
index 18b782fa7081b..76e6013841c75 100644
--- a/api_docs/unified_search_autocomplete.mdx
+++ b/api_docs/unified_search_autocomplete.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete
title: "unifiedSearch.autocomplete"
image: https://source.unsplash.com/400x175/?github
description: API docs for the unifiedSearch.autocomplete plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete']
---
import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Unified Search](https://github.com/orgs/elastic/teams/kibana-app-servic
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 125 | 2 | 99 | 17 |
+| 128 | 2 | 102 | 17 |
## Client
diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx
index 7a9ded502796d..bc3da076b5916 100644
--- a/api_docs/url_forwarding.mdx
+++ b/api_docs/url_forwarding.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding
title: "urlForwarding"
image: https://source.unsplash.com/400x175/?github
description: API docs for the urlForwarding plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding']
---
import urlForwardingObj from './url_forwarding.devdocs.json';
diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx
index 34bbb721a3728..b67acbd363bf0 100644
--- a/api_docs/usage_collection.mdx
+++ b/api_docs/usage_collection.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection
title: "usageCollection"
image: https://source.unsplash.com/400x175/?github
description: API docs for the usageCollection plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection']
---
import usageCollectionObj from './usage_collection.devdocs.json';
diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx
index c3afd8d86827c..1c83be4e34381 100644
--- a/api_docs/ux.mdx
+++ b/api_docs/ux.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux
title: "ux"
image: https://source.unsplash.com/400x175/?github
description: API docs for the ux plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux']
---
import uxObj from './ux.devdocs.json';
diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx
index 271d79629a0b7..7c1cb5bae3809 100644
--- a/api_docs/vis_default_editor.mdx
+++ b/api_docs/vis_default_editor.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor
title: "visDefaultEditor"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visDefaultEditor plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor']
---
import visDefaultEditorObj from './vis_default_editor.devdocs.json';
diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx
index f28ab39c716fb..4b95ba2b035fd 100644
--- a/api_docs/vis_type_gauge.mdx
+++ b/api_docs/vis_type_gauge.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge
title: "visTypeGauge"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeGauge plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge']
---
import visTypeGaugeObj from './vis_type_gauge.devdocs.json';
diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx
index 32a96558c72f8..1ea7a1e4b9250 100644
--- a/api_docs/vis_type_heatmap.mdx
+++ b/api_docs/vis_type_heatmap.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap
title: "visTypeHeatmap"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeHeatmap plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap']
---
import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json';
diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx
index 827eb1f6f0969..3ffea5a4f58e6 100644
--- a/api_docs/vis_type_pie.mdx
+++ b/api_docs/vis_type_pie.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie
title: "visTypePie"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypePie plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie']
---
import visTypePieObj from './vis_type_pie.devdocs.json';
diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx
index d9fc5b663679c..414b4de0b2363 100644
--- a/api_docs/vis_type_table.mdx
+++ b/api_docs/vis_type_table.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable
title: "visTypeTable"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeTable plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable']
---
import visTypeTableObj from './vis_type_table.devdocs.json';
diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx
index e8dfbf76d6ffa..9306f4a52fd35 100644
--- a/api_docs/vis_type_timelion.mdx
+++ b/api_docs/vis_type_timelion.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion
title: "visTypeTimelion"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeTimelion plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion']
---
import visTypeTimelionObj from './vis_type_timelion.devdocs.json';
diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx
index c962200fe1fdc..8d5ffda6491b3 100644
--- a/api_docs/vis_type_timeseries.mdx
+++ b/api_docs/vis_type_timeseries.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries
title: "visTypeTimeseries"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeTimeseries plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries']
---
import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json';
diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx
index abe648760bf12..9a7a8eb698283 100644
--- a/api_docs/vis_type_vega.mdx
+++ b/api_docs/vis_type_vega.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega
title: "visTypeVega"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeVega plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega']
---
import visTypeVegaObj from './vis_type_vega.devdocs.json';
diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx
index 4260c1aaeb253..443abb630d8da 100644
--- a/api_docs/vis_type_vislib.mdx
+++ b/api_docs/vis_type_vislib.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib
title: "visTypeVislib"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeVislib plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib']
---
import visTypeVislibObj from './vis_type_vislib.devdocs.json';
diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx
index f03c9b37afbb4..958b60a5150f5 100644
--- a/api_docs/vis_type_xy.mdx
+++ b/api_docs/vis_type_xy.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy
title: "visTypeXy"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visTypeXy plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy']
---
import visTypeXyObj from './vis_type_xy.devdocs.json';
diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json
index adc8f3022cb1a..befca8a834867 100644
--- a/api_docs/visualizations.devdocs.json
+++ b/api_docs/visualizations.devdocs.json
@@ -3042,7 +3042,7 @@
"label": "sharingSavedObjectProps",
"description": [],
"signature": [
- "{ outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined"
+ "{ outcome?: \"conflict\" | \"exactMatch\" | \"aliasMatch\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined"
],
"path": "src/plugins/visualizations/public/types.ts",
"deprecated": false,
@@ -9284,6 +9284,203 @@
],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration",
+ "type": "Interface",
+ "tags": [],
+ "label": "MetricVisConfiguration",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.layerId",
+ "type": "string",
+ "tags": [],
+ "label": "layerId",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.layerType",
+ "type": "string",
+ "tags": [],
+ "label": "layerType",
+ "description": [],
+ "signature": [
+ "\"data\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.metricAccessor",
+ "type": "string",
+ "tags": [],
+ "label": "metricAccessor",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.secondaryMetricAccessor",
+ "type": "string",
+ "tags": [],
+ "label": "secondaryMetricAccessor",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.maxAccessor",
+ "type": "string",
+ "tags": [],
+ "label": "maxAccessor",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.breakdownByAccessor",
+ "type": "string",
+ "tags": [],
+ "label": "breakdownByAccessor",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.collapseFn",
+ "type": "string",
+ "tags": [],
+ "label": "collapseFn",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.subtitle",
+ "type": "string",
+ "tags": [],
+ "label": "subtitle",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.secondaryPrefix",
+ "type": "string",
+ "tags": [],
+ "label": "secondaryPrefix",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.progressDirection",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "progressDirection",
+ "description": [],
+ "signature": [
+ "LayoutDirection",
+ " | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.color",
+ "type": "string",
+ "tags": [],
+ "label": "color",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.palette",
+ "type": "Object",
+ "tags": [],
+ "label": "palette",
+ "description": [],
+ "signature": [
+ "PaletteOutput",
+ "<",
+ "CustomPaletteParams",
+ "> | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.MetricVisConfiguration.maxCols",
+ "type": "number",
+ "tags": [],
+ "label": "maxCols",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "visualizations",
"id": "def-common.MovingAverageParams",
@@ -9332,100 +9529,393 @@
"children": [
{
"parentPluginId": "visualizations",
- "id": "def-common.NavigateToLensContext.layers",
- "type": "Array",
+ "id": "def-common.NavigateToLensContext.layers",
+ "type": "Array",
+ "tags": [],
+ "label": "layers",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "visualizations",
+ "scope": "common",
+ "docId": "kibVisualizationsPluginApi",
+ "section": "def-common.Layer",
+ "text": "Layer"
+ },
+ "[]"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.NavigateToLensContext.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.NavigateToLensContext.configuration",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "configuration",
+ "description": [],
+ "signature": [
+ "T"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.NavigateToLensContext.indexPatternIds",
+ "type": "Array",
+ "tags": [],
+ "label": "indexPatternIds",
+ "description": [],
+ "signature": [
+ "string[]"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/context.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.NumberValueFormat",
+ "type": "Interface",
+ "tags": [],
+ "label": "NumberValueFormat",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.NumberValueFormat.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.NumberValueFormat.params",
+ "type": "Object",
+ "tags": [],
+ "label": "params",
+ "description": [],
+ "signature": [
+ "{ decimals: number; suffix?: string | undefined; } | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PagingState",
+ "type": "Interface",
+ "tags": [],
+ "label": "PagingState",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PagingState.size",
+ "type": "number",
+ "tags": [],
+ "label": "size",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PagingState.enabled",
+ "type": "boolean",
+ "tags": [],
+ "label": "enabled",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState",
+ "type": "Interface",
+ "tags": [],
+ "label": "PartitionLayerState",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.layerId",
+ "type": "string",
+ "tags": [],
+ "label": "layerId",
+ "description": [],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.layerType",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "layerType",
+ "description": [],
+ "signature": [
+ "\"data\" | \"referenceLine\" | \"annotations\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.primaryGroups",
+ "type": "Array",
+ "tags": [],
+ "label": "primaryGroups",
+ "description": [],
+ "signature": [
+ "string[]"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.secondaryGroups",
+ "type": "Array",
+ "tags": [],
+ "label": "secondaryGroups",
+ "description": [],
+ "signature": [
+ "string[] | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.metric",
+ "type": "string",
+ "tags": [],
+ "label": "metric",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.collapseFns",
+ "type": "Object",
+ "tags": [],
+ "label": "collapseFns",
+ "description": [],
+ "signature": [
+ "Record | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.numberDisplay",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "numberDisplay",
+ "description": [],
+ "signature": [
+ "\"value\" | \"percent\" | \"hidden\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.categoryDisplay",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "categoryDisplay",
+ "description": [],
+ "signature": [
+ "\"default\" | \"hide\" | \"inside\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.legendDisplay",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "legendDisplay",
+ "description": [],
+ "signature": [
+ "\"default\" | \"hide\" | \"show\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.legendPosition",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "legendPosition",
+ "description": [],
+ "signature": [
+ "Position",
+ " | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.showValuesInLegend",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "showValuesInLegend",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionLayerState.nestedLegend",
+ "type": "CompoundType",
"tags": [],
- "label": "layers",
+ "label": "nestedLegend",
"description": [],
"signature": [
- {
- "pluginId": "visualizations",
- "scope": "common",
- "docId": "kibVisualizationsPluginApi",
- "section": "def-common.Layer",
- "text": "Layer"
- },
- "[]"
+ "boolean | undefined"
],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/context.ts",
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "visualizations",
- "id": "def-common.NavigateToLensContext.type",
- "type": "string",
+ "id": "def-common.PartitionLayerState.percentDecimals",
+ "type": "number",
"tags": [],
- "label": "type",
+ "label": "percentDecimals",
"description": [],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/context.ts",
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "visualizations",
- "id": "def-common.NavigateToLensContext.configuration",
- "type": "Uncategorized",
+ "id": "def-common.PartitionLayerState.emptySizeRatio",
+ "type": "number",
"tags": [],
- "label": "configuration",
+ "label": "emptySizeRatio",
"description": [],
"signature": [
- "T"
+ "number | undefined"
],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/context.ts",
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "visualizations",
- "id": "def-common.NavigateToLensContext.indexPatternIds",
- "type": "Array",
+ "id": "def-common.PartitionLayerState.legendMaxLines",
+ "type": "number",
"tags": [],
- "label": "indexPatternIds",
+ "label": "legendMaxLines",
"description": [],
"signature": [
- "string[]"
+ "number | undefined"
],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/context.ts",
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
"deprecated": false,
"trackAdoption": false
- }
- ],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "visualizations",
- "id": "def-common.NumberValueFormat",
- "type": "Interface",
- "tags": [],
- "label": "NumberValueFormat",
- "description": [],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
+ },
{
"parentPluginId": "visualizations",
- "id": "def-common.NumberValueFormat.id",
- "type": "string",
+ "id": "def-common.PartitionLayerState.legendSize",
+ "type": "CompoundType",
"tags": [],
- "label": "id",
+ "label": "legendSize",
"description": [],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts",
+ "signature": [
+ {
+ "pluginId": "visualizations",
+ "scope": "common",
+ "docId": "kibVisualizationsPluginApi",
+ "section": "def-common.LegendSize",
+ "text": "LegendSize"
+ },
+ " | undefined"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "visualizations",
- "id": "def-common.NumberValueFormat.params",
- "type": "Object",
+ "id": "def-common.PartitionLayerState.truncateLegend",
+ "type": "CompoundType",
"tags": [],
- "label": "params",
+ "label": "truncateLegend",
"description": [],
"signature": [
- "{ decimals: number; suffix?: string | undefined; } | undefined"
+ "boolean | undefined"
],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/common.ts",
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -9434,10 +9924,10 @@
},
{
"parentPluginId": "visualizations",
- "id": "def-common.PagingState",
+ "id": "def-common.PartitionVisConfiguration",
"type": "Interface",
"tags": [],
- "label": "PagingState",
+ "label": "PartitionVisConfiguration",
"description": [],
"path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
"deprecated": false,
@@ -9445,22 +9935,50 @@
"children": [
{
"parentPluginId": "visualizations",
- "id": "def-common.PagingState.size",
- "type": "number",
+ "id": "def-common.PartitionVisConfiguration.shape",
+ "type": "CompoundType",
"tags": [],
- "label": "size",
+ "label": "shape",
"description": [],
+ "signature": [
+ "\"pie\" | \"donut\" | \"treemap\" | \"mosaic\" | \"waffle\""
+ ],
"path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "visualizations",
- "id": "def-common.PagingState.enabled",
- "type": "boolean",
+ "id": "def-common.PartitionVisConfiguration.layers",
+ "type": "Array",
"tags": [],
- "label": "enabled",
+ "label": "layers",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "visualizations",
+ "scope": "common",
+ "docId": "kibVisualizationsPluginApi",
+ "section": "def-common.PartitionLayerState",
+ "text": "PartitionLayerState"
+ },
+ "[]"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionVisConfiguration.palette",
+ "type": "Object",
+ "tags": [],
+ "label": "palette",
"description": [],
+ "signature": [
+ "PaletteOutput",
+ "<{ [key: string]: unknown; }> | undefined"
+ ],
"path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
"deprecated": false,
"trackAdoption": false
@@ -11810,6 +12328,21 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.CategoryDisplayType",
+ "type": "Type",
+ "tags": [],
+ "label": "CategoryDisplayType",
+ "description": [],
+ "signature": [
+ "\"default\" | \"hide\" | \"inside\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "visualizations",
"id": "def-common.Column",
@@ -11891,6 +12424,22 @@
"docId": "kibVisualizationsPluginApi",
"section": "def-common.TableVisConfiguration",
"text": "TableVisConfiguration"
+ },
+ " | ",
+ {
+ "pluginId": "visualizations",
+ "scope": "common",
+ "docId": "kibVisualizationsPluginApi",
+ "section": "def-common.PartitionVisConfiguration",
+ "text": "PartitionVisConfiguration"
+ },
+ " | ",
+ {
+ "pluginId": "visualizations",
+ "scope": "common",
+ "docId": "kibVisualizationsPluginApi",
+ "section": "def-common.MetricVisConfiguration",
+ "text": "MetricVisConfiguration"
}
],
"path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
@@ -12327,6 +12876,36 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.LayerType",
+ "type": "Type",
+ "tags": [],
+ "label": "LayerType",
+ "description": [],
+ "signature": [
+ "\"data\" | \"referenceLine\" | \"annotations\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.LegendDisplayType",
+ "type": "Type",
+ "tags": [],
+ "label": "LegendDisplayType",
+ "description": [],
+ "signature": [
+ "\"default\" | \"hide\" | \"show\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "visualizations",
"id": "def-common.MaxColumn",
@@ -12510,6 +13089,21 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.NumberDisplayType",
+ "type": "Type",
+ "tags": [],
+ "label": "NumberDisplayType",
+ "description": [],
+ "signature": [
+ "\"value\" | \"percent\" | \"hidden\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "visualizations",
"id": "def-common.Operation",
@@ -12555,6 +13149,21 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionChartType",
+ "type": "Type",
+ "tags": [],
+ "label": "PartitionChartType",
+ "description": [],
+ "signature": [
+ "\"pie\" | \"donut\" | \"treemap\" | \"mosaic\" | \"waffle\""
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "visualizations",
"id": "def-common.PercentileColumn",
@@ -13005,6 +13614,21 @@
}
],
"objects": [
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.CategoryDisplayTypes",
+ "type": "Object",
+ "tags": [],
+ "label": "CategoryDisplayTypes",
+ "description": [],
+ "signature": [
+ "{ readonly DEFAULT: \"default\"; readonly INSIDE: \"inside\"; readonly HIDE: \"hide\"; }"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "visualizations",
"id": "def-common.FillTypes",
@@ -13015,7 +13639,37 @@
"signature": [
"{ readonly NONE: \"none\"; readonly ABOVE: \"above\"; readonly BELOW: \"below\"; }"
],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.LayerTypes",
+ "type": "Object",
+ "tags": [],
+ "label": "LayerTypes",
+ "description": [],
+ "signature": [
+ "{ readonly DATA: \"data\"; readonly REFERENCELINE: \"referenceLine\"; readonly ANNOTATIONS: \"annotations\"; }"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.LegendDisplayTypes",
+ "type": "Object",
+ "tags": [],
+ "label": "LegendDisplayTypes",
+ "description": [],
+ "signature": [
+ "{ readonly DEFAULT: \"default\"; readonly SHOW: \"show\"; readonly HIDE: \"hide\"; }"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
@@ -13035,6 +13689,21 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.NumberDisplayTypes",
+ "type": "Object",
+ "tags": [],
+ "label": "NumberDisplayTypes",
+ "description": [],
+ "signature": [
+ "{ readonly HIDDEN: \"hidden\"; readonly PERCENT: \"percent\"; readonly VALUE: \"value\"; }"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "visualizations",
"id": "def-common.Operations",
@@ -13080,6 +13749,21 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "visualizations",
+ "id": "def-common.PartitionChartTypes",
+ "type": "Object",
+ "tags": [],
+ "label": "PartitionChartTypes",
+ "description": [],
+ "signature": [
+ "{ readonly PIE: \"pie\"; readonly DONUT: \"donut\"; readonly TREEMAP: \"treemap\"; readonly MOSAIC: \"mosaic\"; readonly WAFFLE: \"waffle\"; }"
+ ],
+ "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "visualizations",
"id": "def-common.RANGE_MODES",
@@ -13105,7 +13789,7 @@
"signature": [
"{ readonly BAR: \"bar\"; readonly LINE: \"line\"; readonly AREA: \"area\"; readonly BAR_STACKED: \"bar_stacked\"; readonly AREA_STACKED: \"area_stacked\"; readonly BAR_HORIZONTAL: \"bar_horizontal\"; readonly BAR_PERCENTAGE_STACKED: \"bar_percentage_stacked\"; readonly BAR_HORIZONTAL_STACKED: \"bar_horizontal_stacked\"; readonly AREA_PERCENTAGE_STACKED: \"area_percentage_stacked\"; readonly BAR_HORIZONTAL_PERCENTAGE_STACKED: \"bar_horizontal_percentage_stacked\"; }"
],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
@@ -13120,7 +13804,7 @@
"signature": [
"{ readonly LINEAR: \"LINEAR\"; readonly CURVE_MONOTONE_X: \"CURVE_MONOTONE_X\"; readonly CURVE_STEP_AFTER: \"CURVE_STEP_AFTER\"; }"
],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
@@ -13135,7 +13819,7 @@
"signature": [
"{ readonly AUTO: \"auto\"; readonly LEFT: \"left\"; readonly RIGHT: \"right\"; readonly BOTTOM: \"bottom\"; }"
],
- "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts",
+ "path": "src/plugins/visualizations/common/convert_to_lens/constants.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx
index c4ea2e6c61e76..4c4afd430bceb 100644
--- a/api_docs/visualizations.mdx
+++ b/api_docs/visualizations.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations
title: "visualizations"
image: https://source.unsplash.com/400x175/?github
description: API docs for the visualizations plugin
-date: 2022-09-27
+date: 2022-10-04
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations']
---
import visualizationsObj from './visualizations.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Vis Editors](https://github.com/orgs/elastic/teams/kibana-vis-editors)
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 679 | 12 | 649 | 18 |
+| 725 | 12 | 695 | 18 |
## Client
diff --git a/docs/api-generated/machine-learning/ml-apis.asciidoc b/docs/api-generated/machine-learning/ml-apis.asciidoc
index 3482109d4ab3e..60aff48267f0c 100644
--- a/docs/api-generated/machine-learning/ml-apis.asciidoc
+++ b/docs/api-generated/machine-learning/ml-apis.asciidoc
@@ -1,4 +1,4 @@
-[[machine-learning-api]]
+[[machine-learning-apis]]
== Machine learning APIs
preview::[]
diff --git a/docs/api/data-views/update.asciidoc b/docs/api/data-views/update.asciidoc
index c1473b8f7079b..790656e6d6057 100644
--- a/docs/api/data-views/update.asciidoc
+++ b/docs/api/data-views/update.asciidoc
@@ -39,6 +39,7 @@ the data view is updated. The default is `false`.
You can partially update the following fields:
* `title`
+* `name`
* `timeFieldName`
* `fields`
* `sourceFilters`
@@ -93,6 +94,7 @@ $ curl -X POST api/data_views/data-view/my-view
{
"data_view": {
"title": "...",
+ "name": "...",
"timeFieldName": "...",
"sourceFilters": [],
"fieldFormats": {},
diff --git a/docs/api/index-patterns/update.asciidoc b/docs/api/index-patterns/update.asciidoc
index 64479f00ef5c5..809c01500b7f9 100644
--- a/docs/api/index-patterns/update.asciidoc
+++ b/docs/api/index-patterns/update.asciidoc
@@ -38,6 +38,7 @@ the index pattern is updated. The default is `false`.
You can partially update the following fields:
* `title`
+* `name`
* `timeFieldName`
* `fields`
* `sourceFilters`
@@ -90,6 +91,7 @@ $ curl -X POST api/index_patterns/index-pattern/my-pattern
{
"index_pattern": {
"title": "...",
+ "name": "...",
"timeFieldName": "...",
"sourceFilters": [],
"fieldFormats": {},
diff --git a/docs/api/machine-learning/ml_apis_v2_defs.asciidoc b/docs/api/machine-learning/ml_apis_v2_defs.asciidoc
deleted file mode 100644
index 691557bfb9634..0000000000000
--- a/docs/api/machine-learning/ml_apis_v2_defs.asciidoc
+++ /dev/null
@@ -1,240 +0,0 @@
-[[Machine_learning_APIs-definitions]]
-== Definitions
-
-* <>
-* <>
-* <>
-* <>
-* <>
-* <>
-
-[[MLSyncResponse]]
-=== `MLSyncResponse`
-
-The sync machine learning saved objects API returns this list of machine learning saved objects that required synchronization.
-
-
-==== Properties
-
-`datafeedsAdded` (++map[string,++<>++]++)::
-If a saved object for an anomaly detection job is missing a datafeed identifier, it is added when you run the sync machine learning saved objects API.
-
-
-`datafeedsRemoved` (++map[string,++<>++]++)::
-If a saved object for an anomaly detection job references a datafeed that no longer exists, it is deleted when you run the sync machine learning saved objects API.
-
-
-`savedObjectsCreated` (<>)::
-If saved objects are missing for machine learning jobs or trained models, they are created when you run the sync machine learning saved objects API.
-
-
-`savedObjectsDeleted` (<>)::
-If saved objects exist for machine learning jobs or trained models that no longer exist, they are deleted when you run the sync machine learning saved objects API.
-
-
-==== Example
-
-[source,json]
---------
-{
- "datafeedsAdded" : {
- "some_property" : {
- "success" : true
- }
- },
- "datafeedsRemoved" : {
- "some_property" : {
- "success" : true
- }
- },
- "savedObjectsCreated" : {
- "anomaly-detector" : {
- "some_property" : {
- "success" : true
- }
- },
- "data-frame-analytics" : {
- "some_property" : {
- "success" : true
- }
- },
- "trained-model" : {
- "some_property" : {
- "success" : true
- }
- }
- },
- "savedObjectsDeleted" : {
- "anomaly-detector" : {
- "some_property" : {
- "success" : true
- }
- },
- "data-frame-analytics" : {
- "some_property" : {
- "success" : true
- }
- },
- "trained-model" : {
- "some_property" : {
- "success" : true
- }
- }
- }
-}
-
---------
-
-[[MLSyncResponse-Datafeeds]]
-=== `MLSyncResponse-Datafeeds`
-
-The sync machine learning saved objects API response contains this object when there are datafeeds affected by the synchronization. There is an object for each relevant datafeed, which contains the synchronization status.
-
-
-==== Properties
-
-`success` (+boolean+)::
-The success or failure of the synchronization.
-
-
-==== Example
-
-[source,json]
---------
-{
- "success" : true
-}
-
---------
-
-[[MLSyncResponse-Jobs]]
-=== `MLSyncResponse-Jobs`
-
-The sync machine learning saved objects API response contains this object when there are machine learning jobs affected by the synchronization. There is an object for each relevant job, which contains the synchronization status.
-
-
-==== Properties
-
-`success` (+boolean+)::
-The success or failure of the synchronization.
-
-
-==== Example
-
-[source,json]
---------
-{
- "success" : true
-}
-
---------
-
-[[MLSyncResponse-Models]]
-=== `MLSyncResponse-Models`
-
-The sync machine learning saved objects API response contains this object when there are trained models affected by the synchronization. There is an object for each relevant trained model, which contains the synchronization status.
-
-
-==== Properties
-
-`success` (+boolean+)::
-The success or failure of the synchronization.
-
-
-==== Example
-
-[source,json]
---------
-{
- "success" : true
-}
-
---------
-
-[[MLSyncResponse-SavedObjectsCreated]]
-=== `MLSyncResponse-SavedObjectsCreated`
-
-If saved objects are missing for machine learning jobs or trained models, they are created when you run the sync machine learning saved objects API.
-
-
-==== Properties
-
-`anomaly-detector` (++map[string,++<>++]++)::
-This object is present if there are anomaly detection jobs affected by the synchronization.
-
-
-`data-frame-analytics` (++map[string,++<>++]++)::
-This object is present if there are data frame analytics jobs affected by the synchronization.
-
-
-`trained-model` (++map[string,++<>++]++)::
-This object is present if there are trained models affected by the synchronization.
-
-
-==== Example
-
-[source,json]
---------
-{
- "anomaly-detector" : {
- "some_property" : {
- "success" : true
- }
- },
- "data-frame-analytics" : {
- "some_property" : {
- "success" : true
- }
- },
- "trained-model" : {
- "some_property" : {
- "success" : true
- }
- }
-}
-
---------
-
-[[MLSyncResponse-SavedObjectsDeleted]]
-=== `MLSyncResponse-SavedObjectsDeleted`
-
-If saved objects exist for machine learning jobs or trained models that no longer exist, they are deleted when you run the sync machine learning saved objects API.
-
-
-==== Properties
-
-`anomaly-detector` (++map[string,++<>++]++)::
-This object is present if there are anomaly detection jobs affected by the synchronization.
-
-
-`data-frame-analytics` (++map[string,++<>++]++)::
-This object is present if there are data frame analytics jobs affected by the synchronization.
-
-
-`trained-model` (++map[string,++<>++]++)::
-This object is present if there are trained models affected by the synchronization.
-
-
-==== Example
-
-[source,json]
---------
-{
- "anomaly-detector" : {
- "some_property" : {
- "success" : true
- }
- },
- "data-frame-analytics" : {
- "some_property" : {
- "success" : true
- }
- },
- "trained-model" : {
- "some_property" : {
- "success" : true
- }
- }
-}
-
---------
diff --git a/docs/api/machine-learning/ml_apis_v2_docs.asciidoc b/docs/api/machine-learning/ml_apis_v2_docs.asciidoc
deleted file mode 100644
index f4a01cad94206..0000000000000
--- a/docs/api/machine-learning/ml_apis_v2_docs.asciidoc
+++ /dev/null
@@ -1,49 +0,0 @@
-[[Machine_learning_APIs]]
-== Machine learning APIs
-
-* <>
-
-[[ml-sync]]
-=== Sync machine learning objects
-
-Synchronizes Kibana saved objects for machine learning jobs and trained models. You must have `all` privileges for the *Machine Learning* feature in the *Analytics* section of the Kibana feature privileges. This API runs automatically when you start Kibana and periodically thereafter.
-
-
-==== Request
-
-`GET /s/{spaceId}/api/ml/saved_objects/sync`
-
-==== Path parameters
-
-[options="header"]
-|==========
-|Name |Type |Required |Description
-|`spaceId` |+string+ |Y |An identifier for the space. If you omit `/s/` and this identifier from the path, the default space is used.
-
-|==========
-==== Query parameters
-
-[options="header"]
-|==========
-|Name |Type |Required |Description
-|`simulate` |+boolean+; default: ++false++ |N |When true, simulates the synchronization by returning only the list actions that would be performed.
-
-|==========
-==== Responses
-
-`200`::
-+
---
-(<>)
-
-Indicates a successful call.
-
---
-
-==== Request example
-
-[source,json]
---------
-curl -XGET https://localhost:5601/s/{spaceId}/api/ml/saved_objects/sync \
--u USER:PASSWORD
---------
\ No newline at end of file
diff --git a/docs/api/machine-learning/sync.asciidoc b/docs/api/machine-learning/sync.asciidoc
new file mode 100644
index 0000000000000..af4f797ade1f2
--- /dev/null
+++ b/docs/api/machine-learning/sync.asciidoc
@@ -0,0 +1,95 @@
+[[machine-learning-api-sync]]
+=== Sync {ml} saved objects API
+++++
+Sync {ml} saved objects
+++++
+
+Synchronizes {kib} saved objects for {ml} jobs and trained models.
+
+[NOTE]
+====
+For the most up-to-date API details, refer to the
+{kib-repo}/tree/{branch}/x-pack/plugins/ml/common/openapi[open API specification]. For a preview, check out <>.
+====
+
+[[machine-learning-api-sync-request]]
+==== {api-request-title}
+
+`GET :/api/ml/saved_objects/sync`
+
+`GET :/s//api/ml/saved_objects/sync`
+
+[[machine-learning-api-sync-prereq]]
+==== {api-prereq-title}
+
+You must have `all` privileges for the *Machine Learning* feature in the *Analytics* section of the
+<>.
+
+[[machine-learning-api-sync-desc]]
+==== {api-description-title}
+
+This API runs automatically when you start {kib} and periodically thereafter.
+
+[[machine-learning-api-sync-path-params]]
+==== {api-path-parms-title}
+
+`space_id`::
+(Optional, string) An identifier for the space. If `space_id` is not provided in
+the URL the default space is used.
+
+[[machine-learning-api-sync-query-params]]
+==== {api-query-parms-title}
+
+`simulate`::
+(Optional, boolean) When `true`, simulates the synchronization by only returning
+the list actions that _would_ be performed.
+
+[[machine-learning-api-sync-response-body]]
+==== {api-response-body-title}
+
+`datafeedsAdded`::
+(array) If a saved object for an {anomaly-job} is missing a {dfeed} identifier,
+it is added. This list contains the {dfeed} identifiers and indicates whether
+the synchronization was successful.
+
+`datafeedsRemoved`::
+(array) If a saved object for an anomaly detection job references a datafeed
+that no longer exists, it is deleted. This list contains the {dfeed} identifiers
+and indicates whether the synchronization was successful.
+
+`savedObjectsCreated`::
+(array) If saved objects are missing for {ml} jobs or trained models, they are
+created. This list contains the job and model identifiers and indicates whether
+the synchronization was successful.
+
+`savedObjectsDeleted`::
+(array) If saved objects exist for {ml} jobs or trained models that no longer
+exist, they are deleted. This list contains the job and model identifiers and
+indicates whether the synchronization was successful.
+
+[[machine-learning-api-sync-codes]]
+==== {api-response-codes-title}
+
+`200`::
+ Indicates a successful call.
+
+[[machine-learning-api-sync-example]]
+==== {api-examples-title}
+
+Retrieve the list of {ml} saved objects that require synchronization:
+
+[source,sh]
+--------------------------------------------------
+GET api/ml/saved_objects/sync?simulate=true
+--------------------------------------------------
+// KIBANA
+
+If there are two jobs that need to be synchronized, for example, the API returns
+the following response:
+
+[source,sh]
+--------------------------------------------------
+{"savedObjectsCreated":{"anomaly_detector":{"myjob1":{"success":true},"myjob2":{"success":true}}},"savedObjectsDeleted":{},"datafeedsAdded":{},"datafeedsRemoved":{}}
+--------------------------------------------------
+
+To perform the synchronization, re-run the API and omit the `simulate` parameter.
\ No newline at end of file
diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc
index f4fc9c67508ef..407261c6f1d7e 100644
--- a/docs/developer/plugin-list.asciidoc
+++ b/docs/developer/plugin-list.asciidoc
@@ -424,10 +424,22 @@ The plugin exposes the static DefaultEditorController class to consume.
|The cloud plugin adds Cloud-specific features to Kibana.
+|{kib-repo}blob/{branch}/x-pack/plugins/cloud_integrations/cloud_chat/README.md[cloudChat]
+|Integrates with DriftChat in order to provide live support to our Elastic Cloud users. This plugin should only run on Elastic Cloud.
+
+
|{kib-repo}blob/{branch}/x-pack/plugins/cloud_integrations/cloud_experiments/README.mdx[cloudExperiments]
|The Cloud Experiments Service provides the necessary APIs to implement A/B testing scenarios, fetching the variations in configuration and reporting back metrics to track conversion rates of the experiments.
+|{kib-repo}blob/{branch}/x-pack/plugins/cloud_integrations/cloud_full_story/README.md[cloudFullStory]
+|Integrates with FullStory in order to provide better product analytics, so we can understand how our users make use of Kibana. This plugin should only run on Elastic Cloud.
+
+
+|{kib-repo}blob/{branch}/x-pack/plugins/cloud_integrations/cloud_links/README.md[cloudLinks]
+|Adds all the links to the Elastic Cloud console.
+
+
|{kib-repo}blob/{branch}/x-pack/plugins/cloud_security_posture/README.md[cloudSecurityPosture]
|Cloud Posture automates the identification and remediation of risks across cloud infrastructures
diff --git a/docs/management/connectors/action-types/servicenow-itom.asciidoc b/docs/management/connectors/action-types/servicenow-itom.asciidoc
index 07ede3ef0d3cb..609ac85c931b6 100644
--- a/docs/management/connectors/action-types/servicenow-itom.asciidoc
+++ b/docs/management/connectors/action-types/servicenow-itom.asciidoc
@@ -6,7 +6,7 @@
The {sn-itom} connector uses the
https://docs.servicenow.com/bundle/rome-it-operations-management/page/product/event-management/task/send-events-via-web-service.html[event API]
-to create {sn} events.
+to create {sn} events. You can use the connector for rule actions.
[float]
[[servicenow-itom-connector-prerequisites]]
diff --git a/docs/management/connectors/action-types/servicenow-sir.asciidoc b/docs/management/connectors/action-types/servicenow-sir.asciidoc
index 06639a077bf89..44c034cd35f61 100644
--- a/docs/management/connectors/action-types/servicenow-sir.asciidoc
+++ b/docs/management/connectors/action-types/servicenow-sir.asciidoc
@@ -6,7 +6,7 @@
The {sn-sir} connector uses the
https://developer.servicenow.com/dev.do#!/reference/api/sandiego/rest/c_ImportSetAPI[import set API]
-to create {sn} security incidents.
+to create {sn} security incidents. You can use the connector for rule actions and cases.
[float]
[[servicenow-sir-connector-prerequisites]]
diff --git a/docs/management/connectors/action-types/servicenow.asciidoc b/docs/management/connectors/action-types/servicenow.asciidoc
index 613935a7ac4d0..658532d1226f9 100644
--- a/docs/management/connectors/action-types/servicenow.asciidoc
+++ b/docs/management/connectors/action-types/servicenow.asciidoc
@@ -6,7 +6,7 @@
The {sn-itsm} connector uses the
https://developer.servicenow.com/dev.do#!/reference/api/sandiego/rest/c_ImportSetAPI[import set API]
-to create {sn} incidents.
+to create {sn} incidents. You can use the connector for rule actions and cases.
[float]
[[servicenow-itsm-connector-prerequisites]]
diff --git a/docs/osquery/images/live-query-check-results.png b/docs/osquery/images/live-query-check-results.png
index cd1362e7e977d..6b84a3bf9f7ca 100644
Binary files a/docs/osquery/images/live-query-check-results.png and b/docs/osquery/images/live-query-check-results.png differ
diff --git a/docs/osquery/osquery.asciidoc b/docs/osquery/osquery.asciidoc
index 66edbc95526eb..e854904b6baf4 100644
--- a/docs/osquery/osquery.asciidoc
+++ b/docs/osquery/osquery.asciidoc
@@ -61,12 +61,11 @@ TIP: To save a single query for future use, click *Save for later* and define th
[[osquery-view-history]]
== View or rerun previous live queries
-The *Live queries history* section on the *Live queries* tab shows a log of queries run over the last 30 days.
-Each query has the following options:
+The *Live queries history* section on the *Live queries* tab shows a log of queries run over the last 30 days. From the Live queries table, you can:
-* Click image:images/play-icon.png[Right-pointing triangle] to rerun a query.
+* Click the run icon (image:images/play-icon.png[Right-pointing triangle]) to rerun a single query or a query pack.
-* Click image:images/table-icon.png[Table icon] to view the query <> and <>.
+* Click the table icon (image:images/table-icon.png[Table icon]) to examine the <> for a single query or a query pack. From the results table, you can also find the query <>.
+
[role="screenshot"]
image::images/live-query-check-results.png[Results of OSquery]
diff --git a/docs/redirects.asciidoc b/docs/redirects.asciidoc
index 5c12048315dec..fe1f3b9521cf2 100644
--- a/docs/redirects.asciidoc
+++ b/docs/redirects.asciidoc
@@ -416,7 +416,7 @@ This page has been deleted. Refer to <>.
This page has been deleted. Refer to <>.
-[role="exclude",id="machine-learning-api-sync"]
-== Sync machine learning saved objects API
+[role="exclude",id="ml-sync"]
+== Sync machine learning objects API
-This page has been deleted. Refer to <>.
+This page has been deleted. Refer to <>.
\ No newline at end of file
diff --git a/docs/user/alerting/alerting-setup.asciidoc b/docs/user/alerting/alerting-setup.asciidoc
index 819f20005d7a4..36c8b46e7b801 100644
--- a/docs/user/alerting/alerting-setup.asciidoc
+++ b/docs/user/alerting/alerting-setup.asciidoc
@@ -98,3 +98,10 @@ user without those privileges updates the rule, the rule will no longer
function. Conversely, if a user with greater or administrator privileges
modifies the rule, it will begin running with increased privileges.
==============================================
+
+[float]
+[[alerting-ccs-setup]]
+=== {ccs-cap}
+
+If you want to use alerting rules with {ccs}, you must configure
+{ref}/remote-clusters-privileges.html#clusters-privileges-ccs-kibana[privileges for {ccs-init} and {kib}].
\ No newline at end of file
diff --git a/docs/user/api.asciidoc b/docs/user/api.asciidoc
index 8f55645e5b910..aa567487b296a 100644
--- a/docs/user/api.asciidoc
+++ b/docs/user/api.asciidoc
@@ -100,8 +100,7 @@ include::{kib-repo-dir}/api/actions-and-connectors.asciidoc[]
include::{kib-repo-dir}/api/cases.asciidoc[]
include::{kib-repo-dir}/api/dashboard-api.asciidoc[]
include::{kib-repo-dir}/api/logstash-configuration-management.asciidoc[]
-include::{kib-repo-dir}/api/machine-learning/ml_apis_v2_docs.asciidoc[]
-include::{kib-repo-dir}/api/machine-learning/ml_apis_v2_defs.asciidoc[leveloffset=+1]
+include::{kib-repo-dir}/api/machine-learning.asciidoc[]
include::{kib-repo-dir}/api/osquery-manager.asciidoc[]
include::{kib-repo-dir}/api/short-urls.asciidoc[]
include::{kib-repo-dir}/api/task-manager/health.asciidoc[]
diff --git a/docs/user/dashboard/images/dashboard_timeSliderControl_8.5.0.gif b/docs/user/dashboard/images/dashboard_timeSliderControl_8.5.0.gif
new file mode 100644
index 0000000000000..89ca09dccc71e
Binary files /dev/null and b/docs/user/dashboard/images/dashboard_timeSliderControl_8.5.0.gif differ
diff --git a/docs/user/dashboard/images/dashboard_timeSliderControl_advanceBackward_8.5.0.png b/docs/user/dashboard/images/dashboard_timeSliderControl_advanceBackward_8.5.0.png
new file mode 100644
index 0000000000000..e1c2e9921f687
Binary files /dev/null and b/docs/user/dashboard/images/dashboard_timeSliderControl_advanceBackward_8.5.0.png differ
diff --git a/docs/user/dashboard/images/dashboard_timeSliderControl_advanceForward_8.5.0.png b/docs/user/dashboard/images/dashboard_timeSliderControl_advanceForward_8.5.0.png
new file mode 100644
index 0000000000000..788621037cb07
Binary files /dev/null and b/docs/user/dashboard/images/dashboard_timeSliderControl_advanceForward_8.5.0.png differ
diff --git a/docs/user/dashboard/images/dashboard_timeSliderControl_animate_8.5.0.png b/docs/user/dashboard/images/dashboard_timeSliderControl_animate_8.5.0.png
new file mode 100644
index 0000000000000..63a93323d6a36
Binary files /dev/null and b/docs/user/dashboard/images/dashboard_timeSliderControl_animate_8.5.0.png differ
diff --git a/docs/user/dashboard/make-dashboards-interactive.asciidoc b/docs/user/dashboard/make-dashboards-interactive.asciidoc
index 7c80fa8588538..127c0a4a79e05 100644
--- a/docs/user/dashboard/make-dashboards-interactive.asciidoc
+++ b/docs/user/dashboard/make-dashboards-interactive.asciidoc
@@ -28,7 +28,7 @@ data-type="inline"
*Controls* are interactive panels you add to your dashboards to filter and display only the data you want to explore.
-There are two types of controls:
+There are three types of controls:
* *Options list* — Adds a dropdown that allows you to filter the data with one or more options that you select.
+
@@ -44,11 +44,17 @@ For example, if you are using the *[Logs] Web Traffic* dashboard from the sample
[role="screenshot"]
image::images/dashboard_controlsRangeSlider_8.3.0.png[Range slider control for the `hour_of_day` field with a range of `9` to `17` selected]
+* *Time slider* — Adds a time range slider that allows you to filter the data within a specified range of time, advance the time range backward and forward, and animate your change in data over the specified time range.
++
+For example, you are using the *[Logs] Web Traffic* dashboard from the sample web logs data, and the global time filter is *Last 7 days*. When you add the time slider, you can click the previous and next buttons to advance the time range backward or forward, and click the play button to watch how the data changes over the last 7 days.
+[role="screenshot"]
+image::images/dashboard_timeSliderControl_8.5.0.gif[Time slider control for the the Last 7 days]
+
[float]
-[[create-and-add-controls]]
-==== Create and add controls
+[[create-and-add-options-list-and-range-slider-controls]]
+==== Create and add Options list and Range slider controls
-To add interactive filters, create controls, then add them to your dashboard.
+To add interactive Options list and Range slider controls, create the controls, then add them to your dashboard.
. Open or create a new dashboard.
@@ -79,8 +85,22 @@ The *Control type* is automatically applied for the field you selected.
. Click *Save and close*.
[float]
-[[filter-the-data-with-options-lists]]
-==== Filter the data with Options lists
+[[add-time-slider-controls]]
+==== Add time slider controls
+
+To add interactive time slider controls, create the control, then add it to your dashboard.
+
+. Open or create a new dashboard.
+
+. In the dashboard toolbar, click *Controls*, then select *Add time slider control*.
+
+. The time slider control uses the time range from the global time filter. To change the time range in the time slider control, <>.
+
+. Save the dashboard.
+
+[float]
+[[filter-the-data-with-options-list-controls]]
+==== Filter the data with Options list controls
Filter the data with one or more options that you select.
. Open the Options list dropdown.
@@ -94,8 +114,8 @@ The dashboard displays only the data for the options you selected.
. To display only the options you selected in the dropdown, click image:images/dashboard_showOnlySelectedOptions_8.3.0.png[The icon to display only the options you have selected in the Options list].
[float]
-[[filter-the-data-with-range-sliders]]
-==== Filter the data with Range sliders
+[[filter-the-data-with-range-slider-controls]]
+==== Filter the data with Range slider controls
Filter the data within a specified range of values.
. On the Range slider, click a value.
@@ -106,6 +126,21 @@ The dashboard displays only the data for the range of values you specified.
. To clear the specified values, click image:images/dashboard_controlsClearSelections_8.3.0.png[The icon to clear all specified values in the Range slider].
+[float]
+[[filter-the-data-with-time-slider-controls]]
+==== Filter the data with time slider controls
+Filter the data within a specified range of time.
+
+. To view a different time range, click the time slider, then move the sliders to specify the time range you want to display.
+
+. To advance the time range forward, click image:images/dashboard_timeSliderControl_advanceForward_8.5.0.png[The icon to advance the time range forward].
+
+. To advance the time range backward, click image:images/dashboard_timeSliderControl_advanceBackward_8.5.0.png[The icon to advance the time range backward].
+
+. To animate the data changes over time, click image:images/dashboard_timeSliderControl_animate_8.5.0.png[The icon to clear all specified values in the Range slider].
+
+. To clear the specified values, click image:images/dashboard_controlsClearSelections_8.3.0.png[The icon to clear all specified values in the Range slider].
+
[float]
[[configure-controls-settings]]
==== Configure the controls settings
@@ -126,9 +161,9 @@ The dashboard displays only the data for the range of values you specified.
[float]
[[edit-controls]]
-==== Edit controls
+==== Edit Options list and Range slider control settings
-Change the settings for a control.
+Change the settings for the Options list and Range slider controls.
. Hover over the control you want to edit, then click image:images/dashboard_controlsEditControl_8.3.0.png[The Edit control icon that opens the Edit control flyout].
diff --git a/docs/user/ml/images/ml-log-pattern-analysis.png b/docs/user/ml/images/ml-log-pattern-analysis.png
new file mode 100644
index 0000000000000..0cf16105a11e9
Binary files /dev/null and b/docs/user/ml/images/ml-log-pattern-analysis.png differ
diff --git a/docs/user/ml/index.asciidoc b/docs/user/ml/index.asciidoc
index c58408d85d37b..7467d99ca22ef 100644
--- a/docs/user/ml/index.asciidoc
+++ b/docs/user/ml/index.asciidoc
@@ -118,8 +118,8 @@ Examine the histogram chart of the log rates for a given {data-source}, and find
the reason behind a particular change possibly in millions of log events across
multiple fields and values.
-You can find explain log rate spikes under **{ml-app}** > **AIOps** where you
-can select the {data-source} or saved search that you want to analyze.
+You can find explain log rate spikes under **{ml-app}** > **AIOps Labs** where
+you can select the {data-source} or saved search that you want to analyze.
[role="screenshot"]
image::user/ml/images/ml-explain-log-rate-before.png[Log event histogram chart]
@@ -142,3 +142,27 @@ deviation and rerun the analysis with the modified values.
[role="screenshot"]
image::user/ml/images/ml-explain-log-rate.png[Log rate spike explained]
+
+[discrete]
+[[log-pattern-analysis]]
+=== Log pattern analysis
+
+preview::[]
+
+Log pattern analysis helps you to find patterns in unstructured log messages and
+makes it easier to examine your data. It performs categorization analysis on a
+selected field of a {data-source}, creates categories based on the data and
+displays them together with a chart that shows the distribution of each category
+and an example document that matches the category.
+
+You can find log pattern analysis under **{ml-app}** > **AIOps Labs** where you
+can select the {data-source} or saved search that you want to analyze.
+
+[role="screenshot"]
+image::user/ml/images/ml-log-pattern-analysis.png[Log pattern analysis UI]
+
+Select a field for categorization and optionally apply any filters that you
+want, then start the analysis. The analysis uses the same algorithms as a {ml}
+categorization job. The results of the analysis are shown in a table that makes
+it possible to open **Discover** and show or filter out the given category
+there, which helps you to further examine your log messages.
\ No newline at end of file
diff --git a/docs/user/reporting/script-example.asciidoc b/docs/user/reporting/script-example.asciidoc
index 1d8e824798e75..937e140bd67a0 100644
--- a/docs/user/reporting/script-example.asciidoc
+++ b/docs/user/reporting/script-example.asciidoc
@@ -3,7 +3,7 @@ URL that you use to download the report. Use the `GET` method in the HTTP reques
To queue CSV report generation using the `POST` URL with cURL:
-["source","sh",subs="attributes"]
+[source,curl]
---------------------------------------------------------
curl \
-XPOST \ <1>
@@ -11,7 +11,6 @@ curl \
-H 'kbn-xsrf: true' \ <3>
'http://0.0.0.0:5601/api/reporting/generate/csv?jobParams=...' <4>
---------------------------------------------------------
-// CONSOLE
<1> The required `POST` method.
<2> The user credentials for a user with permission to access {kib} and {report-features}.
@@ -20,7 +19,7 @@ curl \
An example response for a successfully queued report:
-[source,json]
+[source,js]
---------------------------------------------------------
{
"path": "/api/reporting/jobs/download/jxzaofkc0ykpf4062305t068", <1>
@@ -35,7 +34,6 @@ An example response for a successfully queued report:
}
}
---------------------------------------------------------
-// CONSOLE
<1> The relative path on the {kib} host for downloading the report.
<2> (Not included in the example) Internal representation of the reporting job, as found in the `.reporting-*` index.
diff --git a/docs/user/security/audit-logging.asciidoc b/docs/user/security/audit-logging.asciidoc
index ce1e63c20d1c6..5f6fe746814e5 100644
--- a/docs/user/security/audit-logging.asciidoc
+++ b/docs/user/security/audit-logging.asciidoc
@@ -325,6 +325,9 @@ Possible values:
| *Field*
| *Description*
+| `user.id`
+| Unique identifier of the user across sessions (See {ref}/user-profile.html[user profiles]).
+
| `user.name`
| Login name of the user.
diff --git a/examples/guided_onboarding_example/public/components/app.tsx b/examples/guided_onboarding_example/public/components/app.tsx
index dc8cbbdcfac83..a5252920c27fa 100755
--- a/examples/guided_onboarding_example/public/components/app.tsx
+++ b/examples/guided_onboarding_example/public/components/app.tsx
@@ -23,6 +23,7 @@ import { CoreStart, ScopedHistory } from '@kbn/core/public';
import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public/types';
import { StepTwo } from './step_two';
import { StepOne } from './step_one';
+import { StepThree } from './step_three';
import { Main } from './main';
interface GuidedOnboardingExampleAppDeps {
@@ -60,6 +61,9 @@ export const GuidedOnboardingExampleApp = (props: GuidedOnboardingExampleAppDeps
+
+
+
diff --git a/examples/guided_onboarding_example/public/components/main.tsx b/examples/guided_onboarding_example/public/components/main.tsx
index 157b13f1276c0..59e6fa3192402 100644
--- a/examples/guided_onboarding_example/public/components/main.tsx
+++ b/examples/guided_onboarding_example/public/components/main.tsx
@@ -25,45 +25,50 @@ import {
EuiText,
EuiTitle,
} from '@elastic/eui';
-import {
+import type {
GuidedOnboardingPluginStart,
- GuidedOnboardingState,
- UseCase,
+ GuideState,
+ GuideStepIds,
+ GuideId,
+ GuideStep,
} from '@kbn/guided-onboarding-plugin/public';
+import { guidesConfig } from '@kbn/guided-onboarding-plugin/public';
interface MainProps {
guidedOnboarding: GuidedOnboardingPluginStart;
notifications: CoreStart['notifications'];
}
+
export const Main = (props: MainProps) => {
const {
guidedOnboarding: { guidedOnboardingApi },
notifications,
} = props;
const history = useHistory();
- const [guideState, setGuideState] = useState(undefined);
+ const [guidesState, setGuidesState] = useState(undefined);
+ const [activeGuide, setActiveGuide] = useState(undefined);
- const [selectedGuide, setSelectedGuide] = useState<
- GuidedOnboardingState['activeGuide'] | undefined
- >(undefined);
- const [selectedStep, setSelectedStep] = useState(
- undefined
- );
+ const [selectedGuide, setSelectedGuide] = useState(undefined);
+ const [selectedStep, setSelectedStep] = useState(undefined);
useEffect(() => {
- const subscription = guidedOnboardingApi
- ?.fetchGuideState$()
- .subscribe((newState: GuidedOnboardingState) => {
- setGuideState(newState);
- });
- return () => subscription?.unsubscribe();
+ const fetchGuidesState = async () => {
+ const newGuidesState = await guidedOnboardingApi?.fetchAllGuidesState();
+ setGuidesState(newGuidesState ? newGuidesState.state : []);
+ };
+
+ fetchGuidesState();
}, [guidedOnboardingApi]);
- const startGuide = async (guide: UseCase) => {
- const response = await guidedOnboardingApi?.updateGuideState({
- activeGuide: guide,
- activeStep: 'add_data',
- });
+ useEffect(() => {
+ const newActiveGuide = guidesState?.find((guide) => guide.isActive === true);
+ if (newActiveGuide) {
+ setActiveGuide(newActiveGuide);
+ }
+ }, [guidesState, setActiveGuide]);
+
+ const activateGuide = async (guideId: GuideId, guideState?: GuideState) => {
+ const response = await guidedOnboardingApi?.activateGuide(guideId, guideState);
if (response) {
notifications.toasts.addSuccess(
@@ -75,11 +80,45 @@ export const Main = (props: MainProps) => {
};
const updateGuideState = async () => {
- const response = await guidedOnboardingApi?.updateGuideState({
- activeGuide: selectedGuide!,
- activeStep: selectedStep!,
+ const selectedGuideConfig = guidesConfig[selectedGuide!];
+ const selectedStepIndex = selectedGuideConfig.steps.findIndex(
+ (step) => step.id === selectedStep!
+ );
+
+ // Noop if the selected step is invalid
+ if (selectedStepIndex === -1) {
+ return;
+ }
+
+ const updatedSteps: GuideStep[] = selectedGuideConfig.steps.map((step, stepIndex) => {
+ if (selectedStepIndex > stepIndex) {
+ return {
+ id: step.id,
+ status: 'complete',
+ };
+ }
+
+ if (selectedStepIndex < stepIndex) {
+ return {
+ id: step.id,
+ status: 'inactive',
+ };
+ }
+
+ return {
+ id: step.id,
+ status: 'active',
+ };
});
+ const updatedGuideState: GuideState = {
+ isActive: true,
+ status: 'in_progress',
+ steps: updatedSteps,
+ guideId: selectedGuide!,
+ };
+
+ const response = await guidedOnboardingApi?.updateGuideState(updatedGuideState, true);
if (response) {
notifications.toasts.addSuccess(
i18n.translate('guidedOnboardingExample.updateGuideState.toastLabel', {
@@ -116,7 +155,7 @@ export const Main = (props: MainProps) => {
so there is no need to 'load' the state from the server."
/>
- {guideState ? (
+ {activeGuide ? (
{
defaultMessage="Active guide"
/>
- {guideState.activeGuide ?? 'undefined'}
+ {activeGuide.guideId}
- {guideState.activeStep ?? 'undefined'}
+
+ {activeGuide.steps.map((step) => {
+ return (
+ <>
+ {`Step "${step.id}": ${step.status}`}
+ >
+ );
+ })}
+
- ) : undefined}
+ ) : (
+
+
+
+ )}
-
- startGuide('search')} fill>
-
-
-
-
- startGuide('observability')} fill>
-
-
-
-
- startGuide('security')} fill>
-
-
-
+ {(Object.keys(guidesConfig) as GuideId[]).map((guideId) => {
+ const guideState = guidesState?.find((guide) => guide.guideId === guideId);
+ return (
+
+ activateGuide(guideId, guideState)}
+ fill
+ disabled={guideState?.status === 'complete'}
+ >
+ {guideState === undefined && (
+
+ )}
+ {(guideState?.isActive === true ||
+ guideState?.status === 'in_progress' ||
+ guideState?.status === 'ready_to_complete') && (
+
+ )}
+ {guideState?.status === 'complete' && (
+
+ )}
+
+
+ );
+ })}
@@ -187,16 +259,15 @@ export const Main = (props: MainProps) => {
{
- const value = e.target.value as UseCase;
+ const value = e.target.value as GuideId;
const shouldResetState = value.trim().length === 0;
if (shouldResetState) {
setSelectedGuide(undefined);
@@ -209,10 +280,10 @@ export const Main = (props: MainProps) => {
-
+
setSelectedStep(e.target.value)}
+ onChange={(e) => setSelectedStep(e.target.value as GuideStepIds)}
/>
diff --git a/examples/guided_onboarding_example/public/components/step_three.tsx b/examples/guided_onboarding_example/public/components/step_three.tsx
new file mode 100644
index 0000000000000..ffe9d87993611
--- /dev/null
+++ b/examples/guided_onboarding_example/public/components/step_three.tsx
@@ -0,0 +1,90 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React, { useEffect, useState } from 'react';
+
+import { EuiButton, EuiSpacer, EuiText, EuiTitle, EuiTourStep } from '@elastic/eui';
+
+import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public/types';
+import { FormattedMessage } from '@kbn/i18n-react';
+import {
+ EuiPageContentHeader_Deprecated as EuiPageContentHeader,
+ EuiPageContentBody_Deprecated as EuiPageContentBody,
+} from '@elastic/eui';
+
+interface StepThreeProps {
+ guidedOnboarding: GuidedOnboardingPluginStart;
+}
+
+export const StepThree = (props: StepThreeProps) => {
+ const {
+ guidedOnboarding: { guidedOnboardingApi },
+ } = props;
+
+ const [isTourStepOpen, setIsTourStepOpen] = useState(false);
+
+ useEffect(() => {
+ const subscription = guidedOnboardingApi
+ ?.isGuideStepActive$('search', 'search_experience')
+ .subscribe((isStepActive) => {
+ setIsTourStepOpen(isStepActive);
+ });
+ return () => subscription?.unsubscribe();
+ }, [guidedOnboardingApi]);
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Click this button to complete step 3.
+
+ }
+ isStepOpen={isTourStepOpen}
+ minWidth={300}
+ onFinish={() => {
+ setIsTourStepOpen(false);
+ }}
+ step={1}
+ stepsTotal={1}
+ title="Step Build search experience"
+ anchorPosition="rightUp"
+ >
+ {
+ await guidedOnboardingApi?.completeGuideStep('search', 'search_experience');
+ }}
+ >
+ Complete step 3
+
+
+
+ >
+ );
+};
diff --git a/examples/guided_onboarding_example/public/components/step_two.tsx b/examples/guided_onboarding_example/public/components/step_two.tsx
index a79ce2329351e..07f4fd7e63e0c 100644
--- a/examples/guided_onboarding_example/public/components/step_two.tsx
+++ b/examples/guided_onboarding_example/public/components/step_two.tsx
@@ -55,7 +55,7 @@ export const StepTwo = (props: StepTwoProps) => {
@@ -73,7 +73,7 @@ export const StepTwo = (props: StepTwoProps) => {
}}
step={1}
stepsTotal={1}
- title="Step Search experience"
+ title="Step Browse documents"
anchorPosition="rightUp"
>
-
>
);
diff --git a/examples/user_profile_examples/public/plugin.tsx b/examples/user_profile_examples/public/plugin.tsx
index e821ebebcd7d9..1b6dd5db267c6 100755
--- a/examples/user_profile_examples/public/plugin.tsx
+++ b/examples/user_profile_examples/public/plugin.tsx
@@ -14,6 +14,7 @@ import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template';
import { AvatarDemo } from './avatar_demo';
import { PopoverDemo } from './popover_demo';
import { SelectableDemo } from './selectable_demo';
+import { ToolTipDemo } from './tooltip_demo';
interface SetupDeps {
developerExamples: DeveloperExamplesSetup;
@@ -38,14 +39,20 @@ export class UserProfilesPlugin implements Plugin
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
,
element
);
diff --git a/examples/user_profile_examples/public/tooltip_demo.tsx b/examples/user_profile_examples/public/tooltip_demo.tsx
new file mode 100644
index 0000000000000..beed3401c0451
--- /dev/null
+++ b/examples/user_profile_examples/public/tooltip_demo.tsx
@@ -0,0 +1,62 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { UserAvatarTip, UserToolTip } from '@kbn/user-profile-components';
+import type { UserProfile, UserProfileAvatarData } from '@kbn/user-profile-components';
+import { EuiCommentList, EuiComment } from '@elastic/eui';
+import { PanelWithCodeBlock } from './panel_with_code_block';
+
+export const ToolTipDemo: FunctionComponent = () => {
+ const userProfile: UserProfile<{ avatar: UserProfileAvatarData }> = {
+ uid: 'u_9xDEQqUqoYCnFnPPLq5mIRHKL8gBTo_NiKgOnd5gGk0_0',
+ enabled: true,
+ user: {
+ username: 'wet_dingo',
+ email: 'wet_dingo@elastic.co',
+ full_name: 'Wet Dingo',
+ },
+ data: {
+ avatar: {
+ color: '#09e8ca',
+ initials: 'WD',
+ imageUrl: 'https://source.unsplash.com/64x64/?dingo',
+ },
+ },
+ };
+
+ return (
+
+
+
+ }
+ username={
+
+ {userProfile.user.full_name}
+
+ }
+ event="pushed incident X0Z235 on Jan 3, 2020"
+ />
+
+
+ );
+};
+
+const code = `import { UserToolTip, UserAvatarTip } from '@kbn/user-profile-components';
+
+
+
+
+
+ `;
diff --git a/fleet_packages.json b/fleet_packages.json
index c4a7f87127f10..4651e86287588 100644
--- a/fleet_packages.json
+++ b/fleet_packages.json
@@ -20,7 +20,7 @@
[
{
"name": "apm",
- "version": "8.4.0",
+ "version": "8.6.0-preview-1663775281",
"forceAlignStackVersion": true
},
{
@@ -29,7 +29,7 @@
},
{
"name": "endpoint",
- "version": "8.4.1"
+ "version": "8.5.0"
},
{
"name": "fleet_server",
@@ -39,4 +39,4 @@
"name": "synthetics",
"version": "0.10.2"
}
-]
+]
\ No newline at end of file
diff --git a/package.json b/package.json
index 02511a00b56c3..f122f532d5274 100644
--- a/package.json
+++ b/package.json
@@ -105,7 +105,7 @@
"@dnd-kit/utilities": "^2.0.0",
"@elastic/apm-rum": "^5.12.0",
"@elastic/apm-rum-react": "^1.4.2",
- "@elastic/charts": "49.0.0",
+ "@elastic/charts": "50.0.1",
"@elastic/datemath": "5.0.3",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.3.0-canary.1",
"@elastic/ems-client": "8.3.3",
@@ -213,6 +213,8 @@
"@kbn/core-http-common": "link:bazel-bin/packages/core/http/core-http-common",
"@kbn/core-http-context-server-internal": "link:bazel-bin/packages/core/http/core-http-context-server-internal",
"@kbn/core-http-context-server-mocks": "link:bazel-bin/packages/core/http/core-http-context-server-mocks",
+ "@kbn/core-http-request-handler-context-server": "link:bazel-bin/packages/core/http/core-http-request-handler-context-server",
+ "@kbn/core-http-request-handler-context-server-internal": "link:bazel-bin/packages/core/http/core-http-request-handler-context-server-internal",
"@kbn/core-http-router-server-internal": "link:bazel-bin/packages/core/http/core-http-router-server-internal",
"@kbn/core-http-router-server-mocks": "link:bazel-bin/packages/core/http/core-http-router-server-mocks",
"@kbn/core-http-server": "link:bazel-bin/packages/core/http/core-http-server",
@@ -252,6 +254,7 @@
"@kbn/core-overlays-browser": "link:bazel-bin/packages/core/overlays/core-overlays-browser",
"@kbn/core-overlays-browser-internal": "link:bazel-bin/packages/core/overlays/core-overlays-browser-internal",
"@kbn/core-overlays-browser-mocks": "link:bazel-bin/packages/core/overlays/core-overlays-browser-mocks",
+ "@kbn/core-plugins-base-server-internal": "link:bazel-bin/packages/core/plugins/core-plugins-base-server-internal",
"@kbn/core-plugins-browser": "link:bazel-bin/packages/core/plugins/core-plugins-browser",
"@kbn/core-plugins-browser-internal": "link:bazel-bin/packages/core/plugins/core-plugins-browser-internal",
"@kbn/core-plugins-browser-mocks": "link:bazel-bin/packages/core/plugins/core-plugins-browser-mocks",
@@ -260,6 +263,8 @@
"@kbn/core-preboot-server-mocks": "link:bazel-bin/packages/core/preboot/core-preboot-server-mocks",
"@kbn/core-rendering-browser-internal": "link:bazel-bin/packages/core/rendering/core-rendering-browser-internal",
"@kbn/core-rendering-browser-mocks": "link:bazel-bin/packages/core/rendering/core-rendering-browser-mocks",
+ "@kbn/core-rendering-server-internal": "link:bazel-bin/packages/core/rendering/core-rendering-server-internal",
+ "@kbn/core-rendering-server-mocks": "link:bazel-bin/packages/core/rendering/core-rendering-server-mocks",
"@kbn/core-root-browser-internal": "link:bazel-bin/packages/core/root/core-root-browser-internal",
"@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",
@@ -333,6 +338,7 @@
"@kbn/safer-lodash-set": "link:bazel-bin/packages/kbn-safer-lodash-set",
"@kbn/securitysolution-autocomplete": "link:bazel-bin/packages/kbn-securitysolution-autocomplete",
"@kbn/securitysolution-es-utils": "link:bazel-bin/packages/kbn-securitysolution-es-utils",
+ "@kbn/securitysolution-exception-list-components": "link:bazel-bin/packages/kbn-securitysolution-exception-list-components",
"@kbn/securitysolution-hook-utils": "link:bazel-bin/packages/kbn-securitysolution-hook-utils",
"@kbn/securitysolution-io-ts-alerting-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-alerting-types",
"@kbn/securitysolution-io-ts-list-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-list-types",
@@ -573,7 +579,7 @@
"react-fast-compare": "^2.0.4",
"react-focus-on": "^3.6.0",
"react-grid-layout": "^1.3.4",
- "react-hook-form": "^7.35.0",
+ "react-hook-form": "^7.36.1",
"react-intl": "^2.8.0",
"react-is": "^17.0.2",
"react-markdown": "^6.0.3",
@@ -639,7 +645,7 @@
"uuid": "3.3.2",
"vega": "^5.22.1",
"vega-interpreter": "^1.0.4",
- "vega-lite": "^5.3.0",
+ "vega-lite": "^5.5.0",
"vega-schema-url-parser": "^2.2.0",
"vega-spec-injector": "^0.0.2",
"vega-tooltip": "^0.28.0",
@@ -934,6 +940,8 @@
"@types/kbn__core-http-common": "link:bazel-bin/packages/core/http/core-http-common/npm_module_types",
"@types/kbn__core-http-context-server-internal": "link:bazel-bin/packages/core/http/core-http-context-server-internal/npm_module_types",
"@types/kbn__core-http-context-server-mocks": "link:bazel-bin/packages/core/http/core-http-context-server-mocks/npm_module_types",
+ "@types/kbn__core-http-request-handler-context-server": "link:bazel-bin/packages/core/http/core-http-request-handler-context-server/npm_module_types",
+ "@types/kbn__core-http-request-handler-context-server-internal": "link:bazel-bin/packages/core/http/core-http-request-handler-context-server-internal/npm_module_types",
"@types/kbn__core-http-router-server-internal": "link:bazel-bin/packages/core/http/core-http-router-server-internal/npm_module_types",
"@types/kbn__core-http-router-server-mocks": "link:bazel-bin/packages/core/http/core-http-router-server-mocks/npm_module_types",
"@types/kbn__core-http-server": "link:bazel-bin/packages/core/http/core-http-server/npm_module_types",
@@ -973,6 +981,7 @@
"@types/kbn__core-overlays-browser": "link:bazel-bin/packages/core/overlays/core-overlays-browser/npm_module_types",
"@types/kbn__core-overlays-browser-internal": "link:bazel-bin/packages/core/overlays/core-overlays-browser-internal/npm_module_types",
"@types/kbn__core-overlays-browser-mocks": "link:bazel-bin/packages/core/overlays/core-overlays-browser-mocks/npm_module_types",
+ "@types/kbn__core-plugins-base-server-internal": "link:bazel-bin/packages/core/plugins/core-plugins-base-server-internal/npm_module_types",
"@types/kbn__core-plugins-browser": "link:bazel-bin/packages/core/plugins/core-plugins-browser/npm_module_types",
"@types/kbn__core-plugins-browser-internal": "link:bazel-bin/packages/core/plugins/core-plugins-browser-internal/npm_module_types",
"@types/kbn__core-plugins-browser-mocks": "link:bazel-bin/packages/core/plugins/core-plugins-browser-mocks/npm_module_types",
@@ -982,6 +991,8 @@
"@types/kbn__core-public-internal-base": "link:bazel-bin/packages/core/public/internal-base/npm_module_types",
"@types/kbn__core-rendering-browser-internal": "link:bazel-bin/packages/core/rendering/core-rendering-browser-internal/npm_module_types",
"@types/kbn__core-rendering-browser-mocks": "link:bazel-bin/packages/core/rendering/core-rendering-browser-mocks/npm_module_types",
+ "@types/kbn__core-rendering-server-internal": "link:bazel-bin/packages/core/rendering/core-rendering-server-internal/npm_module_types",
+ "@types/kbn__core-rendering-server-mocks": "link:bazel-bin/packages/core/rendering/core-rendering-server-mocks/npm_module_types",
"@types/kbn__core-root-browser-internal": "link:bazel-bin/packages/core/root/core-root-browser-internal/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",
@@ -1082,6 +1093,7 @@
"@types/kbn__rule-data-utils": "link:bazel-bin/packages/kbn-rule-data-utils/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-exception-list-components": "link:bazel-bin/packages/kbn-securitysolution-exception-list-components/npm_module_types",
"@types/kbn__securitysolution-hook-utils": "link:bazel-bin/packages/kbn-securitysolution-hook-utils/npm_module_types",
"@types/kbn__securitysolution-io-ts-alerting-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-alerting-types/npm_module_types",
"@types/kbn__securitysolution-io-ts-list-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-list-types/npm_module_types",
@@ -1177,7 +1189,7 @@
"@types/nock": "^10.0.3",
"@types/node": "16.11.41",
"@types/node-fetch": "^2.6.0",
- "@types/node-forge": "^1.0.4",
+ "@types/node-forge": "^1.3.0",
"@types/nodemailer": "^6.4.0",
"@types/normalize-path": "^3.0.0",
"@types/object-hash": "^1.3.0",
@@ -1280,7 +1292,7 @@
"cssnano": "^5.1.12",
"cssnano-preset-default": "^5.2.12",
"csstype": "^3.0.2",
- "cypress": "^10.7.0",
+ "cypress": "^10.9.0",
"cypress-axe": "^1.0.0",
"cypress-file-upload": "^5.0.8",
"cypress-multi-reporters": "^1.6.1",
diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel
index 62cc4b4ce9ad2..0d5ecd4bc4cfc 100644
--- a/packages/BUILD.bazel
+++ b/packages/BUILD.bazel
@@ -79,6 +79,8 @@ filegroup(
"//packages/core/http/core-http-common:build",
"//packages/core/http/core-http-context-server-internal:build",
"//packages/core/http/core-http-context-server-mocks:build",
+ "//packages/core/http/core-http-request-handler-context-server:build",
+ "//packages/core/http/core-http-request-handler-context-server-internal:build",
"//packages/core/http/core-http-router-server-internal:build",
"//packages/core/http/core-http-router-server-mocks:build",
"//packages/core/http/core-http-server:build",
@@ -118,6 +120,7 @@ filegroup(
"//packages/core/overlays/core-overlays-browser:build",
"//packages/core/overlays/core-overlays-browser-internal:build",
"//packages/core/overlays/core-overlays-browser-mocks:build",
+ "//packages/core/plugins/core-plugins-base-server-internal:build",
"//packages/core/plugins/core-plugins-browser:build",
"//packages/core/plugins/core-plugins-browser-internal:build",
"//packages/core/plugins/core-plugins-browser-mocks:build",
@@ -126,6 +129,8 @@ filegroup(
"//packages/core/preboot/core-preboot-server-mocks:build",
"//packages/core/rendering/core-rendering-browser-internal:build",
"//packages/core/rendering/core-rendering-browser-mocks:build",
+ "//packages/core/rendering/core-rendering-server-internal:build",
+ "//packages/core/rendering/core-rendering-server-mocks:build",
"//packages/core/root/core-root-browser-internal:build",
"//packages/core/saved-objects/core-saved-objects-api-browser:build",
"//packages/core/saved-objects/core-saved-objects-api-server:build",
@@ -249,6 +254,7 @@ filegroup(
"//packages/kbn-safer-lodash-set:build",
"//packages/kbn-securitysolution-autocomplete:build",
"//packages/kbn-securitysolution-es-utils:build",
+ "//packages/kbn-securitysolution-exception-list-components:build",
"//packages/kbn-securitysolution-hook-utils:build",
"//packages/kbn-securitysolution-io-ts-alerting-types:build",
"//packages/kbn-securitysolution-io-ts-list-types:build",
@@ -410,6 +416,8 @@ filegroup(
"//packages/core/http/core-http-common:build_types",
"//packages/core/http/core-http-context-server-internal:build_types",
"//packages/core/http/core-http-context-server-mocks:build_types",
+ "//packages/core/http/core-http-request-handler-context-server:build_types",
+ "//packages/core/http/core-http-request-handler-context-server-internal:build_types",
"//packages/core/http/core-http-router-server-internal:build_types",
"//packages/core/http/core-http-router-server-mocks:build_types",
"//packages/core/http/core-http-server:build_types",
@@ -449,6 +457,7 @@ filegroup(
"//packages/core/overlays/core-overlays-browser:build_types",
"//packages/core/overlays/core-overlays-browser-internal:build_types",
"//packages/core/overlays/core-overlays-browser-mocks:build_types",
+ "//packages/core/plugins/core-plugins-base-server-internal:build_types",
"//packages/core/plugins/core-plugins-browser:build_types",
"//packages/core/plugins/core-plugins-browser-internal:build_types",
"//packages/core/plugins/core-plugins-browser-mocks:build_types",
@@ -457,6 +466,8 @@ filegroup(
"//packages/core/preboot/core-preboot-server-mocks:build_types",
"//packages/core/rendering/core-rendering-browser-internal:build_types",
"//packages/core/rendering/core-rendering-browser-mocks:build_types",
+ "//packages/core/rendering/core-rendering-server-internal:build_types",
+ "//packages/core/rendering/core-rendering-server-mocks:build_types",
"//packages/core/root/core-root-browser-internal:build_types",
"//packages/core/saved-objects/core-saved-objects-api-browser:build_types",
"//packages/core/saved-objects/core-saved-objects-api-server:build_types",
@@ -570,6 +581,7 @@ filegroup(
"//packages/kbn-safer-lodash-set:build_types",
"//packages/kbn-securitysolution-autocomplete:build_types",
"//packages/kbn-securitysolution-es-utils:build_types",
+ "//packages/kbn-securitysolution-exception-list-components:build_types",
"//packages/kbn-securitysolution-hook-utils:build_types",
"//packages/kbn-securitysolution-io-ts-alerting-types:build_types",
"//packages/kbn-securitysolution-io-ts-list-types:build_types",
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/BUILD.bazel b/packages/core/http/core-http-request-handler-context-server-internal/BUILD.bazel
new file mode 100644
index 0000000000000..82040b5fb1ad8
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/BUILD.bazel
@@ -0,0 +1,116 @@
+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-http-request-handler-context-server-internal"
+PKG_REQUIRE_NAME = "@kbn/core-http-request-handler-context-server-internal"
+
+SOURCE_FILES = glob(
+ [
+ "**/*.ts",
+ ],
+ exclude = [
+ "**/*.config.js",
+ "**/*.mock.*",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+RUNTIME_DEPS = [
+ "//packages/core/elasticsearch/core-elasticsearch-server-internal",
+ "//packages/core/saved-objects/core-saved-objects-server-internal",
+ "//packages/core/deprecations/core-deprecations-server-internal",
+ "//packages/core/ui-settings/core-ui-settings-server-internal",
+]
+
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "//packages/core/http/core-http-server:npm_module_types",
+ "//packages/core/http/core-http-request-handler-context-server:npm_module_types",
+ "//packages/core/elasticsearch/core-elasticsearch-server-internal:npm_module_types",
+ "//packages/core/saved-objects/core-saved-objects-server-internal:npm_module_types",
+ "//packages/core/deprecations/core-deprecations-server-internal:npm_module_types",
+ "//packages/core/ui-settings/core-ui-settings-server:npm_module_types",
+ "//packages/core/ui-settings/core-ui-settings-server-internal: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",
+ 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/core/http/core-http-request-handler-context-server-internal/README.md b/packages/core/http/core-http-request-handler-context-server-internal/README.md
new file mode 100644
index 0000000000000..aa27c116c4f6d
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/README.md
@@ -0,0 +1,3 @@
+# @kbn/core-http-request-handler-context-server-internal
+
+This package contains the internal types and implementation of Core's `CoreRequestHandlerContext`
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/index.ts b/packages/core/http/core-http-request-handler-context-server-internal/index.ts
new file mode 100644
index 0000000000000..2ee514f67265b
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/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 { CoreRouteHandlerContext, PrebootCoreRouteHandlerContext } from './src';
+export type { CoreRouteHandlerContextParams, PrebootCoreRouteHandlerContextParams } from './src';
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/jest.config.js b/packages/core/http/core-http-request-handler-context-server-internal/jest.config.js
new file mode 100644
index 0000000000000..68a5f2b3a03a8
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-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/jest_node',
+ rootDir: '../../../..',
+ roots: ['/packages/core/http/core-http-request-handler-context-server-internal'],
+};
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/kibana.jsonc b/packages/core/http/core-http-request-handler-context-server-internal/kibana.jsonc
new file mode 100644
index 0000000000000..98b452aec0d97
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/kibana.jsonc
@@ -0,0 +1,7 @@
+{
+ "type": "shared-common",
+ "id": "@kbn/core-http-request-handler-context-server-internal",
+ "owner": "@elastic/kibana-core",
+ "runtimeDeps": [],
+ "typeDeps": [],
+}
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/package.json b/packages/core/http/core-http-request-handler-context-server-internal/package.json
new file mode 100644
index 0000000000000..672bb6ce72715
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@kbn/core-http-request-handler-context-server-internal",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "author": "Kibana Core",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/src/core/server/core_route_handler_context.test.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.test.ts
similarity index 86%
rename from src/core/server/core_route_handler_context.test.ts
rename to packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.test.ts
index ace0144eae54f..f8e906650fcf1 100644
--- a/src/core/server/core_route_handler_context.test.ts
+++ b/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.test.ts
@@ -7,13 +7,14 @@
*/
import { CoreRouteHandlerContext } from './core_route_handler_context';
-import { coreMock, httpServerMock } from './mocks';
+import { httpServerMock } from '@kbn/core-http-server-mocks';
+import { createCoreRouteHandlerContextParamsMock } from './test_helpers';
describe('#elasticsearch', () => {
describe('#client', () => {
test('returns the results of coreStart.elasticsearch.client.asScoped', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const client = context.elasticsearch.client;
@@ -22,7 +23,7 @@ describe('#elasticsearch', () => {
test('lazily created', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
expect(coreStart.elasticsearch.client.asScoped).not.toHaveBeenCalled();
@@ -33,7 +34,7 @@ describe('#elasticsearch', () => {
test('only creates one instance', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const client1 = context.elasticsearch.client;
@@ -50,7 +51,7 @@ describe('#savedObjects', () => {
describe('#client', () => {
test('returns the results of coreStart.savedObjects.getScopedClient', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const client = context.savedObjects.client;
@@ -59,7 +60,7 @@ describe('#savedObjects', () => {
test('lazily created', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const savedObjects = context.savedObjects;
@@ -71,7 +72,7 @@ describe('#savedObjects', () => {
test('only creates one instance', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const client1 = context.savedObjects.client;
@@ -86,7 +87,7 @@ describe('#savedObjects', () => {
describe('#typeRegistry', () => {
test('returns the results of coreStart.savedObjects.getTypeRegistry', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const typeRegistry = context.savedObjects.typeRegistry;
@@ -95,7 +96,7 @@ describe('#savedObjects', () => {
test('lazily created', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
expect(coreStart.savedObjects.getTypeRegistry).not.toHaveBeenCalled();
@@ -106,7 +107,7 @@ describe('#savedObjects', () => {
test('only creates one instance', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const typeRegistry1 = context.savedObjects.typeRegistry;
@@ -123,7 +124,7 @@ describe('#uiSettings', () => {
describe('#client', () => {
test('returns the results of coreStart.uiSettings.asScopedToClient', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const client = context.uiSettings.client;
@@ -132,7 +133,7 @@ describe('#uiSettings', () => {
test('lazily created', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
expect(coreStart.uiSettings.asScopedToClient).not.toHaveBeenCalled();
@@ -143,7 +144,7 @@ describe('#uiSettings', () => {
test('only creates one instance', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const client1 = context.uiSettings.client;
@@ -160,7 +161,7 @@ describe('#deprecations', () => {
describe('#client', () => {
test('returns the results of coreStart.deprecations.asScopedToClient', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const client = context.deprecations.client;
@@ -169,7 +170,7 @@ describe('#deprecations', () => {
test('lazily created', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
expect(coreStart.deprecations.asScopedToClient).not.toHaveBeenCalled();
@@ -180,7 +181,7 @@ describe('#deprecations', () => {
test('only creates one instance', () => {
const request = httpServerMock.createKibanaRequest();
- const coreStart = coreMock.createInternalStart();
+ const coreStart = createCoreRouteHandlerContextParamsMock();
const context = new CoreRouteHandlerContext(coreStart, request);
const client1 = context.deprecations.client;
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.ts
new file mode 100644
index 0000000000000..6cc54130a575c
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/src/core_route_handler_context.ts
@@ -0,0 +1,63 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { KibanaRequest } from '@kbn/core-http-server';
+import type { CoreRequestHandlerContext } from '@kbn/core-http-request-handler-context-server';
+import {
+ CoreElasticsearchRouteHandlerContext,
+ type InternalElasticsearchServiceStart,
+} from '@kbn/core-elasticsearch-server-internal';
+import {
+ CoreSavedObjectsRouteHandlerContext,
+ type InternalSavedObjectsServiceStart,
+} from '@kbn/core-saved-objects-server-internal';
+import {
+ CoreDeprecationsRouteHandlerContext,
+ type InternalDeprecationsServiceStart,
+} from '@kbn/core-deprecations-server-internal';
+import {
+ CoreUiSettingsRouteHandlerContext,
+ type InternalUiSettingsServiceStart,
+} from '@kbn/core-ui-settings-server-internal';
+
+/**
+ * Subset of `InternalCoreStart` used by {@link CoreRouteHandlerContext}
+ * @internal
+ */
+export interface CoreRouteHandlerContextParams {
+ elasticsearch: InternalElasticsearchServiceStart;
+ savedObjects: InternalSavedObjectsServiceStart;
+ uiSettings: InternalUiSettingsServiceStart;
+ deprecations: InternalDeprecationsServiceStart;
+}
+
+/**
+ * The concrete implementation for Core's route handler context.
+ *
+ * @internal
+ */
+export class CoreRouteHandlerContext implements CoreRequestHandlerContext {
+ readonly elasticsearch: CoreElasticsearchRouteHandlerContext;
+ readonly savedObjects: CoreSavedObjectsRouteHandlerContext;
+ readonly uiSettings: CoreUiSettingsRouteHandlerContext;
+ readonly deprecations: CoreDeprecationsRouteHandlerContext;
+
+ constructor(coreStart: CoreRouteHandlerContextParams, request: KibanaRequest) {
+ this.elasticsearch = new CoreElasticsearchRouteHandlerContext(coreStart.elasticsearch, request);
+ this.savedObjects = new CoreSavedObjectsRouteHandlerContext(coreStart.savedObjects, request);
+ this.uiSettings = new CoreUiSettingsRouteHandlerContext(
+ coreStart.uiSettings,
+ this.savedObjects
+ );
+ this.deprecations = new CoreDeprecationsRouteHandlerContext(
+ coreStart.deprecations,
+ this.elasticsearch,
+ this.savedObjects
+ );
+ }
+}
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/src/index.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/index.ts
new file mode 100644
index 0000000000000..48d93f78b2a48
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/src/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 { CoreRouteHandlerContext } from './core_route_handler_context';
+export type { CoreRouteHandlerContextParams } from './core_route_handler_context';
+export { PrebootCoreRouteHandlerContext } from './preboot_core_route_handler_context';
+export type { PrebootCoreRouteHandlerContextParams } from './preboot_core_route_handler_context';
diff --git a/src/core/server/preboot_core_route_handler_context.test.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/preboot_core_route_handler_context.test.ts
similarity index 85%
rename from src/core/server/preboot_core_route_handler_context.test.ts
rename to packages/core/http/core-http-request-handler-context-server-internal/src/preboot_core_route_handler_context.test.ts
index 8d090d8644637..75bfc39bfdc9a 100644
--- a/src/core/server/preboot_core_route_handler_context.test.ts
+++ b/packages/core/http/core-http-request-handler-context-server-internal/src/preboot_core_route_handler_context.test.ts
@@ -7,12 +7,12 @@
*/
import { PrebootCoreRouteHandlerContext } from './preboot_core_route_handler_context';
-import { coreMock } from './mocks';
+import { createPrebootCoreRouteHandlerContextParamsMock } from './test_helpers';
describe('#uiSettings', () => {
describe('#client', () => {
test('returns the results of corePreboot.uiSettings.createDefaultsClient', () => {
- const corePreboot = coreMock.createInternalPreboot();
+ const corePreboot = createPrebootCoreRouteHandlerContextParamsMock();
const context = new PrebootCoreRouteHandlerContext(corePreboot);
const client = context.uiSettings.client;
@@ -21,7 +21,7 @@ describe('#uiSettings', () => {
});
test('only creates one instance', () => {
- const corePreboot = coreMock.createInternalPreboot();
+ const corePreboot = createPrebootCoreRouteHandlerContextParamsMock();
const context = new PrebootCoreRouteHandlerContext(corePreboot);
const client1 = context.uiSettings.client;
diff --git a/src/core/server/preboot_core_route_handler_context.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/preboot_core_route_handler_context.ts
similarity index 71%
rename from src/core/server/preboot_core_route_handler_context.ts
rename to packages/core/http/core-http-request-handler-context-server-internal/src/preboot_core_route_handler_context.ts
index ec5ef594180d1..c0bf184d8c985 100644
--- a/src/core/server/preboot_core_route_handler_context.ts
+++ b/packages/core/http/core-http-request-handler-context-server-internal/src/preboot_core_route_handler_context.ts
@@ -8,13 +8,17 @@
// eslint-disable-next-line max-classes-per-file
import type { IUiSettingsClient } from '@kbn/core-ui-settings-server';
-import type { InternalCorePreboot } from './internal_types';
+import type {
+ PrebootUiSettingsRequestHandlerContext,
+ PrebootCoreRequestHandlerContext,
+} from '@kbn/core-http-request-handler-context-server';
+import type { InternalUiSettingsServicePreboot } from '@kbn/core-ui-settings-server-internal';
/**
- * @public
+ * @internal
*/
-export interface PrebootUiSettingsRequestHandlerContext {
- client: IUiSettingsClient;
+export interface PrebootCoreRouteHandlerContextParams {
+ uiSettings: InternalUiSettingsServicePreboot;
}
/**
@@ -25,13 +29,6 @@ class PrebootCoreUiSettingsRouteHandlerContext implements PrebootUiSettingsReque
constructor(public readonly client: IUiSettingsClient) {}
}
-/**
- * @public
- */
-export interface PrebootCoreRequestHandlerContext {
- uiSettings: PrebootUiSettingsRequestHandlerContext;
-}
-
/**
* Implementation of {@link PrebootCoreRequestHandlerContext}.
* @internal
@@ -39,7 +36,7 @@ export interface PrebootCoreRequestHandlerContext {
export class PrebootCoreRouteHandlerContext implements PrebootCoreRequestHandlerContext {
readonly uiSettings: PrebootUiSettingsRequestHandlerContext;
- constructor(private readonly corePreboot: InternalCorePreboot) {
+ constructor(private readonly corePreboot: PrebootCoreRouteHandlerContextParams) {
this.uiSettings = new PrebootCoreUiSettingsRouteHandlerContext(
this.corePreboot.uiSettings.createDefaultsClient()
);
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/core_route_handler_context_params.mock.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/core_route_handler_context_params.mock.ts
new file mode 100644
index 0000000000000..eaf46eae3c8b6
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/core_route_handler_context_params.mock.ts
@@ -0,0 +1,21 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks';
+import { savedObjectsServiceMock } from '@kbn/core-saved-objects-server-mocks';
+import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks';
+import { deprecationsServiceMock } from '@kbn/core-deprecations-server-mocks';
+
+export const createCoreRouteHandlerContextParamsMock = () => {
+ return {
+ elasticsearch: elasticsearchServiceMock.createInternalStart(),
+ savedObjects: savedObjectsServiceMock.createInternalStartContract(),
+ uiSettings: uiSettingsServiceMock.createStartContract(),
+ deprecations: deprecationsServiceMock.createInternalStartContract(),
+ };
+};
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/index.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/index.ts
new file mode 100644
index 0000000000000..5556547d4602f
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/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 { createCoreRouteHandlerContextParamsMock } from './core_route_handler_context_params.mock';
+export { createPrebootCoreRouteHandlerContextParamsMock } from './preboot_core_route_handler_context_params.mock';
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/preboot_core_route_handler_context_params.mock.ts b/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/preboot_core_route_handler_context_params.mock.ts
new file mode 100644
index 0000000000000..dc4eab6b55672
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/src/test_helpers/preboot_core_route_handler_context_params.mock.ts
@@ -0,0 +1,15 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks';
+
+export const createPrebootCoreRouteHandlerContextParamsMock = () => {
+ return {
+ uiSettings: uiSettingsServiceMock.createPrebootContract(),
+ };
+};
diff --git a/packages/core/http/core-http-request-handler-context-server-internal/tsconfig.json b/packages/core/http/core-http-request-handler-context-server-internal/tsconfig.json
new file mode 100644
index 0000000000000..71bb40fe57f3f
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server-internal/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "extends": "../../../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "**/*.ts",
+ ]
+}
diff --git a/packages/core/http/core-http-request-handler-context-server/BUILD.bazel b/packages/core/http/core-http-request-handler-context-server/BUILD.bazel
new file mode 100644
index 0000000000000..45c5ebc08776f
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server/BUILD.bazel
@@ -0,0 +1,110 @@
+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-http-request-handler-context-server"
+PKG_REQUIRE_NAME = "@kbn/core-http-request-handler-context-server"
+
+SOURCE_FILES = glob(
+ [
+ "**/*.ts",
+ ],
+ exclude = [
+ "**/*.config.js",
+ "**/*.mock.*",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+RUNTIME_DEPS = [
+]
+
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "//packages/core/http/core-http-server:npm_module_types",
+ "//packages/core/elasticsearch/core-elasticsearch-server:npm_module_types",
+ "//packages/core/saved-objects/core-saved-objects-server:npm_module_types",
+ "//packages/core/deprecations/core-deprecations-server:npm_module_types",
+ "//packages/core/ui-settings/core-ui-settings-server: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",
+ 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/core/http/core-http-request-handler-context-server/README.md b/packages/core/http/core-http-request-handler-context-server/README.md
new file mode 100644
index 0000000000000..b7b191f7345f3
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server/README.md
@@ -0,0 +1,3 @@
+# @kbn/core-http-request-handler-context-server
+
+This package contains the public types for Core's server-side `RequestHandlerContext` http subdomain.
diff --git a/packages/core/http/core-http-request-handler-context-server/index.ts b/packages/core/http/core-http-request-handler-context-server/index.ts
new file mode 100644
index 0000000000000..125c466d25d2c
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server/index.ts
@@ -0,0 +1,16 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export type {
+ RequestHandlerContext,
+ CoreRequestHandlerContext,
+ CustomRequestHandlerContext,
+ PrebootCoreRequestHandlerContext,
+ PrebootRequestHandlerContext,
+ PrebootUiSettingsRequestHandlerContext,
+} from './src';
diff --git a/src/plugins/dashboard/common/embeddable/types.ts b/packages/core/http/core-http-request-handler-context-server/jest.config.js
similarity index 68%
rename from src/plugins/dashboard/common/embeddable/types.ts
rename to packages/core/http/core-http-request-handler-context-server/jest.config.js
index d786078766f78..dc60767ed0880 100644
--- a/src/plugins/dashboard/common/embeddable/types.ts
+++ b/packages/core/http/core-http-request-handler-context-server/jest.config.js
@@ -6,11 +6,8 @@
* Side Public License, v 1.
*/
-// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
-export type GridData = {
- w: number;
- h: number;
- x: number;
- y: number;
- i: string;
+module.exports = {
+ preset: '@kbn/test/jest_node',
+ rootDir: '../../../..',
+ roots: ['/packages/core/http/core-http-request-handler-context-server'],
};
diff --git a/packages/core/http/core-http-request-handler-context-server/kibana.jsonc b/packages/core/http/core-http-request-handler-context-server/kibana.jsonc
new file mode 100644
index 0000000000000..3fba38b6444e4
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server/kibana.jsonc
@@ -0,0 +1,7 @@
+{
+ "type": "shared-common",
+ "id": "@kbn/core-http-request-handler-context-server",
+ "owner": "@elastic/kibana-core",
+ "runtimeDeps": [],
+ "typeDeps": [],
+}
diff --git a/packages/core/http/core-http-request-handler-context-server/package.json b/packages/core/http/core-http-request-handler-context-server/package.json
new file mode 100644
index 0000000000000..da85fc826828d
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@kbn/core-http-request-handler-context-server",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "author": "Kibana Core",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/packages/core/http/core-http-request-handler-context-server/src/index.ts b/packages/core/http/core-http-request-handler-context-server/src/index.ts
new file mode 100644
index 0000000000000..2ab372a0ab975
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server/src/index.ts
@@ -0,0 +1,18 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export type {
+ RequestHandlerContext,
+ CoreRequestHandlerContext,
+ CustomRequestHandlerContext,
+} from './request_handler_context';
+export type {
+ PrebootRequestHandlerContext,
+ PrebootCoreRequestHandlerContext,
+ PrebootUiSettingsRequestHandlerContext,
+} from './preboot_request_handler_context';
diff --git a/packages/core/http/core-http-request-handler-context-server/src/preboot_request_handler_context.ts b/packages/core/http/core-http-request-handler-context-server/src/preboot_request_handler_context.ts
new file mode 100644
index 0000000000000..62caefe5619c6
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server/src/preboot_request_handler_context.ts
@@ -0,0 +1,31 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { RequestHandlerContextBase } from '@kbn/core-http-server';
+import type { IUiSettingsClient } from '@kbn/core-ui-settings-server';
+
+/**
+ * @public
+ */
+export interface PrebootUiSettingsRequestHandlerContext {
+ client: IUiSettingsClient;
+}
+
+/**
+ * @public
+ */
+export interface PrebootCoreRequestHandlerContext {
+ uiSettings: PrebootUiSettingsRequestHandlerContext;
+}
+
+/**
+ * @public
+ */
+export interface PrebootRequestHandlerContext extends RequestHandlerContextBase {
+ core: Promise;
+}
diff --git a/src/core/server/core_route_handler_context.ts b/packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts
similarity index 53%
rename from src/core/server/core_route_handler_context.ts
rename to packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts
index 14cc99b501436..07704752bd8ed 100644
--- a/src/core/server/core_route_handler_context.ts
+++ b/packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts
@@ -6,16 +6,11 @@
* Side Public License, v 1.
*/
-import type { KibanaRequest } from '@kbn/core-http-server';
+import type { RequestHandlerContextBase } from '@kbn/core-http-server';
import type { ElasticsearchRequestHandlerContext } from '@kbn/core-elasticsearch-server';
-import { CoreElasticsearchRouteHandlerContext } from '@kbn/core-elasticsearch-server-internal';
import type { SavedObjectsRequestHandlerContext } from '@kbn/core-saved-objects-server';
-import { CoreSavedObjectsRouteHandlerContext } from '@kbn/core-saved-objects-server-internal';
import type { DeprecationsRequestHandlerContext } from '@kbn/core-deprecations-server';
-import { CoreDeprecationsRouteHandlerContext } from '@kbn/core-deprecations-server-internal';
import type { UiSettingsRequestHandlerContext } from '@kbn/core-ui-settings-server';
-import { CoreUiSettingsRouteHandlerContext } from '@kbn/core-ui-settings-server-internal';
-import type { InternalCoreStart } from './internal_types';
/**
* The `core` context provided to route handler.
@@ -39,27 +34,19 @@ export interface CoreRequestHandlerContext {
}
/**
- * The concrete implementation for Core's route handler context.
+ * Base context passed to a route handler, containing the `core` context part.
*
- * @internal
+ * @public
*/
-export class CoreRouteHandlerContext implements CoreRequestHandlerContext {
- readonly elasticsearch: CoreElasticsearchRouteHandlerContext;
- readonly savedObjects: CoreSavedObjectsRouteHandlerContext;
- readonly uiSettings: CoreUiSettingsRouteHandlerContext;
- readonly deprecations: CoreDeprecationsRouteHandlerContext;
-
- constructor(coreStart: InternalCoreStart, request: KibanaRequest) {
- this.elasticsearch = new CoreElasticsearchRouteHandlerContext(coreStart.elasticsearch, request);
- this.savedObjects = new CoreSavedObjectsRouteHandlerContext(coreStart.savedObjects, request);
- this.uiSettings = new CoreUiSettingsRouteHandlerContext(
- coreStart.uiSettings,
- this.savedObjects
- );
- this.deprecations = new CoreDeprecationsRouteHandlerContext(
- coreStart.deprecations,
- this.elasticsearch,
- this.savedObjects
- );
- }
+export interface RequestHandlerContext extends RequestHandlerContextBase {
+ core: Promise;
}
+
+/**
+ * Mixin allowing plugins to define their own request handler contexts.
+ *
+ * @public
+ */
+export type CustomRequestHandlerContext = RequestHandlerContext & {
+ [Key in keyof T]: T[Key] extends Promise ? T[Key] : Promise;
+};
diff --git a/packages/core/http/core-http-request-handler-context-server/tsconfig.json b/packages/core/http/core-http-request-handler-context-server/tsconfig.json
new file mode 100644
index 0000000000000..71bb40fe57f3f
--- /dev/null
+++ b/packages/core/http/core-http-request-handler-context-server/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "extends": "../../../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "**/*.ts",
+ ]
+}
diff --git a/packages/core/plugins/core-plugins-base-server-internal/BUILD.bazel b/packages/core/plugins/core-plugins-base-server-internal/BUILD.bazel
new file mode 100644
index 0000000000000..7e4d73b638a75
--- /dev/null
+++ b/packages/core/plugins/core-plugins-base-server-internal/BUILD.bazel
@@ -0,0 +1,107 @@
+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-plugins-base-server-internal"
+PKG_REQUIRE_NAME = "@kbn/core-plugins-base-server-internal"
+
+SOURCE_FILES = glob(
+ [
+ "**/*.ts",
+ ],
+ exclude = [
+ "**/*.config.js",
+ "**/*.mock.*",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+RUNTIME_DEPS = [
+]
+
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "@npm//rxjs",
+ "//packages/core/base/core-base-common: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",
+ 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/core/plugins/core-plugins-base-server-internal/README.md b/packages/core/plugins/core-plugins-base-server-internal/README.md
new file mode 100644
index 0000000000000..565082ebccc04
--- /dev/null
+++ b/packages/core/plugins/core-plugins-base-server-internal/README.md
@@ -0,0 +1,3 @@
+# @kbn/core-plugins-base-server-internal
+
+This package contains base internal types of the `plugins` domain used across other core domains.
diff --git a/src/plugins/dashboard/public/saved_dashboards/index.ts b/packages/core/plugins/core-plugins-base-server-internal/index.ts
similarity index 73%
rename from src/plugins/dashboard/public/saved_dashboards/index.ts
rename to packages/core/plugins/core-plugins-base-server-internal/index.ts
index 7a17aa6f2c0e0..3052f46e9fe7a 100644
--- a/src/plugins/dashboard/public/saved_dashboards/index.ts
+++ b/packages/core/plugins/core-plugins-base-server-internal/index.ts
@@ -6,6 +6,4 @@
* Side Public License, v 1.
*/
-export * from '../../common/saved_dashboard_references';
-export * from './saved_dashboard';
-export * from './saved_dashboards';
+export type { UiPlugins, InternalPluginInfo } from './src';
diff --git a/packages/core/plugins/core-plugins-base-server-internal/jest.config.js b/packages/core/plugins/core-plugins-base-server-internal/jest.config.js
new file mode 100644
index 0000000000000..9a9b5aa5ec9bf
--- /dev/null
+++ b/packages/core/plugins/core-plugins-base-server-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/jest_node',
+ rootDir: '../../../..',
+ roots: ['/packages/core/plugins/core-plugins-base-server-internal'],
+};
diff --git a/packages/core/plugins/core-plugins-base-server-internal/kibana.jsonc b/packages/core/plugins/core-plugins-base-server-internal/kibana.jsonc
new file mode 100644
index 0000000000000..a593530ab5fc4
--- /dev/null
+++ b/packages/core/plugins/core-plugins-base-server-internal/kibana.jsonc
@@ -0,0 +1,7 @@
+{
+ "type": "shared-common",
+ "id": "@kbn/core-plugins-base-server-internal",
+ "owner": "@elastic/kibana-core",
+ "runtimeDeps": [],
+ "typeDeps": [],
+}
diff --git a/packages/core/plugins/core-plugins-base-server-internal/package.json b/packages/core/plugins/core-plugins-base-server-internal/package.json
new file mode 100644
index 0000000000000..6af3453f1a29b
--- /dev/null
+++ b/packages/core/plugins/core-plugins-base-server-internal/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@kbn/core-plugins-base-server-internal",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "author": "Kibana Core",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/packages/core/plugins/core-plugins-base-server-internal/src/index.ts b/packages/core/plugins/core-plugins-base-server-internal/src/index.ts
new file mode 100644
index 0000000000000..ade9e77fc1783
--- /dev/null
+++ b/packages/core/plugins/core-plugins-base-server-internal/src/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 type { UiPlugins, InternalPluginInfo } from './types';
diff --git a/packages/core/plugins/core-plugins-base-server-internal/src/types.ts b/packages/core/plugins/core-plugins-base-server-internal/src/types.ts
new file mode 100644
index 0000000000000..d0afcce5dba5c
--- /dev/null
+++ b/packages/core/plugins/core-plugins-base-server-internal/src/types.ts
@@ -0,0 +1,51 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { Observable } from 'rxjs';
+import type { DiscoveredPlugin, PluginName } from '@kbn/core-base-common';
+
+/** @internal */
+export interface UiPlugins {
+ /**
+ * Paths to all discovered ui plugin entrypoints on the filesystem, even if
+ * disabled.
+ */
+ internal: Map;
+
+ /**
+ * Information needed by client-side to load plugins and wire dependencies.
+ */
+ public: Map;
+
+ /**
+ * Configuration for plugins to be exposed to the client-side.
+ */
+ browserConfigs: Map>;
+}
+
+/**
+ * @internal
+ */
+export interface InternalPluginInfo {
+ /**
+ * Version of the plugin
+ */
+ readonly version: string;
+ /**
+ * Bundles that must be loaded for this plugin
+ */
+ readonly requiredBundles: readonly string[];
+ /**
+ * Path to the target/public directory of the plugin which should be served
+ */
+ readonly publicTargetDir: string;
+ /**
+ * Path to the plugin assets directory.
+ */
+ readonly publicAssetsDir: string;
+}
diff --git a/packages/core/plugins/core-plugins-base-server-internal/tsconfig.json b/packages/core/plugins/core-plugins-base-server-internal/tsconfig.json
new file mode 100644
index 0000000000000..71bb40fe57f3f
--- /dev/null
+++ b/packages/core/plugins/core-plugins-base-server-internal/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "extends": "../../../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "**/*.ts",
+ ]
+}
diff --git a/packages/core/rendering/core-rendering-server-internal/BUILD.bazel b/packages/core/rendering/core-rendering-server-internal/BUILD.bazel
new file mode 100644
index 0000000000000..b02ff09264699
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-internal/BUILD.bazel
@@ -0,0 +1,127 @@
+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-rendering-server-internal"
+PKG_REQUIRE_NAME = "@kbn/core-rendering-server-internal"
+
+SOURCE_FILES = glob(
+ [
+ "**/*.ts",
+ "**/*.tsx",
+ ],
+ exclude = [
+ "**/*.config.js",
+ "**/*.mock.*",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+RUNTIME_DEPS = [
+ "@npm//react",
+ "@npm//react-dom",
+ "@npm//rxjs",
+ "//packages/kbn-i18n",
+ "//packages/kbn-ui-shared-deps-npm",
+ "//packages/kbn-ui-shared-deps-src",
+]
+
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "@npm//@types/react",
+ "@npm//@types/react-dom",
+ "@npm//rxjs",
+ "//packages/kbn-i18n:npm_module_types",
+ "//packages/kbn-ui-shared-deps-npm:npm_module_types",
+ "//packages/kbn-ui-shared-deps-src:npm_module_types",
+ "//packages/core/base/core-base-server-internal:npm_module_types",
+ "//packages/core/injected-metadata/core-injected-metadata-common-internal:npm_module_types",
+ "//packages/core/http/core-http-server:npm_module_types",
+ "//packages/core/http/core-http-server-internal:npm_module_types",
+ "//packages/core/elasticsearch/core-elasticsearch-server-internal:npm_module_types",
+ "//packages/core/status/core-status-server-internal:npm_module_types",
+ "//packages/core/ui-settings/core-ui-settings-common:npm_module_types",
+ "//packages/core/ui-settings/core-ui-settings-server:npm_module_types",
+ "//packages/core/plugins/core-plugins-base-server-internal: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",
+ 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/core/rendering/core-rendering-server-internal/README.md b/packages/core/rendering/core-rendering-server-internal/README.md
new file mode 100644
index 0000000000000..629ac2047de02
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-internal/README.md
@@ -0,0 +1,3 @@
+# @kbn/core-rendering-server-internal
+
+This package contains the internal types and implementation for Core's server-side rendering service.
diff --git a/packages/core/rendering/core-rendering-server-internal/index.ts b/packages/core/rendering/core-rendering-server-internal/index.ts
new file mode 100644
index 0000000000000..7ddc442a74253
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-internal/index.ts
@@ -0,0 +1,17 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { RenderingService, Fonts } from './src';
+export type {
+ InternalRenderingServicePreboot,
+ InternalRenderingServiceSetup,
+ IRenderOptions,
+ RenderingMetadata,
+ RenderingPrebootDeps,
+ RenderingSetupDeps,
+} from './src';
diff --git a/packages/core/rendering/core-rendering-server-internal/jest.config.js b/packages/core/rendering/core-rendering-server-internal/jest.config.js
new file mode 100644
index 0000000000000..48ca2e89b9763
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-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/jest_node',
+ rootDir: '../../../..',
+ roots: ['/packages/core/rendering/core-rendering-server-internal'],
+};
diff --git a/packages/core/rendering/core-rendering-server-internal/kibana.jsonc b/packages/core/rendering/core-rendering-server-internal/kibana.jsonc
new file mode 100644
index 0000000000000..2ce227d70528f
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-internal/kibana.jsonc
@@ -0,0 +1,7 @@
+{
+ "type": "shared-common",
+ "id": "@kbn/core-rendering-server-internal",
+ "owner": "@elastic/kibana-core",
+ "runtimeDeps": [],
+ "typeDeps": [],
+}
diff --git a/packages/core/rendering/core-rendering-server-internal/package.json b/packages/core/rendering/core-rendering-server-internal/package.json
new file mode 100644
index 0000000000000..ef29d29e9fa2f
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-internal/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@kbn/core-rendering-server-internal",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "author": "Kibana Core",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap b/packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap
similarity index 100%
rename from src/core/server/rendering/__snapshots__/rendering_service.test.ts.snap
rename to packages/core/rendering/core-rendering-server-internal/src/__snapshots__/rendering_service.test.ts.snap
diff --git a/src/core/server/rendering/bootstrap/__snapshots__/render_template.test.ts.snap b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/__snapshots__/render_template.test.ts.snap
similarity index 100%
rename from src/core/server/rendering/bootstrap/__snapshots__/render_template.test.ts.snap
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/__snapshots__/render_template.test.ts.snap
diff --git a/src/core/server/rendering/bootstrap/bootstrap_renderer.test.mocks.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.mocks.ts
similarity index 100%
rename from src/core/server/rendering/bootstrap/bootstrap_renderer.test.mocks.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.mocks.ts
diff --git a/src/core/server/rendering/bootstrap/bootstrap_renderer.test.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts
similarity index 98%
rename from src/core/server/rendering/bootstrap/bootstrap_renderer.test.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts
index a1ed415f72c42..af9de3fbd6ff1 100644
--- a/src/core/server/rendering/bootstrap/bootstrap_renderer.test.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.test.ts
@@ -15,7 +15,7 @@ import {
import { PackageInfo } from '@kbn/config';
import { AuthStatus } from '@kbn/core-http-server';
-import { UiPlugins } from '../../plugins';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { httpServiceMock, httpServerMock } from '@kbn/core-http-server-mocks';
import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks';
import { bootstrapRendererFactory, BootstrapRenderer } from './bootstrap_renderer';
diff --git a/src/core/server/rendering/bootstrap/bootstrap_renderer.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.ts
similarity index 97%
rename from src/core/server/rendering/bootstrap/bootstrap_renderer.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.ts
index 4c20f8d3d799a..8424bb3e68a1d 100644
--- a/src/core/server/rendering/bootstrap/bootstrap_renderer.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/bootstrap_renderer.ts
@@ -11,7 +11,7 @@ import { PackageInfo } from '@kbn/config';
import { ThemeVersion } from '@kbn/ui-shared-deps-npm';
import type { KibanaRequest, HttpAuth } from '@kbn/core-http-server';
import type { IUiSettingsClient } from '@kbn/core-ui-settings-server';
-import { UiPlugins } from '../../plugins';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { getPluginsBundlePaths } from './get_plugin_bundle_paths';
import { getJsDependencyPaths } from './get_js_dependency_paths';
import { getThemeTag } from './get_theme_tag';
diff --git a/src/core/server/rendering/bootstrap/get_js_dependency_paths.test.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_js_dependency_paths.test.ts
similarity index 100%
rename from src/core/server/rendering/bootstrap/get_js_dependency_paths.test.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_js_dependency_paths.test.ts
diff --git a/src/core/server/rendering/bootstrap/get_js_dependency_paths.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_js_dependency_paths.ts
similarity index 100%
rename from src/core/server/rendering/bootstrap/get_js_dependency_paths.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_js_dependency_paths.ts
diff --git a/src/core/server/rendering/bootstrap/get_plugin_bundle_paths.test.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_plugin_bundle_paths.test.ts
similarity index 94%
rename from src/core/server/rendering/bootstrap/get_plugin_bundle_paths.test.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_plugin_bundle_paths.test.ts
index e3746eeb17a00..619765cdc7b6a 100644
--- a/src/core/server/rendering/bootstrap/get_plugin_bundle_paths.test.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_plugin_bundle_paths.test.ts
@@ -6,7 +6,8 @@
* Side Public License, v 1.
*/
-import { InternalPluginInfo, PluginType, UiPlugins } from '../../plugins';
+import { PluginType } from '@kbn/core-base-common';
+import type { InternalPluginInfo, UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { getPluginsBundlePaths } from './get_plugin_bundle_paths';
const createUiPlugins = (pluginDeps: Record) => {
diff --git a/src/core/server/rendering/bootstrap/get_plugin_bundle_paths.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_plugin_bundle_paths.ts
similarity index 95%
rename from src/core/server/rendering/bootstrap/get_plugin_bundle_paths.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_plugin_bundle_paths.ts
index e5a9ed9fdd3d0..ad9f3edb4aa51 100644
--- a/src/core/server/rendering/bootstrap/get_plugin_bundle_paths.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_plugin_bundle_paths.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import { UiPlugins } from '../../plugins';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { filterUiPlugins } from '../filter_ui_plugins';
export interface PluginInfo {
diff --git a/src/core/server/rendering/bootstrap/get_theme_tag.test.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.test.ts
similarity index 100%
rename from src/core/server/rendering/bootstrap/get_theme_tag.test.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.test.ts
diff --git a/src/core/server/rendering/bootstrap/get_theme_tag.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.ts
similarity index 100%
rename from src/core/server/rendering/bootstrap/get_theme_tag.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/get_theme_tag.ts
diff --git a/src/core/server/rendering/bootstrap/index.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/index.ts
similarity index 100%
rename from src/core/server/rendering/bootstrap/index.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/index.ts
diff --git a/src/core/server/rendering/bootstrap/register_bootstrap_route.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/register_bootstrap_route.ts
similarity index 100%
rename from src/core/server/rendering/bootstrap/register_bootstrap_route.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/register_bootstrap_route.ts
diff --git a/src/core/server/rendering/bootstrap/render_template.test.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/render_template.test.ts
similarity index 100%
rename from src/core/server/rendering/bootstrap/render_template.test.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/render_template.test.ts
diff --git a/src/core/server/rendering/bootstrap/render_template.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/render_template.ts
similarity index 100%
rename from src/core/server/rendering/bootstrap/render_template.ts
rename to packages/core/rendering/core-rendering-server-internal/src/bootstrap/render_template.ts
diff --git a/src/core/server/rendering/filter_ui_plugins.test.ts b/packages/core/rendering/core-rendering-server-internal/src/filter_ui_plugins.test.ts
similarity index 93%
rename from src/core/server/rendering/filter_ui_plugins.test.ts
rename to packages/core/rendering/core-rendering-server-internal/src/filter_ui_plugins.test.ts
index fc013b4be0d07..096e0cc57b1f6 100644
--- a/src/core/server/rendering/filter_ui_plugins.test.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/filter_ui_plugins.test.ts
@@ -6,7 +6,8 @@
* Side Public License, v 1.
*/
-import type { DiscoveredPlugin, PluginName, UiPlugins } from '../plugins';
+import type { PluginName, DiscoveredPlugin } from '@kbn/core-base-common';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { filterUiPlugins } from './filter_ui_plugins';
function createMockPlugin(params: Partial) {
diff --git a/src/core/server/rendering/filter_ui_plugins.ts b/packages/core/rendering/core-rendering-server-internal/src/filter_ui_plugins.ts
similarity index 95%
rename from src/core/server/rendering/filter_ui_plugins.ts
rename to packages/core/rendering/core-rendering-server-internal/src/filter_ui_plugins.ts
index d3ca102a35758..e1be7719bfea7 100644
--- a/src/core/server/rendering/filter_ui_plugins.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/filter_ui_plugins.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import type { UiPlugins } from '../plugins';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
/**
* Gets the array of plugins that should be enabled on the page.
diff --git a/src/core/server/rendering/index.ts b/packages/core/rendering/core-rendering-server-internal/src/index.ts
similarity index 94%
rename from src/core/server/rendering/index.ts
rename to packages/core/rendering/core-rendering-server-internal/src/index.ts
index 6cf0e2a74aa1f..e1cac45f7765c 100644
--- a/src/core/server/rendering/index.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/index.ts
@@ -7,6 +7,7 @@
*/
export { RenderingService } from './rendering_service';
+export { Fonts } from './views';
export type {
InternalRenderingServicePreboot,
InternalRenderingServiceSetup,
diff --git a/src/core/server/rendering/internal_types.ts b/packages/core/rendering/core-rendering-server-internal/src/internal_types.ts
similarity index 100%
rename from src/core/server/rendering/internal_types.ts
rename to packages/core/rendering/core-rendering-server-internal/src/internal_types.ts
diff --git a/src/core/server/rendering/render_utils.test.ts b/packages/core/rendering/core-rendering-server-internal/src/render_utils.test.ts
similarity index 100%
rename from src/core/server/rendering/render_utils.test.ts
rename to packages/core/rendering/core-rendering-server-internal/src/render_utils.test.ts
diff --git a/src/core/server/rendering/render_utils.ts b/packages/core/rendering/core-rendering-server-internal/src/render_utils.ts
similarity index 100%
rename from src/core/server/rendering/render_utils.ts
rename to packages/core/rendering/core-rendering-server-internal/src/render_utils.ts
diff --git a/src/core/server/rendering/rendering_service.test.mocks.ts b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.mocks.ts
similarity index 100%
rename from src/core/server/rendering/rendering_service.test.mocks.ts
rename to packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.mocks.ts
diff --git a/src/core/server/rendering/rendering_service.test.ts b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts
similarity index 99%
rename from src/core/server/rendering/rendering_service.test.ts
rename to packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts
index 424bcd8a6533b..48196717c6f9f 100644
--- a/src/core/server/rendering/rendering_service.test.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.test.ts
@@ -22,7 +22,7 @@ import {
mockRenderingServiceParams,
mockRenderingPrebootDeps,
mockRenderingSetupDeps,
-} from './__mocks__/params';
+} from './test_helpers/params';
import { InternalRenderingServicePreboot, InternalRenderingServiceSetup } from './types';
import { RenderingService } from './rendering_service';
import { AuthStatus } from '@kbn/core-http-server';
diff --git a/src/core/server/rendering/rendering_service.tsx b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx
similarity index 98%
rename from src/core/server/rendering/rendering_service.tsx
rename to packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx
index c5b56a06782bc..653768c83d784 100644
--- a/src/core/server/rendering/rendering_service.tsx
+++ b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx
@@ -8,15 +8,15 @@
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
+import { firstValueFrom, of } from 'rxjs';
import { catchError, take, timeout } from 'rxjs/operators';
import { i18n } from '@kbn/i18n';
import type { ThemeVersion } from '@kbn/ui-shared-deps-npm';
-import { firstValueFrom, of } from 'rxjs';
import type { CoreContext } from '@kbn/core-base-server-internal';
import type { KibanaRequest, HttpAuth } from '@kbn/core-http-server';
import type { IUiSettingsClient } from '@kbn/core-ui-settings-server';
-import type { UiPlugins } from '../plugins';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { Template } from './views';
import {
IRenderOptions,
diff --git a/src/core/server/rendering/__mocks__/params.ts b/packages/core/rendering/core-rendering-server-internal/src/test_helpers/params.ts
similarity index 85%
rename from src/core/server/rendering/__mocks__/params.ts
rename to packages/core/rendering/core-rendering-server-internal/src/test_helpers/params.ts
index c75353b87a65d..51dfab71efd22 100644
--- a/src/core/server/rendering/__mocks__/params.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/test_helpers/params.ts
@@ -10,7 +10,6 @@ import { mockCoreContext } from '@kbn/core-base-server-mocks';
import { httpServiceMock } from '@kbn/core-http-server-mocks';
import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks';
import { statusServiceMock } from '@kbn/core-status-server-mocks';
-import { pluginServiceMock } from '../../plugins/plugins_service.mock';
const context = mockCoreContext.create();
const httpPreboot = httpServiceMock.createInternalPrebootContract();
@@ -18,14 +17,22 @@ const httpSetup = httpServiceMock.createInternalSetupContract();
const status = statusServiceMock.createInternalSetupContract();
const elasticsearch = elasticsearchServiceMock.createInternalSetup();
+function createUiPlugins() {
+ return {
+ browserConfigs: new Map(),
+ internal: new Map(),
+ public: new Map(),
+ };
+}
+
export const mockRenderingServiceParams = context;
export const mockRenderingPrebootDeps = {
http: httpPreboot,
- uiPlugins: pluginServiceMock.createUiPlugins(),
+ uiPlugins: createUiPlugins(),
};
export const mockRenderingSetupDeps = {
elasticsearch,
http: httpSetup,
- uiPlugins: pluginServiceMock.createUiPlugins(),
+ uiPlugins: createUiPlugins(),
status,
};
diff --git a/src/core/server/rendering/__mocks__/rendering_service.ts b/packages/core/rendering/core-rendering-server-internal/src/test_helpers/rendering_service.ts
similarity index 100%
rename from src/core/server/rendering/__mocks__/rendering_service.ts
rename to packages/core/rendering/core-rendering-server-internal/src/test_helpers/rendering_service.ts
diff --git a/src/core/server/rendering/types.ts b/packages/core/rendering/core-rendering-server-internal/src/types.ts
similarity index 96%
rename from src/core/server/rendering/types.ts
rename to packages/core/rendering/core-rendering-server-internal/src/types.ts
index 7068d2a9b789d..e2f7797ac5c42 100644
--- a/src/core/server/rendering/types.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/types.ts
@@ -17,7 +17,7 @@ import type {
import type { InternalElasticsearchServiceSetup } from '@kbn/core-elasticsearch-server-internal';
import type { InternalStatusServiceSetup } from '@kbn/core-status-server-internal';
import type { IUiSettingsClient } from '@kbn/core-ui-settings-server';
-import { UiPlugins } from '../plugins';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
/** @internal */
export interface RenderingMetadata {
@@ -46,7 +46,7 @@ export interface RenderingSetupDeps {
uiPlugins: UiPlugins;
}
-/** @public */
+/** @internal */
export interface IRenderOptions {
/**
* Set whether the page is anonymous, which determines what plugins are enabled and whether to output user settings in the page metadata.
diff --git a/src/core/server/rendering/views/fonts.tsx b/packages/core/rendering/core-rendering-server-internal/src/views/fonts.tsx
similarity index 100%
rename from src/core/server/rendering/views/fonts.tsx
rename to packages/core/rendering/core-rendering-server-internal/src/views/fonts.tsx
diff --git a/src/core/server/rendering/views/index.ts b/packages/core/rendering/core-rendering-server-internal/src/views/index.ts
similarity index 92%
rename from src/core/server/rendering/views/index.ts
rename to packages/core/rendering/core-rendering-server-internal/src/views/index.ts
index 1aa6e658e3d29..01f395261eccf 100644
--- a/src/core/server/rendering/views/index.ts
+++ b/packages/core/rendering/core-rendering-server-internal/src/views/index.ts
@@ -7,3 +7,4 @@
*/
export { Template } from './template';
+export { Fonts } from './fonts';
diff --git a/src/core/server/rendering/views/logo.tsx b/packages/core/rendering/core-rendering-server-internal/src/views/logo.tsx
similarity index 100%
rename from src/core/server/rendering/views/logo.tsx
rename to packages/core/rendering/core-rendering-server-internal/src/views/logo.tsx
diff --git a/src/core/server/rendering/views/styles.tsx b/packages/core/rendering/core-rendering-server-internal/src/views/styles.tsx
similarity index 100%
rename from src/core/server/rendering/views/styles.tsx
rename to packages/core/rendering/core-rendering-server-internal/src/views/styles.tsx
diff --git a/src/core/server/rendering/views/template.tsx b/packages/core/rendering/core-rendering-server-internal/src/views/template.tsx
similarity index 100%
rename from src/core/server/rendering/views/template.tsx
rename to packages/core/rendering/core-rendering-server-internal/src/views/template.tsx
diff --git a/packages/core/rendering/core-rendering-server-internal/tsconfig.json b/packages/core/rendering/core-rendering-server-internal/tsconfig.json
new file mode 100644
index 0000000000000..73c8a6666ff7e
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-internal/tsconfig.json
@@ -0,0 +1,19 @@
+{
+ "extends": "../../../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node",
+ "react",
+ ]
+ },
+ "include": [
+ "**/*.ts",
+ "**/*.tsx",
+ ]
+}
diff --git a/packages/core/rendering/core-rendering-server-mocks/BUILD.bazel b/packages/core/rendering/core-rendering-server-mocks/BUILD.bazel
new file mode 100644
index 0000000000000..9ec36da1a1f67
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-mocks/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-rendering-server-mocks"
+PKG_REQUIRE_NAME = "@kbn/core-rendering-server-mocks"
+
+SOURCE_FILES = glob(
+ [
+ "**/*.ts",
+ ],
+ exclude = [
+ "**/*.config.js",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+]
+
+RUNTIME_DEPS = [
+]
+
+TYPES_DEPS = [
+ "@npm//@types/node",
+ "@npm//@types/jest",
+ "//packages/kbn-utility-types:npm_module_types",
+ "//packages/core/rendering/core-rendering-server-internal: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",
+ 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/core/rendering/core-rendering-server-mocks/README.md b/packages/core/rendering/core-rendering-server-mocks/README.md
new file mode 100644
index 0000000000000..72df549319198
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-mocks/README.md
@@ -0,0 +1,4 @@
+# @kbn/core-rendering-server-mocks
+
+This package contains mocks for Core's server-side rendering service.
+- `renderingServiceMock`
diff --git a/packages/core/rendering/core-rendering-server-mocks/index.ts b/packages/core/rendering/core-rendering-server-mocks/index.ts
new file mode 100644
index 0000000000000..e7ce72ce797fb
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-mocks/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 { renderingServiceMock } from './src';
diff --git a/packages/core/rendering/core-rendering-server-mocks/jest.config.js b/packages/core/rendering/core-rendering-server-mocks/jest.config.js
new file mode 100644
index 0000000000000..5dc1ae51c50b0
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-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/jest_node',
+ rootDir: '../../../..',
+ roots: ['/packages/core/rendering/core-rendering-server-mocks'],
+};
diff --git a/packages/core/rendering/core-rendering-server-mocks/kibana.jsonc b/packages/core/rendering/core-rendering-server-mocks/kibana.jsonc
new file mode 100644
index 0000000000000..a04eae9cadc20
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-mocks/kibana.jsonc
@@ -0,0 +1,7 @@
+{
+ "type": "shared-common",
+ "id": "@kbn/core-rendering-server-mocks",
+ "owner": "@elastic/kibana-core",
+ "runtimeDeps": [],
+ "typeDeps": [],
+}
diff --git a/packages/core/rendering/core-rendering-server-mocks/package.json b/packages/core/rendering/core-rendering-server-mocks/package.json
new file mode 100644
index 0000000000000..572e1d5530587
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-mocks/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@kbn/core-rendering-server-mocks",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "author": "Kibana Core",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/packages/core/rendering/core-rendering-server-mocks/src/index.ts b/packages/core/rendering/core-rendering-server-mocks/src/index.ts
new file mode 100644
index 0000000000000..d56794e3e9ac6
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-mocks/src/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 { renderingServiceMock } from './rendering_service.mock';
diff --git a/src/core/server/rendering/rendering_service.mock.ts b/packages/core/rendering/core-rendering-server-mocks/src/rendering_service.mock.ts
similarity index 55%
rename from src/core/server/rendering/rendering_service.mock.ts
rename to packages/core/rendering/core-rendering-server-mocks/src/rendering_service.mock.ts
index 3d8213da62c6d..5cdf5c92f9237 100644
--- a/src/core/server/rendering/rendering_service.mock.ts
+++ b/packages/core/rendering/core-rendering-server-mocks/src/rendering_service.mock.ts
@@ -6,7 +6,14 @@
* Side Public License, v 1.
*/
-import { InternalRenderingServicePreboot, InternalRenderingServiceSetup } from './types';
+import type { PublicMethodsOf } from '@kbn/utility-types';
+import type {
+ InternalRenderingServicePreboot,
+ InternalRenderingServiceSetup,
+ RenderingService,
+} from '@kbn/core-rendering-server-internal';
+
+export type RenderingServiceMock = jest.Mocked>;
function createRenderingPreboot() {
const mocked: jest.Mocked = {
@@ -22,7 +29,21 @@ function createRenderingSetup() {
return mocked;
}
-export const renderingMock = {
+function createRenderingService() {
+ const mock: RenderingServiceMock = {
+ preboot: jest.fn(),
+ setup: jest.fn(),
+ stop: jest.fn(),
+ };
+
+ mock.preboot.mockResolvedValue(createRenderingPreboot());
+ mock.setup.mockResolvedValue(createRenderingSetup());
+
+ return mock;
+}
+
+export const renderingServiceMock = {
+ create: createRenderingService,
createPrebootContract: createRenderingPreboot,
createSetupContract: createRenderingSetup,
};
diff --git a/packages/core/rendering/core-rendering-server-mocks/tsconfig.json b/packages/core/rendering/core-rendering-server-mocks/tsconfig.json
new file mode 100644
index 0000000000000..71bb40fe57f3f
--- /dev/null
+++ b/packages/core/rendering/core-rendering-server-mocks/tsconfig.json
@@ -0,0 +1,17 @@
+{
+ "extends": "../../../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node"
+ ]
+ },
+ "include": [
+ "**/*.ts",
+ ]
+}
diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.test.ts
index 614c9e3680acc..fed06cbf2f740 100644
--- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.test.ts
+++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/saved_objects_exporter.test.ts
@@ -146,16 +146,18 @@ describe('getSortedObjectsForExport()', () => {
attributes = {},
sort = [],
type = 'index-pattern',
+ idPrefix = '',
}: {
attributes?: Record;
sort?: string[];
type?: string;
+ idPrefix?: string;
} = {}
) {
const hits = [];
for (let i = 1; i <= hitCount; i++) {
hits.push({
- id: `${i}`,
+ id: `${idPrefix}${i}`,
type,
attributes,
sort,
@@ -247,7 +249,7 @@ describe('getSortedObjectsForExport()', () => {
describe('>1k hits', () => {
const firstMockHits = generateHits(1000, { sort: ['a', 'b'] });
- const secondMockHits = generateHits(500);
+ const secondMockHits = generateHits(500, { idPrefix: 'second-hit-' });
test('requests multiple pages', async () => {
savedObjectsClient.find.mockResolvedValueOnce({
diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.test.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.test.ts
index 1f663ea5dbc56..27fbb09a37018 100644
--- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.test.ts
+++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.test.ts
@@ -6,7 +6,9 @@
* Side Public License, v 1.
*/
+import { range } from 'lodash';
import { sortObjects } from './sort_objects';
+import type { SavedObject } from '@kbn/core-saved-objects-common';
describe('sortObjects()', () => {
test('should return on empty array', () => {
@@ -309,6 +311,7 @@ describe('sortObjects()', () => {
]
`);
});
+
test('should not fail on complex circular dependencies', () => {
const docs = [
{
@@ -424,4 +427,38 @@ describe('sortObjects()', () => {
]
`);
});
+
+ test('should not fail on large graph of objects', () => {
+ // create an object that references all objects with a higher `index` up to `depth`.
+ const createComplexNode = (index: number, depth: number): SavedObject => {
+ return {
+ type: 'test',
+ id: `${index}`,
+ attributes: {},
+ references: range(index + 1, depth).map((refIndex) => ({
+ type: 'test',
+ id: `${refIndex}`,
+ name: `test-${refIndex}`,
+ })),
+ };
+ };
+
+ const createComplexGraph = (depth: number): SavedObject[] => {
+ const nodes: SavedObject[] = [];
+ for (let i = 0; i < depth; i++) {
+ nodes.push(createComplexNode(i, depth));
+ }
+ return nodes;
+ };
+
+ const depth = 100;
+ const graph = createComplexGraph(depth);
+ const sorted = sortObjects(graph);
+
+ expect(sorted.map(({ type, id }) => `${type}:${id}`)).toEqual(
+ range(depth)
+ .reverse()
+ .map((index) => `test:${index}`)
+ );
+ });
});
diff --git a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.ts b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.ts
index 487622877e25c..551ba3989e527 100644
--- a/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.ts
+++ b/packages/core/saved-objects/core-saved-objects-import-export-server-internal/src/export/sort_objects.ts
@@ -8,27 +8,29 @@
import type { SavedObject } from '@kbn/core-saved-objects-common';
+const getId = (object: { type: string; id: string }) => `${object.type}:${object.id}`;
+
export function sortObjects(savedObjects: SavedObject[]): SavedObject[] {
- const path = new Set();
+ const traversed = new Set();
const sorted = new Set();
const objectsByTypeId = new Map(
- savedObjects.map((object) => [`${object.type}:${object.id}`, object] as [string, SavedObject])
+ savedObjects.map((object) => [getId(object), object] as [string, SavedObject])
);
function includeObjects(objects: SavedObject[]) {
for (const object of objects) {
- if (path.has(object)) {
+ const objectId = getId(object);
+ if (traversed.has(objectId)) {
continue;
}
- const refdObjects = object.references
- .map((ref) => objectsByTypeId.get(`${ref.type}:${ref.id}`))
+ const objectRefs = object.references
+ .map((ref) => objectsByTypeId.get(getId(ref)))
.filter((ref): ref is SavedObject => !!ref);
- if (refdObjects.length) {
- path.add(object);
- includeObjects(refdObjects);
- path.delete(object);
+ traversed.add(objectId);
+ if (objectRefs.length) {
+ includeObjects(objectRefs);
}
sorted.add(object);
@@ -36,5 +38,6 @@ export function sortObjects(savedObjects: SavedObject[]): SavedObject[] {
}
includeObjects(savedObjects);
+
return [...sorted];
}
diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/__snapshots__/migrations_state_action_machine.test.ts.snap b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/__snapshots__/migrations_state_action_machine.test.ts.snap
index 4c21ba704fe48..39ff3c4c5700a 100644
--- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/__snapshots__/migrations_state_action_machine.test.ts.snap
+++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/__snapshots__/migrations_state_action_machine.test.ts.snap
@@ -71,6 +71,11 @@ Object {
"type": "fleet-enrollment-api-keys",
},
},
+ Object {
+ "term": Object {
+ "type": "guided-setup-state",
+ },
+ },
Object {
"term": Object {
"type": "ml-telemetry",
@@ -246,6 +251,11 @@ Object {
"type": "fleet-enrollment-api-keys",
},
},
+ Object {
+ "term": Object {
+ "type": "guided-setup-state",
+ },
+ },
Object {
"term": Object {
"type": "ml-telemetry",
@@ -425,6 +435,11 @@ Object {
"type": "fleet-enrollment-api-keys",
},
},
+ Object {
+ "term": Object {
+ "type": "guided-setup-state",
+ },
+ },
Object {
"term": Object {
"type": "ml-telemetry",
@@ -608,6 +623,11 @@ Object {
"type": "fleet-enrollment-api-keys",
},
},
+ Object {
+ "term": Object {
+ "type": "guided-setup-state",
+ },
+ },
Object {
"term": Object {
"type": "ml-telemetry",
@@ -833,6 +853,11 @@ Object {
"type": "fleet-enrollment-api-keys",
},
},
+ Object {
+ "term": Object {
+ "type": "guided-setup-state",
+ },
+ },
Object {
"term": Object {
"type": "ml-telemetry",
@@ -1019,6 +1044,11 @@ Object {
"type": "fleet-enrollment-api-keys",
},
},
+ Object {
+ "term": Object {
+ "type": "guided-setup-state",
+ },
+ },
Object {
"term": Object {
"type": "ml-telemetry",
diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/unused_types.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/unused_types.ts
index 480395241c278..7dbcf2c270ba4 100644
--- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/unused_types.ts
+++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/unused_types.ts
@@ -22,6 +22,8 @@ export const REMOVED_TYPES: string[] = [
'fleet-agents',
'fleet-agent-actions',
'fleet-enrollment-api-keys',
+ // replaced by guided-onboarding-guide-state in 8.6
+ 'guided-setup-state',
// Was removed in 7.12
'ml-telemetry',
'server',
diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/initial_state.test.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/initial_state.test.ts
index 2b0e9a7c7f1a4..d1c19aa7d212e 100644
--- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/initial_state.test.ts
+++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/initial_state.test.ts
@@ -107,6 +107,11 @@ describe('createInitialState', () => {
"type": "fleet-enrollment-api-keys",
},
},
+ Object {
+ "term": Object {
+ "type": "guided-setup-state",
+ },
+ },
Object {
"term": Object {
"type": "ml-telemetry",
diff --git a/packages/kbn-apm-synthtrace/src/cli/run_synthtrace.ts b/packages/kbn-apm-synthtrace/src/cli/run_synthtrace.ts
index ecfbd4a387f34..517d2d61d799f 100644
--- a/packages/kbn-apm-synthtrace/src/cli/run_synthtrace.ts
+++ b/packages/kbn-apm-synthtrace/src/cli/run_synthtrace.ts
@@ -15,7 +15,7 @@ import { parseRunCliFlags } from './utils/parse_run_cli_flags';
import { getCommonServices } from './utils/get_common_services';
import { ApmSynthtraceKibanaClient } from '../lib/apm/client/apm_synthtrace_kibana_client';
import { StreamAggregator } from '../lib/stream_aggregator';
-import { ServiceLatencyAggregator } from '../lib/apm/aggregators/service_latency_aggregator';
+import { ServicMetricsAggregator } from '../lib/apm/aggregators/service_metrics_aggregator';
function options(y: Argv) {
return y
@@ -207,7 +207,7 @@ export function runSynthtrace() {
}
const aggregators: StreamAggregator[] = [];
const registry = new Map StreamAggregator[]>([
- ['service', () => [new ServiceLatencyAggregator()]],
+ ['service', () => [new ServicMetricsAggregator()]],
]);
if (runOptions.streamProcessors && runOptions.streamProcessors.length > 0) {
for (const processorName of runOptions.streamProcessors) {
diff --git a/packages/kbn-apm-synthtrace/src/cli/utils/synthtrace_worker.ts b/packages/kbn-apm-synthtrace/src/cli/utils/synthtrace_worker.ts
index 720b1b0527e80..54ce5b1b2e328 100644
--- a/packages/kbn-apm-synthtrace/src/cli/utils/synthtrace_worker.ts
+++ b/packages/kbn-apm-synthtrace/src/cli/utils/synthtrace_worker.ts
@@ -16,7 +16,7 @@ import { StreamProcessor } from '../../lib/stream_processor';
import { Scenario } from '../scenario';
import { EntityIterable, Fields } from '../../..';
import { StreamAggregator } from '../../lib/stream_aggregator';
-import { ServiceLatencyAggregator } from '../../lib/apm/aggregators/service_latency_aggregator';
+import { ServicMetricsAggregator } from '../../lib/apm/aggregators/service_metrics_aggregator';
// logging proxy to main thread, ensures we see real time logging
const l = {
@@ -63,7 +63,7 @@ async function setup() {
parentPort?.postMessage({ workerIndex, lastTimestamp: item['@timestamp'] });
}
};
- const aggregators: StreamAggregator[] = [new ServiceLatencyAggregator()];
+ const aggregators: StreamAggregator[] = [new ServicMetricsAggregator()];
// If we are sending data to apm-server we do not have to create any aggregates in the stream processor
streamProcessor = new StreamProcessor({
version,
diff --git a/packages/kbn-apm-synthtrace/src/lib/apm/aggregators/service_latency_aggregator.ts b/packages/kbn-apm-synthtrace/src/lib/apm/aggregators/service_metrics_aggregator.ts
similarity index 78%
rename from packages/kbn-apm-synthtrace/src/lib/apm/aggregators/service_latency_aggregator.ts
rename to packages/kbn-apm-synthtrace/src/lib/apm/aggregators/service_metrics_aggregator.ts
index e28ba234b2a49..618c9e52b9f2c 100644
--- a/packages/kbn-apm-synthtrace/src/lib/apm/aggregators/service_latency_aggregator.ts
+++ b/packages/kbn-apm-synthtrace/src/lib/apm/aggregators/service_metrics_aggregator.ts
@@ -12,12 +12,14 @@ import { ApmFields } from '../apm_fields';
import { Fields } from '../../entity';
import { StreamAggregator } from '../../stream_aggregator';
-type LatencyState = {
+type AggregationState = {
count: number;
min: number;
max: number;
sum: number;
timestamp: number;
+ failure_count: number;
+ success_count: number;
} & Pick;
export type ServiceFields = Fields &
@@ -35,15 +37,22 @@ export type ServiceFields = Fields &
| 'transaction.type'
> &
Partial<{
- 'transaction.duration.aggregate': {
- min: number;
- max: number;
- sum: number;
- value_count: number;
+ _doc_count: number;
+ transaction: {
+ duration: {
+ summary: {
+ min: number;
+ max: number;
+ sum: number;
+ value_count: number;
+ };
+ };
+ failure_count: number;
+ success_count: number;
};
}>;
-export class ServiceLatencyAggregator implements StreamAggregator {
+export class ServicMetricsAggregator implements StreamAggregator {
public readonly name;
constructor() {
@@ -68,7 +77,7 @@ export class ServiceLatencyAggregator implements StreamAggregator {
duration: {
type: 'object',
properties: {
- aggregate: {
+ summary: {
type: 'aggregate_metric_double',
metrics: ['min', 'max', 'sum', 'value_count'],
default_metric: 'sum',
@@ -76,6 +85,12 @@ export class ServiceLatencyAggregator implements StreamAggregator {
},
},
},
+ failure_count: {
+ type: { type: 'long' },
+ },
+ success_count: {
+ type: { type: 'long' },
+ },
},
},
service: {
@@ -99,7 +114,7 @@ export class ServiceLatencyAggregator implements StreamAggregator {
return null;
}
- private state: Record = {};
+ private state: Record = {};
private processedComponent: number = 0;
@@ -120,13 +135,25 @@ export class ServiceLatencyAggregator implements StreamAggregator {
'service.name': service,
'service.environment': environment,
'transaction.type': transactionType,
+ failure_count: 0,
+ success_count: 0,
};
}
+
+ const state = this.state[key];
+ state.count++;
+
+ switch (event['event.outcome']) {
+ case 'failure':
+ state.failure_count++;
+ break;
+ case 'success':
+ state.success_count++;
+ break;
+ }
+
const duration = Number(event['transaction.duration.us']);
if (duration >= 0) {
- const state = this.state[key];
-
- state.count++;
state.sum += duration;
if (duration > state.max) state.max = duration;
if (duration < state.min) state.min = Math.min(0, duration);
@@ -164,17 +191,24 @@ export class ServiceLatencyAggregator implements StreamAggregator {
const component = Date.now() % 100;
const state = this.state[key];
return {
+ _doc_count: state.count,
'@timestamp': state.timestamp + random(0, 100) + component + this.processedComponent,
'metricset.name': 'service',
'processor.event': 'metric',
'service.name': state['service.name'],
'service.environment': state['service.environment'],
'transaction.type': state['transaction.type'],
- 'transaction.duration.aggregate': {
- min: state.min,
- max: state.max,
- sum: state.sum,
- value_count: state.count,
+ transaction: {
+ duration: {
+ summary: {
+ min: state.min,
+ max: state.max,
+ sum: state.sum,
+ value_count: state.count,
+ },
+ },
+ failure_count: state.failure_count,
+ success_count: state.success_count,
},
};
}
diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts
index 721fc431a3c2e..8ef5a68a3f98c 100644
--- a/packages/kbn-doc-links/src/get_doc_links.ts
+++ b/packages/kbn-doc-links/src/get_doc_links.ts
@@ -31,6 +31,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
const ENTERPRISE_SEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/enterprise-search/${DOC_LINK_VERSION}/`;
const WORKPLACE_SEARCH_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/workplace-search/${DOC_LINK_VERSION}/`;
const SEARCH_UI_DOCS = `${DOCS_WEBSITE_URL}search-ui/`;
+ const MACHINE_LEARNING_DOCS = `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/`;
return deepFreeze({
settings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/settings.html`,
@@ -362,6 +363,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
eventFilters: `${SECURITY_SOLUTION_DOCS}event-filters.html`,
blocklist: `${SECURITY_SOLUTION_DOCS}blocklist.html`,
threatIntelInt: `${SECURITY_SOLUTION_DOCS}es-threat-intel-integrations.html`,
+ endpointArtifacts: `${SECURITY_SOLUTION_DOCS}endpoint-artifacts.html`,
policyResponseTroubleshooting: {
full_disk_access: `${SECURITY_SOLUTION_DOCS}deploy-elastic-endpoint.html#enable-fda-endpoint`,
macos_system_ext: `${SECURITY_SOLUTION_DOCS}deploy-elastic-endpoint.html#system-extension-endpoint`,
@@ -398,39 +400,39 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => {
savedObjectsApiList: `${KIBANA_DOCS}saved-objects-api.html#saved-objects-api`,
},
ml: {
- guide: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/index.html`,
- aggregations: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-configuring-aggregation.html`,
- anomalyDetection: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-overview.html`,
- anomalyDetectionJobs: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-finding-anomalies.html`,
- anomalyDetectionConfiguringCategories: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-configuring-categories.html`,
- anomalyDetectionBucketSpan: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-bucket-span`,
- anomalyDetectionCardinality: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-cardinality`,
- anomalyDetectionCreateJobs: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-create-job`,
- anomalyDetectionDetectors: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-detectors`,
- anomalyDetectionInfluencers: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-influencers`,
+ guide: `${MACHINE_LEARNING_DOCS}index.html`,
+ aggregations: `${MACHINE_LEARNING_DOCS}ml-configuring-aggregation.html`,
+ anomalyDetection: `${MACHINE_LEARNING_DOCS}ml-ad-overview.html`,
+ anomalyDetectionJobs: `${MACHINE_LEARNING_DOCS}ml-ad-finding-anomalies.html`,
+ anomalyDetectionConfiguringCategories: `${MACHINE_LEARNING_DOCS}ml-configuring-categories.html`,
+ anomalyDetectionBucketSpan: `${MACHINE_LEARNING_DOCS}ml-ad-run-jobs.html#ml-ad-bucket-span`,
+ anomalyDetectionCardinality: `${MACHINE_LEARNING_DOCS}ml-ad-run-jobs.html#ml-ad-cardinality`,
+ anomalyDetectionCreateJobs: `${MACHINE_LEARNING_DOCS}ml-ad-run-jobs.html#ml-ad-create-job`,
+ anomalyDetectionDetectors: `${MACHINE_LEARNING_DOCS}ml-ad-run-jobs.html#ml-ad-detectors`,
+ anomalyDetectionInfluencers: `${MACHINE_LEARNING_DOCS}ml-ad-run-jobs.html#ml-ad-influencers`,
anomalyDetectionJobResource: `${ELASTICSEARCH_DOCS}ml-put-job.html#ml-put-job-path-parms`,
anomalyDetectionJobResourceAnalysisConfig: `${ELASTICSEARCH_DOCS}ml-put-job.html#put-analysisconfig`,
- anomalyDetectionJobTips: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-job-tips`,
- alertingRules: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-configuring-alerts.html`,
- anomalyDetectionModelMemoryLimits: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-model-memory-limits`,
- calendars: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-calendars`,
- classificationEvaluation: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-classification.html#ml-dfanalytics-classification-evaluation`,
- customRules: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-ad-run-jobs.html#ml-ad-rules`,
- customUrls: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-configuring-url.html`,
- dataFrameAnalytics: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfanalytics.html`,
- dFAPrepareData: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-overview.html#prepare-transform-data`,
- featureImportance: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-feature-importance.html`,
- outlierDetectionRoc: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-finding-outliers.html#ml-dfanalytics-roc`,
- regressionEvaluation: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-regression.html#ml-dfanalytics-regression-evaluation`,
- classificationAucRoc: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-dfa-classification.html#ml-dfanalytics-class-aucroc`,
+ anomalyDetectionJobTips: `${MACHINE_LEARNING_DOCS}ml-ad-run-jobs.html#ml-ad-job-tips`,
+ alertingRules: `${MACHINE_LEARNING_DOCS}ml-configuring-alerts.html`,
+ anomalyDetectionModelMemoryLimits: `${MACHINE_LEARNING_DOCS}ml-ad-run-jobs.html#ml-ad-model-memory-limits`,
+ calendars: `${MACHINE_LEARNING_DOCS}ml-ad-run-jobs.html#ml-ad-calendars`,
+ classificationEvaluation: `${MACHINE_LEARNING_DOCS}ml-dfa-classification.html#ml-dfanalytics-classification-evaluation`,
+ customRules: `${MACHINE_LEARNING_DOCS}ml-ad-run-jobs.html#ml-ad-rules`,
+ customUrls: `${MACHINE_LEARNING_DOCS}ml-configuring-url.html`,
+ dataFrameAnalytics: `${MACHINE_LEARNING_DOCS}ml-dfanalytics.html`,
+ dFAPrepareData: `${MACHINE_LEARNING_DOCS}ml-dfa-overview.html#prepare-transform-data`,
+ featureImportance: `${MACHINE_LEARNING_DOCS}ml-feature-importance.html`,
+ outlierDetectionRoc: `${MACHINE_LEARNING_DOCS}ml-dfa-finding-outliers.html#ml-dfanalytics-roc`,
+ regressionEvaluation: `${MACHINE_LEARNING_DOCS}ml-dfa-regression.html#ml-dfanalytics-regression-evaluation`,
+ classificationAucRoc: `${MACHINE_LEARNING_DOCS}ml-dfa-classification.html#ml-dfanalytics-class-aucroc`,
setUpgradeMode: `${ELASTICSEARCH_DOCS}ml-set-upgrade-mode.html`,
- trainedModels: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-trained-models.html`,
- startTrainedModelsDeployment: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-nlp-deploy-models.html#ml-nlp-deploy-model`,
+ trainedModels: `${MACHINE_LEARNING_DOCS}ml-trained-models.html`,
+ startTrainedModelsDeployment: `${MACHINE_LEARNING_DOCS}ml-nlp-deploy-models.html#ml-nlp-deploy-model`,
},
transforms: {
guide: `${ELASTICSEARCH_DOCS}transforms.html`,
// TODO add valid docs URL
- alertingRules: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/ml-configuring-alerts.html`,
+ alertingRules: `${MACHINE_LEARNING_DOCS}ml-configuring-alerts.html`,
},
visualize: {
guide: `${KIBANA_DOCS}dashboard.html`,
diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts
index 7cd785ee194fa..aed1b552bdb30 100644
--- a/packages/kbn-doc-links/src/types.ts
+++ b/packages/kbn-doc-links/src/types.ts
@@ -265,6 +265,7 @@ export interface DocLinks {
readonly trustedApps: string;
readonly eventFilters: string;
readonly blocklist: string;
+ readonly endpointArtifacts: string;
readonly policyResponseTroubleshooting: {
full_disk_access: string;
macos_system_ext: string;
diff --git a/packages/kbn-eslint-plugin-imports/src/rules/no_boundary_crossing.ts b/packages/kbn-eslint-plugin-imports/src/rules/no_boundary_crossing.ts
index 4f3defc21d296..832b4d2e3c67e 100644
--- a/packages/kbn-eslint-plugin-imports/src/rules/no_boundary_crossing.ts
+++ b/packages/kbn-eslint-plugin-imports/src/rules/no_boundary_crossing.ts
@@ -19,15 +19,17 @@ import { getSourcePath } from '../helpers/source';
import { getRepoSourceClassifier } from '../helpers/repo_source_classifier';
import { getImportResolver } from '../get_import_resolver';
-const IMPORTABLE_FROM: Record = {
+const ANY_FILE_IN_BAZEL = Symbol();
+
+const IMPORTABLE_FROM: Record = {
'non-package': ['non-package', 'server package', 'browser package', 'common package', 'static'],
'server package': ['common package', 'server package', 'static'],
'browser package': ['common package', 'browser package', 'static'],
'common package': ['common package', 'static'],
static: [],
- 'tests or mocks': '*',
- tooling: '*',
+ 'tests or mocks': ANY_FILE_IN_BAZEL,
+ tooling: ANY_FILE_IN_BAZEL,
};
const toList = (strings: string[]) => {
@@ -87,6 +89,7 @@ export const NoBoundaryCrossingRule: Rule.RuleModule = {
},
messages: {
TYPE_MISMATCH: `"{{importedType}}" code can not be imported from "{{ownType}}" code.{{suggestion}}`,
+ FILE_OUTSIDE_OF_PACKAGE: `"{{ownType}}" code can import any code already within packages, but not files outside of packages.`,
},
},
create(context) {
@@ -98,12 +101,7 @@ export const NoBoundaryCrossingRule: Rule.RuleModule = {
const self = classifier.classify(sourcePath);
const importable = IMPORTABLE_FROM[self.type];
- if (importable === '*') {
- // don't check imports in files which can import anything
- return {};
- }
-
- return visitAllImportStatements((req, { node, importer }) => {
+ return visitAllImportStatements((req, { node, importer, type }) => {
if (
req === null ||
// we can ignore imports using the raw-loader, they will need to be resolved but can be managed on a case by case basis
@@ -121,6 +119,27 @@ export const NoBoundaryCrossingRule: Rule.RuleModule = {
const imported = classifier.classify(result.absolute);
+ if (importable === ANY_FILE_IN_BAZEL) {
+ if (type === 'jest' && imported.repoRel === 'package.json') {
+ // we allow jest.mock() calls to mock out the `package.json` file... it's a very
+ // specific exception for a very specific implementation
+ return;
+ }
+
+ if (self.pkgInfo?.isBazelPackage ? imported.pkgInfo?.isBazelPackage : true) {
+ return;
+ }
+
+ context.report({
+ node: node as ESTree.Node,
+ messageId: 'FILE_OUTSIDE_OF_PACKAGE',
+ data: {
+ ownType: self.type,
+ },
+ });
+ return;
+ }
+
if (!importable.includes(imported.type)) {
context.report({
node: node as ESTree.Node,
diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml
index c8daaf258deb6..67064af8cddc5 100644
--- a/packages/kbn-optimizer/limits.yml
+++ b/packages/kbn-optimizer/limits.yml
@@ -10,7 +10,10 @@ pageLoadAssetSize:
cases: 144442
charts: 55000
cloud: 21076
+ cloudChat: 19894
cloudExperiments: 59358
+ cloudFullStory: 18493
+ cloudLinks: 17629
cloudSecurityPosture: 19109
console: 46091
controls: 40000
@@ -23,7 +26,7 @@ pageLoadAssetSize:
dataViewEditor: 12000
dataViewFieldEditor: 27000
dataViewManagement: 5000
- dataViews: 44532
+ dataViews: 46532
dataVisualizer: 27530
devTools: 38637
discover: 99999
@@ -108,6 +111,7 @@ pageLoadAssetSize:
snapshotRestore: 79032
spaces: 57868
stackAlerts: 29684
+ stackConnectors: 36314
synthetics: 40958
telemetry: 51957
telemetryManagementSection: 38586
diff --git a/packages/kbn-repo-source-classifier/src/pkg_info.ts b/packages/kbn-repo-source-classifier/src/pkg_info.ts
index 89d66092737b4..a7f7100ba959f 100644
--- a/packages/kbn-repo-source-classifier/src/pkg_info.ts
+++ b/packages/kbn-repo-source-classifier/src/pkg_info.ts
@@ -13,4 +13,6 @@ export interface PkgInfo {
rel: string;
/** Absolute path to the package directory */
pkgDir: string;
+ /** Is the package a bazel package? If false, then the package is a "synthetic" plugin package */
+ isBazelPackage: boolean;
}
diff --git a/packages/kbn-repo-source-classifier/src/repo_path.ts b/packages/kbn-repo-source-classifier/src/repo_path.ts
index 05eef7105a717..cd13adf0cb824 100644
--- a/packages/kbn-repo-source-classifier/src/repo_path.ts
+++ b/packages/kbn-repo-source-classifier/src/repo_path.ts
@@ -93,6 +93,7 @@ export class RepoPath {
pkgDir,
pkgId,
rel,
+ isBazelPackage: this.resolver.isBazelPackage(pkgId),
};
}
}
diff --git a/packages/kbn-securitysolution-exception-list-components/BUILD.bazel b/packages/kbn-securitysolution-exception-list-components/BUILD.bazel
new file mode 100644
index 0000000000000..6436793fa5f30
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/BUILD.bazel
@@ -0,0 +1,163 @@
+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-securitysolution-exception-list-components"
+PKG_REQUIRE_NAME = "@kbn/securitysolution-exception-list-components"
+
+SOURCE_FILES = glob(
+ [
+ "**/*.ts",
+ "**/*.tsx",
+ "**/*.svg",
+ "**/*.d.ts",
+ ],
+ exclude = [
+ "**/*.config.js",
+ "**/*.mock.*",
+ "**/*.test.*",
+ "**/*.stories.*",
+ "**/__snapshots__/**",
+ "**/integration_tests/**",
+ "**/mocks/**",
+ "**/scripts/**",
+ "**/storybook/**",
+ "**/test_fixtures/**",
+ "**/test_helpers/**",
+ ],
+)
+
+SRCS = SOURCE_FILES
+
+filegroup(
+ name = "srcs",
+ srcs = SRCS,
+)
+
+NPM_MODULE_EXTRA_FILES = [
+ "package.json",
+ "jest.config.js"
+]
+
+# 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 = [
+ "@npm//react",
+ "//packages/kbn-securitysolution-io-ts-list-types",
+ "//packages/kbn-securitysolution-autocomplete",
+ "//packages/kbn-ui-theme",
+ "//packages/kbn-i18n-react",
+ "//packages/kbn-i18n",
+ "@npm//@elastic/eui",
+ "@npm//@emotion/css",
+ "@npm//@emotion/react",
+ "@npm//@testing-library/jest-dom",
+ "@npm//jest",
+]
+
+# 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//@types/react",
+ "//packages/kbn-securitysolution-io-ts-list-types:npm_module_types",
+ "//packages/kbn-securitysolution-autocomplete:npm_module_types",
+ "//packages/kbn-ui-theme:npm_module_types",
+ "//packages/kbn-i18n-react:npm_module_types",
+ "@npm//@elastic/eui",
+ "@npm//@emotion/css",
+ "@npm//@emotion/react",
+ "@npm//jest",
+
+]
+
+jsts_transpiler(
+ name = "target_node",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+ additional_args = [
+ "--copy-files"
+ ],
+)
+
+jsts_transpiler(
+ name = "target_web",
+ srcs = SRCS,
+ build_pkg_name = package_name(),
+ web = True,
+ additional_args = [
+ "--copy-files"
+ ],
+)
+
+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",
+ 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/kbn-securitysolution-exception-list-components/README.md b/packages/kbn-securitysolution-exception-list-components/README.md
new file mode 100644
index 0000000000000..e23b85e409960
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/README.md
@@ -0,0 +1,27 @@
+# @kbn/securitysolution-exception-list-components
+
+This is where the building UI components of the Exception-List live
+Most of the components here are imported from `x-pack/plugins/security_solutions/public/detection_engine`
+
+# Aim
+
+TODO
+
+# Pattern used
+
+```
+component
+ index.tsx
+ index.styles.ts <-- to hold styles if the component has many custom styles
+ use_component.ts <-- for logic if the Presentational Component has logic
+ index.test.tsx
+ use_component.test.tsx
+```
+
+# Next
+
+- Now the `ExceptionItems, ExceptionItemCard
+and ExceptionItemCardMetaInfo
+ ` receive `securityLinkAnchorComponent, exceptionsUtilityComponent
+, and exceptionsUtilityComponent
+` as props to avoid moving all the `common` components under the `x-pack` at once, later we should move all building blocks to this `kbn-package`
diff --git a/packages/kbn-securitysolution-exception-list-components/index.ts b/packages/kbn-securitysolution-exception-list-components/index.ts
new file mode 100644
index 0000000000000..f5001ff35fd33
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/index.ts
@@ -0,0 +1,16 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+export * from './src/search_bar/search_bar';
+export * from './src/empty_viewer_state/empty_viewer_state';
+export * from './src/pagination/pagination';
+// export * from './src/exceptions_utility/exceptions_utility';
+export * from './src/exception_items/exception_items';
+export * from './src/exception_item_card';
+export * from './src/value_with_space_warning';
+export * from './src/types';
diff --git a/packages/kbn-securitysolution-exception-list-components/jest.config.js b/packages/kbn-securitysolution-exception-list-components/jest.config.js
new file mode 100644
index 0000000000000..37a11c23c75ba
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/jest.config.js
@@ -0,0 +1,21 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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-securitysolution-exception-list-components'],
+ coverageReporters: ['text', 'html'],
+ collectCoverageFrom: [
+ '/packages/kbn-securitysolution-exception-list-components/**/*.{ts,tsx}',
+ '!/packages/kbn-securitysolution-exception-list-components/**/*.test',
+ ],
+ setupFilesAfterEnv: [
+ '/packages/kbn-securitysolution-exception-list-components/setup_test.ts',
+ ],
+};
diff --git a/packages/kbn-securitysolution-exception-list-components/kibana.jsonc b/packages/kbn-securitysolution-exception-list-components/kibana.jsonc
new file mode 100644
index 0000000000000..081c50d35af0d
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/kibana.jsonc
@@ -0,0 +1,7 @@
+{
+ "type": "shared-common",
+ "id": "@kbn/securitysolution-exception-list-components",
+ "owner": "@elastic/security-solution-platform",
+ "runtimeDeps": [],
+ "typeDeps": [],
+}
diff --git a/packages/kbn-securitysolution-exception-list-components/package.json b/packages/kbn-securitysolution-exception-list-components/package.json
new file mode 100644
index 0000000000000..263863d725c1e
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@kbn/securitysolution-exception-list-components",
+ "private": true,
+ "version": "1.0.0",
+ "main": "./target_node/index.js",
+ "browser": "./target_web/index.js",
+ "license": "SSPL-1.0 OR Elastic License 2.0"
+}
diff --git a/packages/kbn-securitysolution-exception-list-components/setup_test.ts b/packages/kbn-securitysolution-exception-list-components/setup_test.ts
new file mode 100644
index 0000000000000..bb55d97ec9302
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/setup_test.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.
+ */
+// eslint-disable-next-line import/no-extraneous-dependencies
+import '@testing-library/jest-dom';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/assets/images/illustration_product_no_results_magnifying_glass.svg b/packages/kbn-securitysolution-exception-list-components/src/assets/images/illustration_product_no_results_magnifying_glass.svg
new file mode 100644
index 0000000000000..b9a0df1630b20
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/assets/images/illustration_product_no_results_magnifying_glass.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/plugins/dashboard/public/services/saved_objects/types.ts b/packages/kbn-securitysolution-exception-list-components/src/custom.d.ts
similarity index 70%
rename from src/plugins/dashboard/public/services/saved_objects/types.ts
rename to packages/kbn-securitysolution-exception-list-components/src/custom.d.ts
index d7d06131f32cb..9169166fe7af9 100644
--- a/src/plugins/dashboard/public/services/saved_objects/types.ts
+++ b/packages/kbn-securitysolution-exception-list-components/src/custom.d.ts
@@ -6,8 +6,8 @@
* Side Public License, v 1.
*/
-import type { CoreStart } from '@kbn/core/public';
-
-export interface DashboardSavedObjectsService {
- client: CoreStart['savedObjects']['client'];
+declare module '*.svg' {
+ const content: string;
+ // eslint-disable-next-line import/no-default-export
+ export default content;
}
diff --git a/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx b/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx
new file mode 100644
index 0000000000000..43943e0e8fb97
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.test.tsx
@@ -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 React from 'react';
+import { render } from '@testing-library/react';
+
+import { EmptyViewerState } from './empty_viewer_state';
+import { ListTypeText, ViewerStatus } from '../types';
+
+describe('EmptyViewerState', () => {
+ it('it should render "error" with the default title and body', () => {
+ const wrapper = render(
+
+ );
+
+ expect(wrapper.getByTestId('errorViewerState')).toBeTruthy();
+ expect(wrapper.getByTestId('errorTitle')).toHaveTextContent('Unable to load exception items');
+ expect(wrapper.getByTestId('errorBody')).toHaveTextContent(
+ 'There was an error loading the exception items. Contact your administrator for help.'
+ );
+ });
+ it('it should render "error" when sending the title and body props', () => {
+ const wrapper = render(
+
+ );
+
+ expect(wrapper.getByTestId('errorViewerState')).toBeTruthy();
+ expect(wrapper.getByTestId('errorTitle')).toHaveTextContent('Error title');
+ expect(wrapper.getByTestId('errorBody')).toHaveTextContent('Error body');
+ });
+ it('it should render loading', () => {
+ const wrapper = render(
+
+ );
+
+ expect(wrapper.getByTestId('loadingViewerState')).toBeTruthy();
+ });
+ it('it should render empty search with the default title and body', () => {
+ const wrapper = render(
+
+ );
+
+ expect(wrapper.getByTestId('emptySearchViewerState')).toBeTruthy();
+ expect(wrapper.getByTestId('emptySearchTitle')).toHaveTextContent(
+ 'No results match your search criteria'
+ );
+ expect(wrapper.getByTestId('emptySearchBody')).toHaveTextContent('Try modifying your search');
+ });
+ it('it should render empty search when sending title and body props', () => {
+ const wrapper = render(
+
+ );
+
+ expect(wrapper.getByTestId('emptySearchViewerState')).toBeTruthy();
+ expect(wrapper.getByTestId('emptySearchTitle')).toHaveTextContent('Empty search title');
+ expect(wrapper.getByTestId('emptySearchBody')).toHaveTextContent('Empty search body');
+ });
+ it('it should render no items screen when sending title and body props', () => {
+ const wrapper = render(
+
+ );
+
+ const { getByTestId } = wrapper;
+ expect(getByTestId('emptyBody')).toHaveTextContent('There are no endpoint exceptions.');
+ expect(getByTestId('emptyStateButton')).toHaveTextContent('Add endpoint exception');
+ expect(getByTestId('emptyViewerState')).toBeTruthy();
+ });
+ it('it should render no items with default title and body props', () => {
+ const wrapper = render(
+
+ );
+
+ const { getByTestId } = wrapper;
+ expect(getByTestId('emptyViewerState')).toBeTruthy();
+ expect(getByTestId('emptyTitle')).toHaveTextContent('Add exceptions to this rule');
+ expect(getByTestId('emptyBody')).toHaveTextContent(
+ 'There is no exception in your rule. Create your first rule exception.'
+ );
+ expect(getByTestId('emptyStateButton')).toHaveTextContent('Create rule exception');
+ });
+ it('it should render no items screen with default title and body props and listType endPoint', () => {
+ const wrapper = render(
+
+ );
+
+ const { getByTestId } = wrapper;
+ expect(getByTestId('emptyViewerState')).toBeTruthy();
+ expect(getByTestId('emptyTitle')).toHaveTextContent('Add exceptions to this rule');
+ expect(getByTestId('emptyBody')).toHaveTextContent(
+ 'There is no exception in your rule. Create your first rule exception.'
+ );
+ expect(getByTestId('emptyStateButton')).toHaveTextContent('Create endpoint exception');
+ });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.tsx b/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.tsx
new file mode 100644
index 0000000000000..060d2ecc15061
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/empty_viewer_state/empty_viewer_state.tsx
@@ -0,0 +1,131 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React, { useMemo } from 'react';
+import type { FC } from 'react';
+import { css } from '@emotion/react';
+import {
+ EuiLoadingContent,
+ EuiImage,
+ EuiEmptyPrompt,
+ EuiButton,
+ useEuiTheme,
+ EuiPanel,
+} from '@elastic/eui';
+import type { ExpressionColor } from '@elastic/eui/src/components/expression/expression';
+import type { EuiFacetGroupLayout } from '@elastic/eui/src/components/facet/facet_group';
+import { euiThemeVars } from '@kbn/ui-theme';
+import { ListTypeText, ViewerStatus } from '../types';
+import * as i18n from '../translations';
+import illustration from '../assets/images/illustration_product_no_results_magnifying_glass.svg';
+
+interface EmptyViewerStateProps {
+ title?: string;
+ body?: string;
+ buttonText?: string;
+ listType?: ListTypeText;
+ isReadOnly: boolean;
+ viewerStatus: ViewerStatus;
+ onCreateExceptionListItem?: () => void | null;
+}
+
+const panelCss = css`
+ margin: ${euiThemeVars.euiSizeL} 0;
+ padding: ${euiThemeVars.euiSizeL} 0;
+`;
+const EmptyViewerStateComponent: FC = ({
+ title,
+ body,
+ buttonText,
+ listType,
+ isReadOnly,
+ viewerStatus,
+ onCreateExceptionListItem,
+}) => {
+ const { euiTheme } = useEuiTheme();
+
+ const euiEmptyPromptProps = useMemo(() => {
+ switch (viewerStatus) {
+ case ViewerStatus.ERROR: {
+ return {
+ color: 'danger' as ExpressionColor,
+ iconType: 'alert',
+ title: (
+ {title || i18n.EMPTY_VIEWER_STATE_ERROR_TITLE}
+ ),
+ body: {body || i18n.EMPTY_VIEWER_STATE_ERROR_BODY}
,
+ 'data-test-subj': 'errorViewerState',
+ };
+ }
+ case ViewerStatus.EMPTY:
+ return {
+ color: 'subdued' as ExpressionColor,
+ iconType: 'plusInCircle',
+ iconColor: euiTheme.colors.darkestShade,
+ title: (
+ {title || i18n.EMPTY_VIEWER_STATE_EMPTY_TITLE}
+ ),
+ body: {body || i18n.EMPTY_VIEWER_STATE_EMPTY_BODY}
,
+ 'data-test-subj': 'emptyViewerState',
+ actions: [
+
+ {buttonText || i18n.EMPTY_VIEWER_STATE_EMPTY_VIEWER_BUTTON(listType || 'rule')}
+ ,
+ ],
+ };
+ case ViewerStatus.EMPTY_SEARCH:
+ return {
+ color: 'plain' as ExpressionColor,
+ layout: 'horizontal' as EuiFacetGroupLayout,
+ hasBorder: true,
+ hasShadow: false,
+ icon: ,
+ title: (
+
+ {title || i18n.EMPTY_VIEWER_STATE_EMPTY_SEARCH_TITLE}
+
+ ),
+ body: (
+
+ {body || i18n.EMPTY_VIEWER_STATE_EMPTY_SEARCH_BODY}
+
+ ),
+ 'data-test-subj': 'emptySearchViewerState',
+ };
+ }
+ }, [
+ viewerStatus,
+ euiTheme.colors.darkestShade,
+ title,
+ body,
+ onCreateExceptionListItem,
+ isReadOnly,
+ buttonText,
+ listType,
+ ]);
+
+ if (viewerStatus === ViewerStatus.LOADING || viewerStatus === ViewerStatus.SEARCHING)
+ return ;
+
+ return (
+
+
+
+ );
+};
+
+export const EmptyViewerState = React.memo(EmptyViewerStateComponent);
+
+EmptyViewerState.displayName = 'EmptyViewerState';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.tsx
new file mode 100644
index 0000000000000..ca08d10f0a049
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/comments/comments.tsx
@@ -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 React, { memo } from 'react';
+import type { EuiCommentProps } from '@elastic/eui';
+import { EuiAccordion, EuiCommentList, EuiFlexItem, EuiPanel, EuiText } from '@elastic/eui';
+import { css } from '@emotion/react';
+import { euiThemeVars } from '@kbn/ui-theme';
+import * as i18n from '../translations';
+
+const accordionCss = css`
+ color: ${euiThemeVars.euiColorPrimary};
+`;
+
+export interface ExceptionItemCardCommentsProps {
+ comments: EuiCommentProps[];
+}
+
+export const ExceptionItemCardComments = memo(({ comments }) => {
+ return (
+
+
+
+ );
+});
+
+ExceptionItemCardComments.displayName = 'ExceptionItemCardComments';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.ts b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.ts
new file mode 100644
index 0000000000000..08514a64feac0
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.config.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 { ListOperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types';
+import * as i18n from '../translations';
+
+export const OS_LABELS = Object.freeze({
+ linux: i18n.OS_LINUX,
+ mac: i18n.OS_MAC,
+ macos: i18n.OS_MAC,
+ windows: i18n.OS_WINDOWS,
+});
+
+export const OPERATOR_TYPE_LABELS_INCLUDED = Object.freeze({
+ [ListOperatorTypeEnum.NESTED]: i18n.CONDITION_OPERATOR_TYPE_NESTED,
+ [ListOperatorTypeEnum.MATCH_ANY]: i18n.CONDITION_OPERATOR_TYPE_MATCH_ANY,
+ [ListOperatorTypeEnum.MATCH]: i18n.CONDITION_OPERATOR_TYPE_MATCH,
+ [ListOperatorTypeEnum.WILDCARD]: i18n.CONDITION_OPERATOR_TYPE_WILDCARD_MATCHES,
+ [ListOperatorTypeEnum.EXISTS]: i18n.CONDITION_OPERATOR_TYPE_EXISTS,
+ [ListOperatorTypeEnum.LIST]: i18n.CONDITION_OPERATOR_TYPE_LIST,
+});
+
+export const OPERATOR_TYPE_LABELS_EXCLUDED = Object.freeze({
+ [ListOperatorTypeEnum.MATCH_ANY]: i18n.CONDITION_OPERATOR_TYPE_NOT_MATCH_ANY,
+ [ListOperatorTypeEnum.MATCH]: i18n.CONDITION_OPERATOR_TYPE_NOT_MATCH,
+ [ListOperatorTypeEnum.WILDCARD]: i18n.CONDITION_OPERATOR_TYPE_WILDCARD_DOES_NOT_MATCH,
+ [ListOperatorTypeEnum.EXISTS]: i18n.CONDITION_OPERATOR_TYPE_DOES_NOT_EXIST,
+ [ListOperatorTypeEnum.LIST]: i18n.CONDITION_OPERATOR_TYPE_NOT_IN_LIST,
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.tsx
new file mode 100644
index 0000000000000..3ad2d7ef21fba
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.styles.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 { cx } from '@emotion/css';
+import { css } from '@emotion/react';
+import { euiThemeVars } from '@kbn/ui-theme';
+
+// TODO check font Roboto Mono
+export const nestedGroupSpaceCss = css`
+ margin-left: ${euiThemeVars.euiSizeXL};
+ margin-bottom: ${euiThemeVars.euiSizeXS};
+ padding-top: ${euiThemeVars.euiSizeXS};
+`;
+
+export const borderCss = cx(
+ 'eui-xScroll',
+ `
+ border: 1px;
+ border-color: #d3dae6;
+ border-style: solid;
+`
+);
+
+export const valueContainerCss = css`
+ display: flex;
+ align-items: center;
+ margin-left: ${euiThemeVars.euiSizeS};
+`;
+export const expressionContainerCss = css`
+ display: flex;
+ align-items: center;
+`;
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx
new file mode 100644
index 0000000000000..ae4b76a4a7dc0
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.test.tsx
@@ -0,0 +1,350 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { render } from '@testing-library/react';
+import React from 'react';
+
+import { ExceptionItemCardConditions } from './conditions';
+
+interface TestEntry {
+ field: string;
+ operator: 'included' | 'excluded';
+ type: unknown;
+ value?: string | string[];
+ entries?: TestEntry[];
+ list?: { id: string; type: string };
+}
+const getEntryKey = (
+ entry: TestEntry,
+ index: string,
+ list?: { id: string; type: string } | null
+) => {
+ if (list && Object.keys(list)) {
+ const { field, type, list: entryList } = entry;
+ const { id } = entryList || {};
+ return `${field}${type}${id || ''}${index}`;
+ }
+ const { field, type, value } = entry;
+ return `${field}${type}${value || ''}${index}`;
+};
+
+describe('ExceptionItemCardConditions', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ jest.resetAllMocks();
+ });
+ it('it includes os condition if one exists', () => {
+ const entries: TestEntry[] = [
+ {
+ field: 'host.name',
+ operator: 'included',
+ type: 'match',
+ value: 'host',
+ },
+ {
+ field: 'threat.indicator.port',
+ operator: 'included',
+ type: 'exists',
+ },
+ {
+ entries: [
+ {
+ field: 'valid',
+ operator: 'included',
+ type: 'match',
+ value: 'true',
+ },
+ ],
+ field: 'file.Ext.code_signature',
+ type: 'nested',
+ operator: 'included',
+ },
+ ];
+ const wrapper = render(
+
+ );
+ expect(wrapper.getByTestId('exceptionItemConditionsOs')).toHaveTextContent('OSIS Linux');
+
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[0], '0')}EntryContent`)
+ ).toHaveTextContent('host.nameIS host');
+
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[1], '1')}EntryContent`)
+ ).toHaveTextContent('AND threat.indicator.portexists');
+
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[2], '2')}EntryContent`)
+ ).toHaveTextContent('AND file.Ext.code_signature');
+
+ if (entries[2] && entries[2].entries) {
+ expect(
+ wrapper.getByTestId(
+ `exceptionItemConditions${getEntryKey(entries[2].entries[0], '0')}EntryContent`
+ )
+ ).toHaveTextContent('validIS true');
+ }
+ });
+
+ it('it renders item conditions', () => {
+ const entries: TestEntry[] = [
+ {
+ field: 'host.name',
+ operator: 'included',
+ type: 'match',
+ value: 'host',
+ },
+ {
+ field: 'host.name',
+ operator: 'excluded',
+ type: 'match',
+ value: 'host',
+ },
+ {
+ field: 'host.name',
+ operator: 'included',
+ type: 'match_any',
+ value: ['foo', 'bar'],
+ },
+ {
+ field: 'host.name',
+ operator: 'excluded',
+ type: 'match_any',
+ value: ['foo', 'bar'],
+ },
+ {
+ field: 'user.name',
+ operator: 'included',
+ type: 'wildcard',
+ value: 'foo*',
+ },
+ {
+ field: 'user.name',
+ operator: 'excluded',
+ type: 'wildcard',
+ value: 'foo*',
+ },
+ {
+ field: 'threat.indicator.port',
+ operator: 'included',
+ type: 'exists',
+ },
+ {
+ field: 'threat.indicator.port',
+ operator: 'excluded',
+ type: 'exists',
+ },
+ {
+ entries: [
+ {
+ field: 'valid',
+ operator: 'included',
+ type: 'match',
+ value: 'true',
+ },
+ ],
+ field: 'file.Ext.code_signature',
+ type: 'nested',
+ operator: 'included',
+ },
+ ];
+ const wrapper = render(
+
+ );
+ expect(wrapper.queryByTestId('exceptionItemConditionsOs')).not.toBeInTheDocument();
+
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[0], '0')}EntryContent`)
+ ).toHaveTextContent('host.nameIS host');
+ // Match;
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[1], '1')}EntryContent`)
+ ).toHaveTextContent('AND host.nameIS NOT host');
+ // MATCH_ANY;
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[2], '2')}EntryContent`)
+ ).toHaveTextContent('AND host.nameis one of foobar');
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[3], '3')}EntryContent`)
+ ).toHaveTextContent('AND host.nameis not one of foobar');
+ // WILDCARD;
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[4], '4')}EntryContent`)
+ ).toHaveTextContent('AND user.nameMATCHES foo*');
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[5], '5')}EntryContent`)
+ ).toHaveTextContent('AND user.nameDOES NOT MATCH foo*');
+ // EXISTS;
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[6], '6')}EntryContent`)
+ ).toHaveTextContent('AND threat.indicator.portexists');
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[7], '7')}EntryContent`)
+ ).toHaveTextContent('AND threat.indicator.portdoes not exist');
+ // NESTED;
+ expect(
+ wrapper.getByTestId(`exceptionItemConditions${getEntryKey(entries[8], '8')}EntryContent`)
+ ).toHaveTextContent('AND file.Ext.code_signature');
+ if (entries[8] && entries[8].entries) {
+ expect(
+ wrapper.getByTestId(
+ `exceptionItemConditions${getEntryKey(entries[8].entries[0], '0')}EntryContent`
+ )
+ ).toHaveTextContent('validIS true');
+ }
+ });
+ it('it renders list conditions', () => {
+ const entries: TestEntry[] = [
+ {
+ field: 'host.name',
+ list: {
+ id: 'ips.txt',
+ type: 'keyword',
+ },
+ operator: 'included',
+ type: 'list',
+ },
+ {
+ field: 'host.name',
+ list: {
+ id: 'ips.txt',
+ type: 'keyword',
+ },
+ operator: 'excluded',
+ type: 'list',
+ },
+ ];
+ const wrapper = render(
+
+ );
+ // /exceptionItemConditionshost.namelist0EntryContent
+ expect(
+ wrapper.getByTestId(
+ `exceptionItemConditions${getEntryKey(entries[0], '0', entries[0].list)}EntryContent`
+ )
+ ).toHaveTextContent('host.nameincluded in ips.txt');
+
+ expect(
+ wrapper.getByTestId(
+ `exceptionItemConditions${getEntryKey(entries[1], '1', entries[1].list)}EntryContent`
+ )
+ ).toHaveTextContent('AND host.nameis not included in ips.txt');
+ });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.tsx
new file mode 100644
index 0000000000000..8b85a7343afc1
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/conditions.tsx
@@ -0,0 +1,56 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React, { memo } from 'react';
+import { EuiPanel } from '@elastic/eui';
+
+import { borderCss } from './conditions.styles';
+import { EntryContent } from './entry_content/entry_content';
+import { OsCondition } from './os_conditions/os_conditions';
+import type { CriteriaConditionsProps, Entry } from './types';
+
+export const ExceptionItemCardConditions = memo(
+ ({ os, entries, dataTestSubj }) => {
+ return (
+
+ {os?.length ? : null}
+ {entries.map((entry: Entry, index: number) => {
+ const nestedEntries = 'entries' in entry ? entry.entries : [];
+ return (
+
+
+ {nestedEntries?.length
+ ? nestedEntries.map((nestedEntry: Entry, nestedIndex: number) => (
+
+ ))
+ : null}
+
+ );
+ })}
+
+ );
+ }
+);
+ExceptionItemCardConditions.displayName = 'ExceptionItemCardConditions';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx
new file mode 100644
index 0000000000000..6a64bcc810c08
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.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 React from 'react';
+import { EuiExpression, EuiBadge } from '@elastic/eui';
+import type { ListOperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types';
+import { ValueWithSpaceWarning } from '../../../..';
+import { OPERATOR_TYPE_LABELS_EXCLUDED, OPERATOR_TYPE_LABELS_INCLUDED } from '../conditions.config';
+import type { Entry } from '../types';
+
+const getEntryValue = (type: string, value?: string | string[]) => {
+ if (type === 'match_any' && Array.isArray(value)) {
+ return value.map((currentValue) => {currentValue} );
+ }
+ return value ?? '';
+};
+
+export const getEntryOperator = (type: ListOperatorTypeEnum, operator: string) => {
+ if (type === 'nested') return '';
+ return operator === 'included'
+ ? OPERATOR_TYPE_LABELS_INCLUDED[type] ?? type
+ : OPERATOR_TYPE_LABELS_EXCLUDED[type] ?? type;
+};
+
+export const getValue = (entry: Entry) => {
+ if (entry.type === 'list') return entry.list.id;
+
+ return 'value' in entry ? entry.value : '';
+};
+
+export const getValueExpression = (
+ type: ListOperatorTypeEnum,
+ operator: string,
+ value: string | string[]
+) => (
+ <>
+
+
+ >
+);
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.tsx
new file mode 100644
index 0000000000000..6c321a6d0ce04
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.tsx
@@ -0,0 +1,71 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React, { memo } from 'react';
+import { EuiExpression, EuiToken, EuiFlexGroup } from '@elastic/eui';
+import { ListOperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types';
+import {
+ nestedGroupSpaceCss,
+ valueContainerCss,
+ expressionContainerCss,
+} from '../conditions.styles';
+import type { Entry } from '../types';
+import * as i18n from '../../translations';
+import { getValue, getValueExpression } from './entry_content.helper';
+
+export const EntryContent = memo(
+ ({
+ entry,
+ index,
+ isNestedEntry = false,
+ dataTestSubj,
+ }: {
+ entry: Entry;
+ index: number;
+ isNestedEntry?: boolean;
+ dataTestSubj?: string;
+ }) => {
+ const { field, type } = entry;
+ const value = getValue(entry);
+ const operator = 'operator' in entry ? entry.operator : '';
+
+ const entryKey = `${field}${type}${value}${index}`;
+ return (
+
+
+ {isNestedEntry ? (
+
+
+
+
+
+ {getValueExpression(type as ListOperatorTypeEnum, operator, value)}
+
+
+ ) : (
+ <>
+
+
+ {getValueExpression(type as ListOperatorTypeEnum, operator, value)}
+ >
+ )}
+
+
+ );
+ }
+);
+EntryContent.displayName = 'EntryContent';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.tsx
new file mode 100644
index 0000000000000..701529ae6717d
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/os_conditions/os_conditions.tsx
@@ -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 React, { memo, useMemo } from 'react';
+import { EuiExpression } from '@elastic/eui';
+
+import { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types';
+import { OS_LABELS } from '../conditions.config';
+import * as i18n from '../../translations';
+
+export interface OsConditionsProps {
+ dataTestSubj: string;
+ os: ExceptionListItemSchema['os_types'];
+}
+
+export const OsCondition = memo(({ os, dataTestSubj }) => {
+ const osLabel = useMemo(() => {
+ return os.map((osValue) => OS_LABELS[osValue] ?? osValue).join(', ');
+ }, [os]);
+ return osLabel ? (
+
+
+
+
+
+
+ ) : null;
+});
+OsCondition.displayName = 'OsCondition';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts
new file mode 100644
index 0000000000000..09067e84cafc7
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/types.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type {
+ EntryExists,
+ EntryList,
+ EntryMatch,
+ EntryMatchAny,
+ EntryMatchWildcard,
+ EntryNested,
+ ExceptionListItemSchema,
+} from '@kbn/securitysolution-io-ts-list-types';
+
+export type Entry =
+ | EntryExists
+ | EntryList
+ | EntryMatch
+ | EntryMatchAny
+ | EntryMatchWildcard
+ | EntryNested;
+
+export type Entries = ExceptionListItemSchema['entries'];
+export interface CriteriaConditionsProps {
+ entries: Entries;
+ dataTestSubj: string;
+ os?: ExceptionListItemSchema['os_types'];
+}
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx
new file mode 100644
index 0000000000000..c3705750d015d
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx
@@ -0,0 +1,136 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React, { useMemo, useCallback, FC } from 'react';
+import { EuiPanel, EuiFlexGroup, EuiFlexItem, EuiCommentProps } from '@elastic/eui';
+import type {
+ CommentsArray,
+ ExceptionListItemSchema,
+ ExceptionListTypeEnum,
+} from '@kbn/securitysolution-io-ts-list-types';
+
+import * as i18n from './translations';
+import {
+ ExceptionItemCardHeader,
+ ExceptionItemCardConditions,
+ ExceptionItemCardMetaInfo,
+ ExceptionItemCardComments,
+} from '.';
+
+import type { ExceptionListItemIdentifiers } from '../types';
+
+export interface ExceptionItemProps {
+ dataTestSubj?: string;
+ disableActions?: boolean;
+ exceptionItem: ExceptionListItemSchema;
+ listType: ExceptionListTypeEnum;
+ ruleReferences: any[]; // rulereferences
+ editActionLabel?: string;
+ deleteActionLabel?: string;
+ securityLinkAnchorComponent: React.ElementType; // This property needs to be removed to avoid the Prop Drilling, once we move all the common components from x-pack/security-solution/common
+ formattedDateComponent: React.ElementType; // This property needs to be removed to avoid the Prop Drilling, once we move all the common components from x-pack/security-solution/common
+ getFormattedComments: (comments: CommentsArray) => EuiCommentProps[]; // This property needs to be removed to avoid the Prop Drilling, once we move all the common components from x-pack/security-solution/common
+ onDeleteException: (arg: ExceptionListItemIdentifiers) => void;
+ onEditException: (item: ExceptionListItemSchema) => void;
+}
+
+const ExceptionItemCardComponent: FC = ({
+ disableActions = false,
+ exceptionItem,
+ listType,
+ ruleReferences,
+ dataTestSubj,
+ editActionLabel,
+ deleteActionLabel,
+ securityLinkAnchorComponent,
+ formattedDateComponent,
+ getFormattedComments,
+ onDeleteException,
+ onEditException,
+}) => {
+ const handleDelete = useCallback((): void => {
+ onDeleteException({
+ id: exceptionItem.id,
+ name: exceptionItem.name,
+ namespaceType: exceptionItem.namespace_type,
+ });
+ }, [onDeleteException, exceptionItem.id, exceptionItem.name, exceptionItem.namespace_type]);
+
+ const handleEdit = useCallback((): void => {
+ onEditException(exceptionItem);
+ }, [onEditException, exceptionItem]);
+
+ const formattedComments = useMemo((): EuiCommentProps[] => {
+ return getFormattedComments(exceptionItem.comments);
+ }, [exceptionItem.comments, getFormattedComments]);
+
+ const actions: Array<{
+ key: string;
+ icon: string;
+ label: string | boolean;
+ onClick: () => void;
+ }> = useMemo(
+ () => [
+ {
+ key: 'edit',
+ icon: 'controlsHorizontal',
+ label: editActionLabel || i18n.exceptionItemCardEditButton(listType),
+ onClick: handleEdit,
+ },
+ {
+ key: 'delete',
+ icon: 'trash',
+ label: deleteActionLabel || listType === i18n.exceptionItemCardDeleteButton(listType),
+ onClick: handleDelete,
+ },
+ ],
+ [editActionLabel, listType, deleteActionLabel, handleDelete, handleEdit]
+ );
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ {formattedComments.length > 0 && (
+
+ )}
+
+
+ );
+};
+
+ExceptionItemCardComponent.displayName = 'ExceptionItemCardComponent';
+
+export const ExceptionItemCard = React.memo(ExceptionItemCardComponent);
+
+ExceptionItemCard.displayName = 'ExceptionItemCard';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx
new file mode 100644
index 0000000000000..7f7f20dfc234d
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.test.tsx
@@ -0,0 +1,76 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React from 'react';
+
+import { getExceptionListItemSchemaMock } from '../../test_helpers/exception_list_item_schema.mock';
+import * as i18n from '../translations';
+import { ExceptionItemCardHeader } from './header';
+import { fireEvent, render } from '@testing-library/react';
+import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types';
+
+const handleEdit = jest.fn();
+const handleDelete = jest.fn();
+const actions = [
+ {
+ key: 'edit',
+ icon: 'pencil',
+ label: i18n.exceptionItemCardEditButton(ExceptionListTypeEnum.DETECTION),
+ onClick: handleEdit,
+ },
+ {
+ key: 'delete',
+ icon: 'trash',
+ label: i18n.exceptionItemCardDeleteButton(ExceptionListTypeEnum.DETECTION),
+ onClick: handleDelete,
+ },
+];
+describe('ExceptionItemCardHeader', () => {
+ it('it renders item name', () => {
+ const wrapper = render(
+
+ );
+
+ expect(wrapper.getByTestId('exceptionItemHeaderTitle')).toHaveTextContent('some name');
+ });
+
+ it('it displays actions', () => {
+ const wrapper = render(
+
+ );
+
+ // click on popover
+ fireEvent.click(wrapper.getByTestId('exceptionItemHeaderActionButton'));
+ fireEvent.click(wrapper.getByTestId('exceptionItemHeaderActionItemedit'));
+ expect(handleEdit).toHaveBeenCalled();
+
+ fireEvent.click(wrapper.getByTestId('exceptionItemHeaderActionItemdelete'));
+ expect(handleDelete).toHaveBeenCalled();
+ });
+
+ it('it disables actions if disableActions is true', () => {
+ const wrapper = render(
+
+ );
+
+ expect(wrapper.getByTestId('exceptionItemHeaderActionButton')).toBeDisabled();
+ });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.tsx
new file mode 100644
index 0000000000000..d58cb8d99b7a1
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/header/header.tsx
@@ -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 React, { memo, useMemo, useState } from 'react';
+import type { EuiContextMenuPanelProps } from '@elastic/eui';
+import {
+ EuiButtonIcon,
+ EuiContextMenuPanel,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiPopover,
+ EuiTitle,
+ EuiContextMenuItem,
+} from '@elastic/eui';
+import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types';
+
+export interface ExceptionItemCardHeaderProps {
+ item: ExceptionListItemSchema;
+ actions: Array<{ key: string; icon: string; label: string | boolean; onClick: () => void }>;
+ disableActions?: boolean;
+ dataTestSubj: string;
+}
+
+export const ExceptionItemCardHeader = memo(
+ ({ item, actions, disableActions = false, dataTestSubj }) => {
+ const [isPopoverOpen, setIsPopoverOpen] = useState(false);
+
+ const onItemActionsClick = () => setIsPopoverOpen((isOpen) => !isOpen);
+ const onClosePopover = () => setIsPopoverOpen(false);
+
+ const itemActions = useMemo((): EuiContextMenuPanelProps['items'] => {
+ return actions.map((action) => (
+ {
+ onClosePopover();
+ action.onClick();
+ }}
+ >
+ {action.label}
+
+ ));
+ }, [dataTestSubj, actions]);
+
+ return (
+
+
+
+ {item.name}
+
+
+
+
+ }
+ panelPaddingSize="none"
+ isOpen={isPopoverOpen}
+ closePopover={onClosePopover}
+ data-test-subj={`${dataTestSubj}Items`}
+ >
+
+
+
+
+ );
+ }
+);
+
+ExceptionItemCardHeader.displayName = 'ExceptionItemCardHeader';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.test.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.test.tsx
new file mode 100644
index 0000000000000..87a8a3bd3b527
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.test.tsx
@@ -0,0 +1,172 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { fireEvent, render } from '@testing-library/react';
+
+import { ExceptionItemCard } from '.';
+import { getExceptionListItemSchemaMock } from '../test_helpers/exception_list_item_schema.mock';
+import { getCommentsArrayMock } from '../test_helpers/comments.mock';
+import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types';
+
+const ruleReferences: unknown[] = [
+ {
+ exception_lists: [
+ {
+ id: '123',
+ list_id: 'i_exist',
+ namespace_type: 'single',
+ type: 'detection',
+ },
+ {
+ id: '456',
+ list_id: 'i_exist_2',
+ namespace_type: 'single',
+ type: 'detection',
+ },
+ ],
+ id: '1a2b3c',
+ name: 'Simple Rule Query',
+ rule_id: 'rule-2',
+ },
+];
+describe('ExceptionItemCard', () => {
+ it('it renders header, item meta information and conditions', () => {
+ const exceptionItem = { ...getExceptionListItemSchemaMock(), comments: [] };
+
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ getFormattedComments={() => []}
+ />
+ );
+
+ expect(wrapper.getByTestId('exceptionItemCardHeaderContainer')).toBeInTheDocument();
+ // expect(wrapper.getByTestId('exceptionItemCardMetaInfo')).toBeInTheDocument();
+ expect(wrapper.getByTestId('exceptionItemCardConditions')).toBeInTheDocument();
+ // expect(wrapper.queryByTestId('exceptionsViewerCommentAccordion')).not.toBeInTheDocument();
+ });
+
+ it('it renders header, item meta information, conditions, and comments if any exist', () => {
+ const exceptionItem = { ...getExceptionListItemSchemaMock(), comments: getCommentsArrayMock() };
+
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ getFormattedComments={() => []}
+ />
+ );
+
+ expect(wrapper.getByTestId('exceptionItemCardHeaderContainer')).toBeInTheDocument();
+ // expect(wrapper.getByTestId('exceptionItemCardMetaInfo')).toBeInTheDocument();
+ expect(wrapper.getByTestId('exceptionItemCardConditions')).toBeInTheDocument();
+ // expect(wrapper.getByTestId('exceptionsViewerCommentAccordion')).toBeInTheDocument();
+ });
+
+ it('it does not render edit or delete action buttons when "disableActions" is "true"', () => {
+ const exceptionItem = getExceptionListItemSchemaMock();
+
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ getFormattedComments={() => []}
+ />
+ );
+ expect(wrapper.queryByTestId('itemActionButton')).not.toBeInTheDocument();
+ });
+
+ it('it invokes "onEditException" when edit button clicked', () => {
+ const mockOnEditException = jest.fn();
+ const exceptionItem = getExceptionListItemSchemaMock();
+
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ getFormattedComments={() => []}
+ />
+ );
+
+ fireEvent.click(wrapper.getByTestId('exceptionItemCardHeaderActionButton'));
+ fireEvent.click(wrapper.getByTestId('exceptionItemCardHeaderActionItemedit'));
+ expect(mockOnEditException).toHaveBeenCalledWith(getExceptionListItemSchemaMock());
+ });
+
+ it('it invokes "onDeleteException" when delete button clicked', () => {
+ const mockOnDeleteException = jest.fn();
+ const exceptionItem = getExceptionListItemSchemaMock();
+
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ getFormattedComments={() => []}
+ />
+ );
+ fireEvent.click(wrapper.getByTestId('exceptionItemCardHeaderActionButton'));
+ fireEvent.click(wrapper.getByTestId('exceptionItemCardHeaderActionItemdelete'));
+
+ expect(mockOnDeleteException).toHaveBeenCalledWith({
+ id: '1',
+ name: 'some name',
+ namespaceType: 'single',
+ });
+ });
+
+ // TODO Fix this Test
+ // it('it renders comment accordion closed to begin with', () => {
+ // const exceptionItem = getExceptionListItemSchemaMock();
+ // exceptionItem.comments = getCommentsArrayMock();
+ // const wrapper = render(
+ //
+ // );
+
+ // expect(wrapper.queryByTestId('accordion-comment-list')).not.toBeVisible();
+ // });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.ts
new file mode 100644
index 0000000000000..c0fd3fafc86d5
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/index.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 and the Server Side Public License, v 1; you may 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 './conditions/conditions';
+export * from './header/header';
+export * from './meta/meta';
+export * from './comments/comments';
+export * from './exception_item_card';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.tsx
new file mode 100644
index 0000000000000..3d075f50096d0
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/details_info/details_info.tsx
@@ -0,0 +1,59 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React, { memo } from 'react';
+import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
+import { css } from '@emotion/react';
+import { euiThemeVars } from '@kbn/ui-theme';
+import * as i18n from '../../translations';
+
+interface MetaInfoDetailsProps {
+ fieldName: string;
+ label: string;
+ lastUpdate: JSX.Element | string;
+ lastUpdateValue: string;
+ dataTestSubj: string;
+}
+
+const euiBadgeFontFamily = css`
+ font-family: ${euiThemeVars.euiFontFamily};
+`;
+export const MetaInfoDetails = memo(
+ ({ label, lastUpdate, lastUpdateValue, dataTestSubj }) => {
+ return (
+
+
+
+ {label}
+
+
+
+
+ {lastUpdate}
+
+
+
+
+ {i18n.EXCEPTION_ITEM_CARD_META_BY}
+
+
+
+
+
+
+ {lastUpdateValue}
+
+
+
+
+
+ );
+ }
+);
+
+MetaInfoDetails.displayName = 'MetaInfoDetails';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx
new file mode 100644
index 0000000000000..c5ad9bd7af313
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.test.tsx
@@ -0,0 +1,155 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React from 'react';
+import { render } from '@testing-library/react';
+import { getExceptionListItemSchemaMock } from '../../test_helpers/exception_list_item_schema.mock';
+
+import { ExceptionItemCardMetaInfo } from './meta';
+import { RuleReference } from '../../types';
+
+const ruleReferences = [
+ {
+ exception_lists: [
+ {
+ id: '123',
+ list_id: 'i_exist',
+ namespace_type: 'single',
+ type: 'detection',
+ },
+ {
+ id: '456',
+ list_id: 'i_exist_2',
+ namespace_type: 'single',
+ type: 'detection',
+ },
+ ],
+ id: '1a2b3c',
+ name: 'Simple Rule Query',
+ rule_id: 'rule-2',
+ },
+];
+describe('ExceptionItemCardMetaInfo', () => {
+ it('it should render creation info with sending custom formattedDateComponent', () => {
+ const wrapper = render(
+ null}
+ formattedDateComponent={({ fieldName, value }) => (
+ <>
+ {new Date(value).toDateString()}
+ >
+ )}
+ />
+ );
+
+ expect(wrapper.getByTestId('exceptionItemMetaCreatedBylastUpdate')).toHaveTextContent(
+ 'Mon Apr 20 2020'
+ );
+ expect(wrapper.getByTestId('exceptionItemMetaCreatedBylastUpdateValue')).toHaveTextContent(
+ 'some user'
+ );
+ });
+
+ it('it should render udate info with sending custom formattedDateComponent', () => {
+ const wrapper = render(
+ null}
+ formattedDateComponent={({ fieldName, value }) => (
+ <>
+ {new Date(value).toDateString()}
+ >
+ )}
+ />
+ );
+ expect(wrapper.getByTestId('exceptionItemMetaUpdatedBylastUpdate')).toHaveTextContent(
+ 'Mon Apr 20 2020'
+ );
+ expect(wrapper.getByTestId('exceptionItemMetaUpdatedBylastUpdateValue')).toHaveTextContent(
+ 'some user'
+ );
+ });
+
+ it('it should render references info', () => {
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ />
+ );
+
+ expect(wrapper.getByTestId('exceptionItemMetaAffectedRulesButton')).toHaveTextContent(
+ 'Affects 1 rule'
+ );
+ });
+
+ it('it renders references info when multiple references exist', () => {
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ />
+ );
+
+ expect(wrapper.getByTestId('exceptionItemMetaAffectedRulesButton')).toHaveTextContent(
+ 'Affects 2 rules'
+ );
+ });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx
new file mode 100644
index 0000000000000..91e0a9cdd19b8
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/meta.tsx
@@ -0,0 +1,123 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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, { memo, useMemo, useState } from 'react';
+import type { EuiContextMenuPanelProps } from '@elastic/eui';
+import {
+ EuiContextMenuItem,
+ EuiContextMenuPanel,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiToolTip,
+ EuiButtonEmpty,
+ EuiPopover,
+} from '@elastic/eui';
+import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types';
+
+import { css } from '@emotion/react';
+import * as i18n from '../translations';
+import type { RuleReference } from '../../types';
+import { MetaInfoDetails } from './details_info/details_info';
+
+const itemCss = css`
+ border-right: 1px solid #d3dae6;
+ padding: 4px 12px 4px 0;
+`;
+
+export interface ExceptionItemCardMetaInfoProps {
+ item: ExceptionListItemSchema;
+ references: RuleReference[];
+ dataTestSubj: string;
+ formattedDateComponent: React.ElementType; // This property needs to be removed to avoid the Prop Drilling, once we move all the common components from x-pack/security-solution/common
+ securityLinkAnchorComponent: React.ElementType; // This property needs to be removed to avoid the Prop Drilling, once we move all the common components from x-pack/security-solution/common
+}
+
+export const ExceptionItemCardMetaInfo = memo(
+ ({ item, references, dataTestSubj, securityLinkAnchorComponent, formattedDateComponent }) => {
+ const [isPopoverOpen, setIsPopoverOpen] = useState(false);
+
+ const onAffectedRulesClick = () => setIsPopoverOpen((isOpen) => !isOpen);
+ const onClosePopover = () => setIsPopoverOpen(false);
+
+ const FormattedDateComponent = formattedDateComponent;
+ const itemActions = useMemo((): EuiContextMenuPanelProps['items'] => {
+ if (references == null || securityLinkAnchorComponent === null) {
+ return [];
+ }
+
+ const SecurityLinkAnchor = securityLinkAnchorComponent;
+ return references.map((reference) => (
+
+
+
+
+
+ ));
+ }, [references, securityLinkAnchorComponent, dataTestSubj]);
+
+ return (
+
+ {FormattedDateComponent !== null && (
+ <>
+
+
+ }
+ lastUpdateValue={item.created_by}
+ dataTestSubj={`${dataTestSubj}CreatedBy`}
+ />
+
+
+
+
+ }
+ lastUpdateValue={item.updated_by}
+ dataTestSubj={`${dataTestSubj}UpdatedBy`}
+ />
+
+ >
+ )}
+
+
+ {i18n.AFFECTED_RULES(references.length)}
+
+ }
+ panelPaddingSize="none"
+ isOpen={isPopoverOpen}
+ closePopover={onClosePopover}
+ data-test-subj={`${dataTestSubj}Items`}
+ >
+
+
+
+
+ );
+ }
+);
+ExceptionItemCardMetaInfo.displayName = 'ExceptionItemCardMetaInfo';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts
new file mode 100644
index 0000000000000..2fa7524291025
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/translations.ts
@@ -0,0 +1,166 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { i18n } from '@kbn/i18n';
+
+export const exceptionItemCardEditButton = (listType: string) =>
+ i18n.translate('exceptionList-components.exceptions.exceptionItem.card.editItemButton', {
+ values: { listType },
+ defaultMessage: 'Edit {listType} exception',
+ });
+
+export const exceptionItemCardDeleteButton = (listType: string) =>
+ i18n.translate('exceptionList-components.exceptions.exceptionItem.card.deleteItemButton', {
+ values: { listType },
+ defaultMessage: 'Delete {listType} exception',
+ });
+
+export const EXCEPTION_ITEM_CARD_CREATED_LABEL = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.createdLabel',
+ {
+ defaultMessage: 'Created',
+ }
+);
+
+export const EXCEPTION_ITEM_CARD_UPDATED_LABEL = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.updatedLabel',
+ {
+ defaultMessage: 'Updated',
+ }
+);
+
+export const EXCEPTION_ITEM_CARD_META_BY = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.metaDetailsBy',
+ {
+ defaultMessage: 'by',
+ }
+);
+
+export const exceptionItemCardCommentsAccordion = (comments: number) =>
+ i18n.translate('exceptionList-components.exceptions.exceptionItem.card.showCommentsLabel', {
+ values: { comments },
+ defaultMessage: 'Show {comments, plural, =1 {comment} other {comments}} ({comments})',
+ });
+
+export const CONDITION_OPERATOR_TYPE_MATCH = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.matchOperator',
+ {
+ defaultMessage: 'IS',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_NOT_MATCH = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.matchOperator.not',
+ {
+ defaultMessage: 'IS NOT',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_WILDCARD_MATCHES = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.wildcardMatchesOperator',
+ {
+ defaultMessage: 'MATCHES',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_WILDCARD_DOES_NOT_MATCH = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.wildcardDoesNotMatchOperator',
+ {
+ defaultMessage: 'DOES NOT MATCH',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_NESTED = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.nestedOperator',
+ {
+ defaultMessage: 'has',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_MATCH_ANY = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.matchAnyOperator',
+ {
+ defaultMessage: 'is one of',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_NOT_MATCH_ANY = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.matchAnyOperator.not',
+ {
+ defaultMessage: 'is not one of',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_EXISTS = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.existsOperator',
+ {
+ defaultMessage: 'exists',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_DOES_NOT_EXIST = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.existsOperator.not',
+ {
+ defaultMessage: 'does not exist',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_LIST = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.listOperator',
+ {
+ defaultMessage: 'included in',
+ }
+);
+
+export const CONDITION_OPERATOR_TYPE_NOT_IN_LIST = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.listOperator.not',
+ {
+ defaultMessage: 'is not included in',
+ }
+);
+
+export const CONDITION_AND = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.and',
+ {
+ defaultMessage: 'AND',
+ }
+);
+
+export const CONDITION_OS = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.os',
+ {
+ defaultMessage: 'OS',
+ }
+);
+
+export const OS_WINDOWS = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.windows',
+ {
+ defaultMessage: 'Windows',
+ }
+);
+
+export const OS_LINUX = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.linux',
+ {
+ defaultMessage: 'Linux',
+ }
+);
+
+export const OS_MAC = i18n.translate(
+ 'exceptionList-components.exceptions.exceptionItem.card.conditions.macos',
+ {
+ defaultMessage: 'Mac',
+ }
+);
+
+export const AFFECTED_RULES = (numRules: number) =>
+ i18n.translate('exceptionList-components.exceptions.card.exceptionItem.affectedRules', {
+ values: { numRules },
+ defaultMessage: 'Affects {numRules} {numRules, plural, =1 {rule} other {rules}}',
+ });
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx
new file mode 100644
index 0000000000000..39c429dd1f1dd
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.test.tsx
@@ -0,0 +1,103 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React from 'react';
+
+import { getExceptionListItemSchemaMock } from '../test_helpers/exception_list_item_schema.mock';
+import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types';
+
+import { ExceptionItems } from './exception_items';
+
+import { ViewerStatus } from '../types';
+import { render } from '@testing-library/react';
+
+const onCreateExceptionListItem = jest.fn();
+const onDeleteException = jest.fn();
+const onEditExceptionItem = jest.fn();
+const onPaginationChange = jest.fn();
+
+const pagination = { pageIndex: 0, pageSize: 0, totalItemCount: 0 };
+
+describe('ExceptionsViewerItems', () => {
+ describe('Viewing EmptyViewerState', () => {
+ it('it renders empty prompt if "viewerStatus" is "empty"', () => {
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ exceptionsUtilityComponent={() => null}
+ getFormattedComments={() => []}
+ />
+ );
+ // expect(wrapper).toMatchSnapshot();
+ expect(wrapper.getByTestId('emptyViewerState')).toBeInTheDocument();
+ expect(wrapper.queryByTestId('exceptionsContainer')).not.toBeInTheDocument();
+ });
+
+ it('it renders no search results found prompt if "viewerStatus" is "empty_search"', () => {
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ exceptionsUtilityComponent={() => null}
+ getFormattedComments={() => []}
+ />
+ );
+ // expect(wrapper).toMatchSnapshot();
+ expect(wrapper.getByTestId('emptySearchViewerState')).toBeInTheDocument();
+ expect(wrapper.queryByTestId('exceptionsContainer')).not.toBeInTheDocument();
+ });
+
+ it('it renders exceptions if "viewerStatus" and "null"', () => {
+ const wrapper = render(
+ null}
+ formattedDateComponent={() => null}
+ exceptionsUtilityComponent={() => null}
+ getFormattedComments={() => []}
+ />
+ );
+ // expect(wrapper).toMatchSnapshot();
+ expect(wrapper.getByTestId('exceptionsContainer')).toBeTruthy();
+ });
+ });
+ // TODO Add Exception Items and Pagination interactions
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.tsx
new file mode 100644
index 0000000000000..80ab3d99f6eb8
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/exception_items/exception_items.tsx
@@ -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 React from 'react';
+import { css } from '@emotion/react';
+import type { FC } from 'react';
+import { EuiCommentProps, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
+
+import type { Pagination as PaginationType } from '@elastic/eui';
+
+import type {
+ CommentsArray,
+ ExceptionListItemSchema,
+ ExceptionListTypeEnum,
+} from '@kbn/securitysolution-io-ts-list-types';
+
+import { euiThemeVars } from '@kbn/ui-theme';
+import { EmptyViewerState, ExceptionItemCard, Pagination } from '../..';
+
+import type {
+ RuleReferences,
+ ExceptionListItemIdentifiers,
+ ViewerStatus,
+ GetExceptionItemProps,
+} from '../types';
+
+const exceptionItemCss = css`
+ margin: ${euiThemeVars.euiSize} 0;
+ &div:first-child {
+ margin: ${euiThemeVars.euiSizeXS} 0 ${euiThemeVars.euiSize};
+ }
+`;
+
+interface ExceptionItemsProps {
+ lastUpdated: string | number | null;
+ viewerStatus: ViewerStatus;
+ isReadOnly: boolean;
+ emptyViewerTitle?: string;
+ emptyViewerBody?: string;
+ emptyViewerButtonText?: string;
+ exceptions: ExceptionListItemSchema[];
+ listType: ExceptionListTypeEnum;
+ ruleReferences: RuleReferences;
+ pagination: PaginationType;
+ securityLinkAnchorComponent: React.ElementType; // This property needs to be removed to avoid the Prop Drilling, once we move all the common components from x-pack/security-solution/common
+ formattedDateComponent: React.ElementType; // This property needs to be removed to avoid the Prop Drilling, once we move all the common components from x-pack/security-solution/common
+ exceptionsUtilityComponent: React.ElementType; // This property needs to be removed to avoid the Prop Drilling, once we move all the common components from x-pack/security-solution/common
+ getFormattedComments: (comments: CommentsArray) => EuiCommentProps[]; // This property needs to be removed to avoid the Prop Drilling, once we move all the common components from x-pack/security-solution/common
+ onCreateExceptionListItem?: () => void;
+ onDeleteException: (arg: ExceptionListItemIdentifiers) => void;
+ onEditExceptionItem: (item: ExceptionListItemSchema) => void;
+ onPaginationChange: (arg: GetExceptionItemProps) => void;
+}
+
+const ExceptionItemsComponent: FC = ({
+ lastUpdated,
+ viewerStatus,
+ isReadOnly,
+ exceptions,
+ listType,
+ ruleReferences,
+ emptyViewerTitle,
+ emptyViewerBody,
+ emptyViewerButtonText,
+ pagination,
+ securityLinkAnchorComponent,
+ exceptionsUtilityComponent,
+ formattedDateComponent,
+ getFormattedComments,
+ onPaginationChange,
+ onDeleteException,
+ onEditExceptionItem,
+ onCreateExceptionListItem,
+}) => {
+ const ExceptionsUtility = exceptionsUtilityComponent;
+ if (!exceptions.length || viewerStatus)
+ return (
+
+ );
+ return (
+ <>
+
+
+
+
+ {exceptions.map((exception) => (
+
+
+
+ ))}
+
+
+
+
+ >
+ );
+};
+
+ExceptionItemsComponent.displayName = 'ExceptionItemsComponent';
+
+export const ExceptionItems = React.memo(ExceptionItemsComponent);
+
+ExceptionItems.displayName = 'ExceptionsItems';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx b/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx
new file mode 100644
index 0000000000000..4d97f198aa2b9
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.test.tsx
@@ -0,0 +1,78 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { fireEvent, render } from '@testing-library/react';
+import React from 'react';
+
+import { Pagination } from './pagination';
+
+describe('Pagination', () => {
+ it('it invokes "onPaginationChange" when per page item is clicked', () => {
+ const mockOnPaginationChange = jest.fn();
+ const wrapper = render(
+
+ );
+
+ fireEvent.click(wrapper.getByTestId('tablePaginationPopoverButton'));
+ fireEvent.click(wrapper.getByTestId('tablePagination-50-rows'));
+
+ expect(mockOnPaginationChange).toHaveBeenCalledWith({
+ pagination: { pageIndex: 0, pageSize: 50, totalItemCount: 1 },
+ });
+ });
+
+ it('it invokes "onPaginationChange" when next clicked', () => {
+ const mockOnPaginationChange = jest.fn();
+ const wrapper = render(
+
+ );
+
+ fireEvent.click(wrapper.getByTestId('pagination-button-next'));
+
+ expect(mockOnPaginationChange).toHaveBeenCalledWith({
+ pagination: { pageIndex: 1, pageSize: 5, totalItemCount: 160 },
+ });
+ });
+
+ it('it invokes "onPaginationChange" when page clicked', () => {
+ const mockOnPaginationChange = jest.fn();
+ const wrapper = render(
+
+ );
+
+ fireEvent.click(wrapper.getByTestId('pagination-button-2'));
+
+ expect(mockOnPaginationChange).toHaveBeenCalledWith({
+ pagination: { pageIndex: 2, pageSize: 50, totalItemCount: 160 },
+ });
+ });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx b/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx
new file mode 100644
index 0000000000000..30b029480e173
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/pagination/pagination.tsx
@@ -0,0 +1,50 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 type { FC } from 'react';
+import { EuiTablePagination } from '@elastic/eui';
+
+import type { PaginationProps } from '../types';
+import { usePagination } from './use_pagination';
+
+const PaginationComponent: FC = ({
+ dataTestSubj,
+ ariaLabel,
+ pagination,
+ onPaginationChange,
+}) => {
+ const {
+ pageIndex,
+ pageCount,
+ pageSize,
+ pageSizeOptions,
+
+ handleItemsPerPageChange,
+ handlePageIndexChange,
+ } = usePagination({ pagination, onPaginationChange });
+
+ return (
+
+ );
+};
+
+PaginationComponent.displayName = 'PaginationComponent';
+
+export const Pagination = React.memo(PaginationComponent);
+
+Pagination.displayName = 'Pagination';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts b/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts
new file mode 100644
index 0000000000000..d190c88f10617
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.test.ts
@@ -0,0 +1,67 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { act, renderHook } from '@testing-library/react-hooks';
+import { usePagination } from './use_pagination';
+
+const onPaginationChange = jest.fn();
+
+describe('usePagination', () => {
+ test('should return the correct EuiTablePagination props when all the pagination object properties are falsy', () => {
+ const pagination = { pageIndex: 0, pageSize: 0, totalItemCount: 0 };
+
+ const { result } = renderHook(() => usePagination({ pagination, onPaginationChange }));
+ const { pageCount, pageIndex, pageSize, pageSizeOptions } = result.current;
+ expect(pageCount).toEqual(0);
+ expect(pageIndex).toEqual(0);
+ expect(pageSize).toEqual(0);
+ expect(pageSizeOptions).toEqual(undefined);
+ });
+ test('should return the correct pageCount when pagination properties are invalid', () => {
+ const pagination = { pageIndex: 0, pageSize: 10, totalItemCount: 0 };
+
+ const { result } = renderHook(() => usePagination({ pagination, onPaginationChange }));
+ const { pageCount } = result.current;
+ expect(pageCount).toEqual(0);
+ });
+ test('should return the correct EuiTablePagination props when all the pagination object properties are turthy', () => {
+ const pagination = { pageIndex: 0, pageSize: 10, totalItemCount: 100 };
+
+ const { result } = renderHook(() => usePagination({ pagination, onPaginationChange }));
+ const { pageCount, pageIndex, pageSize } = result.current;
+ expect(pageCount).toEqual(10);
+ expect(pageIndex).toEqual(0);
+ expect(pageSize).toEqual(10);
+ });
+ test('should call onPaginationChange with correct pageIndex when the Page changes', () => {
+ const pagination = { pageIndex: 0, pageSize: 10, totalItemCount: 100 };
+
+ const { result } = renderHook(() => usePagination({ pagination, onPaginationChange }));
+ const { handlePageIndexChange } = result.current;
+
+ act(() => {
+ handlePageIndexChange(2);
+ });
+ expect(onPaginationChange).toHaveBeenCalledWith({
+ pagination: { pageIndex: 2, pageSize: 10, totalItemCount: 100 },
+ });
+ });
+ test('should call onPaginationChange with correct pageSize when the number of items per change changes', () => {
+ const pagination = { pageIndex: 0, pageSize: 10, totalItemCount: 100 };
+
+ const { result } = renderHook(() => usePagination({ pagination, onPaginationChange }));
+ const { handleItemsPerPageChange } = result.current;
+
+ act(() => {
+ handleItemsPerPageChange(100);
+ });
+ expect(onPaginationChange).toHaveBeenCalledWith({
+ pagination: { pageIndex: 0, pageSize: 100, totalItemCount: 100 },
+ });
+ });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts b/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts
new file mode 100644
index 0000000000000..d235658263687
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/pagination/use_pagination.ts
@@ -0,0 +1,55 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { useCallback, useMemo } from 'react';
+import type { PaginationProps } from '../types';
+
+export const usePagination = ({ pagination, onPaginationChange }: PaginationProps) => {
+ const { pageIndex, totalItemCount, pageSize, pageSizeOptions } = pagination;
+
+ const pageCount = useMemo(
+ () => (isFinite(totalItemCount / pageSize) ? Math.ceil(totalItemCount / pageSize) : 0),
+ [pageSize, totalItemCount]
+ );
+
+ const handleItemsPerPageChange = useCallback(
+ (nextPageSize: number) => {
+ onPaginationChange({
+ pagination: {
+ pageIndex,
+ pageSize: nextPageSize,
+ totalItemCount,
+ },
+ });
+ },
+ [pageIndex, totalItemCount, onPaginationChange]
+ );
+
+ const handlePageIndexChange = useCallback(
+ (nextPageIndex: number) => {
+ onPaginationChange({
+ pagination: {
+ pageIndex: nextPageIndex,
+ pageSize,
+ totalItemCount,
+ },
+ });
+ },
+ [pageSize, totalItemCount, onPaginationChange]
+ );
+
+ return {
+ pageCount,
+ pageIndex,
+ pageSize,
+ pageSizeOptions,
+
+ handleItemsPerPageChange,
+ handlePageIndexChange,
+ };
+};
diff --git a/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx b/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx
new file mode 100644
index 0000000000000..ac82bb3b6e850
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.test.tsx
@@ -0,0 +1,90 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React from 'react';
+import { fireEvent, render } from '@testing-library/react';
+
+import { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types';
+
+import { SearchBar } from './search_bar';
+
+describe('SearchBar', () => {
+ it('it does not display add exception button if user is read only', () => {
+ const wrapper = render(
+
+ );
+
+ expect(wrapper.queryByTestId('searchBarButton')).not.toBeInTheDocument();
+ });
+
+ it('it invokes "onAddExceptionClick" when user selects to add an exception item', () => {
+ const mockOnAddExceptionClick = jest.fn();
+ const wrapper = render(
+
+ );
+
+ const searchBtn = wrapper.getByTestId('searchBarButton');
+
+ fireEvent.click(searchBtn);
+ expect(searchBtn).toHaveTextContent('Add rule exception');
+ expect(mockOnAddExceptionClick).toHaveBeenCalledWith('detection');
+ });
+
+ it('it invokes "onAddExceptionClick" when user selects to add an endpoint exception item', () => {
+ const mockOnAddExceptionClick = jest.fn();
+ const wrapper = render(
+
+ );
+
+ const searchBtn = wrapper.getByTestId('searchBarButton');
+
+ fireEvent.click(searchBtn);
+ expect(searchBtn).toHaveTextContent('Add endpoint exception');
+ expect(mockOnAddExceptionClick).toHaveBeenCalledWith('endpoint');
+ });
+ it('it invokes the "handlOnSearch" when the user add search query', () => {
+ const mockHandleOnSearch = jest.fn();
+ const wrapper = render(
+
+ );
+
+ const searchInput = wrapper.getByTestId('searchBar');
+ fireEvent.change(searchInput, { target: { value: 'query' } });
+ expect(mockHandleOnSearch).toBeCalledWith({ search: 'query' });
+ });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.tsx b/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.tsx
new file mode 100644
index 0000000000000..bb8dc6ee62559
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/search_bar/search_bar.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 React, { useCallback } from 'react';
+import type { FC } from 'react';
+
+import type { SearchFilterConfig } from '@elastic/eui';
+import { EuiFlexGroup, EuiFlexItem, EuiButton, EuiSearchBar } from '@elastic/eui';
+import type { ExceptionListTypeEnum } from '@kbn/securitysolution-io-ts-list-types';
+import type { GetExceptionItemProps } from '../types';
+
+const ITEMS_SCHEMA = {
+ strict: true,
+ fields: {
+ created_by: {
+ type: 'string',
+ },
+ description: {
+ type: 'string',
+ },
+ id: {
+ type: 'string',
+ },
+ item_id: {
+ type: 'string',
+ },
+ list_id: {
+ type: 'string',
+ },
+ name: {
+ type: 'string',
+ },
+ os_types: {
+ type: 'string',
+ },
+ tags: {
+ type: 'string',
+ },
+ },
+};
+interface SearchBarProps {
+ addExceptionButtonText?: string;
+ placeholdertext?: string;
+ canAddException?: boolean; // TODO what is the default value
+
+ // TODO: REFACTOR: not to send the listType and handle it in the Parent
+ // Exception list type used to determine what type of item is
+ // being created when "onAddExceptionClick" is invoked
+ listType: ExceptionListTypeEnum;
+ isSearching?: boolean;
+ dataTestSubj?: string;
+ filters?: SearchFilterConfig[]; // TODO about filters
+ onSearch: (arg: GetExceptionItemProps) => void;
+ onAddExceptionClick: (type: ExceptionListTypeEnum) => void;
+}
+const SearchBarComponent: FC = ({
+ addExceptionButtonText,
+ placeholdertext,
+ canAddException,
+ listType,
+ isSearching,
+ dataTestSubj,
+ filters = [],
+ onSearch,
+ onAddExceptionClick,
+}) => {
+ const handleOnSearch = useCallback(
+ ({ queryText }): void => {
+ onSearch({ search: queryText });
+ },
+ [onSearch]
+ );
+
+ const handleAddException = useCallback(() => {
+ // TODO: ASK YARA why we need to send the listType
+ onAddExceptionClick(listType);
+ }, [onAddExceptionClick, listType]);
+
+ return (
+
+
+
+
+ {!canAddException && (
+
+
+ {addExceptionButtonText}
+
+
+ )}
+
+ );
+};
+
+SearchBarComponent.displayName = 'SearchBarComponent';
+
+export const SearchBar = React.memo(SearchBarComponent);
+
+SearchBar.displayName = 'SearchBar';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/test_helpers/comments.mock.ts b/packages/kbn-securitysolution-exception-list-components/src/test_helpers/comments.mock.ts
new file mode 100644
index 0000000000000..3e83aa53f0f23
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/test_helpers/comments.mock.ts
@@ -0,0 +1,18 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { Comment, CommentsArray } from '@kbn/securitysolution-io-ts-list-types';
+
+export const getCommentsMock = (): Comment => ({
+ comment: 'some old comment',
+ created_at: '2020-04-20T15:25:31.830Z',
+ created_by: 'some user',
+ id: 'uuid_here',
+});
+
+export const getCommentsArrayMock = (): CommentsArray => [getCommentsMock(), getCommentsMock()];
diff --git a/packages/kbn-securitysolution-exception-list-components/src/test_helpers/exception_list_item_schema.mock.ts b/packages/kbn-securitysolution-exception-list-components/src/test_helpers/exception_list_item_schema.mock.ts
new file mode 100644
index 0000000000000..40f6d5292f317
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/test_helpers/exception_list_item_schema.mock.ts
@@ -0,0 +1,42 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types';
+
+export const getExceptionListItemSchemaMock = (
+ overrides?: Partial
+): ExceptionListItemSchema => ({
+ _version: undefined,
+ comments: [],
+ created_at: '2020-04-20T15:25:31.830Z',
+ created_by: 'some user',
+ description: 'some description',
+ entries: [
+ {
+ entries: [
+ { field: 'nested.field', operator: 'included', type: 'match', value: 'some value' },
+ ],
+ field: 'some.parentField',
+ type: 'nested',
+ },
+ { field: 'some.not.nested.field', operator: 'included', type: 'match', value: 'some value' },
+ ],
+ id: '1',
+ item_id: 'endpoint_list_item',
+ list_id: 'endpoint_list_id',
+ meta: {},
+ name: 'some name',
+ namespace_type: 'single',
+ os_types: [],
+ tags: ['user added string for a tag', 'malware'],
+ tie_breaker_id: '6a76b69d-80df-4ab2-8c3e-85f466b06a0e',
+ type: 'simple',
+ updated_at: '2020-04-20T15:25:31.830Z',
+ updated_by: 'some user',
+ ...(overrides || {}),
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/translations.ts b/packages/kbn-securitysolution-exception-list-components/src/translations.ts
new file mode 100644
index 0000000000000..c919ef423c545
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/translations.ts
@@ -0,0 +1,57 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { i18n } from '@kbn/i18n';
+
+export const EMPTY_VIEWER_STATE_EMPTY_TITLE = i18n.translate(
+ 'exceptionList-components.empty.viewer.state.empty.title',
+ {
+ defaultMessage: 'Add exceptions to this rule',
+ }
+);
+
+export const EMPTY_VIEWER_STATE_EMPTY_BODY = i18n.translate(
+ 'exceptionList-components.empty.viewer.state.empty.body',
+ {
+ defaultMessage: 'There is no exception in your rule. Create your first rule exception.',
+ }
+);
+export const EMPTY_VIEWER_STATE_EMPTY_SEARCH_TITLE = i18n.translate(
+ 'exceptionList-components.empty.viewer.state.empty_search.search.title',
+ {
+ defaultMessage: 'No results match your search criteria',
+ }
+);
+
+export const EMPTY_VIEWER_STATE_EMPTY_SEARCH_BODY = i18n.translate(
+ 'exceptionList-components.empty.viewer.state.empty_search.body',
+ {
+ defaultMessage: 'Try modifying your search',
+ }
+);
+
+export const EMPTY_VIEWER_STATE_EMPTY_VIEWER_BUTTON = (exceptionType: string) =>
+ i18n.translate('exceptionList-components.empty.viewer.state.empty.viewer_button', {
+ values: { exceptionType },
+ defaultMessage: 'Create {exceptionType} exception',
+ });
+
+export const EMPTY_VIEWER_STATE_ERROR_TITLE = i18n.translate(
+ 'exceptionList-components.empty.viewer.state.error_title',
+ {
+ defaultMessage: 'Unable to load exception items',
+ }
+);
+
+export const EMPTY_VIEWER_STATE_ERROR_BODY = i18n.translate(
+ 'exceptionList-components.empty.viewer.state.error_body',
+ {
+ defaultMessage:
+ 'There was an error loading the exception items. Contact your administrator for help.',
+ }
+);
diff --git a/packages/kbn-securitysolution-exception-list-components/src/types/index.ts b/packages/kbn-securitysolution-exception-list-components/src/types/index.ts
new file mode 100644
index 0000000000000..dbb402ca78451
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/types/index.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { ExceptionListSchema } from '@kbn/securitysolution-io-ts-list-types';
+
+import type { Pagination } from '@elastic/eui';
+import type { NamespaceType } from '@kbn/securitysolution-io-ts-list-types';
+
+export interface GetExceptionItemProps {
+ pagination?: Pagination;
+ search?: string;
+ filters?: string;
+}
+
+export interface PaginationProps {
+ dataTestSubj?: string;
+ ariaLabel?: string;
+ pagination: Pagination;
+ onPaginationChange: (arg: GetExceptionItemProps) => void;
+}
+
+export enum ViewerStatus {
+ ERROR = 'error',
+ EMPTY = 'empty',
+ EMPTY_SEARCH = 'empty_search',
+ LOADING = 'loading',
+ SEARCHING = 'searching',
+ DELETING = 'deleting',
+}
+
+export interface ExceptionListSummaryProps {
+ pagination: Pagination;
+ // Corresponds to last time exception items were fetched
+ lastUpdated: string | number | null;
+}
+
+export type ViewerFlyoutName = 'addException' | 'editException' | null;
+
+export interface RuleReferences {
+ [key: string]: any[]; // TODO fix
+}
+
+export interface ExceptionListItemIdentifiers {
+ id: string;
+ name: string;
+ namespaceType: NamespaceType;
+}
+
+export enum ListTypeText {
+ ENDPOINT = 'endpoint',
+ DETECTION = 'empty',
+ RULE_DEFAULT = 'empty_search',
+}
+
+export interface RuleReference {
+ name: string;
+ id: string;
+ ruleId: string;
+ exceptionLists: ExceptionListSchema[];
+}
diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/index.ts
new file mode 100644
index 0000000000000..472a80575f27d
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/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 { ValueWithSpaceWarning } from './value_with_space_warning';
diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts
new file mode 100644
index 0000000000000..8f6788d710a19
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.test.ts
@@ -0,0 +1,54 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { renderHook } from '@testing-library/react-hooks';
+import { useValueWithSpaceWarning } from './use_value_with_space_warning';
+
+describe('useValueWithSpaceWarning', () => {
+ it('should return true when value is string and contains space', () => {
+ const { result } = renderHook(() => useValueWithSpaceWarning({ value: ' space before' }));
+
+ const { showSpaceWarningIcon, warningText } = result.current;
+ expect(showSpaceWarningIcon).toBeTruthy();
+ expect(warningText).toBeTruthy();
+ });
+ it('should return true when value is string and does not contain space', () => {
+ const { result } = renderHook(() => useValueWithSpaceWarning({ value: 'no space' }));
+
+ const { showSpaceWarningIcon, warningText } = result.current;
+ expect(showSpaceWarningIcon).toBeFalsy();
+ expect(warningText).toBeTruthy();
+ });
+ it('should return true when value is array and one of the elements contains space', () => {
+ const { result } = renderHook(() =>
+ useValueWithSpaceWarning({ value: [' space before', 'no space'] })
+ );
+
+ const { showSpaceWarningIcon, warningText } = result.current;
+ expect(showSpaceWarningIcon).toBeTruthy();
+ expect(warningText).toBeTruthy();
+ });
+ it('should return true when value is array and none contains space', () => {
+ const { result } = renderHook(() =>
+ useValueWithSpaceWarning({ value: ['no space', 'no space'] })
+ );
+
+ const { showSpaceWarningIcon, warningText } = result.current;
+ expect(showSpaceWarningIcon).toBeFalsy();
+ expect(warningText).toBeTruthy();
+ });
+ it('should return the tooltipIconText', () => {
+ const { result } = renderHook(() =>
+ useValueWithSpaceWarning({ value: ' space before', tooltipIconText: 'Warning Text' })
+ );
+
+ const { showSpaceWarningIcon, warningText } = result.current;
+ expect(showSpaceWarningIcon).toBeTruthy();
+ expect(warningText).toEqual('Warning Text');
+ });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts
new file mode 100644
index 0000000000000..bf407d2798c78
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/use_value_with_space_warning.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { paramContainsSpace, autoCompletei18n } from '@kbn/securitysolution-autocomplete';
+
+interface UseValueWithSpaceWarningResult {
+ showSpaceWarningIcon: boolean;
+ warningText: string;
+}
+interface UseValueWithSpaceWarningProps {
+ value: string | string[];
+ tooltipIconText?: string;
+}
+
+export const useValueWithSpaceWarning = ({
+ value,
+ tooltipIconText,
+}: UseValueWithSpaceWarningProps): UseValueWithSpaceWarningResult => {
+ const showSpaceWarningIcon = Array.isArray(value)
+ ? value.find(paramContainsSpace)
+ : paramContainsSpace(value);
+
+ return {
+ showSpaceWarningIcon: !!showSpaceWarningIcon,
+ warningText: tooltipIconText || autoCompletei18n.FIELD_SPACE_WARNING,
+ };
+};
diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.tsx b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.tsx
new file mode 100644
index 0000000000000..e19a54be48aa4
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.test.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 React from 'react';
+import { fireEvent, render } from '@testing-library/react';
+
+import { ValueWithSpaceWarning } from '.';
+
+import * as useValueWithSpaceWarningMock from './use_value_with_space_warning';
+
+jest.mock('./use_value_with_space_warning');
+
+describe('ValueWithSpaceWarning', () => {
+ beforeEach(() => {
+ // @ts-ignore
+ useValueWithSpaceWarningMock.useValueWithSpaceWarning = jest
+ .fn()
+ .mockReturnValue({ showSpaceWarningIcon: true, warningText: 'Warning Text' });
+ });
+ it('should not render if value is falsy', () => {
+ const container = render( );
+ expect(container.queryByTestId('valueWithSpaceWarningTooltip')).toBeFalsy();
+ });
+ it('should not render if showSpaceWarning is falsy', () => {
+ // @ts-ignore
+ useValueWithSpaceWarningMock.useValueWithSpaceWarning = jest
+ .fn()
+ .mockReturnValue({ showSpaceWarningIcon: false, warningText: '' });
+
+ const container = render( );
+ expect(container.queryByTestId('valueWithSpaceWarningTooltip')).toBeFalsy();
+ });
+ it('should render if showSpaceWarning is truthy', () => {
+ const container = render( );
+ expect(container.getByTestId('valueWithSpaceWarningTooltip')).toBeInTheDocument();
+ });
+ it('should show the tooltip when the icon is clicked', async () => {
+ const container = render( );
+
+ fireEvent.mouseOver(container.getByTestId('valueWithSpaceWarningTooltip'));
+ expect(await container.findByText('Warning Text')).toBeInTheDocument();
+ });
+});
diff --git a/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx
new file mode 100644
index 0000000000000..9cff0649efb9e
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/src/value_with_space_warning/value_with_space_warning.tsx
@@ -0,0 +1,47 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React from 'react';
+import type { FC } from 'react';
+import { css } from '@emotion/css';
+import { euiThemeVars } from '@kbn/ui-theme';
+
+import { EuiIcon, EuiToolTip } from '@elastic/eui';
+import { useValueWithSpaceWarning } from './use_value_with_space_warning';
+
+interface ValueWithSpaceWarningProps {
+ value: string[] | string;
+ tooltipIconType?: string;
+ tooltipIconText?: string;
+}
+const containerCss = css`
+ display: inline;
+ margin-left: ${euiThemeVars.euiSizeXS};
+`;
+export const ValueWithSpaceWarning: FC = ({
+ value,
+ tooltipIconType = 'iInCircle',
+ tooltipIconText,
+}) => {
+ const { showSpaceWarningIcon, warningText } = useValueWithSpaceWarning({
+ value,
+ tooltipIconText,
+ });
+ if (!showSpaceWarningIcon || !value) return null;
+ return (
+
+
+
+
+
+ );
+};
diff --git a/packages/kbn-securitysolution-exception-list-components/tsconfig.json b/packages/kbn-securitysolution-exception-list-components/tsconfig.json
new file mode 100644
index 0000000000000..412652e0a8f9d
--- /dev/null
+++ b/packages/kbn-securitysolution-exception-list-components/tsconfig.json
@@ -0,0 +1,21 @@
+{
+ "extends": "../../tsconfig.bazel.json",
+ "compilerOptions": {
+ "declaration": true,
+ "declarationMap": true,
+ "emitDeclarationOnly": true,
+ "outDir": "target_types",
+ "stripInternal": false,
+ "types": [
+ "jest",
+ "node",
+ "react",
+ "@emotion/react/types/css-prop"
+ ]
+ },
+ "include": [
+ "**/*.ts",
+ "**/*.tsx",
+ "**/*.d.ts"
+ ]
+}
diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/index.ts b/packages/kbn-securitysolution-io-ts-alerting-types/index.ts
index c2e00482cd2d3..75d5352c9f63e 100644
--- a/packages/kbn-securitysolution-io-ts-alerting-types/index.ts
+++ b/packages/kbn-securitysolution-io-ts-alerting-types/index.ts
@@ -18,7 +18,6 @@ export * from './src/default_per_page';
export * from './src/default_risk_score_mapping_array';
export * from './src/default_severity_mapping_array';
export * from './src/default_threat_array';
-export * from './src/default_throttle_null';
export * from './src/default_to_string';
export * from './src/default_uuid';
export * from './src/from';
diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_throttle_null/index.test.ts b/packages/kbn-securitysolution-io-ts-alerting-types/src/default_throttle_null/index.test.ts
deleted file mode 100644
index b92815d4fe828..0000000000000
--- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_throttle_null/index.test.ts
+++ /dev/null
@@ -1,44 +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 { pipe } from 'fp-ts/lib/pipeable';
-import { left } from 'fp-ts/lib/Either';
-import { Throttle } from '../throttle';
-import { DefaultThrottleNull } from '.';
-import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';
-
-describe('default_throttle_null', () => {
- test('it should validate a throttle string', () => {
- const payload: Throttle = 'some string';
- const decoded = DefaultThrottleNull.decode(payload);
- const message = pipe(decoded, foldLeftRight);
-
- expect(getPaths(left(message.errors))).toEqual([]);
- expect(message.schema).toEqual(payload);
- });
-
- test('it should not validate an array with a number', () => {
- const payload = 5;
- const decoded = DefaultThrottleNull.decode(payload);
- const message = pipe(decoded, foldLeftRight);
-
- expect(getPaths(left(message.errors))).toEqual([
- 'Invalid value "5" supplied to "DefaultThreatNull"',
- ]);
- expect(message.schema).toEqual({});
- });
-
- test('it should return a default "null" if not provided a value', () => {
- const payload = undefined;
- const decoded = DefaultThrottleNull.decode(payload);
- const message = pipe(decoded, foldLeftRight);
-
- expect(getPaths(left(message.errors))).toEqual([]);
- expect(message.schema).toEqual(null);
- });
-});
diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_throttle_null/index.ts b/packages/kbn-securitysolution-io-ts-alerting-types/src/default_throttle_null/index.ts
deleted file mode 100644
index e9b9ec27ea418..0000000000000
--- a/packages/kbn-securitysolution-io-ts-alerting-types/src/default_throttle_null/index.ts
+++ /dev/null
@@ -1,23 +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 * as t from 'io-ts';
-import { Either } from 'fp-ts/lib/Either';
-import { throttle, ThrottleOrNull } from '../throttle';
-
-/**
- * Types the DefaultThrottleNull as:
- * - If null or undefined, then a null will be set
- */
-export const DefaultThrottleNull = new t.Type(
- 'DefaultThreatNull',
- throttle.is,
- (input, context): Either =>
- input == null ? t.success(null) : throttle.validate(input, context),
- t.identity
-);
diff --git a/packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts b/packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts
index 19e75dcc3be07..d7d636ad0994e 100644
--- a/packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts
+++ b/packages/kbn-securitysolution-io-ts-alerting-types/src/throttle/index.ts
@@ -6,13 +6,15 @@
* Side Public License, v 1.
*/
+import { TimeDuration } from '@kbn/securitysolution-io-ts-types';
import * as t from 'io-ts';
-export const throttle = t.string;
+export const throttle = t.union([
+ t.literal('no_actions'),
+ t.literal('rule'),
+ TimeDuration({ allowedUnits: ['h', 'd'] }),
+]);
export type Throttle = t.TypeOf;
export const throttleOrNull = t.union([throttle, t.null]);
export type ThrottleOrNull = t.TypeOf;
-
-export const throttleOrNullOrUndefined = t.union([throttle, t.null, t.undefined]);
-export type ThrottleOrUndefinedOrNull = t.TypeOf;
diff --git a/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.test.ts b/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.test.ts
index 8af5f04bf16e6..dc6b5e61ebbf6 100644
--- a/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.test.ts
+++ b/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.test.ts
@@ -6,100 +6,315 @@
* Side Public License, v 1.
*/
-import { pipe } from 'fp-ts/lib/pipeable';
import { left } from 'fp-ts/lib/Either';
import { TimeDuration } from '.';
import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils';
-describe('time_unit', () => {
- test('it should validate a correctly formed TimeDuration with time unit of seconds', () => {
- const payload = '1s';
- const decoded = TimeDuration.decode(payload);
- const message = pipe(decoded, foldLeftRight);
+describe('TimeDuration', () => {
+ describe('with allowedDurations', () => {
+ test('it should validate a correctly formed TimeDuration with an allowed duration of 1s', () => {
+ const payload = '1s';
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 's'],
+ [2, 'h'],
+ [7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
- expect(getPaths(left(message.errors))).toEqual([]);
- expect(message.schema).toEqual(payload);
- });
+ expect(getPaths(left(message.errors))).toEqual([]);
+ expect(message.schema).toEqual(payload);
+ });
- test('it should validate a correctly formed TimeDuration with time unit of minutes', () => {
- const payload = '100m';
- const decoded = TimeDuration.decode(payload);
- const message = pipe(decoded, foldLeftRight);
+ test('it should validate a correctly formed TimeDuration with an allowed duration of 7d', () => {
+ const payload = '1s';
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 's'],
+ [2, 'h'],
+ [7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
- expect(getPaths(left(message.errors))).toEqual([]);
- expect(message.schema).toEqual(payload);
- });
+ expect(getPaths(left(message.errors))).toEqual([]);
+ expect(message.schema).toEqual(payload);
+ });
- test('it should validate a correctly formed TimeDuration with time unit of hours', () => {
- const payload = '10000000h';
- const decoded = TimeDuration.decode(payload);
- const message = pipe(decoded, foldLeftRight);
+ test('it should NOT validate a time duration if the allowed durations does not include it', () => {
+ const payload = '24h';
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 's'],
+ [2, 'h'],
+ [7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
- expect(getPaths(left(message.errors))).toEqual([]);
- expect(message.schema).toEqual(payload);
- });
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "24h" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
- test('it should NOT validate a negative TimeDuration', () => {
- const payload = '-10s';
- const decoded = TimeDuration.decode(payload);
- const message = pipe(decoded, foldLeftRight);
+ test('it should NOT validate a an allowed duration with a negative number', () => {
+ const payload = '10s';
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 's'],
+ [-7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
- expect(getPaths(left(message.errors))).toEqual([
- 'Invalid value "-10s" supplied to "TimeDuration"',
- ]);
- expect(message.schema).toEqual({});
- });
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "[[1,"s"],[-7,"d"]]" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
- test('it should NOT validate a TimeDuration with some other time unit', () => {
- const payload = '10000000w';
- const decoded = TimeDuration.decode(payload);
- const message = pipe(decoded, foldLeftRight);
+ test('it should NOT validate an allowed duration with a fractional number', () => {
+ const payload = '1.5s';
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 's'],
+ [-7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
- expect(getPaths(left(message.errors))).toEqual([
- 'Invalid value "10000000w" supplied to "TimeDuration"',
- ]);
- expect(message.schema).toEqual({});
- });
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "1.5s" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
- test('it should NOT validate a TimeDuration with a time interval with incorrect format', () => {
- const payload = '100ff0000w';
- const decoded = TimeDuration.decode(payload);
- const message = pipe(decoded, foldLeftRight);
+ test('it should NOT validate a an allowed duration with a duration of 0', () => {
+ const payload = '10s';
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [0, 's'],
+ [7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
- expect(getPaths(left(message.errors))).toEqual([
- 'Invalid value "100ff0000w" supplied to "TimeDuration"',
- ]);
- expect(message.schema).toEqual({});
- });
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "[[0,"s"],[7,"d"]]" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
- test('it should NOT validate an empty string', () => {
- const payload = '';
- const decoded = TimeDuration.decode(payload);
- const message = pipe(decoded, foldLeftRight);
+ test('it should NOT validate a TimeDuration with an invalid time unit', () => {
+ const payload = '10000000days';
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 'h'],
+ [1, 'd'],
+ [7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
- expect(getPaths(left(message.errors))).toEqual(['Invalid value "" supplied to "TimeDuration"']);
- expect(message.schema).toEqual({});
- });
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "10000000days" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
+
+ test('it should NOT validate a TimeDuration with a time interval with incorrect format', () => {
+ const payload = '100ff0000w';
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 'h'],
+ [1, 'd'],
+ [7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "100ff0000w" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
- test('it should NOT validate an number', () => {
- const payload = 100;
- const decoded = TimeDuration.decode(payload);
- const message = pipe(decoded, foldLeftRight);
+ test('it should NOT validate an empty string', () => {
+ const payload = '';
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 'h'],
+ [1, 'd'],
+ [7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
- expect(getPaths(left(message.errors))).toEqual([
- 'Invalid value "100" supplied to "TimeDuration"',
- ]);
- expect(message.schema).toEqual({});
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
+
+ test('it should NOT validate an number', () => {
+ const payload = 100;
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 'h'],
+ [1, 'd'],
+ [7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "100" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
+
+ test('it should NOT validate an TimeDuration with a valid time unit but unsafe integer', () => {
+ const payload = `${Math.pow(2, 53)}h`;
+ const decoded = TimeDuration({
+ allowedDurations: [
+ [1, 'h'],
+ [1, 'd'],
+ [7, 'd'],
+ ],
+ }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ `Invalid value "${Math.pow(2, 53)}h" supplied to "TimeDuration"`,
+ ]);
+ expect(message.schema).toEqual({});
+ });
});
+ describe('with allowedUnits', () => {
+ test('it should validate a correctly formed TimeDuration with time unit of seconds', () => {
+ const payload = '1s';
+ const decoded = TimeDuration({ allowedUnits: ['s'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([]);
+ expect(message.schema).toEqual(payload);
+ });
+
+ test('it should validate a correctly formed TimeDuration with time unit of minutes', () => {
+ const payload = '100m';
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([]);
+ expect(message.schema).toEqual(payload);
+ });
+
+ test('it should validate a correctly formed TimeDuration with time unit of hours', () => {
+ const payload = '10000000h';
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm', 'h'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([]);
+ expect(message.schema).toEqual(payload);
+ });
+
+ test('it should validate a correctly formed TimeDuration with time unit of days', () => {
+ const payload = '7d';
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm', 'h', 'd'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([]);
+ expect(message.schema).toEqual(payload);
+ });
+
+ test('it should NOT validate a correctly formed TimeDuration with time unit of seconds if it is not an allowed unit', () => {
+ const payload = '30s';
+ const decoded = TimeDuration({ allowedUnits: ['m', 'h', 'd'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "30s" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
+
+ test('it should NOT validate a negative TimeDuration', () => {
+ const payload = '-10s';
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm', 'h', 'd'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "-10s" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
+
+ test('it should NOT validate a fractional number', () => {
+ const payload = '1.5s';
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm', 'h', 'd'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "1.5s" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
+
+ test('it should NOT validate a TimeDuration with an invalid time unit', () => {
+ const payload = '10000000days';
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm', 'h', 'd'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "10000000days" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
+
+ test('it should NOT validate a TimeDuration with a time interval with incorrect format', () => {
+ const payload = '100ff0000w';
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm', 'h'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "100ff0000w" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
+
+ test('it should NOT validate an empty string', () => {
+ const payload = '';
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm', 'h'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
+
+ test('it should NOT validate an number', () => {
+ const payload = 100;
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm', 'h'] }).decode(payload);
+ const message = foldLeftRight(decoded);
+
+ expect(getPaths(left(message.errors))).toEqual([
+ 'Invalid value "100" supplied to "TimeDuration"',
+ ]);
+ expect(message.schema).toEqual({});
+ });
- test('it should NOT validate an TimeDuration with a valid time unit but unsafe integer', () => {
- const payload = `${Math.pow(2, 53)}h`;
- const decoded = TimeDuration.decode(payload);
- const message = pipe(decoded, foldLeftRight);
+ test('it should NOT validate an TimeDuration with a valid time unit but unsafe integer', () => {
+ const payload = `${Math.pow(2, 53)}h`;
+ const decoded = TimeDuration({ allowedUnits: ['s', 'm', 'h'] }).decode(payload);
+ const message = foldLeftRight(decoded);
- expect(getPaths(left(message.errors))).toEqual([
- `Invalid value "${Math.pow(2, 53)}h" supplied to "TimeDuration"`,
- ]);
- expect(message.schema).toEqual({});
+ expect(getPaths(left(message.errors))).toEqual([
+ `Invalid value "${Math.pow(2, 53)}h" supplied to "TimeDuration"`,
+ ]);
+ expect(message.schema).toEqual({});
+ });
});
});
diff --git a/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts b/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts
index c486e1d171689..0b69c62e0d2f5 100644
--- a/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts
+++ b/packages/kbn-securitysolution-io-ts-types/src/time_duration/index.ts
@@ -12,34 +12,60 @@ import { Either } from 'fp-ts/lib/Either';
/**
* Types the TimeDuration as:
* - A string that is not empty, and composed of a positive integer greater than 0 followed by a unit of time
- * - in the format {safe_integer}{timeUnit}, e.g. "30s", "1m", "2h"
+ * - in the format {safe_integer}{timeUnit}, e.g. "30s", "1m", "2h", "7d"
*/
-export const TimeDuration = new t.Type(
- 'TimeDuration',
- t.string.is,
- (input, context): Either => {
- if (typeof input === 'string' && input.trim() !== '') {
- try {
- const inputLength = input.length;
- const time = parseInt(input.trim().substring(0, inputLength - 1), 10);
- const unit = input.trim().at(-1);
- if (
- time >= 1 &&
- Number.isSafeInteger(time) &&
- (unit === 's' || unit === 'm' || unit === 'h')
- ) {
- return t.success(input);
- } else {
+
+type TimeUnits = 's' | 'm' | 'h' | 'd' | 'w' | 'y';
+interface TimeDurationWithAllowedDurations {
+ allowedDurations: Array<[number, TimeUnits]>;
+ allowedUnits?: never;
+}
+interface TimeDurationWithAllowedUnits {
+ allowedUnits: TimeUnits[];
+ allowedDurations?: never;
+}
+
+type TimeDurationType = TimeDurationWithAllowedDurations | TimeDurationWithAllowedUnits;
+
+const isTimeSafe = (time: number) => time >= 1 && Number.isSafeInteger(time);
+
+export const TimeDuration = ({ allowedUnits, allowedDurations }: TimeDurationType) => {
+ return new t.Type(
+ 'TimeDuration',
+ t.string.is,
+ (input, context): Either => {
+ if (typeof input === 'string' && input.trim() !== '') {
+ try {
+ const inputLength = input.length;
+ const time = Number(input.trim().substring(0, inputLength - 1));
+ const unit = input.trim().at(-1);
+ if (!isTimeSafe(time)) {
+ return t.failure(input, context);
+ }
+ if (allowedDurations) {
+ for (const [allowedTime, allowedUnit] of allowedDurations) {
+ if (!isTimeSafe(allowedTime)) {
+ return t.failure(allowedDurations, context);
+ }
+ if (allowedTime === time && allowedUnit === unit) {
+ return t.success(input);
+ }
+ }
+ return t.failure(input, context);
+ } else if (allowedUnits.includes(unit as TimeUnits)) {
+ return t.success(input);
+ } else {
+ return t.failure(input, context);
+ }
+ } catch (error) {
return t.failure(input, context);
}
- } catch (error) {
+ } else {
return t.failure(input, context);
}
- } else {
- return t.failure(input, context);
- }
- },
- t.identity
-);
+ },
+ t.identity
+ );
+};
export type TimeDurationC = typeof TimeDuration;
diff --git a/packages/kbn-test/jest_integration/jest-preset.js b/packages/kbn-test/jest_integration/jest-preset.js
index b039329893d37..d150f8bd9e45d 100644
--- a/packages/kbn-test/jest_integration/jest-preset.js
+++ b/packages/kbn-test/jest_integration/jest-preset.js
@@ -15,9 +15,8 @@ module.exports = {
(pattern) => !pattern.includes('integration_tests')
),
setupFilesAfterEnv: [
+ ...preset.setupFilesAfterEnv,
'/node_modules/@kbn/test/target_node/src/jest/setup/after_env.integration.js',
- '/node_modules/@kbn/test/target_node/src/jest/setup/mocks.moment_timezone.js',
- '/node_modules/@kbn/test/target_node/src/jest/setup/mocks.eui.js',
],
reporters: [
'default',
diff --git a/packages/kbn-user-profile-components/index.ts b/packages/kbn-user-profile-components/index.ts
index 8489a9eb3b35a..5f8d1db6fcf62 100644
--- a/packages/kbn-user-profile-components/index.ts
+++ b/packages/kbn-user-profile-components/index.ts
@@ -7,9 +7,12 @@
*/
export type { UserAvatarProps, UserProfileWithAvatar } from './src/user_avatar';
+export type { UserToolTipProps } from './src/user_tooltip';
export type { UserProfilesSelectableProps } from './src/user_profiles_selectable';
export type { UserProfilesPopoverProps } from './src/user_profiles_popover';
export { UserAvatar } from './src/user_avatar';
+export { UserAvatarTip } from './src/user_avatar_tip';
+export { UserToolTip } from './src/user_tooltip';
export { UserProfilesSelectable } from './src/user_profiles_selectable';
export { UserProfilesPopover } from './src/user_profiles_popover';
export { getUserDisplayName } from './src/user_profile';
diff --git a/packages/kbn-user-profile-components/src/user_avatar_tip.test.tsx b/packages/kbn-user-profile-components/src/user_avatar_tip.test.tsx
new file mode 100644
index 0000000000000..108015c3bae60
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_avatar_tip.test.tsx
@@ -0,0 +1,73 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { UserAvatarTip } from './user_avatar_tip';
+
+describe('UserAvatarTip', () => {
+ it('should render `UserToolTip` correctly with `UserAvatar`', () => {
+ const wrapper = shallow(
+
+ );
+ expect(wrapper).toMatchInlineSnapshot(`
+
+
+
+ `);
+ });
+
+ it('should not render `UserToolTip` when user is not set', () => {
+ const wrapper = shallow( );
+ expect(wrapper).toMatchInlineSnapshot(` `);
+ });
+});
diff --git a/packages/kbn-user-profile-components/src/user_avatar_tip.tsx b/packages/kbn-user-profile-components/src/user_avatar_tip.tsx
new file mode 100644
index 0000000000000..6bb3d342aa38f
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_avatar_tip.tsx
@@ -0,0 +1,29 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { FunctionComponent } from 'react';
+import React from 'react';
+
+import type { UserAvatarProps } from './user_avatar';
+import { UserAvatar } from './user_avatar';
+import { UserToolTip } from './user_tooltip';
+
+/**
+ * Renders a user avatar with tooltip
+ */
+export const UserAvatarTip: FunctionComponent = ({ user, avatar, ...rest }) => {
+ if (!user) {
+ return ;
+ }
+
+ return (
+
+
+
+ );
+};
diff --git a/packages/kbn-user-profile-components/src/user_profiles_selectable.tsx b/packages/kbn-user-profile-components/src/user_profiles_selectable.tsx
index 76b9b9ea6d556..904e5ac2896c1 100644
--- a/packages/kbn-user-profile-components/src/user_profiles_selectable.tsx
+++ b/packages/kbn-user-profile-components/src/user_profiles_selectable.tsx
@@ -301,7 +301,7 @@ export const UserProfilesSelectable =
{option.label}
- {option.user.email ? (
+ {option.user.email && option.user.email !== option.label ? (
{searchValue ? (
diff --git a/packages/kbn-user-profile-components/src/user_tooltip.test.tsx b/packages/kbn-user-profile-components/src/user_tooltip.test.tsx
new file mode 100644
index 0000000000000..ed18651b223cf
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_tooltip.test.tsx
@@ -0,0 +1,91 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { UserToolTip } from './user_tooltip';
+
+describe('UserToolTip', () => {
+ it('should render `EuiToolTip` correctly with `UserAvatar`', () => {
+ const wrapper = shallow(
+
+ Toggle
+
+ );
+ expect(wrapper).toMatchInlineSnapshot(`
+
+
+
+
+
+
+
+
+ Delighted Nightingale
+
+
+
+ delighted_nightingale@elastic.co
+
+
+
+
+ }
+ delay="regular"
+ display="inlineBlock"
+ position="top"
+ >
+
+ Toggle
+
+
+ `);
+ });
+});
diff --git a/packages/kbn-user-profile-components/src/user_tooltip.tsx b/packages/kbn-user-profile-components/src/user_tooltip.tsx
new file mode 100644
index 0000000000000..c2678996aebb3
--- /dev/null
+++ b/packages/kbn-user-profile-components/src/user_tooltip.tsx
@@ -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 { EuiToolTipProps } from '@elastic/eui';
+import { EuiToolTip, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
+import type { FunctionComponent } from 'react';
+import React from 'react';
+
+import type { UserProfileUserInfo, UserProfileAvatarData } from './user_profile';
+import { UserAvatar } from './user_avatar';
+import { getUserDisplayName } from './user_profile';
+
+/**
+ * Props of {@link UserToolTip} component
+ */
+export interface UserToolTipProps extends Omit {
+ /**
+ * User to be rendered
+ */
+ user: UserProfileUserInfo;
+
+ /**
+ * Avatar data of user to be rendered
+ */
+ avatar?: UserProfileAvatarData;
+}
+
+/**
+ * Renders a tooltip with user information
+ */
+export const UserToolTip: FunctionComponent = ({ user, avatar, ...rest }) => {
+ const displayName = getUserDisplayName(user);
+ return (
+
+
+
+
+
+
+
+ {displayName}
+
+ {user.email && user.email !== displayName ? (
+ {user.email}
+ ) : undefined}
+
+
+
+ }
+ {...rest}
+ />
+ );
+};
diff --git a/renovate.json b/renovate.json
index 6eed31366c409..4075b2452bea1 100644
--- a/renovate.json
+++ b/renovate.json
@@ -125,7 +125,7 @@
],
"reviewers": ["team:kibana-security"],
"matchBaseBranches": ["main"],
- "labels": ["Team:Security", "release_note:skip", "auto-backport"],
+ "labels": ["Team:Security", "release_note:skip", "backport:all-open"],
"enabled": true
},
{
diff --git a/src/core/server/core_app/bundle_routes/register_bundle_routes.test.ts b/src/core/server/core_app/bundle_routes/register_bundle_routes.test.ts
index 12f3041ec53fb..f816a85404f7a 100644
--- a/src/core/server/core_app/bundle_routes/register_bundle_routes.test.ts
+++ b/src/core/server/core_app/bundle_routes/register_bundle_routes.test.ts
@@ -10,7 +10,7 @@ import { registerRouteForBundleMock } from './register_bundle_routes.test.mocks'
import { PackageInfo } from '@kbn/config';
import { httpServiceMock } from '@kbn/core-http-server-mocks';
-import { InternalPluginInfo, UiPlugins } from '../../plugins';
+import type { InternalPluginInfo, UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { registerBundleRoutes } from './register_bundle_routes';
import { FileHashCache } from './file_hash_cache';
diff --git a/src/core/server/core_app/bundle_routes/register_bundle_routes.ts b/src/core/server/core_app/bundle_routes/register_bundle_routes.ts
index 6f701b46dcc8b..4adb50fdc96ca 100644
--- a/src/core/server/core_app/bundle_routes/register_bundle_routes.ts
+++ b/src/core/server/core_app/bundle_routes/register_bundle_routes.ts
@@ -12,7 +12,7 @@ import { fromRoot } from '@kbn/utils';
import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm';
import * as UiSharedDepsSrc from '@kbn/ui-shared-deps-src';
import type { IRouter } from '@kbn/core-http-server';
-import { UiPlugins } from '../../plugins';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { FileHashCache } from './file_hash_cache';
import { registerRouteForBundle } from './bundles_route';
diff --git a/src/core/server/core_app/core_app.test.ts b/src/core/server/core_app/core_app.test.ts
index 913ac2aa9ef67..76663eeed2fd1 100644
--- a/src/core/server/core_app/core_app.test.ts
+++ b/src/core/server/core_app/core_app.test.ts
@@ -10,9 +10,9 @@ import { registerBundleRoutesMock } from './core_app.test.mocks';
import { mockCoreContext } from '@kbn/core-base-server-mocks';
import { mockRouter } from '@kbn/core-http-router-server-mocks';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { coreMock, httpServerMock } from '../mocks';
import { httpResourcesMock } from '../http_resources/http_resources_service.mock';
-import type { UiPlugins } from '../plugins';
import { PluginType } from '../plugins';
import { CoreApp } from './core_app';
import { RequestHandlerContext } from '..';
diff --git a/src/core/server/core_app/core_app.ts b/src/core/server/core_app/core_app.ts
index d6f305698fc94..b8701d7646b7e 100644
--- a/src/core/server/core_app/core_app.ts
+++ b/src/core/server/core_app/core_app.ts
@@ -20,10 +20,10 @@ import type {
KibanaRequest,
IBasePath,
} from '@kbn/core-http-server';
+import type { UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { HttpResources, HttpResourcesServiceToolkit } from '../http_resources';
import { InternalCorePreboot, InternalCoreSetup } from '../internal_types';
import { registerBundleRoutes } from './bundle_routes';
-import { UiPlugins } from '../plugins';
import type { InternalCoreAppRequestHandlerContext } from './internal_types';
/** @internal */
diff --git a/src/core/server/http_resources/http_resources_service.test.ts b/src/core/server/http_resources/http_resources_service.test.ts
index 47b0ef049485b..ea04f30847508 100644
--- a/src/core/server/http_resources/http_resources_service.test.ts
+++ b/src/core/server/http_resources/http_resources_service.test.ts
@@ -13,7 +13,7 @@ import type { RouteConfig } from '@kbn/core-http-server';
import { mockCoreContext } from '@kbn/core-base-server-mocks';
import { httpServiceMock, httpServerMock } from '@kbn/core-http-server-mocks';
import { coreMock } from '../mocks';
-import { renderingMock } from '../rendering/rendering_service.mock';
+import { renderingServiceMock } from '@kbn/core-rendering-server-mocks';
import { HttpResourcesService, PrebootDeps, SetupDeps } from './http_resources_service';
import { httpResourcesMock } from './http_resources_service.mock';
import { HttpResources } from '..';
@@ -37,11 +37,11 @@ describe('HttpResources service', () => {
beforeEach(() => {
prebootDeps = {
http: httpServiceMock.createInternalPrebootContract(),
- rendering: renderingMock.createPrebootContract(),
+ rendering: renderingServiceMock.createPrebootContract(),
};
setupDeps = {
http: httpServiceMock.createInternalSetupContract(),
- rendering: renderingMock.createSetupContract(),
+ rendering: renderingServiceMock.createSetupContract(),
};
service = new HttpResourcesService(coreContext);
router = httpServiceMock.createRouter();
diff --git a/src/core/server/http_resources/http_resources_service.ts b/src/core/server/http_resources/http_resources_service.ts
index 7e95dc9e302d9..7cc88699ea7ba 100644
--- a/src/core/server/http_resources/http_resources_service.ts
+++ b/src/core/server/http_resources/http_resources_service.ts
@@ -18,8 +18,11 @@ import type {
InternalHttpServiceSetup,
InternalHttpServicePreboot,
} from '@kbn/core-http-server-internal';
-import { RequestHandlerContext } from '..';
-import { InternalRenderingServicePreboot, InternalRenderingServiceSetup } from '../rendering';
+import type {
+ InternalRenderingServicePreboot,
+ InternalRenderingServiceSetup,
+} from '@kbn/core-rendering-server-internal';
+import type { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server';
import {
InternalHttpResourcesSetup,
HttpResources,
diff --git a/src/core/server/http_resources/types.ts b/src/core/server/http_resources/types.ts
index 397f03098dd13..246a7394c3ade 100644
--- a/src/core/server/http_resources/types.ts
+++ b/src/core/server/http_resources/types.ts
@@ -15,7 +15,7 @@ import type {
KibanaResponseFactory,
RequestHandler,
} from '@kbn/core-http-server';
-import type { RequestHandlerContext } from '..';
+import type { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server';
/**
* Allows to configure HTTP response parameters
diff --git a/src/core/server/index.ts b/src/core/server/index.ts
index 6e72b1d2623cf..dafd53e374fe8 100644
--- a/src/core/server/index.ts
+++ b/src/core/server/index.ts
@@ -42,7 +42,6 @@ import type {
ExecutionContextStart,
} from '@kbn/core-execution-context-server';
import type {
- RequestHandlerContextBase,
IRouter,
RequestHandler,
KibanaResponseFactory,
@@ -69,12 +68,11 @@ import type { CoreUsageDataStart, CoreUsageDataSetup } from '@kbn/core-usage-dat
import type { I18nServiceSetup } from '@kbn/core-i18n-server';
import type { StatusServiceSetup } from '@kbn/core-status-server';
import type { UiSettingsServiceSetup, UiSettingsServiceStart } from '@kbn/core-ui-settings-server';
-
+import type { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server';
import { HttpResources } from './http_resources';
-import { PluginsServiceSetup, PluginsServiceStart, PluginOpaqueId } from './plugins';
-import type { CoreRequestHandlerContext } from './core_route_handler_context';
-import type { PrebootCoreRequestHandlerContext } from './preboot_core_route_handler_context';
+import { PluginsServiceSetup, PluginsServiceStart } from './plugins';
+export type { PluginOpaqueId } from '@kbn/core-base-common';
export type {
CoreUsageStats,
CoreUsageData,
@@ -232,7 +230,6 @@ export type {
HttpResourcesRequestHandler,
} from './http_resources';
-export type { IRenderOptions } from './rendering';
export type {
LoggingServiceSetup,
LoggerContextConfigInput,
@@ -462,33 +459,13 @@ export type {
AnalyticsServicePreboot,
AnalyticsServiceStart,
} from '@kbn/core-analytics-server';
-
-export type { CoreRequestHandlerContext } from './core_route_handler_context';
-
-/**
- * Base context passed to a route handler, containing the `core` context part.
- *
- * @public
- */
-export interface RequestHandlerContext extends RequestHandlerContextBase {
- core: Promise;
-}
-
-/**
- * @internal
- */
-export interface PrebootRequestHandlerContext extends RequestHandlerContextBase {
- core: Promise;
-}
-
-/**
- * Mixin allowing plugins to define their own request handler contexts.
- *
- * @public
- */
-export type CustomRequestHandlerContext = RequestHandlerContext & {
- [Key in keyof T]: T[Key] extends Promise ? T[Key] : Promise;
-};
+export type {
+ RequestHandlerContext,
+ CoreRequestHandlerContext,
+ CustomRequestHandlerContext,
+ PrebootRequestHandlerContext,
+ PrebootCoreRequestHandlerContext,
+} from '@kbn/core-http-request-handler-context-server';
/**
* Context passed to the `setup` method of `preboot` plugins.
@@ -599,7 +576,6 @@ export type {
HttpResources,
PluginsServiceSetup,
PluginsServiceStart,
- PluginOpaqueId,
};
/**
diff --git a/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts b/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts
index a1f7490168345..4fd5ca5cd2aea 100644
--- a/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts
+++ b/src/core/server/integration_tests/saved_objects/migrations/type_registrations.test.ts
@@ -60,6 +60,7 @@ const previouslyRegisteredTypes = [
'fleet-preconfiguration-deletion-record',
'graph-workspace',
'guided-setup-state',
+ 'guided-onboarding-guide-state',
'index-pattern',
'infrastructure-monitoring-log-view',
'infrastructure-ui-source',
diff --git a/src/core/server/internal_types.ts b/src/core/server/internal_types.ts
index e744ae01d1be0..683d08fe4f849 100644
--- a/src/core/server/internal_types.ts
+++ b/src/core/server/internal_types.ts
@@ -58,7 +58,7 @@ import type {
InternalUiSettingsServiceSetup,
InternalUiSettingsServiceStart,
} from '@kbn/core-ui-settings-server-internal';
-import { InternalRenderingServiceSetup } from './rendering';
+import type { InternalRenderingServiceSetup } from '@kbn/core-rendering-server-internal';
import { InternalHttpResourcesPreboot, InternalHttpResourcesSetup } from './http_resources';
/** @internal */
diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts
index 6c2ef712cbf56..cd0429415e7cb 100644
--- a/src/core/server/mocks.ts
+++ b/src/core/server/mocks.ts
@@ -31,6 +31,7 @@ import { coreUsageDataServiceMock } from '@kbn/core-usage-data-server-mocks';
import { i18nServiceMock } from '@kbn/core-i18n-server-mocks';
import { statusServiceMock } from '@kbn/core-status-server-mocks';
import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks';
+import { renderingServiceMock } from '@kbn/core-rendering-server-mocks';
import type {
PluginInitializerContext,
CoreSetup,
@@ -40,7 +41,6 @@ import type {
RequestHandlerContext,
} from '.';
import { httpResourcesMock } from './http_resources/http_resources_service.mock';
-import { renderingMock } from './rendering/rendering_service.mock';
import { SharedGlobalConfig } from './plugins';
export { configServiceMock, configDeprecationsMock } from '@kbn/config-mocks';
@@ -57,7 +57,7 @@ export {
export { migrationMocks } from '@kbn/core-saved-objects-migration-server-mocks';
export { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks';
export { metricsServiceMock } from '@kbn/core-metrics-server-mocks';
-export { renderingMock } from './rendering/rendering_service.mock';
+export { renderingServiceMock } from '@kbn/core-rendering-server-mocks';
export { statusServiceMock } from '@kbn/core-status-server-mocks';
export { contextServiceMock } from '@kbn/core-http-context-server-mocks';
export { capabilitiesServiceMock } from '@kbn/core-capabilities-server-mocks';
@@ -237,7 +237,7 @@ function createInternalCoreSetupMock() {
environment: environmentServiceMock.createSetupContract(),
i18n: i18nServiceMock.createSetupContract(),
httpResources: httpResourcesMock.createSetupContract(),
- rendering: renderingMock.createSetupContract(),
+ rendering: renderingServiceMock.createSetupContract(),
uiSettings: uiSettingsServiceMock.createSetupContract(),
logging: loggingServiceMock.createInternalSetupContract(),
metrics: metricsServiceMock.createInternalSetupContract(),
diff --git a/src/core/server/plugins/index.ts b/src/core/server/plugins/index.ts
index 1b655ccd8bd98..2111d467ef3c2 100644
--- a/src/core/server/plugins/index.ts
+++ b/src/core/server/plugins/index.ts
@@ -10,7 +10,6 @@ export { PluginsService } from './plugins_service';
export type {
PluginsServiceSetup,
PluginsServiceStart,
- UiPlugins,
DiscoveredPlugins,
} from './plugins_service';
export { config } from './plugins_config';
diff --git a/src/core/server/plugins/plugins_service.ts b/src/core/server/plugins/plugins_service.ts
index a95619f3bc453..3305ff0a06b43 100644
--- a/src/core/server/plugins/plugins_service.ts
+++ b/src/core/server/plugins/plugins_service.ts
@@ -17,15 +17,10 @@ import type { CoreContext, CoreService } from '@kbn/core-base-server-internal';
import type { PluginName } from '@kbn/core-base-common';
import type { InternalEnvironmentServicePreboot } from '@kbn/core-environment-server-internal';
import type { InternalNodeServicePreboot } from '@kbn/core-node-server-internal';
+import type { InternalPluginInfo, UiPlugins } from '@kbn/core-plugins-base-server-internal';
import { discover, PluginDiscoveryError, PluginDiscoveryErrorType } from './discovery';
import { PluginWrapper } from './plugin';
-import {
- DiscoveredPlugin,
- InternalPluginInfo,
- PluginConfigDescriptor,
- PluginDependencies,
- PluginType,
-} from './types';
+import { DiscoveredPlugin, PluginConfigDescriptor, PluginDependencies, PluginType } from './types';
import { PluginsConfig, PluginsConfigType } from './plugins_config';
import { PluginsSystem } from './plugins_system';
import { createBrowserConfig } from './create_browser_config';
@@ -48,25 +43,6 @@ export interface PluginsServiceSetup {
contracts: Map;
}
-/** @internal */
-export interface UiPlugins {
- /**
- * Paths to all discovered ui plugin entrypoints on the filesystem, even if
- * disabled.
- */
- internal: Map;
-
- /**
- * Information needed by client-side to load plugins and wire dependencies.
- */
- public: Map;
-
- /**
- * Configuration for plugins to be exposed to the client-side.
- */
- browserConfigs: Map>;
-}
-
/** @internal */
export interface PluginsServiceStart {
/** Start contracts returned by plugins. */
diff --git a/src/core/server/plugins/types.ts b/src/core/server/plugins/types.ts
index f8b20b66f5069..699631bc4411e 100644
--- a/src/core/server/plugins/types.ts
+++ b/src/core/server/plugins/types.ts
@@ -254,28 +254,6 @@ export interface PluginManifest {
readonly enabledOnAnonymousPages?: boolean;
}
-/**
- * @internal
- */
-export interface InternalPluginInfo {
- /**
- * Version of the plugin
- */
- readonly version: string;
- /**
- * Bundles that must be loaded for this plugin
- */
- readonly requiredBundles: readonly string[];
- /**
- * Path to the target/public directory of the plugin which should be served
- */
- readonly publicTargetDir: string;
- /**
- * Path to the plugin assets directory.
- */
- readonly publicAssetsDir: string;
-}
-
/**
* The interface that should be returned by a `PluginInitializer` for a `preboot` plugin.
*
diff --git a/src/core/server/server.test.mocks.ts b/src/core/server/server.test.mocks.ts
index dec2b17ae8c61..3e1d5c0e3a28f 100644
--- a/src/core/server/server.test.mocks.ts
+++ b/src/core/server/server.test.mocks.ts
@@ -63,10 +63,12 @@ jest.doMock('@kbn/core-config-server-internal', () => ({
ensureValidConfiguration: mockEnsureValidConfiguration,
}));
-import { RenderingService, mockRenderingService } from './rendering/__mocks__/rendering_service';
+import { renderingServiceMock } from '@kbn/core-rendering-server-mocks';
-export { mockRenderingService };
-jest.doMock('./rendering/rendering_service', () => ({ RenderingService }));
+export const mockRenderingService = renderingServiceMock.create();
+jest.doMock('@kbn/core-rendering-server-internal', () => ({
+ RenderingService: jest.fn(() => mockRenderingService),
+}));
import { environmentServiceMock } from '@kbn/core-environment-server-mocks';
diff --git a/src/core/server/server.ts b/src/core/server/server.ts
index aa747a1023b35..b7f41dd31dd04 100644
--- a/src/core/server/server.ts
+++ b/src/core/server/server.ts
@@ -58,16 +58,21 @@ import {
import { CoreUsageDataService } from '@kbn/core-usage-data-server-internal';
import { StatusService, statusConfig } from '@kbn/core-status-server-internal';
import { UiSettingsService, uiSettingsConfig } from '@kbn/core-ui-settings-server-internal';
+import {
+ CoreRouteHandlerContext,
+ PrebootCoreRouteHandlerContext,
+} from '@kbn/core-http-request-handler-context-server-internal';
+import type {
+ RequestHandlerContext,
+ PrebootRequestHandlerContext,
+} from '@kbn/core-http-request-handler-context-server';
+import { RenderingService } from '@kbn/core-rendering-server-internal';
import { CoreApp } from './core_app';
import { HttpResourcesService } from './http_resources';
-import { RenderingService } from './rendering';
import { PluginsService, config as pluginsConfig } from './plugins';
import { InternalCorePreboot, InternalCoreSetup, InternalCoreStart } from './internal_types';
-import { CoreRouteHandlerContext } from './core_route_handler_context';
-import { PrebootCoreRouteHandlerContext } from './preboot_core_route_handler_context';
import { DiscoveredPlugins } from './plugins';
-import type { RequestHandlerContext, PrebootRequestHandlerContext } from '.';
const coreId = Symbol('core');
const rootConfigPath = '';
diff --git a/src/dev/build/args.test.ts b/src/dev/build/args.test.ts
index 6a7436284b2ea..3e1b1c72f88fb 100644
--- a/src/dev/build/args.test.ts
+++ b/src/dev/build/args.test.ts
@@ -28,13 +28,13 @@ it('build default and oss dist for current platform, without packages, by defaul
Object {
"buildOptions": Object {
"buildCanvasShareableRuntime": true,
+ "buildExamplePlugins": false,
"createArchives": true,
"createDebPackage": false,
"createDockerCloud": false,
"createDockerContexts": true,
"createDockerUBI": false,
"createDockerUbuntu": false,
- "createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": false,
@@ -62,13 +62,13 @@ it('builds packages if --all-platforms is passed', () => {
Object {
"buildOptions": Object {
"buildCanvasShareableRuntime": true,
+ "buildExamplePlugins": false,
"createArchives": true,
"createDebPackage": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerUBI": true,
"createDockerUbuntu": true,
- "createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": true,
@@ -96,13 +96,13 @@ it('limits packages if --rpm passed with --all-platforms', () => {
Object {
"buildOptions": Object {
"buildCanvasShareableRuntime": true,
+ "buildExamplePlugins": false,
"createArchives": true,
"createDebPackage": false,
"createDockerCloud": false,
"createDockerContexts": true,
"createDockerUBI": false,
"createDockerUbuntu": false,
- "createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": true,
@@ -130,13 +130,13 @@ it('limits packages if --deb passed with --all-platforms', () => {
Object {
"buildOptions": Object {
"buildCanvasShareableRuntime": true,
+ "buildExamplePlugins": false,
"createArchives": true,
"createDebPackage": true,
"createDockerCloud": false,
"createDockerContexts": true,
"createDockerUBI": false,
"createDockerUbuntu": false,
- "createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": false,
@@ -165,13 +165,13 @@ it('limits packages if --docker passed with --all-platforms', () => {
Object {
"buildOptions": Object {
"buildCanvasShareableRuntime": true,
+ "buildExamplePlugins": false,
"createArchives": true,
"createDebPackage": false,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerUBI": true,
"createDockerUbuntu": true,
- "createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": false,
@@ -207,13 +207,13 @@ it('limits packages if --docker passed with --skip-docker-ubi and --all-platform
Object {
"buildOptions": Object {
"buildCanvasShareableRuntime": true,
+ "buildExamplePlugins": false,
"createArchives": true,
"createDebPackage": false,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerUBI": false,
"createDockerUbuntu": true,
- "createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": false,
@@ -242,13 +242,13 @@ it('limits packages if --all-platforms passed with --skip-docker-ubuntu', () =>
Object {
"buildOptions": Object {
"buildCanvasShareableRuntime": true,
+ "buildExamplePlugins": false,
"createArchives": true,
"createDebPackage": true,
"createDockerCloud": true,
"createDockerContexts": true,
"createDockerUBI": true,
"createDockerUbuntu": false,
- "createExamplePlugins": false,
"createGenericFolders": true,
"createPlatformFolders": true,
"createRpmPackage": true,
diff --git a/src/dev/build/args.ts b/src/dev/build/args.ts
index c3d1a19f82a3e..c3cd4f164a483 100644
--- a/src/dev/build/args.ts
+++ b/src/dev/build/args.ts
@@ -127,7 +127,7 @@ export function readCliArgs(argv: string[]) {
createGenericFolders: !Boolean(flags['skip-generic-folders']),
createPlatformFolders: !Boolean(flags['skip-platform-folders']),
createArchives: !Boolean(flags['skip-archives']),
- createExamplePlugins: Boolean(flags['example-plugins']),
+ buildExamplePlugins: Boolean(flags['example-plugins']),
createRpmPackage: isOsPackageDesired('rpm'),
createDebPackage: isOsPackageDesired('deb'),
createDockerUbuntu:
diff --git a/src/dev/build/build_distributables.ts b/src/dev/build/build_distributables.ts
index 0649c5ddc946a..40a1afa51add6 100644
--- a/src/dev/build/build_distributables.ts
+++ b/src/dev/build/build_distributables.ts
@@ -32,7 +32,7 @@ export interface BuildOptions {
createDockerContexts: boolean;
versionQualifier: string | undefined;
targetAllPlatforms: boolean;
- createExamplePlugins: boolean;
+ buildExamplePlugins: boolean;
eprRegistry: 'production' | 'snapshot';
}
@@ -58,13 +58,6 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions
await run(Tasks.ExtractNodeBuilds);
}
- /**
- * build example plugins
- */
- if (options.createExamplePlugins) {
- await run(Tasks.BuildKibanaExamplePlugins);
- }
-
/**
* run platform-generic build tasks
*/
@@ -79,6 +72,9 @@ export async function buildDistributables(log: ToolingLog, options: BuildOptions
await run(Tasks.BuildCanvasShareableRuntime);
}
await run(Tasks.BuildKibanaPlatformPlugins);
+ if (options.buildExamplePlugins) {
+ await run(Tasks.BuildKibanaExamplePlugins);
+ }
await run(Tasks.CreatePackageJson);
await run(Tasks.InstallDependencies);
await run(Tasks.GeneratePackagesOptimizedAssets);
diff --git a/src/dev/build/tasks/build_kibana_example_plugins.ts b/src/dev/build/tasks/build_kibana_example_plugins.ts
index 0208ba2ed61b6..6fc53e10390c2 100644
--- a/src/dev/build/tasks/build_kibana_example_plugins.ts
+++ b/src/dev/build/tasks/build_kibana_example_plugins.ts
@@ -9,14 +9,16 @@
import Path from 'path';
import Fs from 'fs';
import { REPO_ROOT } from '@kbn/utils';
-import { exec, mkdirp, copyAll, Task } from '../lib';
+import { exec, Task } from '../lib';
export const BuildKibanaExamplePlugins: Task = {
description: 'Building distributable versions of Kibana example plugins',
- async run(config, log) {
+ async run(config, log, build) {
+ const pluginsDir = build.resolvePath('plugins');
const args = [
Path.resolve(REPO_ROOT, 'scripts/plugin_helpers'),
'build',
+ '--skip-archive',
`--kibana-version=${config.getBuildVersion()}`,
];
@@ -42,15 +44,12 @@ export const BuildKibanaExamplePlugins: Task = {
cwd: examplePlugin,
level: 'info',
});
+ log.info('Copying build to distribution');
+ const pluginBuild = Path.resolve(examplePlugin, 'build', 'kibana');
+ Fs.cpSync(pluginBuild, pluginsDir, { recursive: true });
} catch (e) {
log.info(`Skipping ${examplePlugin}, no kibana.json`);
}
}
-
- const pluginsDir = config.resolveFromTarget('example_plugins');
- await mkdirp(pluginsDir);
- await copyAll(REPO_ROOT, pluginsDir, {
- select: ['examples/*/build/*.zip', 'x-pack/examples/*/build/*.zip'],
- });
},
};
diff --git a/src/dev/build/tasks/bundle_fleet_packages.ts b/src/dev/build/tasks/bundle_fleet_packages.ts
index 4ba5e79d29928..30cfc1d22b0e6 100644
--- a/src/dev/build/tasks/bundle_fleet_packages.ts
+++ b/src/dev/build/tasks/bundle_fleet_packages.ts
@@ -15,6 +15,10 @@ import { Task, read, downloadToDisk, unzipBuffer, createZipFile } from '../lib';
const BUNDLED_PACKAGES_DIR = 'x-pack/plugins/fleet/target/bundled_packages';
+// APM needs to directly request its versions from Package Storage v2 - this should
+// be removed when Package Storage v2 is in production
+const PACKAGE_STORAGE_V2_URL = 'https://epr-v2.ea-web.elastic.dev';
+
interface FleetPackage {
name: string;
version: string;
@@ -64,7 +68,12 @@ export const BundleFleetPackages: Task = {
}
const archivePath = `${fleetPackage.name}-${versionToWrite}.zip`;
- const archiveUrl = `${eprUrl}/epr/${fleetPackage.name}/${fleetPackage.name}-${fleetPackage.version}.zip`;
+ let archiveUrl = `${eprUrl}/epr/${fleetPackage.name}/${fleetPackage.name}-${fleetPackage.version}.zip`;
+
+ // Point APM to package storage v2
+ if (fleetPackage.name === 'apm') {
+ archiveUrl = `${PACKAGE_STORAGE_V2_URL}/epr/${fleetPackage.name}/${fleetPackage.name}-${fleetPackage.version}.zip`;
+ }
const destination = build.resolvePath(BUNDLED_PACKAGES_DIR, archivePath);
diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts
index 1705c9ac2ec9c..6f82ec078f7ab 100644
--- a/src/dev/storybook/aliases.ts
+++ b/src/dev/storybook/aliases.ts
@@ -11,7 +11,7 @@ export const storybookAliases = {
apm: 'x-pack/plugins/apm/.storybook',
canvas: 'x-pack/plugins/canvas/storybook',
ci_composite: '.ci/.storybook',
- cloud: 'x-pack/plugins/cloud/.storybook',
+ cloud_chat: 'x-pack/plugins/cloud_integrations/cloud_chat/.storybook',
coloring: 'packages/kbn-coloring/.storybook',
chart_icons: 'packages/kbn-chart-icons/.storybook',
content_management: 'packages/content-management/.storybook',
@@ -43,6 +43,7 @@ export const storybookAliases = {
security_solution: 'x-pack/plugins/security_solution/.storybook',
shared_ux: 'packages/shared-ux/storybook/config',
threat_intelligence: 'x-pack/plugins/threat_intelligence/.storybook',
+ triggers_actions_ui: 'x-pack/plugins/triggers_actions_ui/.storybook',
ui_actions_enhanced: 'src/plugins/ui_actions_enhanced/.storybook',
unified_search: 'src/plugins/unified_search/.storybook',
};
diff --git a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/__snapshots__/pie_vis_function.test.ts.snap b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/__snapshots__/pie_vis_function.test.ts.snap
index 0f64f4c0a4779..3fd9966e7524e 100644
--- a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/__snapshots__/pie_vis_function.test.ts.snap
+++ b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/__snapshots__/pie_vis_function.test.ts.snap
@@ -26,6 +26,7 @@ Object {
"as": "partitionVis",
"type": "render",
"value": Object {
+ "canNavigateToLens": false,
"params": Object {
"listenOnChange": true,
},
@@ -160,6 +161,7 @@ Object {
"as": "partitionVis",
"type": "render",
"value": Object {
+ "canNavigateToLens": false,
"params": Object {
"listenOnChange": true,
},
diff --git a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/pie_vis_function.ts b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/pie_vis_function.ts
index 5b69fbc6194fd..119d45f579ebf 100644
--- a/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/pie_vis_function.ts
+++ b/src/plugins/chart_expressions/expression_partition_vis/common/expression_functions/pie_vis_function.ts
@@ -188,6 +188,7 @@ export const pieVisFunction = (): PieVisExpressionFunctionDefinition => ({
visConfig,
syncColors: handlers?.isSyncColorsEnabled?.() ?? false,
visType: args.isDonut ? ChartTypes.DONUT : ChartTypes.PIE,
+ canNavigateToLens: Boolean(handlers?.variables?.canNavigateToLens),
params: {
listenOnChange: true,
},
diff --git a/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts b/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts
index 2f436de90e138..6a8fd2935ba54 100644
--- a/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts
+++ b/src/plugins/chart_expressions/expression_partition_vis/common/types/expression_renderers.ts
@@ -108,6 +108,7 @@ export interface RenderValue {
visType: ChartTypes;
visConfig: PartitionVisParams;
syncColors: boolean;
+ canNavigateToLens?: boolean;
}
export enum LabelPositions {
diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx
index 546b70d98c6eb..4b6fe45e4df92 100644
--- a/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx
+++ b/src/plugins/chart_expressions/expression_partition_vis/public/expression_renderers/partition_vis_renderer.tsx
@@ -49,7 +49,11 @@ export const getPartitionVisRenderer: (
displayName: strings.getDisplayName(),
help: strings.getHelpDescription(),
reuseDomNode: true,
- render: async (domNode, { visConfig, visData, visType, syncColors }, handlers) => {
+ render: async (
+ domNode,
+ { visConfig, visData, visType, syncColors, canNavigateToLens },
+ handlers
+ ) => {
const { core, plugins } = getStartDeps();
handlers.onDestroy(() => {
@@ -62,9 +66,12 @@ export const getPartitionVisRenderer: (
const visualizationType = extractVisualizationType(executionContext);
if (containerType && visualizationType) {
- plugins.usageCollection?.reportUiCounter(containerType, METRIC_TYPE.COUNT, [
+ const events = [
`render_${visualizationType}_${visType}`,
- ]);
+ canNavigateToLens ? `render_${visualizationType}_${visType}_convertable` : undefined,
+ ].filter((event): event is string => Boolean(event));
+
+ plugins.usageCollection?.reportUiCounter(containerType, METRIC_TYPE.COUNT, events);
}
handlers.done();
};
diff --git a/src/plugins/controls/public/services/plugin_services.stub.ts b/src/plugins/controls/public/services/plugin_services.stub.ts
index 485891ff6ef94..08be260ce052c 100644
--- a/src/plugins/controls/public/services/plugin_services.stub.ts
+++ b/src/plugins/controls/public/services/plugin_services.stub.ts
@@ -27,16 +27,15 @@ import { themeServiceFactory } from './theme/theme.story';
import { registry as stubRegistry } from './plugin_services.story';
export const providers: PluginServiceProviders = {
- http: new PluginServiceProvider(httpServiceFactory),
+ controls: new PluginServiceProvider(controlsServiceFactory),
data: new PluginServiceProvider(dataServiceFactory),
- overlays: new PluginServiceProvider(overlaysServiceFactory),
dataViews: new PluginServiceProvider(dataViewsServiceFactory),
+ http: new PluginServiceProvider(httpServiceFactory),
+ optionsList: new PluginServiceProvider(optionsListServiceFactory),
+ overlays: new PluginServiceProvider(overlaysServiceFactory),
settings: new PluginServiceProvider(settingsServiceFactory),
- unifiedSearch: new PluginServiceProvider(unifiedSearchServiceFactory),
theme: new PluginServiceProvider(themeServiceFactory),
-
- controls: new PluginServiceProvider(controlsServiceFactory),
- optionsList: new PluginServiceProvider(optionsListServiceFactory),
+ unifiedSearch: new PluginServiceProvider(unifiedSearchServiceFactory),
};
export const pluginServices = new PluginServices();
diff --git a/src/plugins/controls/public/services/plugin_services.ts b/src/plugins/controls/public/services/plugin_services.ts
index 4debd0e8c9eba..f1811063e39a5 100644
--- a/src/plugins/controls/public/services/plugin_services.ts
+++ b/src/plugins/controls/public/services/plugin_services.ts
@@ -30,16 +30,15 @@ export const providers: PluginServiceProviders<
ControlsServices,
KibanaPluginServiceParams
> = {
- http: new PluginServiceProvider(httpServiceFactory),
+ controls: new PluginServiceProvider(controlsServiceFactory),
data: new PluginServiceProvider(dataServiceFactory),
- unifiedSearch: new PluginServiceProvider(unifiedSearchServiceFactory),
- overlays: new PluginServiceProvider(overlaysServiceFactory),
dataViews: new PluginServiceProvider(dataViewsServiceFactory),
+ http: new PluginServiceProvider(httpServiceFactory),
+ optionsList: new PluginServiceProvider(optionsListServiceFactory, ['data', 'http']),
+ overlays: new PluginServiceProvider(overlaysServiceFactory),
settings: new PluginServiceProvider(settingsServiceFactory),
theme: new PluginServiceProvider(themeServiceFactory),
-
- optionsList: new PluginServiceProvider(optionsListServiceFactory, ['data', 'http']),
- controls: new PluginServiceProvider(controlsServiceFactory),
+ unifiedSearch: new PluginServiceProvider(unifiedSearchServiceFactory),
};
export const pluginServices = new PluginServices();
diff --git a/src/plugins/custom_integrations/common/index.ts b/src/plugins/custom_integrations/common/index.ts
index a3ab30a526ca6..e52a5deac59e5 100755
--- a/src/plugins/custom_integrations/common/index.ts
+++ b/src/plugins/custom_integrations/common/index.ts
@@ -23,6 +23,7 @@ export const INTEGRATION_CATEGORY_DISPLAY = {
datastore: 'Datastore',
elastic_stack: 'Elastic Stack',
google_cloud: 'Google Cloud',
+ infrastructure: 'Infrastructure',
kubernetes: 'Kubernetes',
languages: 'Languages',
message_queue: 'Message queue',
diff --git a/src/plugins/custom_integrations/common/language_integrations.ts b/src/plugins/custom_integrations/common/language_integrations.ts
index c9821281f2854..9ba914c02fd0d 100644
--- a/src/plugins/custom_integrations/common/language_integrations.ts
+++ b/src/plugins/custom_integrations/common/language_integrations.ts
@@ -145,4 +145,18 @@ export const languageIntegrations: LanguageIntegration[] = [
integrationsAppUrl: `/app/integrations/language_clients/java/overview`,
exportLanguageUiComponent: false,
},
+ // Uncomment to show the sample language client card + README UI
+ // {
+ // id: 'sample',
+ // title: i18n.translate('customIntegrations.languageclients.SampleTitle', {
+ // defaultMessage: 'Sample Language Client',
+ // }),
+ // icon: 'es.svg',
+ // description: i18n.translate('customIntegrations.languageclients.SampleDescription', {
+ // defaultMessage: 'Sample language client',
+ // }),
+ // docUrlTemplate: '',
+ // integrationsAppUrl: `/app/integrations/language_clients/sample/overview`,
+ // exportLanguageUiComponent: true,
+ // },
];
diff --git a/src/plugins/custom_integrations/public/components/fleet_integration/overview_component.tsx b/src/plugins/custom_integrations/public/components/fleet_integration/overview_component.tsx
deleted file mode 100644
index c5b8584e1e4a9..0000000000000
--- a/src/plugins/custom_integrations/public/components/fleet_integration/overview_component.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import React from 'react';
-import { EuiTitle } from '@elastic/eui';
-
-/*
-Example of Overview component to be shown inside Integrations app
-*/
-export interface ReadmeProps {
- packageName: string;
-}
-export const OverviewComponent: React.FC = ({ packageName }) => {
- return (
-
- {packageName} client - Overview
-
- );
-};
diff --git a/src/plugins/custom_integrations/public/components/fleet_integration/sample/sample_client_readme.tsx b/src/plugins/custom_integrations/public/components/fleet_integration/sample/sample_client_readme.tsx
new file mode 100644
index 0000000000000..c2ca0d62da689
--- /dev/null
+++ b/src/plugins/custom_integrations/public/components/fleet_integration/sample/sample_client_readme.tsx
@@ -0,0 +1,200 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React, { useState } from 'react';
+
+// eslint-disable-next-line @kbn/eslint/module_migration
+import styled from 'styled-components';
+import cuid from 'cuid';
+
+import {
+ EuiButton,
+ EuiCode,
+ EuiCodeBlock,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiPage,
+ EuiPageBody,
+ EuiPageHeader,
+ EuiPageSection,
+ EuiSpacer,
+ EuiText,
+ EuiTitle,
+ EuiPanel,
+ EuiImage,
+} from '@elastic/eui';
+import { FormattedMessage } from '@kbn/i18n-react';
+import { euiThemeVars } from '@kbn/ui-theme';
+import icon from '../../../assets/language_clients/es.svg';
+
+const CenterColumn = styled(EuiFlexItem)`
+ max-width: 740px;
+`;
+
+const FixedHeader = styled.div`
+ width: 100%;
+ height: 196px;
+ border-bottom: 1px solid ${euiThemeVars.euiColorLightShade};
+`;
+
+const IconPanel = styled(EuiPanel)`
+ padding: ${(props) => props.theme.eui.euiSizeXL};
+ width: ${(props) =>
+ parseFloat(props.theme.eui.euiSize) * 6 + parseFloat(props.theme.eui.euiSizeXL) * 2}px;
+ svg,
+ img {
+ height: ${(props) => parseFloat(props.theme.eui.euiSize) * 6}px;
+ width: ${(props) => parseFloat(props.theme.eui.euiSize) * 6}px;
+ }
+ .euiFlexItem {
+ height: ${(props) => parseFloat(props.theme.eui.euiSize) * 6}px;
+ justify-content: center;
+ }
+`;
+
+const TopFlexGroup = styled(EuiFlexGroup)`
+ max-width: 1150px;
+ margin-left: auto;
+ margin-right: auto;
+ padding: calc(${euiThemeVars.euiSizeXL} * 2) ${euiThemeVars.euiSizeM} 0 ${euiThemeVars.euiSizeM};
+`;
+
+export const SampleClientReadme = () => {
+ const [apiKey, setApiKey] = useState(null);
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+ {`# Grab the sample language client from NPM and install it in your project \n`}
+ {`$ npm install @elastic/elasticsearch-sample`}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ setApiKey(cuid())} disabled={!!apiKey}>
+ Generate API key
+
+
+
+ {apiKey && (
+
+
+ {apiKey}
+
+
+ )}
+
+
+
+
+
+
+
+
+
+
+
+ elastic.config.json,
+ }}
+ />
+
+
+
+
+
+ {`
+{
+ "apiKey": "${apiKey || 'YOUR_API_KEY'}
+}
+
+ `}
+
+
+
+
+
+
+ >
+ );
+};
diff --git a/src/plugins/custom_integrations/public/mocks.tsx b/src/plugins/custom_integrations/public/mocks.tsx
index 038fdb1780458..2503008ea90ec 100644
--- a/src/plugins/custom_integrations/public/mocks.tsx
+++ b/src/plugins/custom_integrations/public/mocks.tsx
@@ -24,7 +24,7 @@ function createCustomIntegrationsStart(): jest.Mocked {
const services = servicesFactory({ startPlugins: {}, coreStart: coreMock.createStart() });
return {
- languageClientsUiComponents: new Map(),
+ languageClientsUiComponents: {},
ContextProvider: jest.fn(({ children }) => (
{children}
diff --git a/src/plugins/custom_integrations/public/plugin.tsx b/src/plugins/custom_integrations/public/plugin.tsx
index 90a796955a595..827d31ce3749d 100755
--- a/src/plugins/custom_integrations/public/plugin.tsx
+++ b/src/plugins/custom_integrations/public/plugin.tsx
@@ -19,12 +19,10 @@ import {
ROUTES_APPEND_CUSTOM_INTEGRATIONS,
ROUTES_REPLACEMENT_CUSTOM_INTEGRATIONS,
} from '../common';
-import { languageIntegrations } from '../common/language_integrations';
-
-import { OverviewComponent } from './components/fleet_integration/overview_component';
import { CustomIntegrationsServicesProvider } from './services';
import { servicesFactory } from './services/kibana';
+import { SampleClientReadme } from './components/fleet_integration/sample/sample_client_readme';
export class CustomIntegrationsPlugin
implements Plugin
@@ -48,16 +46,7 @@ export class CustomIntegrationsPlugin
): CustomIntegrationsStart {
const services = servicesFactory({ coreStart, startPlugins });
- const languageClientsUiComponents = new Map();
-
- // Set the language clients components to render in Fleet plugin under Integrations app
- // Export component only if the integration has exportLanguageUiComponent = true
- languageIntegrations
- .filter((int) => int.exportLanguageUiComponent)
- .map((int) => {
- const ReadmeComponent = () => ;
- languageClientsUiComponents.set(`language_client.${int.id}`, ReadmeComponent);
- });
+ const languageClientsUiComponents = { sample: SampleClientReadme };
const ContextProvider: React.FC = ({ children }) => (
diff --git a/src/plugins/custom_integrations/public/types.ts b/src/plugins/custom_integrations/public/types.ts
index db8acc3e2e07e..60b8aefe23dd1 100755
--- a/src/plugins/custom_integrations/public/types.ts
+++ b/src/plugins/custom_integrations/public/types.ts
@@ -15,7 +15,7 @@ export interface CustomIntegrationsSetup {
export interface CustomIntegrationsStart {
ContextProvider: React.FC;
- languageClientsUiComponents: Map;
+ languageClientsUiComponents: Record;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
diff --git a/src/plugins/dashboard/common/embeddable/embeddable_references.test.ts b/src/plugins/dashboard/common/embeddable/embeddable_references.test.ts
deleted file mode 100644
index 3a6475b60251c..0000000000000
--- a/src/plugins/dashboard/common/embeddable/embeddable_references.test.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import {
- ExtractDeps,
- extractPanelsReferences,
- InjectDeps,
- injectPanelsReferences,
-} from './embeddable_references';
-import { createEmbeddablePersistableStateServiceMock } from '@kbn/embeddable-plugin/common/mocks';
-import { SavedDashboardPanel } from '../types';
-import { EmbeddableStateWithType } from '@kbn/embeddable-plugin/common';
-
-const embeddablePersistableStateService = createEmbeddablePersistableStateServiceMock();
-const deps: InjectDeps & ExtractDeps = {
- embeddablePersistableStateService,
-};
-
-test('inject/extract panel references', () => {
- embeddablePersistableStateService.extract.mockImplementationOnce((state) => {
- const { HARDCODED_ID, ...restOfState } = state as unknown as Record;
- return {
- state: restOfState as EmbeddableStateWithType,
- references: [{ id: HARDCODED_ID as string, name: 'refName', type: 'type' }],
- };
- });
-
- embeddablePersistableStateService.inject.mockImplementationOnce((state, references) => {
- const ref = references.find((r) => r.name === 'refName');
- return {
- ...state,
- HARDCODED_ID: ref!.id,
- };
- });
-
- const savedDashboardPanel: SavedDashboardPanel = {
- type: 'search',
- embeddableConfig: {
- HARDCODED_ID: 'IMPORTANT_HARDCODED_ID',
- },
- id: 'savedObjectId',
- panelIndex: '123',
- gridData: {
- x: 0,
- y: 0,
- h: 15,
- w: 15,
- i: '123',
- },
- version: '7.0.0',
- };
-
- const [{ panel: extractedPanel, references }] = extractPanelsReferences(
- [savedDashboardPanel],
- deps
- );
- expect(extractedPanel.embeddableConfig).toEqual({});
- expect(references).toMatchInlineSnapshot(`
- Array [
- Object {
- "id": "IMPORTANT_HARDCODED_ID",
- "name": "refName",
- "type": "type",
- },
- ]
- `);
-
- const [injectedPanel] = injectPanelsReferences([extractedPanel], references, deps);
-
- expect(injectedPanel).toEqual(savedDashboardPanel);
-});
diff --git a/src/plugins/dashboard/common/embeddable/embeddable_references.ts b/src/plugins/dashboard/common/embeddable/embeddable_references.ts
deleted file mode 100644
index 6664f70d3392a..0000000000000
--- a/src/plugins/dashboard/common/embeddable/embeddable_references.ts
+++ /dev/null
@@ -1,69 +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 { omit } from 'lodash';
-import { SavedObjectReference } from '@kbn/core/types';
-import { EmbeddablePersistableStateService } from '@kbn/embeddable-plugin/common/types';
-import {
- convertSavedDashboardPanelToPanelState,
- convertPanelStateToSavedDashboardPanel,
-} from './embeddable_saved_object_converters';
-import { SavedDashboardPanel } from '../types';
-
-export interface InjectDeps {
- embeddablePersistableStateService: EmbeddablePersistableStateService;
-}
-
-export function injectPanelsReferences(
- panels: SavedDashboardPanel[],
- references: SavedObjectReference[],
- deps: InjectDeps
-): SavedDashboardPanel[] {
- const result: SavedDashboardPanel[] = [];
- for (const panel of panels) {
- const embeddableState = convertSavedDashboardPanelToPanelState(panel);
- embeddableState.explicitInput = omit(
- deps.embeddablePersistableStateService.inject(
- { ...embeddableState.explicitInput, type: panel.type },
- references
- ),
- 'type'
- );
- result.push(convertPanelStateToSavedDashboardPanel(embeddableState, panel.version));
- }
- return result;
-}
-
-export interface ExtractDeps {
- embeddablePersistableStateService: EmbeddablePersistableStateService;
-}
-
-export function extractPanelsReferences(
- panels: SavedDashboardPanel[],
- deps: ExtractDeps
-): Array<{ panel: SavedDashboardPanel; references: SavedObjectReference[] }> {
- const result: Array<{ panel: SavedDashboardPanel; references: SavedObjectReference[] }> = [];
-
- for (const panel of panels) {
- const embeddable = convertSavedDashboardPanelToPanelState(panel);
- const { state: embeddableInputWithExtractedReferences, references } =
- deps.embeddablePersistableStateService.extract({
- ...embeddable.explicitInput,
- type: embeddable.type,
- });
- embeddable.explicitInput = omit(embeddableInputWithExtractedReferences, 'type');
-
- const newPanel = convertPanelStateToSavedDashboardPanel(embeddable, panel.version);
- result.push({
- panel: newPanel,
- references,
- });
- }
-
- return result;
-}
diff --git a/src/plugins/dashboard/common/index.ts b/src/plugins/dashboard/common/index.ts
index 73e01693977d9..81833f8a8f18e 100644
--- a/src/plugins/dashboard/common/index.ts
+++ b/src/plugins/dashboard/common/index.ts
@@ -6,24 +6,28 @@
* Side Public License, v 1.
*/
-export type { GridData } from './embeddable/types';
-export type {
- RawSavedDashboardPanel730ToLatest,
- DashboardDoc730ToLatest,
- DashboardDoc700To720,
- DashboardDocPre700,
-} from './bwc/types';
export type {
+ GridData,
+ DashboardPanelMap,
+ SavedDashboardPanel,
+ DashboardAttributes,
+ DashboardPanelState,
DashboardContainerStateWithType,
- SavedDashboardPanelTo60,
- SavedDashboardPanel610,
- SavedDashboardPanel620,
- SavedDashboardPanel630,
- SavedDashboardPanel640To720,
- SavedDashboardPanel730ToLatest,
} from './types';
-export { migratePanelsTo730 } from './migrate_to_730_panels';
+export {
+ injectReferences,
+ extractReferences,
+} from './persistable_state/dashboard_saved_object_references';
+
+export { createInject, createExtract } from './persistable_state/dashboard_container_references';
+
+export {
+ convertPanelStateToSavedDashboardPanel,
+ convertSavedDashboardPanelToPanelState,
+ convertSavedPanelsToPanelMap,
+ convertPanelMapToSavedPanels,
+} from './lib/dashboard_panel_converters';
export const UI_SETTINGS = {
ENABLE_LABS_UI: 'labs:dashboard:enable_ui',
diff --git a/src/plugins/dashboard/common/embeddable/embeddable_saved_object_converters.test.ts b/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts
similarity index 98%
rename from src/plugins/dashboard/common/embeddable/embeddable_saved_object_converters.test.ts
rename to src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts
index 9ec93fa85fc54..2ebca116f3f12 100644
--- a/src/plugins/dashboard/common/embeddable/embeddable_saved_object_converters.test.ts
+++ b/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts
@@ -9,7 +9,7 @@
import {
convertSavedDashboardPanelToPanelState,
convertPanelStateToSavedDashboardPanel,
-} from './embeddable_saved_object_converters';
+} from './dashboard_panel_converters';
import { SavedDashboardPanel, DashboardPanelState } from '../types';
import { EmbeddableInput } from '@kbn/embeddable-plugin/common/types';
diff --git a/src/plugins/dashboard/common/embeddable/embeddable_saved_object_converters.ts b/src/plugins/dashboard/common/lib/dashboard_panel_converters.ts
similarity index 75%
rename from src/plugins/dashboard/common/embeddable/embeddable_saved_object_converters.ts
rename to src/plugins/dashboard/common/lib/dashboard_panel_converters.ts
index aa9519a5a48b9..2652c7f9a40a7 100644
--- a/src/plugins/dashboard/common/embeddable/embeddable_saved_object_converters.ts
+++ b/src/plugins/dashboard/common/lib/dashboard_panel_converters.ts
@@ -8,7 +8,7 @@
import { omit } from 'lodash';
import { EmbeddableInput, SavedObjectEmbeddableInput } from '@kbn/embeddable-plugin/common';
-import { DashboardPanelState, SavedDashboardPanel } from '../types';
+import { DashboardPanelMap, DashboardPanelState, SavedDashboardPanel } from '../types';
export function convertSavedDashboardPanelToPanelState<
TEmbeddableInput extends EmbeddableInput | SavedObjectEmbeddableInput = SavedObjectEmbeddableInput
@@ -42,3 +42,17 @@ export function convertPanelStateToSavedDashboardPanel(
...(panelState.panelRefName !== undefined && { panelRefName: panelState.panelRefName }),
};
}
+
+export const convertSavedPanelsToPanelMap = (panels?: SavedDashboardPanel[]): DashboardPanelMap => {
+ const panelsMap: DashboardPanelMap = {};
+ panels?.forEach((panel, idx) => {
+ panelsMap![panel.panelIndex ?? String(idx)] = convertSavedDashboardPanelToPanelState(panel);
+ });
+ return panelsMap;
+};
+
+export const convertPanelMapToSavedPanels = (panels: DashboardPanelMap, version: string) => {
+ return Object.values(panels).map((panel) =>
+ convertPanelStateToSavedDashboardPanel(panel, version)
+ );
+};
diff --git a/src/plugins/dashboard/common/embeddable/dashboard_container_persistable_state.test.ts b/src/plugins/dashboard/common/persistable_state/dashboard_container_references.test.ts
similarity index 99%
rename from src/plugins/dashboard/common/embeddable/dashboard_container_persistable_state.test.ts
rename to src/plugins/dashboard/common/persistable_state/dashboard_container_references.test.ts
index ee13926486f8b..47215e5e32008 100644
--- a/src/plugins/dashboard/common/embeddable/dashboard_container_persistable_state.test.ts
+++ b/src/plugins/dashboard/common/persistable_state/dashboard_container_references.test.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import { createExtract, createInject } from './dashboard_container_persistable_state';
+import { createExtract, createInject } from './dashboard_container_references';
import { createEmbeddablePersistableStateServiceMock } from '@kbn/embeddable-plugin/common/mocks';
import { DashboardContainerStateWithType } from '../types';
diff --git a/src/plugins/dashboard/common/embeddable/dashboard_container_persistable_state.ts b/src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts
similarity index 100%
rename from src/plugins/dashboard/common/embeddable/dashboard_container_persistable_state.ts
rename to src/plugins/dashboard/common/persistable_state/dashboard_container_references.ts
diff --git a/src/plugins/dashboard/common/saved_dashboard_references.test.ts b/src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.test.ts
similarity index 98%
rename from src/plugins/dashboard/common/saved_dashboard_references.test.ts
rename to src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.test.ts
index 84bfe6ea48d3a..e28a429d6d004 100644
--- a/src/plugins/dashboard/common/saved_dashboard_references.test.ts
+++ b/src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.test.ts
@@ -11,9 +11,9 @@ import {
injectReferences,
InjectDeps,
ExtractDeps,
-} from './saved_dashboard_references';
+} from './dashboard_saved_object_references';
-import { createExtract, createInject } from './embeddable/dashboard_container_persistable_state';
+import { createExtract, createInject } from './dashboard_container_references';
import { createEmbeddablePersistableStateServiceMock } from '@kbn/embeddable-plugin/common/mocks';
const embeddablePersistableStateServiceMock = createEmbeddablePersistableStateServiceMock();
diff --git a/src/plugins/dashboard/common/saved_dashboard_references.ts b/src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts
similarity index 96%
rename from src/plugins/dashboard/common/saved_dashboard_references.ts
rename to src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts
index e3a3193dd85a1..a3126a381d944 100644
--- a/src/plugins/dashboard/common/saved_dashboard_references.ts
+++ b/src/plugins/dashboard/common/persistable_state/dashboard_saved_object_references.ts
@@ -6,23 +6,33 @@
* Side Public License, v 1.
*/
import semverGt from 'semver/functions/gt';
-import { SavedObjectAttributes, SavedObjectReference } from '@kbn/core/types';
-import { EmbeddablePersistableStateService } from '@kbn/embeddable-plugin/common/types';
+
import {
- PersistableControlGroupInput,
RawControlGroupAttributes,
+ PersistableControlGroupInput,
} from '@kbn/controls-plugin/common';
-import { DashboardContainerStateWithType, DashboardPanelState } from './types';
+import { SavedObjectAttributes, SavedObjectReference } from '@kbn/core/types';
+import { EmbeddablePersistableStateService } from '@kbn/embeddable-plugin/common/types';
+
+import {
+ SavedDashboardPanel,
+ DashboardPanelState,
+ DashboardContainerStateWithType,
+} from '../types';
import {
convertPanelStateToSavedDashboardPanel,
convertSavedDashboardPanelToPanelState,
-} from './embeddable/embeddable_saved_object_converters';
-import { SavedDashboardPanel } from './types';
+} from '../lib/dashboard_panel_converters';
export interface ExtractDeps {
embeddablePersistableStateService: EmbeddablePersistableStateService;
}
-export interface SavedObjectAttributesAndReferences {
+
+export interface InjectDeps {
+ embeddablePersistableStateService: EmbeddablePersistableStateService;
+}
+
+interface SavedObjectAttributesAndReferences {
attributes: SavedObjectAttributes;
references: SavedObjectReference[];
}
@@ -79,7 +89,7 @@ function panelStatesToPanels(
let originalPanel = originalPanels.find((p) => p.panelIndex === id);
if (!originalPanel) {
- // Maybe original panel doesn't have a panel index and it's just straight up based on it's index
+ // Maybe original panel doesn't have a panel index and it's just straight up based on its index
const numericId = parseInt(id, 10);
originalPanel = isNaN(numericId) ? originalPanel : originalPanels[numericId];
}
@@ -91,6 +101,45 @@ function panelStatesToPanels(
});
}
+export function injectReferences(
+ { attributes, references = [] }: SavedObjectAttributesAndReferences,
+ deps: InjectDeps
+): SavedObjectAttributes {
+ // Skip if panelsJSON is missing otherwise this will cause saved object import to fail when
+ // importing objects without panelsJSON. At development time of this, there is no guarantee each saved
+ // object has panelsJSON in all previous versions of kibana.
+ if (typeof attributes.panelsJSON !== 'string') {
+ return attributes;
+ }
+ const parsedPanels = JSON.parse(attributes.panelsJSON);
+ // Same here, prevent failing saved object import if ever panels aren't an array.
+ if (!Array.isArray(parsedPanels)) {
+ return attributes;
+ }
+
+ const { panels, state } = dashboardAttributesToState(attributes);
+
+ const injectedState = deps.embeddablePersistableStateService.inject(
+ state,
+ references
+ ) as DashboardContainerStateWithType;
+ const injectedPanels = panelStatesToPanels(injectedState.panels, panels);
+
+ const newAttributes = {
+ ...attributes,
+ panelsJSON: JSON.stringify(injectedPanels),
+ } as SavedObjectAttributes;
+
+ if (injectedState.controlGroupInput) {
+ newAttributes.controlGroupInput = {
+ ...(attributes.controlGroupInput as SavedObjectAttributes),
+ panelsJSON: JSON.stringify(injectedState.controlGroupInput.panels),
+ };
+ }
+
+ return newAttributes;
+}
+
export function extractReferences(
{ attributes, references = [] }: SavedObjectAttributesAndReferences,
deps: ExtractDeps
@@ -137,49 +186,6 @@ export function extractReferences(
};
}
-export interface InjectDeps {
- embeddablePersistableStateService: EmbeddablePersistableStateService;
-}
-
-export function injectReferences(
- { attributes, references = [] }: SavedObjectAttributesAndReferences,
- deps: InjectDeps
-): SavedObjectAttributes {
- // Skip if panelsJSON is missing otherwise this will cause saved object import to fail when
- // importing objects without panelsJSON. At development time of this, there is no guarantee each saved
- // object has panelsJSON in all previous versions of kibana.
- if (typeof attributes.panelsJSON !== 'string') {
- return attributes;
- }
- const parsedPanels = JSON.parse(attributes.panelsJSON);
- // Same here, prevent failing saved object import if ever panels aren't an array.
- if (!Array.isArray(parsedPanels)) {
- return attributes;
- }
-
- const { panels, state } = dashboardAttributesToState(attributes);
-
- const injectedState = deps.embeddablePersistableStateService.inject(
- state,
- references
- ) as DashboardContainerStateWithType;
- const injectedPanels = panelStatesToPanels(injectedState.panels, panels);
-
- const newAttributes = {
- ...attributes,
- panelsJSON: JSON.stringify(injectedPanels),
- } as SavedObjectAttributes;
-
- if (injectedState.controlGroupInput) {
- newAttributes.controlGroupInput = {
- ...(attributes.controlGroupInput as SavedObjectAttributes),
- panelsJSON: JSON.stringify(injectedState.controlGroupInput.panels),
- };
- }
-
- return newAttributes;
-}
-
function pre730ExtractReferences(
{ attributes, references = [] }: SavedObjectAttributesAndReferences,
deps: ExtractDeps
diff --git a/src/plugins/dashboard/common/types.ts b/src/plugins/dashboard/common/types.ts
index 941f9437e54e6..ff5a1cbc17552 100644
--- a/src/plugins/dashboard/common/types.ts
+++ b/src/plugins/dashboard/common/types.ts
@@ -11,28 +11,13 @@ import {
EmbeddableStateWithType,
PanelState,
} from '@kbn/embeddable-plugin/common/types';
-import { SavedObjectEmbeddableInput } from '@kbn/embeddable-plugin/common/lib/saved_object_embeddable';
-import { PersistableControlGroupInput } from '@kbn/controls-plugin/common';
+import { Serializable } from '@kbn/utility-types';
import {
- RawSavedDashboardPanelTo60,
- RawSavedDashboardPanel610,
- RawSavedDashboardPanel620,
- RawSavedDashboardPanel630,
- RawSavedDashboardPanel640To720,
- RawSavedDashboardPanel730ToLatest,
-} from './bwc/types';
-
-import { GridData } from './embeddable/types';
-
-export type PanelId = string;
-export type SavedObjectId = string;
-
-export interface DashboardPanelState<
- TEmbeddableInput extends EmbeddableInput | SavedObjectEmbeddableInput = SavedObjectEmbeddableInput
-> extends PanelState {
- readonly gridData: GridData;
- panelRefName?: string;
-}
+ PersistableControlGroupInput,
+ RawControlGroupAttributes,
+} from '@kbn/controls-plugin/common';
+import { RefreshInterval } from '@kbn/data-plugin/common';
+import { SavedObjectEmbeddableInput } from '@kbn/embeddable-plugin/common/lib/saved_object_embeddable';
export interface DashboardCapabilities {
showWriteControls: boolean;
@@ -43,62 +28,77 @@ export interface DashboardCapabilities {
}
/**
- * This should always represent the latest dashboard panel shape, after all possible migrations.
+ * The attributes of the dashboard saved object. This interface should be the
+ * source of truth for the latest dashboard attributes shape after all migrations.
*/
-export type SavedDashboardPanel = SavedDashboardPanel730ToLatest;
-
-export type SavedDashboardPanel640To720 = Pick<
- RawSavedDashboardPanel640To720,
- Exclude
-> & {
- readonly id: string;
- readonly type: string;
-};
+export interface DashboardAttributes {
+ controlGroupInput?: RawControlGroupAttributes;
+ refreshInterval?: RefreshInterval;
+ timeRestore: boolean;
+ optionsJSON?: string;
+ useMargins?: boolean;
+ description: string;
+ panelsJSON: string;
+ timeFrom?: string;
+ version: number;
+ timeTo?: string;
+ title: string;
+ kibanaSavedObjectMeta: {
+ searchSourceJSON: string;
+ };
+}
-export type SavedDashboardPanel630 = Pick<
- RawSavedDashboardPanel630,
- Exclude
-> & {
- readonly id: string;
- readonly type: string;
-};
+/** --------------------------------------------------------------------
+ * Dashboard panel types
+ -----------------------------------------------------------------------*/
-export type SavedDashboardPanel620 = Pick<
- RawSavedDashboardPanel620,
- Exclude
-> & {
- readonly id: string;
- readonly type: string;
-};
+/**
+ * The dashboard panel format expected by the embeddable container.
+ */
+export interface DashboardPanelState<
+ TEmbeddableInput extends EmbeddableInput | SavedObjectEmbeddableInput = SavedObjectEmbeddableInput
+> extends PanelState {
+ readonly gridData: GridData;
+ panelRefName?: string;
+}
-export type SavedDashboardPanel610 = Pick<
- RawSavedDashboardPanel610,
- Exclude
-> & {
- readonly id: string;
- readonly type: string;
-};
+/**
+ * A saved dashboard panel parsed directly from the Dashboard Attributes panels JSON
+ */
+export interface SavedDashboardPanel {
+ embeddableConfig: { [key: string]: Serializable }; // parsed into the panel's explicitInput
+ id?: string; // the saved object id for by reference panels
+ type: string; // the embeddable type
+ panelRefName?: string;
+ gridData: GridData;
+ panelIndex: string;
+ version: string;
+ title?: string;
+}
-export type SavedDashboardPanelTo60 = Pick<
- RawSavedDashboardPanelTo60,
- Exclude
-> & {
- readonly id: string;
- readonly type: string;
-};
+/**
+ * Grid type for React Grid Layout
+ */
+export interface GridData {
+ w: number;
+ h: number;
+ x: number;
+ y: number;
+ i: string;
+}
-// id becomes optional starting in 7.3.0
-export type SavedDashboardPanel730ToLatest = Pick<
- RawSavedDashboardPanel730ToLatest,
- Exclude
-> & {
- readonly id?: string;
- readonly type: string;
-};
+export interface DashboardPanelMap {
+ [key: string]: DashboardPanelState;
+}
-// Making this interface because so much of the Container type from embeddable is tied up in public
-// Once that is all available from common, we should be able to move the dashboard_container type to our common as well
+/** --------------------------------------------------------------------
+ * Dashboard container types
+ -----------------------------------------------------------------------*/
+/**
+ * Types below this line are copied here because so many important types are tied up in public. These types should be
+ * moved from public into common.
+ */
export interface DashboardContainerStateWithType extends EmbeddableStateWithType {
panels: {
[panelId: string]: DashboardPanelState;
diff --git a/src/plugins/dashboard/public/application/actions/add_to_library_action.test.tsx b/src/plugins/dashboard/public/application/actions/add_to_library_action.test.tsx
index ac467e35729f8..aa3419e37890c 100644
--- a/src/plugins/dashboard/public/application/actions/add_to_library_action.test.tsx
+++ b/src/plugins/dashboard/public/application/actions/add_to_library_action.test.tsx
@@ -6,7 +6,6 @@
* Side Public License, v 1.
*/
-import { AddToLibraryAction } from '.';
import { DashboardContainer } from '../embeddable/dashboard_container';
import { getSampleDashboardInput } from '../test_helpers';
import { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks';
@@ -27,6 +26,7 @@ import {
CONTACT_CARD_EMBEDDABLE,
} from '@kbn/embeddable-plugin/public/lib/test_samples/embeddables';
import { pluginServices } from '../../services/plugin_services';
+import { AddToLibraryAction } from './add_to_library_action';
const embeddableFactory = new ContactCardEmbeddableFactory((() => null) as any, {} as any);
pluginServices.getServices().embeddable.getEmbeddableFactory = jest
diff --git a/src/plugins/dashboard/public/application/actions/add_to_library_action.tsx b/src/plugins/dashboard/public/application/actions/add_to_library_action.tsx
index 8c6577012161d..0510d35519ff2 100644
--- a/src/plugins/dashboard/public/application/actions/add_to_library_action.tsx
+++ b/src/plugins/dashboard/public/application/actions/add_to_library_action.tsx
@@ -18,8 +18,9 @@ import {
import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public';
import { dashboardAddToLibraryAction } from '../../dashboard_strings';
-import { type DashboardPanelState, DASHBOARD_CONTAINER_TYPE, type DashboardContainer } from '..';
+import { type DashboardPanelState, type DashboardContainer } from '..';
import { pluginServices } from '../../services/plugin_services';
+import { DASHBOARD_CONTAINER_TYPE } from '../../dashboard_constants';
export const ACTION_ADD_TO_LIBRARY = 'saveToLibrary';
diff --git a/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx b/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx
index 5bb331e58fe38..0fb63049ebe32 100644
--- a/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx
+++ b/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx
@@ -12,7 +12,7 @@ import { getSampleDashboardInput, getSampleDashboardPanel } from '../test_helper
import { coreMock } from '@kbn/core/public/mocks';
import { CoreStart } from '@kbn/core/public';
-import { ClonePanelAction } from '.';
+import { ClonePanelAction } from './clone_panel_action';
import { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks';
import {
ContactCardEmbeddable,
diff --git a/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx b/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx
index 02862e7c75e86..11a96733337f0 100644
--- a/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx
+++ b/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx
@@ -27,9 +27,10 @@ import {
placePanelBeside,
IPanelPlacementBesideArgs,
} from '../embeddable/panel/dashboard_panel_placement';
-import { dashboardClonePanelAction } from '../../dashboard_strings';
-import { type DashboardPanelState, DASHBOARD_CONTAINER_TYPE, type DashboardContainer } from '..';
import { pluginServices } from '../../services/plugin_services';
+import { dashboardClonePanelAction } from '../../dashboard_strings';
+import { DASHBOARD_CONTAINER_TYPE } from '../../dashboard_constants';
+import { type DashboardPanelState, type DashboardContainer } from '..';
export const ACTION_CLONE_PANEL = 'clonePanel';
diff --git a/src/plugins/dashboard/public/application/actions/copy_to_dashboard_action.tsx b/src/plugins/dashboard/public/application/actions/copy_to_dashboard_action.tsx
index 8f602db5e4529..cdd8d726e9fa6 100644
--- a/src/plugins/dashboard/public/application/actions/copy_to_dashboard_action.tsx
+++ b/src/plugins/dashboard/public/application/actions/copy_to_dashboard_action.tsx
@@ -14,9 +14,10 @@ import type { IEmbeddable } from '@kbn/embeddable-plugin/public';
import type { PresentationUtilPluginStart } from '@kbn/presentation-util-plugin/public';
import { dashboardCopyToDashboardAction } from '../../dashboard_strings';
-import { DASHBOARD_CONTAINER_TYPE, DashboardContainer } from '../embeddable';
+import { DashboardContainer } from '../embeddable';
import { CopyToDashboardModal } from './copy_to_dashboard_modal';
import { pluginServices } from '../../services/plugin_services';
+import { DASHBOARD_CONTAINER_TYPE } from '../../dashboard_constants';
export const ACTION_COPY_TO_DASHBOARD = 'copyToDashboard';
diff --git a/src/plugins/dashboard/public/application/actions/copy_to_dashboard_modal.tsx b/src/plugins/dashboard/public/application/actions/copy_to_dashboard_modal.tsx
index 7f9a99ed27231..af91631d20b39 100644
--- a/src/plugins/dashboard/public/application/actions/copy_to_dashboard_modal.tsx
+++ b/src/plugins/dashboard/public/application/actions/copy_to_dashboard_modal.tsx
@@ -25,8 +25,8 @@ import {
import { IEmbeddable, PanelNotFoundError } from '@kbn/embeddable-plugin/public';
import { LazyDashboardPicker, withSuspense } from '@kbn/presentation-util-plugin/public';
import { dashboardCopyToDashboardAction } from '../../dashboard_strings';
-import { createDashboardEditUrl, DashboardConstants, DashboardContainer } from '../..';
-import { DashboardPanelState } from '..';
+import { createDashboardEditUrl, DashboardConstants } from '../..';
+import { type DashboardContainer, DashboardPanelState } from '..';
import { pluginServices } from '../../services/plugin_services';
interface CopyToDashboardModalProps {
diff --git a/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx b/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx
index c5da566b90a6a..79ab109ddce51 100644
--- a/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx
+++ b/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx
@@ -9,9 +9,9 @@
import type { IEmbeddable } from '@kbn/embeddable-plugin/public';
import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public';
-import type { DashboardContainerInput } from '../..';
+import { DashboardContainerInput, DASHBOARD_CONTAINER_TYPE } from '../..';
import { dashboardExpandPanelAction } from '../../dashboard_strings';
-import { DASHBOARD_CONTAINER_TYPE, type DashboardContainer } from '../embeddable';
+import { type DashboardContainer } from '../embeddable';
export const ACTION_EXPAND_PANEL = 'togglePanel';
diff --git a/src/plugins/dashboard/public/application/actions/filters_notification_badge.test.tsx b/src/plugins/dashboard/public/application/actions/filters_notification_badge.test.tsx
index 275a5625e5e0b..3b3fb5dde0497 100644
--- a/src/plugins/dashboard/public/application/actions/filters_notification_badge.test.tsx
+++ b/src/plugins/dashboard/public/application/actions/filters_notification_badge.test.tsx
@@ -6,27 +6,26 @@
* Side Public License, v 1.
*/
-import { getSampleDashboardInput } from '../test_helpers';
-import { DashboardContainer } from '../embeddable/dashboard_container';
-
-import { FiltersNotificationBadge } from '.';
-import { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks';
-import { type Query, type AggregateQuery, Filter } from '@kbn/es-query';
import {
- ErrorEmbeddable,
- FilterableEmbeddable,
IContainer,
+ ErrorEmbeddable,
isErrorEmbeddable,
+ FilterableEmbeddable,
} from '@kbn/embeddable-plugin/public';
-
import {
ContactCardEmbeddable,
- ContactCardEmbeddableFactory,
+ CONTACT_CARD_EMBEDDABLE,
ContactCardEmbeddableInput,
ContactCardEmbeddableOutput,
- CONTACT_CARD_EMBEDDABLE,
+ ContactCardEmbeddableFactory,
} from '@kbn/embeddable-plugin/public/lib/test_samples/embeddables';
+import { type Query, type AggregateQuery, Filter } from '@kbn/es-query';
+import { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks';
+
+import { getSampleDashboardInput } from '../test_helpers';
import { pluginServices } from '../../services/plugin_services';
+import { DashboardContainer } from '../embeddable/dashboard_container';
+import { FiltersNotificationBadge } from './filters_notification_badge';
const mockEmbeddableFactory = new ContactCardEmbeddableFactory((() => null) as any, {} as any);
pluginServices.getServices().embeddable.getEmbeddableFactory = jest
diff --git a/src/plugins/dashboard/public/application/actions/index.ts b/src/plugins/dashboard/public/application/actions/index.ts
index 5c95e3c42cccd..a238ce05e1017 100644
--- a/src/plugins/dashboard/public/application/actions/index.ts
+++ b/src/plugins/dashboard/public/application/actions/index.ts
@@ -6,23 +6,76 @@
* Side Public License, v 1.
*/
-export type { ExpandPanelActionContext } from './expand_panel_action';
-export { ExpandPanelAction, ACTION_EXPAND_PANEL } from './expand_panel_action';
-export type { ReplacePanelActionContext } from './replace_panel_action';
-export { ReplacePanelAction, ACTION_REPLACE_PANEL } from './replace_panel_action';
-export type { ClonePanelActionContext } from './clone_panel_action';
-export { ClonePanelAction, ACTION_CLONE_PANEL } from './clone_panel_action';
-export type { AddToLibraryActionContext } from './add_to_library_action';
-export { AddToLibraryAction, ACTION_ADD_TO_LIBRARY } from './add_to_library_action';
-export type { UnlinkFromLibraryActionContext } from './unlink_from_library_action';
-export { UnlinkFromLibraryAction, ACTION_UNLINK_FROM_LIBRARY } from './unlink_from_library_action';
-export type { CopyToDashboardActionContext } from './copy_to_dashboard_action';
-export { CopyToDashboardAction, ACTION_COPY_TO_DASHBOARD } from './copy_to_dashboard_action';
-export type { LibraryNotificationActionContext } from './library_notification_action';
-export {
- LibraryNotificationAction,
- ACTION_LIBRARY_NOTIFICATION,
-} from './library_notification_action';
-export { FiltersNotificationBadge, BADGE_FILTERS_NOTIFICATION } from './filters_notification_badge';
-export type { ExportContext } from './export_csv_action';
-export { ExportCSVAction, ACTION_EXPORT_CSV } from './export_csv_action';
+import {
+ CONTEXT_MENU_TRIGGER,
+ PANEL_BADGE_TRIGGER,
+ PANEL_NOTIFICATION_TRIGGER,
+} from '@kbn/embeddable-plugin/public';
+import { CoreStart } from '@kbn/core/public';
+import { getSavedObjectFinder } from '@kbn/saved-objects-plugin/public';
+
+import { ExportCSVAction } from './export_csv_action';
+import { ClonePanelAction } from './clone_panel_action';
+import { DashboardStartDependencies } from '../../plugin';
+import { ExpandPanelAction } from './expand_panel_action';
+import { ReplacePanelAction } from './replace_panel_action';
+import { AddToLibraryAction } from './add_to_library_action';
+import { CopyToDashboardAction } from './copy_to_dashboard_action';
+import { UnlinkFromLibraryAction } from './unlink_from_library_action';
+import { FiltersNotificationBadge } from './filters_notification_badge';
+import { LibraryNotificationAction } from './library_notification_action';
+
+interface BuildAllDashboardActionsProps {
+ core: CoreStart;
+ allowByValueEmbeddables?: boolean;
+ plugins: DashboardStartDependencies;
+}
+
+export const buildAllDashboardActions = async ({
+ core,
+ plugins,
+ allowByValueEmbeddables,
+}: BuildAllDashboardActionsProps) => {
+ const { uiSettings } = core;
+ const { uiActions, share, presentationUtil } = plugins;
+
+ const clonePanelAction = new ClonePanelAction(core.savedObjects);
+ uiActions.registerAction(clonePanelAction);
+ uiActions.attachAction(CONTEXT_MENU_TRIGGER, clonePanelAction.id);
+
+ const SavedObjectFinder = getSavedObjectFinder(core.savedObjects, uiSettings);
+ const changeViewAction = new ReplacePanelAction(SavedObjectFinder);
+ uiActions.registerAction(changeViewAction);
+ uiActions.attachAction(CONTEXT_MENU_TRIGGER, changeViewAction.id);
+
+ const panelLevelFiltersNotification = new FiltersNotificationBadge();
+ uiActions.registerAction(panelLevelFiltersNotification);
+ uiActions.attachAction(PANEL_BADGE_TRIGGER, panelLevelFiltersNotification.id);
+
+ const expandPanelAction = new ExpandPanelAction();
+ uiActions.registerAction(expandPanelAction);
+ uiActions.attachAction(CONTEXT_MENU_TRIGGER, expandPanelAction.id);
+
+ if (share) {
+ const ExportCSVPlugin = new ExportCSVAction();
+ uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, ExportCSVPlugin);
+ }
+
+ if (allowByValueEmbeddables) {
+ const addToLibraryAction = new AddToLibraryAction();
+ uiActions.registerAction(addToLibraryAction);
+ uiActions.attachAction(CONTEXT_MENU_TRIGGER, addToLibraryAction.id);
+
+ const unlinkFromLibraryAction = new UnlinkFromLibraryAction();
+ uiActions.registerAction(unlinkFromLibraryAction);
+ uiActions.attachAction(CONTEXT_MENU_TRIGGER, unlinkFromLibraryAction.id);
+
+ const libraryNotificationAction = new LibraryNotificationAction(unlinkFromLibraryAction);
+ uiActions.registerAction(libraryNotificationAction);
+ uiActions.attachAction(PANEL_NOTIFICATION_TRIGGER, libraryNotificationAction.id);
+
+ const copyToDashboardAction = new CopyToDashboardAction(presentationUtil.ContextProvider);
+ uiActions.registerAction(copyToDashboardAction);
+ uiActions.attachAction(CONTEXT_MENU_TRIGGER, copyToDashboardAction.id);
+ }
+};
diff --git a/src/plugins/dashboard/public/application/actions/library_notification_action.test.tsx b/src/plugins/dashboard/public/application/actions/library_notification_action.test.tsx
index f1202de4ac1b6..f30cba538b8d1 100644
--- a/src/plugins/dashboard/public/application/actions/library_notification_action.test.tsx
+++ b/src/plugins/dashboard/public/application/actions/library_notification_action.test.tsx
@@ -6,11 +6,6 @@
* Side Public License, v 1.
*/
-import { getSampleDashboardInput } from '../test_helpers';
-import { DashboardContainer } from '../embeddable/dashboard_container';
-
-import { LibraryNotificationAction, UnlinkFromLibraryAction } from '.';
-import { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks';
import {
ErrorEmbeddable,
IContainer,
@@ -25,7 +20,13 @@ import {
ContactCardEmbeddableOutput,
CONTACT_CARD_EMBEDDABLE,
} from '@kbn/embeddable-plugin/public/lib/test_samples/embeddables';
+import { embeddablePluginMock } from '@kbn/embeddable-plugin/public/mocks';
+
+import { getSampleDashboardInput } from '../test_helpers';
import { pluginServices } from '../../services/plugin_services';
+import { DashboardContainer } from '../embeddable/dashboard_container';
+import { UnlinkFromLibraryAction } from './unlink_from_library_action';
+import { LibraryNotificationAction } from './library_notification_action';
const mockEmbeddableFactory = new ContactCardEmbeddableFactory((() => null) as any, {} as any);
pluginServices.getServices().embeddable.getEmbeddableFactory = jest
diff --git a/src/plugins/dashboard/public/application/actions/library_notification_action.tsx b/src/plugins/dashboard/public/application/actions/library_notification_action.tsx
index a5abe8161e9ad..a05b78994b31d 100644
--- a/src/plugins/dashboard/public/application/actions/library_notification_action.tsx
+++ b/src/plugins/dashboard/public/application/actions/library_notification_action.tsx
@@ -17,10 +17,10 @@ import {
import { KibanaThemeProvider, reactToUiComponent } from '@kbn/kibana-react-plugin/public';
import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public';
-import { UnlinkFromLibraryAction } from '.';
-import { LibraryNotificationPopover } from './library_notification_popover';
-import { dashboardLibraryNotification } from '../../dashboard_strings';
import { pluginServices } from '../../services/plugin_services';
+import { UnlinkFromLibraryAction } from './unlink_from_library_action';
+import { dashboardLibraryNotification } from '../../dashboard_strings';
+import { LibraryNotificationPopover } from './library_notification_popover';
export const ACTION_LIBRARY_NOTIFICATION = 'ACTION_LIBRARY_NOTIFICATION';
diff --git a/src/plugins/dashboard/public/application/actions/library_notification_popover.tsx b/src/plugins/dashboard/public/application/actions/library_notification_popover.tsx
index 81d2f2a0557ec..38c8452eadde5 100644
--- a/src/plugins/dashboard/public/application/actions/library_notification_popover.tsx
+++ b/src/plugins/dashboard/public/application/actions/library_notification_popover.tsx
@@ -17,8 +17,10 @@ import {
EuiPopoverTitle,
EuiText,
} from '@elastic/eui';
-import { LibraryNotificationActionContext, UnlinkFromLibraryAction } from '.';
+
import { dashboardLibraryNotification } from '../../dashboard_strings';
+import { UnlinkFromLibraryAction } from './unlink_from_library_action';
+import { LibraryNotificationActionContext } from './library_notification_action';
export interface LibraryNotificationProps {
context: LibraryNotificationActionContext;
diff --git a/src/plugins/dashboard/public/application/actions/replace_panel_action.tsx b/src/plugins/dashboard/public/application/actions/replace_panel_action.tsx
index f39988842e3fc..52f6a345a181e 100644
--- a/src/plugins/dashboard/public/application/actions/replace_panel_action.tsx
+++ b/src/plugins/dashboard/public/application/actions/replace_panel_action.tsx
@@ -8,9 +8,10 @@
import { type IEmbeddable, ViewMode } from '@kbn/embeddable-plugin/public';
import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public';
-import { DASHBOARD_CONTAINER_TYPE, type DashboardContainer } from '../embeddable';
+import type { DashboardContainer } from '../embeddable';
import { openReplacePanelFlyout } from './open_replace_panel_flyout';
import { dashboardReplacePanelAction } from '../../dashboard_strings';
+import { DASHBOARD_CONTAINER_TYPE } from '../../dashboard_constants';
export const ACTION_REPLACE_PANEL = 'replacePanel';
diff --git a/src/plugins/dashboard/public/application/actions/unlink_from_library_action.test.tsx b/src/plugins/dashboard/public/application/actions/unlink_from_library_action.test.tsx
index 854383edd4e14..080c358a86fdf 100644
--- a/src/plugins/dashboard/public/application/actions/unlink_from_library_action.test.tsx
+++ b/src/plugins/dashboard/public/application/actions/unlink_from_library_action.test.tsx
@@ -23,10 +23,10 @@ import {
CONTACT_CARD_EMBEDDABLE,
} from '@kbn/embeddable-plugin/public/lib/test_samples/embeddables';
-import { UnlinkFromLibraryAction } from '.';
import { getSampleDashboardInput } from '../test_helpers';
-import { DashboardContainer } from '../embeddable/dashboard_container';
import { pluginServices } from '../../services/plugin_services';
+import { UnlinkFromLibraryAction } from './unlink_from_library_action';
+import { DashboardContainer } from '../embeddable/dashboard_container';
let container: DashboardContainer;
let embeddable: ContactCardEmbeddable & ReferenceOrValueEmbeddable;
diff --git a/src/plugins/dashboard/public/application/actions/unlink_from_library_action.tsx b/src/plugins/dashboard/public/application/actions/unlink_from_library_action.tsx
index e399411e77fee..b7c53a78becc2 100644
--- a/src/plugins/dashboard/public/application/actions/unlink_from_library_action.tsx
+++ b/src/plugins/dashboard/public/application/actions/unlink_from_library_action.tsx
@@ -17,8 +17,9 @@ import {
} from '@kbn/embeddable-plugin/public';
import { Action, IncompatibleActionError } from '@kbn/ui-actions-plugin/public';
import { dashboardUnlinkFromLibraryAction } from '../../dashboard_strings';
-import { type DashboardPanelState, DASHBOARD_CONTAINER_TYPE, type DashboardContainer } from '..';
+import { type DashboardPanelState, type DashboardContainer } from '..';
import { pluginServices } from '../../services/plugin_services';
+import { DASHBOARD_CONTAINER_TYPE } from '../../dashboard_constants';
export const ACTION_UNLINK_FROM_LIBRARY = 'unlinkFromLibrary';
diff --git a/src/plugins/dashboard/public/application/dashboard_app.tsx b/src/plugins/dashboard/public/application/dashboard_app.tsx
index 302cb43794229..b05944c99292b 100644
--- a/src/plugins/dashboard/public/application/dashboard_app.tsx
+++ b/src/plugins/dashboard/public/application/dashboard_app.tsx
@@ -9,24 +9,23 @@
import { History } from 'history';
import React, { useEffect, useMemo, useRef, useState } from 'react';
-import { EmbeddableRenderer, ViewMode } from '@kbn/embeddable-plugin/public';
import { useExecutionContext } from '@kbn/kibana-react-plugin/public';
+import { EmbeddableRenderer, ViewMode } from '@kbn/embeddable-plugin/public';
import { createKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public';
-import { useDashboardSelector } from './state';
-import { useDashboardAppState } from './hooks';
import {
dashboardFeatureCatalog,
getDashboardBreadcrumb,
getDashboardTitle,
leaveConfirmStrings,
} from '../dashboard_strings';
-import { createDashboardEditUrl } from '../dashboard_constants';
-import { DashboardTopNav, isCompleteDashboardAppState } from './top_nav/dashboard_top_nav';
-import { DashboardEmbedSettings, DashboardRedirect } from '../types';
-import { DashboardAppNoDataPage } from './dashboard_app_no_data';
+import { useDashboardAppState } from './hooks';
+import { useDashboardSelector } from './state';
import { pluginServices } from '../services/plugin_services';
+import { DashboardAppNoDataPage } from './dashboard_app_no_data';
+import { DashboardEmbedSettings, DashboardRedirect } from '../types';
import { useDashboardMountContext } from './hooks/dashboard_mount_context';
+import { DashboardTopNav, isCompleteDashboardAppState } from './top_nav/dashboard_top_nav';
export interface DashboardAppProps {
history: History;
savedDashboardId?: string;
@@ -43,13 +42,12 @@ export function DashboardApp({
const { onAppLeave } = useDashboardMountContext();
const {
chrome: { setBreadcrumbs, setIsVisible },
+ screenshotMode: { isScreenshotMode },
coreContext: { executionContext },
- data: { search },
embeddable: { getStateTransfer },
notifications: { toasts },
- screenshotMode: { isScreenshotMode },
settings: { uiSettings },
- spaces: { getLegacyUrlConflict },
+ data: { search },
} = pluginServices.getServices();
const [showNoDataPage, setShowNoDataPage] = useState(false);
@@ -160,17 +158,7 @@ export function DashboardApp({
dashboardAppState={dashboardAppState}
/>
- {dashboardAppState.savedDashboard.outcome === 'conflict' &&
- dashboardAppState.savedDashboard.id &&
- dashboardAppState.savedDashboard.aliasId
- ? getLegacyUrlConflict?.({
- currentObjectId: dashboardAppState.savedDashboard.id,
- otherObjectId: dashboardAppState.savedDashboard.aliasId,
- otherObjectPath: `#${createDashboardEditUrl(
- dashboardAppState.savedDashboard.aliasId
- )}${history.location.search}`,
- })
- : null}
+ {dashboardAppState.createConflictWarning?.()}
createKbnUrlStateStorage({
history,
@@ -172,51 +162,48 @@ export async function mountApp({ core, element, appUnMounted, mountContext }: Da
});
const app = (
- // TODO: Remove KibanaContextProvider as part of https://github.com/elastic/kibana/pull/138774
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx
index 4f7483cf06f35..036c77fc6257c 100644
--- a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx
+++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx
@@ -32,7 +32,7 @@ import type { Query } from '@kbn/es-query';
import type { RefreshInterval } from '@kbn/data-plugin/public';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
-import { DASHBOARD_CONTAINER_TYPE } from './dashboard_constants';
+import { DASHBOARD_CONTAINER_TYPE } from '../../dashboard_constants';
import { createPanelState } from './panel';
import { DashboardPanelState } from './types';
import { DashboardViewport } from './viewport/dashboard_viewport';
diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx
index 27670ee104367..58a2c63492c09 100644
--- a/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx
+++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx
@@ -7,16 +7,14 @@
*/
import { i18n } from '@kbn/i18n';
-import { EmbeddablePersistableStateService } from '@kbn/embeddable-plugin/common';
-
import { identity, pickBy } from 'lodash';
+
import {
ControlGroupContainer,
ControlGroupInput,
ControlGroupOutput,
CONTROL_GROUP_TYPE,
} from '@kbn/controls-plugin/public';
-import { getDefaultControlGroupInput } from '@kbn/controls-plugin/common';
import {
Container,
ErrorEmbeddable,
@@ -25,14 +23,13 @@ import {
EmbeddableFactoryDefinition,
} from '@kbn/embeddable-plugin/public';
+import { getDefaultControlGroupInput } from '@kbn/controls-plugin/common';
+import { EmbeddablePersistableStateService } from '@kbn/embeddable-plugin/common';
+
import { DashboardContainerInput } from '../..';
-import { DASHBOARD_CONTAINER_TYPE } from './dashboard_constants';
+import { createExtract, createInject } from '../../../common';
import type { DashboardContainer } from './dashboard_container';
-import {
- createExtract,
- createInject,
-} from '../../../common/embeddable/dashboard_container_persistable_state';
-import { pluginServices } from '../../services/plugin_services';
+import { DASHBOARD_CONTAINER_TYPE } from '../../dashboard_constants';
export type DashboardContainerFactory = EmbeddableFactory<
DashboardContainerInput,
@@ -80,6 +77,7 @@ export class DashboardContainerFactoryDefinition
initialInput: DashboardContainerInput,
parent?: Container
): Promise
=> {
+ const { pluginServices } = await import('../../services/plugin_services');
const {
embeddable: { getEmbeddableFactory },
} = pluginServices.getServices();
diff --git a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx
index 64afdcdb2e609..7fda6eb1a3f35 100644
--- a/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx
+++ b/src/plugins/dashboard/public/application/embeddable/grid/dashboard_grid.tsx
@@ -22,9 +22,9 @@ import { DashboardContainer, DashboardLoadedInfo } from '../dashboard_container'
import { GridData } from '../../../../common';
import { DashboardGridItem } from './dashboard_grid_item';
import { DashboardLoadedEventStatus, DashboardPanelState } from '../types';
-import { DASHBOARD_GRID_COLUMN_COUNT, DASHBOARD_GRID_HEIGHT } from '../dashboard_constants';
+import { DASHBOARD_GRID_COLUMN_COUNT, DASHBOARD_GRID_HEIGHT } from '../../../dashboard_constants';
import { pluginServices } from '../../../services/plugin_services';
-import { dashboardLoadingErrorStrings } from '../../../dashboard_strings';
+import { dashboardSavedObjectErrorStrings } from '../../../dashboard_strings';
let lastValidGridSize = 0;
@@ -153,7 +153,7 @@ class DashboardGridUi extends React.Component {
} catch (error) {
console.error(error); // eslint-disable-line no-console
isLayoutInvalid = true;
- toasts.addDanger(dashboardLoadingErrorStrings.getDashboardGridError(error.message));
+ toasts.addDanger(dashboardSavedObjectErrorStrings.getDashboardGridError(error.message));
}
this.setState({
layout,
diff --git a/src/plugins/dashboard/public/application/embeddable/index.ts b/src/plugins/dashboard/public/application/embeddable/index.ts
index ce8bb5b7169ac..1979ae5ad7bf6 100644
--- a/src/plugins/dashboard/public/application/embeddable/index.ts
+++ b/src/plugins/dashboard/public/application/embeddable/index.ts
@@ -13,11 +13,4 @@ export { createPanelState } from './panel';
export * from './types';
-export {
- DASHBOARD_GRID_COLUMN_COUNT,
- DEFAULT_PANEL_HEIGHT,
- DEFAULT_PANEL_WIDTH,
- DASHBOARD_CONTAINER_TYPE,
-} from './dashboard_constants';
-
export { createDashboardContainerByValueRenderer } from './dashboard_container_by_value_renderer';
diff --git a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts
index 10c3044ea912a..4c926675e1e94 100644
--- a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts
+++ b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts
@@ -8,7 +8,7 @@
import { EmbeddableInput } from '@kbn/embeddable-plugin/public';
import { CONTACT_CARD_EMBEDDABLE } from '@kbn/embeddable-plugin/public/lib/test_samples';
-import { DEFAULT_PANEL_HEIGHT, DEFAULT_PANEL_WIDTH } from '../dashboard_constants';
+import { DEFAULT_PANEL_HEIGHT, DEFAULT_PANEL_WIDTH } from '../../../dashboard_constants';
import { DashboardPanelState } from '../types';
import { createPanelState } from './create_panel_state';
diff --git a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts
index 5aa9066ea1eba..e5d4f69c914ce 100644
--- a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts
+++ b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts
@@ -7,7 +7,7 @@
*/
import { PanelState, EmbeddableInput } from '@kbn/embeddable-plugin/public';
-import { DEFAULT_PANEL_HEIGHT, DEFAULT_PANEL_WIDTH } from '../dashboard_constants';
+import { DEFAULT_PANEL_HEIGHT, DEFAULT_PANEL_WIDTH } from '../../../dashboard_constants';
import { DashboardPanelState } from '../types';
import {
IPanelPlacementArgs,
diff --git a/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts b/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts
index 9d90b711a6843..77b51874319ba 100644
--- a/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts
+++ b/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts
@@ -8,8 +8,8 @@
import _ from 'lodash';
import { PanelNotFoundError } from '@kbn/embeddable-plugin/public';
-import { GridData } from '../../../../common';
-import { DashboardPanelState, DASHBOARD_GRID_COLUMN_COUNT } from '..';
+import { DashboardPanelState, GridData } from '../../../../common';
+import { DASHBOARD_GRID_COLUMN_COUNT } from '../../../dashboard_constants';
export type PanelPlacementMethod = (
args: PlacementArgs
diff --git a/src/plugins/dashboard/public/application/embeddable/placeholder/index.ts b/src/plugins/dashboard/public/application/embeddable/placeholder/index.ts
index af4327f0fcd98..1d1aba84e7c3a 100644
--- a/src/plugins/dashboard/public/application/embeddable/placeholder/index.ts
+++ b/src/plugins/dashboard/public/application/embeddable/placeholder/index.ts
@@ -6,5 +6,6 @@
* Side Public License, v 1.
*/
-export * from './placeholder_embeddable';
-export * from './placeholder_embeddable_factory';
+export { PlaceholderEmbeddableFactory } from './placeholder_embeddable_factory';
+
+export const PLACEHOLDER_EMBEDDABLE = 'placeholder';
diff --git a/src/plugins/dashboard/public/application/embeddable/placeholder/placeholder_embeddable.tsx b/src/plugins/dashboard/public/application/embeddable/placeholder/placeholder_embeddable.tsx
index a7fa1e793ebf0..de468d86c89fe 100644
--- a/src/plugins/dashboard/public/application/embeddable/placeholder/placeholder_embeddable.tsx
+++ b/src/plugins/dashboard/public/application/embeddable/placeholder/placeholder_embeddable.tsx
@@ -13,9 +13,9 @@ import classNames from 'classnames';
import { EuiLoadingChart } from '@elastic/eui';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import { Embeddable, type EmbeddableInput, type IContainer } from '@kbn/embeddable-plugin/public';
-import { pluginServices } from '../../../services/plugin_services';
-export const PLACEHOLDER_EMBEDDABLE = 'placeholder';
+import { PLACEHOLDER_EMBEDDABLE } from '.';
+import { pluginServices } from '../../../services/plugin_services';
export class PlaceholderEmbeddable extends Embeddable {
public readonly type = PLACEHOLDER_EMBEDDABLE;
diff --git a/src/plugins/dashboard/public/application/embeddable/placeholder/placeholder_embeddable_factory.ts b/src/plugins/dashboard/public/application/embeddable/placeholder/placeholder_embeddable_factory.ts
index 74ce8bf96edbd..26cdddbf17d85 100644
--- a/src/plugins/dashboard/public/application/embeddable/placeholder/placeholder_embeddable_factory.ts
+++ b/src/plugins/dashboard/public/application/embeddable/placeholder/placeholder_embeddable_factory.ts
@@ -13,7 +13,7 @@ import {
EmbeddableInput,
IContainer,
} from '@kbn/embeddable-plugin/public';
-import { PlaceholderEmbeddable, PLACEHOLDER_EMBEDDABLE } from './placeholder_embeddable';
+import { PLACEHOLDER_EMBEDDABLE } from '.';
export class PlaceholderEmbeddableFactory implements EmbeddableFactoryDefinition {
public readonly type = PLACEHOLDER_EMBEDDABLE;
@@ -29,6 +29,7 @@ export class PlaceholderEmbeddableFactory implements EmbeddableFactoryDefinition
}
public async create(initialInput: EmbeddableInput, parent?: IContainer) {
+ const { PlaceholderEmbeddable } = await import('./placeholder_embeddable');
return new PlaceholderEmbeddable(initialInput, parent);
}
diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx
index c462df50ef27f..76a3ae7a053a4 100644
--- a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx
+++ b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx
@@ -9,27 +9,20 @@
import React from 'react';
import { Provider } from 'react-redux';
import { createBrowserHistory } from 'history';
+
+import type { Filter } from '@kbn/es-query';
+import { DataView } from '@kbn/data-views-plugin/public';
+import { EmbeddableFactory, ViewMode } from '@kbn/embeddable-plugin/public';
import { renderHook, act, RenderHookResult } from '@testing-library/react-hooks';
import { createKbnUrlStateStorage, defer } from '@kbn/kibana-utils-plugin/public';
-import { DataView } from '@kbn/data-views-plugin/public';
+import { DashboardAppState } from '../../types';
+import { getSampleDashboardInput } from '../test_helpers';
import { DashboardConstants } from '../../dashboard_constants';
-import { SavedObjectLoader } from '../../services/saved_object_loader';
-import { DashboardAppServices, DashboardAppState } from '../../types';
+import { pluginServices } from '../../services/plugin_services';
import { DashboardContainer } from '../embeddable/dashboard_container';
-import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
import { dashboardStateStore, setDescription, setViewMode } from '../state';
import { useDashboardAppState, UseDashboardStateProps } from './use_dashboard_app_state';
-import {
- getSampleDashboardInput,
- getSavedDashboardMock,
- makeDefaultServices,
-} from '../test_helpers';
-
-import type { Filter } from '@kbn/es-query';
-import { pluginServices } from '../../services/plugin_services';
-import { EmbeddableFactory, ViewMode } from '@kbn/embeddable-plugin/public';
-import { DashboardServices } from '../../services/types';
interface SetupEmbeddableFactoryReturn {
finalizeEmbeddableCreation: () => void;
@@ -40,7 +33,6 @@ interface SetupEmbeddableFactoryReturn {
interface RenderDashboardStateHookReturn {
embeddableFactoryResult: SetupEmbeddableFactoryReturn;
renderHookResult: RenderHookResult, DashboardAppState>;
- services: DashboardAppServices;
props: UseDashboardStateProps;
}
@@ -55,28 +47,7 @@ const createDashboardAppStateProps = (): UseDashboardStateProps => ({
setShowNoDataPage: () => {},
});
-const createDashboardAppStateServices = () => {
- const defaults = makeDefaultServices();
-
- const defaultDataView = { id: 'foo', fields: [{ name: 'bar' }] } as DataView;
-
- (pluginServices.getServices().data.dataViews.getDefaultDataView as jest.Mock).mockResolvedValue(
- defaultDataView
- );
- (pluginServices.getServices().data.dataViews.getDefaultId as jest.Mock).mockResolvedValue(
- defaultDataView.id
- );
- (pluginServices.getServices().data.query.filterManager.getFilters as jest.Mock).mockReturnValue(
- []
- );
-
- return defaults;
-};
-
-const setupEmbeddableFactory = (
- services: DashboardAppServices,
- id: string
-): SetupEmbeddableFactoryReturn => {
+const setupEmbeddableFactory = (id: string): SetupEmbeddableFactoryReturn => {
const dashboardContainer = new DashboardContainer({ ...getSampleDashboardInput(), id });
const deferEmbeddableCreate = defer();
pluginServices.getServices().embeddable.getEmbeddableFactory = jest.fn().mockImplementation(
@@ -100,15 +71,22 @@ const setupEmbeddableFactory = (
const renderDashboardAppStateHook = ({
partialProps,
- partialServices,
}: {
partialProps?: Partial;
- partialServices?: Partial;
}): RenderDashboardStateHookReturn => {
+ const defaultDataView = { id: 'foo', fields: [{ name: 'bar' }] } as DataView;
+ (pluginServices.getServices().data.dataViews.getDefaultDataView as jest.Mock).mockResolvedValue(
+ defaultDataView
+ );
+ (pluginServices.getServices().data.dataViews.getDefaultId as jest.Mock).mockResolvedValue(
+ defaultDataView.id
+ );
+ (pluginServices.getServices().data.query.filterManager.getFilters as jest.Mock).mockReturnValue(
+ []
+ );
+
const props = { ...createDashboardAppStateProps(), ...(partialProps ?? {}) };
- const services = { ...createDashboardAppStateServices(), ...(partialServices ?? {}) };
- const embeddableFactoryResult = setupEmbeddableFactory(services, originalDashboardEmbeddableId);
- const DashboardServicesProvider = pluginServices.getContextProvider();
+ const embeddableFactoryResult = setupEmbeddableFactory(originalDashboardEmbeddableId);
const renderHookResult = renderHook(
(replaceProps: Partial) => {
@@ -116,18 +94,11 @@ const renderDashboardAppStateHook = ({
},
{
wrapper: ({ children }) => {
- return (
-
- {/* Can't get rid of KibanaContextProvider here yet because of saved dashboard tests below */}
-
- {children}
-
-
- );
+ return {children} ;
},
}
);
- return { embeddableFactoryResult, renderHookResult, services, props };
+ return { embeddableFactoryResult, renderHookResult, props };
};
describe('Dashboard container lifecycle', () => {
@@ -146,7 +117,7 @@ describe('Dashboard container lifecycle', () => {
});
test('Old dashboard container is destroyed when new dashboardId is given', async () => {
- const { renderHookResult, embeddableFactoryResult, services } = renderDashboardAppStateHook({});
+ const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({});
const getResult = () => renderHookResult.result.current;
// on initial render dashboard container is undefined
@@ -158,7 +129,7 @@ describe('Dashboard container lifecycle', () => {
expect(embeddableFactoryResult.dashboardDestroySpy).not.toBeCalled();
const newDashboardId = 'wow_a_new_dashboard_id';
- const embeddableFactoryNew = setupEmbeddableFactory(services, newDashboardId);
+ const embeddableFactoryNew = setupEmbeddableFactory(newDashboardId);
renderHookResult.rerender({ savedDashboardId: newDashboardId });
embeddableFactoryNew.finalizeEmbeddableCreation();
@@ -170,7 +141,7 @@ describe('Dashboard container lifecycle', () => {
});
test('Dashboard container is destroyed if dashboard id is changed before container is resolved', async () => {
- const { renderHookResult, embeddableFactoryResult, services } = renderDashboardAppStateHook({});
+ const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({});
const getResult = () => renderHookResult.result.current;
// on initial render dashboard container is undefined
@@ -178,7 +149,7 @@ describe('Dashboard container lifecycle', () => {
await act(() => Promise.resolve()); // wait for the original savedDashboard to be loaded...
const newDashboardId = 'wow_a_new_dashboard_id';
- const embeddableFactoryNew = setupEmbeddableFactory(services, newDashboardId);
+ const embeddableFactoryNew = setupEmbeddableFactory(newDashboardId);
renderHookResult.rerender({ savedDashboardId: newDashboardId });
await act(() => Promise.resolve()); // wait for the new savedDashboard to be loaded...
@@ -199,38 +170,33 @@ describe('Dashboard container lifecycle', () => {
// FLAKY: https://github.com/elastic/kibana/issues/105018
describe.skip('Dashboard initial state', () => {
it('Extracts state from Dashboard Saved Object', async () => {
+ const savedTitle = 'testDash1';
+ (
+ pluginServices.getServices().dashboardSavedObject
+ .loadDashboardStateFromSavedObject as jest.Mock
+ ).mockResolvedValue({ title: savedTitle });
+
const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({});
const getResult = () => renderHookResult.result.current;
- // saved dashboard isn't applied until after the dashboard embeddable has been created.
- expect(getResult().savedDashboard).toBeUndefined();
-
embeddableFactoryResult.finalizeEmbeddableCreation();
await renderHookResult.waitForNextUpdate();
- expect(getResult().savedDashboard).toBeDefined();
- expect(getResult().savedDashboard?.title).toEqual(
- getResult().getLatestDashboardState?.().title
- );
+ expect(savedTitle).toEqual(getResult().getLatestDashboardState?.().title);
});
it('Sets initial time range and filters from saved dashboard', async () => {
- const savedDashboards = {} as SavedObjectLoader;
- savedDashboards.get = jest.fn().mockImplementation((id?: string) =>
- Promise.resolve(
- getSavedDashboardMock({
- getFilters: () => [{ meta: { test: 'filterMeTimbers' } } as unknown as Filter],
- timeRestore: true,
- timeFrom: 'now-13d',
- timeTo: 'now',
- id,
- })
- )
- );
- const partialServices: Partial = { savedDashboards };
- const { renderHookResult, embeddableFactoryResult, services } = renderDashboardAppStateHook({
- partialServices,
+ (
+ pluginServices.getServices().dashboardSavedObject
+ .loadDashboardStateFromSavedObject as jest.Mock
+ ).mockResolvedValue({
+ filters: [{ meta: { test: 'filterMeTimbers' } } as unknown as Filter],
+ timeRestore: true,
+ timeFrom: 'now-13d',
+ timeTo: 'now',
});
+
+ const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({});
const getResult = () => renderHookResult.result.current;
embeddableFactoryResult.finalizeEmbeddableCreation();
@@ -238,15 +204,13 @@ describe.skip('Dashboard initial state', () => {
expect(getResult().getLatestDashboardState?.().timeRestore).toEqual(true);
expect(
- (services as DashboardAppServices & { data: DashboardServices['data'] }).data.query.timefilter
- .timefilter.setTime
+ pluginServices.getServices().data.query.timefilter.timefilter.setTime
).toHaveBeenCalledWith({
from: 'now-13d',
to: 'now',
});
expect(
- (services as DashboardAppServices & { data: DashboardServices['data'] }).data.query
- .filterManager.setAppFilters
+ pluginServices.getServices().data.query.filterManager.setAppFilters
).toHaveBeenCalledWith([{ meta: { test: 'filterMeTimbers' } } as unknown as Filter]);
});
diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts
index 932bfdd016b38..850c6f575904c 100644
--- a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts
+++ b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts
@@ -6,50 +6,45 @@
* Side Public License, v 1.
*/
+import { omit } from 'lodash';
import { History } from 'history';
import { debounceTime, switchMap } from 'rxjs/operators';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { BehaviorSubject, combineLatest, Observable, Subject } from 'rxjs';
import { ViewMode } from '@kbn/embeddable-plugin/public';
-import { useKibana } from '@kbn/kibana-react-plugin/public';
import type { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public';
-import { DashboardConstants } from '../..';
-import { getNewDashboardTitle } from '../../dashboard_strings';
-import { setDashboardState, useDashboardDispatch, useDashboardSelector } from '../state';
-import type {
- DashboardBuildContext,
- DashboardAppServices,
- DashboardAppState,
- DashboardState,
-} from '../../types';
-import { DashboardAppLocatorParams } from '../../locator';
import {
- loadDashboardHistoryLocationState,
- tryDestroyDashboardContainer,
- syncDashboardContainerInput,
- savedObjectToDashboardState,
+ diffDashboardState,
+ syncDashboardUrlState,
syncDashboardDataViews,
- syncDashboardFilterState,
- loadSavedDashboardState,
buildDashboardContainer,
- syncDashboardUrlState,
- diffDashboardState,
- areTimeRangesEqual,
- areRefreshIntervalsEqual,
+ syncDashboardFilterState,
+ syncDashboardContainerInput,
+ tryDestroyDashboardContainer,
+ loadDashboardHistoryLocationState,
} from '../lib';
-import { isDashboardAppInNoDataState } from '../dashboard_app_no_data';
+import {
+ dashboardStateLoadWasSuccessful,
+ LoadDashboardFromSavedObjectReturn,
+} from '../../services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object';
+import { DashboardConstants } from '../..';
+import { DashboardAppLocatorParams } from '../../locator';
+import { dashboardSavedObjectErrorStrings, getNewDashboardTitle } from '../../dashboard_strings';
import { pluginServices } from '../../services/plugin_services';
import { useDashboardMountContext } from './dashboard_mount_context';
+import { isDashboardAppInNoDataState } from '../dashboard_app_no_data';
+import { setDashboardState, useDashboardDispatch, useDashboardSelector } from '../state';
+import type { DashboardBuildContext, DashboardAppState, DashboardState } from '../../types';
export interface UseDashboardStateProps {
history: History;
showNoDataPage: boolean;
savedDashboardId?: string;
isEmbeddedExternally: boolean;
- setShowNoDataPage: (showNoData: boolean) => void;
kbnUrlStateStorage: IKbnUrlStateStorage;
+ setShowNoDataPage: (showNoData: boolean) => void;
}
export const useDashboardAppState = ({
@@ -79,25 +74,23 @@ export const useDashboardAppState = ({
const [lastSavedState, setLastSavedState] = useState();
const $onLastSavedStateChange = useMemo(() => new Subject(), []);
- const {
- services: { savedDashboards },
- } = useKibana();
-
/**
* Unpack services and context
*/
const { scopedHistory } = useDashboardMountContext();
const {
+ embeddable,
+ notifications: { toasts },
chrome: { docTitle },
dashboardCapabilities,
dashboardSessionStorage,
+ spaces: { redirectLegacyUrl },
data: { query, search, dataViews },
- embeddable,
initializerContext: { kibanaVersion },
screenshotMode: { isScreenshotMode, getScreenshotContext },
- spaces: { redirectLegacyUrl },
- notifications,
+ dashboardSavedObject: { loadDashboardStateFromSavedObject },
} = pluginServices.getServices();
+
const { getStateTransfer } = embeddable;
/**
@@ -120,7 +113,6 @@ export const useDashboardAppState = ({
*/
const dashboardBuildContext: DashboardBuildContext = {
history,
- savedDashboards,
kbnUrlStateStorage,
isEmbeddedExternally,
dispatchDashboardStateChange,
@@ -149,33 +141,25 @@ export const useDashboardAppState = ({
/**
* Load and unpack state from dashboard saved object.
*/
- const loadSavedDashboardResult = await loadSavedDashboardState({
- ...dashboardBuildContext,
- savedDashboardId,
- });
- if (canceled || !loadSavedDashboardResult) return;
- const { savedDashboard, savedDashboardState } = loadSavedDashboardResult;
-
- // If the saved dashboard is an alias match, then we will redirect
- if (savedDashboard.outcome === 'aliasMatch' && savedDashboard.id && savedDashboard.aliasId) {
- // We want to keep the "query" params on our redirect.
- // But, these aren't true query params, they are technically part of the hash
- // So, to get the new path, we will just replace the current id in the hash
- // with the alias id
- const path = scopedHistory().location.hash.replace(
- savedDashboard.id,
- savedDashboard.aliasId
- );
- const aliasPurpose = savedDashboard.aliasPurpose;
- if (isScreenshotMode()) {
- scopedHistory().replace(path);
- } else {
- await redirectLegacyUrl?.({ path, aliasPurpose });
- }
- // Return so we don't run any more of the hook and let it rerun after the redirect that just happened
+ let loadSavedDashboardResult: LoadDashboardFromSavedObjectReturn;
+ try {
+ loadSavedDashboardResult = await loadDashboardStateFromSavedObject({
+ getScopedHistory: scopedHistory,
+ id: savedDashboardId,
+ });
+ } catch (error) {
+ // redirect back to landing page if dashboard could not be loaded.
+ toasts.addDanger(dashboardSavedObjectErrorStrings.getDashboardLoadError(error.message));
+ history.push(DashboardConstants.LANDING_PAGE_PATH);
+ return;
+ }
+ if (canceled || !dashboardStateLoadWasSuccessful(loadSavedDashboardResult)) {
return;
}
+ const { dashboardState: savedDashboardState, createConflictWarning } =
+ loadSavedDashboardResult;
+
/**
* Combine initial state from the saved object, session storage, and URL, then dispatch it to Redux.
*/
@@ -187,12 +171,11 @@ export const useDashboardAppState = ({
const { initialDashboardStateFromUrl, stopWatchingAppStateInUrl } = syncDashboardUrlState({
...dashboardBuildContext,
- savedDashboard,
});
const printLayoutDetected = isScreenshotMode() && getScreenshotContext('layout') === 'print';
- const initialDashboardState = {
+ const initialDashboardState: DashboardState = {
...savedDashboardState,
...dashboardSessionStorageState,
...initialDashboardStateFromUrl,
@@ -208,10 +191,9 @@ export const useDashboardAppState = ({
/**
* Start syncing dashboard state with the Query, Filters and Timepicker from the Query Service.
*/
- const { applyFilters, stopSyncingDashboardFilterState } = syncDashboardFilterState({
+ const { stopSyncingDashboardFilterState } = syncDashboardFilterState({
...dashboardBuildContext,
initialDashboardState,
- savedDashboard,
});
/**
@@ -222,10 +204,9 @@ export const useDashboardAppState = ({
...dashboardBuildContext,
initialDashboardState,
incomingEmbeddable,
- savedDashboard,
executionContext: {
type: 'dashboard',
- description: savedDashboard.title,
+ description: initialDashboardState.title,
},
});
@@ -256,15 +237,13 @@ export const useDashboardAppState = ({
const stopSyncingContainerInput = syncDashboardContainerInput({
...dashboardBuildContext,
dashboardContainer,
- savedDashboard,
- applyFilters,
});
/**
* Any time the redux state, or the last saved state changes, compare them, set the unsaved
* changes state, and and push the unsaved changes to session storage.
*/
- const { timefilter } = query.timefilter;
+
const lastSavedSubscription = combineLatest([
$onLastSavedStateChange,
dashboardAppState.$onDashboardStateChange,
@@ -281,31 +260,24 @@ export const useDashboardAppState = ({
newState: current,
}).then((unsavedChanges) => {
if (observer.closed) return;
- const savedTimeChanged =
- lastSaved.timeRestore &&
- (!areTimeRangesEqual(
- {
- from: savedDashboard?.timeFrom,
- to: savedDashboard?.timeTo,
- },
- timefilter.getTime()
- ) ||
- !areRefreshIntervalsEqual(
- savedDashboard?.refreshInterval,
- timefilter.getRefreshInterval()
- ));
-
/**
* changes to the dashboard should only be considered 'unsaved changes' when
* editing the dashboard
*/
const hasUnsavedChanges =
- current.viewMode === ViewMode.EDIT &&
- (Object.keys(unsavedChanges).length > 0 || savedTimeChanged);
+ current.viewMode === ViewMode.EDIT && Object.keys(unsavedChanges).length > 0;
setDashboardAppState((s) => ({ ...s, hasUnsavedChanges }));
unsavedChanges.viewMode = current.viewMode; // always push view mode into session store.
- dashboardSessionStorage.setState(savedDashboardId, unsavedChanges);
+
+ /**
+ * Current behaviour expects time range not to be backed up.
+ * TODO: Revisit this. It seems like we should treat all state the same.
+ */
+ dashboardSessionStorage.setState(
+ savedDashboardId,
+ omit(unsavedChanges, ['timeRange', 'refreshInterval'])
+ );
});
});
})
@@ -319,11 +291,7 @@ export const useDashboardAppState = ({
setLastSavedState(savedDashboardState);
dashboardBuildContext.$checkForUnsavedChanges.next(undefined);
const updateLastSavedState = () => {
- setLastSavedState(
- savedObjectToDashboardState({
- savedDashboard,
- })
- );
+ setLastSavedState(dashboardBuildContext.getLatestDashboardState());
};
/**
@@ -332,10 +300,9 @@ export const useDashboardAppState = ({
docTitle.change(savedDashboardState.title || getNewDashboardTitle());
setDashboardAppState((s) => ({
...s,
- applyFilters,
- savedDashboard,
dashboardContainer,
updateLastSavedState,
+ createConflictWarning,
getLatestDashboardState: dashboardBuildContext.getLatestDashboardState,
}));
@@ -359,47 +326,43 @@ export const useDashboardAppState = ({
}, [
dashboardAppState.$triggerDashboardRefresh,
dashboardAppState.$onDashboardStateChange,
+ loadDashboardStateFromSavedObject,
dispatchDashboardStateChange,
$onLastSavedStateChange,
dashboardSessionStorage,
dashboardCapabilities,
isEmbeddedExternally,
+ getScreenshotContext,
kbnUrlStateStorage,
+ setShowNoDataPage,
+ redirectLegacyUrl,
savedDashboardId,
+ isScreenshotMode,
getStateTransfer,
- savedDashboards,
+ showNoDataPage,
scopedHistory,
- notifications,
- dataViews,
kibanaVersion,
+ dataViews,
embeddable,
docTitle,
history,
+ toasts,
search,
query,
- showNoDataPage,
- setShowNoDataPage,
- redirectLegacyUrl,
- getScreenshotContext,
- isScreenshotMode,
]);
/**
* rebuild reset to last saved state callback whenever last saved state changes
*/
const resetToLastSavedState = useCallback(() => {
- if (
- !lastSavedState ||
- !dashboardAppState.savedDashboard ||
- !dashboardAppState.getLatestDashboardState
- ) {
+ if (!lastSavedState || !dashboardAppState.getLatestDashboardState) {
return;
}
if (dashboardAppState.getLatestDashboardState().timeRestore) {
const { timefilter } = query.timefilter;
- const { timeFrom: from, timeTo: to, refreshInterval } = dashboardAppState.savedDashboard;
- if (from && to) timefilter.setTime({ from, to });
+ const { timeRange, refreshInterval } = lastSavedState;
+ if (timeRange) timefilter.setTime(timeRange);
if (refreshInterval) timefilter.setRefreshInterval(refreshInterval);
}
dispatchDashboardStateChange(
diff --git a/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts b/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts
index 8ad2b7ddc52e2..2d5304e002d54 100644
--- a/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts
+++ b/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts
@@ -16,8 +16,7 @@ import {
isErrorEmbeddable,
} from '@kbn/embeddable-plugin/public';
-import { DashboardSavedObject } from '../../saved_dashboards';
-import { DashboardContainer, DASHBOARD_CONTAINER_TYPE } from '../embeddable';
+import { DashboardContainer } from '../embeddable';
import { DashboardBuildContext, DashboardState, DashboardContainerInput } from '../../types';
import {
enableDashboardSearchSessions,
@@ -25,9 +24,9 @@ import {
stateToDashboardContainerInput,
} from '.';
import { pluginServices } from '../../services/plugin_services';
+import { DASHBOARD_CONTAINER_TYPE } from '../../dashboard_constants';
type BuildDashboardContainerProps = DashboardBuildContext & {
- savedDashboard: DashboardSavedObject;
initialDashboardState: DashboardState;
incomingEmbeddable?: EmbeddablePackageState;
executionContext?: KibanaExecutionContext;
@@ -41,7 +40,6 @@ export const buildDashboardContainer = async ({
initialDashboardState,
isEmbeddedExternally,
incomingEmbeddable,
- savedDashboard,
history,
executionContext,
}: BuildDashboardContainerProps) => {
@@ -55,7 +53,6 @@ export const buildDashboardContainer = async ({
// set up search session
enableDashboardSearchSessions({
- savedDashboard,
initialDashboardState,
getLatestDashboardState,
canStoreSearchSession,
@@ -95,7 +92,6 @@ export const buildDashboardContainer = async ({
dashboardState: initialDashboardState,
incomingEmbeddable,
searchSessionId,
- savedDashboard,
executionContext,
});
diff --git a/src/plugins/dashboard/public/application/lib/convert_dashboard_panels.ts b/src/plugins/dashboard/public/application/lib/convert_dashboard_panels.ts
deleted file mode 100644
index 8e74245137f8e..0000000000000
--- a/src/plugins/dashboard/public/application/lib/convert_dashboard_panels.ts
+++ /dev/null
@@ -1,32 +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 {
- convertSavedDashboardPanelToPanelState,
- convertPanelStateToSavedDashboardPanel,
-} from '../../../common/embeddable/embeddable_saved_object_converters';
-import { pluginServices } from '../../services/plugin_services';
-import type { SavedDashboardPanel, DashboardPanelMap } from '../../types';
-
-export const convertSavedPanelsToPanelMap = (panels?: SavedDashboardPanel[]): DashboardPanelMap => {
- const panelsMap: DashboardPanelMap = {};
- panels?.forEach((panel, idx) => {
- panelsMap![panel.panelIndex ?? String(idx)] = convertSavedDashboardPanelToPanelState(panel);
- });
- return panelsMap;
-};
-
-export const convertPanelMapToSavedPanels = (panels: DashboardPanelMap) => {
- const {
- initializerContext: { kibanaVersion },
- } = pluginServices.getServices();
-
- return Object.values(panels).map((panel) =>
- convertPanelStateToSavedDashboardPanel(panel, kibanaVersion)
- );
-};
diff --git a/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts
index c9e954a081ca2..14e0f4ac4c171 100644
--- a/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts
+++ b/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts
@@ -6,37 +6,21 @@
* Side Public License, v 1.
*/
-import _ from 'lodash';
+import { cloneDeep, omit } from 'lodash';
import type { KibanaExecutionContext } from '@kbn/core/public';
-import type { ControlGroupInput } from '@kbn/controls-plugin/public';
-import { type EmbeddablePackageState, ViewMode } from '@kbn/embeddable-plugin/public';
-import {
- compareFilters,
- COMPARE_ALL_OPTIONS,
- Filter,
- isFilterPinned,
- TimeRange,
-} from '@kbn/es-query';
import { mapAndFlattenFilters } from '@kbn/data-plugin/public';
+import { type EmbeddablePackageState } from '@kbn/embeddable-plugin/public';
+import { Filter, isFilterPinned, compareFilters, COMPARE_ALL_OPTIONS } from '@kbn/es-query';
-import type { DashboardSavedObject } from '../../saved_dashboards';
-import { getTagsFromSavedDashboard, migrateAppState } from '.';
-import { convertPanelStateToSavedDashboardPanel } from '../../../common/embeddable/embeddable_saved_object_converters';
-import type { DashboardState, RawDashboardState, DashboardContainerInput } from '../../types';
-import { convertSavedPanelsToPanelMap } from './convert_dashboard_panels';
-import { deserializeControlGroupFromDashboardSavedObject } from './dashboard_control_group';
import { pluginServices } from '../../services/plugin_services';
-
-interface SavedObjectToDashboardStateProps {
- savedDashboard: DashboardSavedObject;
-}
+import { convertPanelStateToSavedDashboardPanel } from '../../../common';
+import type { DashboardState, RawDashboardState, DashboardContainerInput } from '../../types';
interface StateToDashboardContainerInputProps {
searchSessionId?: string;
isEmbeddedExternally?: boolean;
dashboardState: DashboardState;
- savedDashboard: DashboardSavedObject;
incomingEmbeddable?: EmbeddablePackageState;
executionContext?: KibanaExecutionContext;
}
@@ -44,40 +28,6 @@ interface StateToDashboardContainerInputProps {
interface StateToRawDashboardStateProps {
state: DashboardState;
}
-/**
- * Converts a dashboard saved object to a dashboard state by extracting raw state from the given Dashboard
- * Saved Object migrating the panel states to the latest version, then converting each panel from a saved
- * dashboard panel to a panel state.
- */
-export const savedObjectToDashboardState = ({
- savedDashboard,
-}: SavedObjectToDashboardStateProps): DashboardState => {
- const {
- dashboardCapabilities: { showWriteControls },
- } = pluginServices.getServices();
-
- const rawState = migrateAppState({
- fullScreenMode: false,
- title: savedDashboard.title,
- query: savedDashboard.getQuery(),
- filters: savedDashboard.getFilters(),
- timeRestore: savedDashboard.timeRestore,
- description: savedDashboard.description || '',
- tags: getTagsFromSavedDashboard(savedDashboard),
- panels: savedDashboard.panelsJSON ? JSON.parse(savedDashboard.panelsJSON) : [],
- viewMode: savedDashboard.id || showWriteControls ? ViewMode.EDIT : ViewMode.VIEW,
- options: savedDashboard.optionsJSON ? JSON.parse(savedDashboard.optionsJSON) : {},
- });
-
- if (rawState.timeRestore) {
- rawState.timeRange = { from: savedDashboard.timeFrom, to: savedDashboard.timeTo } as TimeRange;
- }
-
- rawState.controlGroupInput = deserializeControlGroupFromDashboardSavedObject(
- savedDashboard
- ) as ControlGroupInput;
- return { ...rawState, panels: convertSavedPanelsToPanelMap(rawState.panels) };
-};
/**
* Converts a dashboard state object to dashboard container input
@@ -85,7 +35,6 @@ export const savedObjectToDashboardState = ({
export const stateToDashboardContainerInput = ({
isEmbeddedExternally,
searchSessionId,
- savedDashboard,
dashboardState,
executionContext,
}: StateToDashboardContainerInputProps): DashboardContainerInput => {
@@ -111,7 +60,7 @@ export const stateToDashboardContainerInput = ({
filters: dashboardFilters,
} = dashboardState;
- const migratedDashboardFilters = mapAndFlattenFilters(_.cloneDeep(dashboardFilters));
+ const migratedDashboardFilters = mapAndFlattenFilters(cloneDeep(dashboardFilters));
return {
refreshConfig: timefilter.getRefreshInterval(),
filters: filterManager
@@ -124,7 +73,7 @@ export const stateToDashboardContainerInput = ({
)
),
isFullScreenMode: fullScreenMode,
- id: savedDashboard.id || '',
+ id: dashboardState.savedObjectId ?? '',
isEmbeddedExternally,
...(options || {}),
controlGroupInput,
@@ -136,7 +85,7 @@ export const stateToDashboardContainerInput = ({
query,
title,
timeRange: {
- ..._.cloneDeep(timefilter.getTime()),
+ ...cloneDeep(timefilter.getTime()),
},
timeslice,
timeRestore,
@@ -161,5 +110,5 @@ export const stateToRawDashboardState = ({
const savedDashboardPanels = Object.values(state.panels).map((panel) =>
convertPanelStateToSavedDashboardPanel(panel, kibanaVersion)
);
- return { ..._.omit(state, 'panels'), panels: savedDashboardPanels };
+ return { ...omit(state, 'panels'), panels: savedDashboardPanels };
};
diff --git a/src/plugins/dashboard/public/application/lib/dashboard_control_group.ts b/src/plugins/dashboard/public/application/lib/dashboard_control_group.ts
index a9f474ed85dd0..4f44d0cf250d1 100644
--- a/src/plugins/dashboard/public/application/lib/dashboard_control_group.ts
+++ b/src/plugins/dashboard/public/application/lib/dashboard_control_group.ts
@@ -14,16 +14,15 @@ import { debounceTime, distinctUntilChanged, distinctUntilKeyChanged } from 'rxj
import {
ControlGroupInput,
- controlGroupInputToRawControlGroupAttributes,
getDefaultControlGroupInput,
persistableControlGroupInputIsEqual,
- rawControlGroupAttributesToControlGroupInput,
+ controlGroupInputToRawControlGroupAttributes,
} from '@kbn/controls-plugin/common';
import { ControlGroupContainer } from '@kbn/controls-plugin/public';
import { DashboardContainer } from '..';
import { DashboardState } from '../../types';
-import { DashboardContainerInput, DashboardSavedObject } from '../..';
+import { DashboardContainerInput } from '../..';
interface DiffChecks {
[key: string]: (a?: unknown, b?: unknown) => boolean;
@@ -169,32 +168,17 @@ export const syncDashboardControlGroup = async ({
};
};
-export const serializeControlGroupToDashboardSavedObject = (
- dashboardSavedObject: DashboardSavedObject,
- dashboardState: DashboardState
+export const serializeControlGroupInput = (
+ controlGroupInput: DashboardState['controlGroupInput']
) => {
// only save to saved object if control group is not default
if (
- persistableControlGroupInputIsEqual(
- dashboardState.controlGroupInput,
- getDefaultControlGroupInput()
- )
+ !controlGroupInput ||
+ persistableControlGroupInputIsEqual(controlGroupInput, getDefaultControlGroupInput())
) {
- dashboardSavedObject.controlGroupInput = undefined;
- return;
+ return undefined;
}
- if (dashboardState.controlGroupInput) {
- dashboardSavedObject.controlGroupInput = controlGroupInputToRawControlGroupAttributes(
- dashboardState.controlGroupInput
- );
- }
-};
-
-export const deserializeControlGroupFromDashboardSavedObject = (
- dashboardSavedObject: DashboardSavedObject
-): Omit | undefined => {
- if (!dashboardSavedObject.controlGroupInput) return;
- return rawControlGroupAttributesToControlGroupInput(dashboardSavedObject.controlGroupInput);
+ return controlGroupInputToRawControlGroupAttributes(controlGroupInput);
};
export const combineDashboardFiltersWithControlGroupFilters = (
diff --git a/src/plugins/dashboard/public/application/lib/session_restoration.test.ts b/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.test.ts
similarity index 89%
rename from src/plugins/dashboard/public/application/lib/session_restoration.test.ts
rename to src/plugins/dashboard/public/application/lib/dashboard_session_restoration.test.ts
index aeb83dd8a6e4c..56ee2ac55f445 100644
--- a/src/plugins/dashboard/public/application/lib/session_restoration.test.ts
+++ b/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.test.ts
@@ -6,16 +6,13 @@
* Side Public License, v 1.
*/
-import { getSavedDashboardMock } from '../test_helpers';
-import { createSessionRestorationDataProvider, savedObjectToDashboardState } from '.';
+import { DashboardState } from '../../types';
+import { createSessionRestorationDataProvider } from '.';
import { pluginServices } from '../../services/plugin_services';
describe('createSessionRestorationDataProvider', () => {
const searchSessionInfoProvider = createSessionRestorationDataProvider({
- getAppState: () =>
- savedObjectToDashboardState({
- savedDashboard: getSavedDashboardMock(),
- }),
+ getAppState: () => ({ panels: {} } as unknown as DashboardState),
getDashboardTitle: () => 'Dashboard',
getDashboardId: () => 'Id',
});
diff --git a/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts b/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts
index b2cedeee4ee04..113c39d0717ba 100644
--- a/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts
+++ b/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts
@@ -17,12 +17,11 @@ import {
import { getQueryParams } from '@kbn/kibana-utils-plugin/public';
import type { DashboardState } from '../../types';
-import type { DashboardSavedObject } from '../../saved_dashboards';
-import { DashboardAppLocatorParams, DashboardConstants } from '../..';
-import { getDashboardTitle } from '../../dashboard_strings';
-import { stateToRawDashboardState } from './convert_dashboard_state';
import { DASHBOARD_APP_LOCATOR } from '../../locator';
+import { getDashboardTitle } from '../../dashboard_strings';
import { pluginServices } from '../../services/plugin_services';
+import { DashboardAppLocatorParams, DashboardConstants } from '../..';
+import { stateToRawDashboardState } from './convert_dashboard_state';
export const getSearchSessionIdFromURL = (history: History): string | undefined =>
getQueryParams(history.location)[DashboardConstants.SEARCH_SESSION_ID] as string | undefined;
@@ -52,10 +51,8 @@ export function enableDashboardSearchSessions({
canStoreSearchSession,
initialDashboardState,
getLatestDashboardState,
- savedDashboard,
}: {
canStoreSearchSession: boolean;
- savedDashboard: DashboardSavedObject;
initialDashboardState: DashboardState;
getLatestDashboardState: () => DashboardState;
}) {
@@ -63,13 +60,13 @@ export function enableDashboardSearchSessions({
const dashboardTitle = getDashboardTitle(
initialDashboardState.title,
initialDashboardState.viewMode,
- !savedDashboard.id
+ !getLatestDashboardState().savedObjectId
);
data.search.session.enableStorage(
createSessionRestorationDataProvider({
getDashboardTitle: () => dashboardTitle,
- getDashboardId: () => savedDashboard?.id || '',
+ getDashboardId: () => getLatestDashboardState().savedObjectId ?? '',
getAppState: getLatestDashboardState,
}),
{
@@ -106,7 +103,7 @@ function getLocatorParams({
return {
timeRange: shouldRestoreSearchSession ? timefilter.getAbsoluteTime() : timefilter.getTime(),
searchSessionId: shouldRestoreSearchSession ? data.search.session.getSessionId() : undefined,
- panels: getDashboardId() ? undefined : appState.panels,
+ panels: getDashboardId() ? undefined : (appState.panels as DashboardAppLocatorParams['panels']),
query: queryString.formatQuery(appState.query) as Query,
filters: filterManager.getFilters(),
savedQuery: appState.savedQuery,
diff --git a/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts b/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts
deleted file mode 100644
index 0a8ec17aeb2f1..0000000000000
--- a/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import type { TagDecoratedSavedObject } from '@kbn/saved-objects-tagging-oss-plugin/public';
-import type { SavedObject } from '@kbn/saved-objects-plugin/public';
-
-import { DashboardSavedObject } from '../..';
-import { pluginServices } from '../../services/plugin_services';
-
-// TS is picky with type guards, we can't just inline `() => false`
-function defaultTaggingGuard(_obj: SavedObject): _obj is TagDecoratedSavedObject {
- return false;
-}
-
-export const getTagsFromSavedDashboard = (savedDashboard: DashboardSavedObject) => {
- const hasTaggingCapabilities = getHasTaggingCapabilitiesGuard();
- return hasTaggingCapabilities(savedDashboard) ? savedDashboard.getTags() : [];
-};
-
-export const getHasTaggingCapabilitiesGuard = () => {
- const {
- savedObjectsTagging: { hasTagDecoration },
- } = pluginServices.getServices();
-
- return hasTagDecoration || defaultTaggingGuard;
-};
diff --git a/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts
index ca913199a3ba2..e5432b50550ee 100644
--- a/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts
+++ b/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts
@@ -6,14 +6,25 @@
* Side Public License, v 1.
*/
-import { xor, omit, isEmpty } from 'lodash';
import fastIsEqual from 'fast-deep-equal';
-import { compareFilters, COMPARE_ALL_OPTIONS, type Filter, isFilterPinned } from '@kbn/es-query';
+import { xor, omit, isEmpty, pick } from 'lodash';
+
+import {
+ compareFilters,
+ COMPARE_ALL_OPTIONS,
+ type Filter,
+ isFilterPinned,
+ TimeRange,
+} from '@kbn/es-query';
+import { RefreshInterval } from '@kbn/data-plugin/common';
import { IEmbeddable } from '@kbn/embeddable-plugin/public';
-
import { persistableControlGroupInputIsEqual } from '@kbn/controls-plugin/common';
+
import { DashboardContainerInput } from '../..';
-import { DashboardOptions, DashboardPanelMap, DashboardState } from '../../types';
+import { areTimesEqual } from './filter_utils';
+import { DashboardPanelMap } from '../embeddable';
+import { DashboardOptions, DashboardState } from '../../types';
+import { pluginServices } from '../../services/plugin_services';
const stateKeystoIgnore = [
'expandedPanelId',
@@ -90,28 +101,85 @@ export const diffDashboardState = async ({
getEmbeddable
);
const optionsAreEqual = getOptionsAreEqual(originalState.options, newState.options);
- const filtersAreEqual = getFiltersAreEqual(originalState.filters, newState.filters, true);
const controlGroupIsEqual = persistableControlGroupInputIsEqual(
originalState.controlGroupInput,
newState.controlGroupInput
);
+ const filterStateDiff = getFiltersAreEqual(originalState.filters, newState.filters, true)
+ ? {}
+ : {
+ filters: newState.filters.filter((f) => !isFilterPinned(f)),
+ };
+
+ const timeStatediff = getTimeSettingsAreEqual({
+ currentTimeRestore: newState.timeRestore,
+ lastSaved: { ...pick(originalState, ['timeRange', 'timeRestore', 'refreshInterval']) },
+ })
+ ? {}
+ : pick(newState, ['timeRange', 'timeRestore', 'refreshInterval']);
+
return {
...commonStateDiff,
...(panelsAreEqual ? {} : { panels: newState.panels }),
- ...(filtersAreEqual ? {} : { filters: newState.filters }),
...(optionsAreEqual ? {} : { options: newState.options }),
...(controlGroupIsEqual ? {} : { controlGroupInput: newState.controlGroupInput }),
+ ...filterStateDiff,
+ ...timeStatediff,
};
};
+interface TimeStateDiffArg {
+ timeRange?: TimeRange;
+ timeRestore?: boolean;
+ refreshInterval?: RefreshInterval;
+}
+
+export const getTimeSettingsAreEqual = ({
+ lastSaved,
+ currentTimeRestore,
+}: {
+ lastSaved?: TimeStateDiffArg;
+ currentTimeRestore?: boolean;
+}) => {
+ const {
+ data: {
+ query: {
+ timefilter: { timefilter },
+ },
+ },
+ } = pluginServices.getServices();
+
+ if (currentTimeRestore !== lastSaved?.timeRestore) return false;
+ if (!currentTimeRestore) return true;
+
+ const currentRange = timefilter.getTime();
+ const lastRange = lastSaved?.timeRange ?? timefilter.getTimeDefaults();
+ if (
+ !areTimesEqual(currentRange.from, lastRange.from) ||
+ !areTimesEqual(currentRange.to, lastRange.to)
+ ) {
+ return false;
+ }
+
+ const currentInterval = timefilter.getRefreshInterval();
+ const lastInterval = lastSaved?.refreshInterval ?? timefilter.getRefreshIntervalDefaults();
+ if (
+ currentInterval.pause !== lastInterval.pause ||
+ currentInterval.value !== lastInterval.value
+ ) {
+ return false;
+ }
+ return true;
+};
+
const getFiltersAreEqual = (
filtersA: Filter[],
filtersB: Filter[],
ignorePinned?: boolean
): boolean => {
return compareFilters(
- filtersA,
+ ignorePinned ? filtersA.filter((f) => !isFilterPinned(f)) : filtersA,
ignorePinned ? filtersB.filter((f) => !isFilterPinned(f)) : filtersB,
COMPARE_ALL_OPTIONS
);
diff --git a/src/plugins/dashboard/public/application/lib/filter_utils.ts b/src/plugins/dashboard/public/application/lib/filter_utils.ts
index 9b9a1270fd3ba..fb2762c7dc587 100644
--- a/src/plugins/dashboard/public/application/lib/filter_utils.ts
+++ b/src/plugins/dashboard/public/application/lib/filter_utils.ts
@@ -8,12 +8,7 @@
import _ from 'lodash';
import moment, { Moment } from 'moment';
-import type { Optional } from '@kbn/utility-types';
-import type { RefreshInterval } from '@kbn/data-plugin/public';
-import type { Filter, TimeRange } from '@kbn/es-query';
-
-type TimeRangeCompare = Optional;
-type RefreshIntervalCompare = Optional;
+import type { Filter } from '@kbn/es-query';
/**
* Converts the time to a utc formatted string. If the time is not valid (e.g. it might be in a relative format like
@@ -32,22 +27,6 @@ export const convertTimeToUTCString = (time?: string | Moment): undefined | stri
}
};
-export const areTimeRangesEqual = (rangeA: TimeRangeCompare, rangeB: TimeRangeCompare): boolean =>
- areTimesEqual(rangeA.from, rangeB.from) && areTimesEqual(rangeA.to, rangeB.to);
-
-export const areRefreshIntervalsEqual = (
- refreshA?: RefreshIntervalCompare,
- refreshB?: RefreshIntervalCompare
-): boolean => refreshA?.pause === refreshB?.pause && refreshA?.value === refreshB?.value;
-
-/**
- * Compares the two times, making sure they are in both compared in string format. Absolute times
- * are sometimes stored as moment objects, but converted to strings when reloaded. Relative times are
- * strings that are not convertible to moment objects.
- * @param timeA {string|Moment}
- * @param timeB {string|Moment}
- * @returns {boolean}
- */
export const areTimesEqual = (timeA?: string | Moment, timeB?: string | Moment) => {
return convertTimeToUTCString(timeA) === convertTimeToUTCString(timeB);
};
diff --git a/src/plugins/dashboard/public/application/lib/index.ts b/src/plugins/dashboard/public/application/lib/index.ts
index 1b4ab12d2bc1b..0f364a31061d3 100644
--- a/src/plugins/dashboard/public/application/lib/index.ts
+++ b/src/plugins/dashboard/public/application/lib/index.ts
@@ -6,28 +6,24 @@
* Side Public License, v 1.
*/
-export * from './filter_utils';
-export { getDashboardIdFromUrl } from './url';
-export { saveDashboard } from './save_dashboard';
-export { migrateAppState } from './migrate_app_state';
-export { addHelpMenuToAppChrome } from './help_menu_util';
-export { diffDashboardState } from './diff_dashboard_state';
-export { getTagsFromSavedDashboard } from './dashboard_tagging';
-export { syncDashboardUrlState } from './sync_dashboard_url_state';
-export { loadSavedDashboardState } from './load_saved_dashboard_state';
-export { attemptLoadDashboardByTitle } from './load_dashboard_by_title';
-export { syncDashboardFilterState } from './sync_dashboard_filter_state';
-export { syncDashboardDataViews } from './sync_dashboard_data_views';
-export { syncDashboardContainerInput } from './sync_dashboard_container_input';
-export { loadDashboardHistoryLocationState } from './load_dashboard_history_location_state';
-export { buildDashboardContainer, tryDestroyDashboardContainer } from './build_dashboard_container';
export {
- stateToDashboardContainerInput,
- savedObjectToDashboardState,
-} from './convert_dashboard_state';
+ areTimesEqual,
+ convertTimeToUTCString,
+ cleanFiltersForSerialize,
+ cleanFiltersForComparison,
+} from './filter_utils';
export {
createSessionRestorationDataProvider,
enableDashboardSearchSessions,
getSearchSessionIdFromURL,
getSessionURLObservable,
} from './dashboard_session_restoration';
+export { addHelpMenuToAppChrome } from './help_menu_util';
+export { diffDashboardState } from './diff_dashboard_state';
+export { syncDashboardUrlState } from './sync_dashboard_url_state';
+export { syncDashboardDataViews } from './sync_dashboard_data_views';
+export { syncDashboardFilterState } from './sync_dashboard_filter_state';
+export { stateToDashboardContainerInput } from './convert_dashboard_state';
+export { syncDashboardContainerInput } from './sync_dashboard_container_input';
+export { loadDashboardHistoryLocationState } from './load_dashboard_history_location_state';
+export { buildDashboardContainer, tryDestroyDashboardContainer } from './build_dashboard_container';
diff --git a/src/plugins/dashboard/public/application/lib/load_dashboard_by_title.ts b/src/plugins/dashboard/public/application/lib/load_dashboard_by_title.ts
deleted file mode 100644
index bff9f8600c0ed..0000000000000
--- a/src/plugins/dashboard/public/application/lib/load_dashboard_by_title.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import { DashboardSavedObject } from '../..';
-import { pluginServices } from '../../services/plugin_services';
-
-export async function attemptLoadDashboardByTitle(
- title: string
-): Promise<{ id: string } | undefined> {
- const {
- savedObjects: { client },
- } = pluginServices.getServices();
-
- const results = await client.find({
- search: `"${title}"`,
- searchFields: ['title'],
- type: 'dashboard',
- });
- // The search isn't an exact match, lets see if we can find a single exact match to use
- const matchingDashboards = results.savedObjects.filter(
- (dashboard) => dashboard.attributes.title.toLowerCase() === title.toLowerCase()
- );
- if (matchingDashboards.length === 1) {
- return { id: matchingDashboards[0].id };
- }
-}
diff --git a/src/plugins/dashboard/public/application/lib/load_dashboard_history_location_state.ts b/src/plugins/dashboard/public/application/lib/load_dashboard_history_location_state.ts
index ce06ef443d69f..9a7d1791c6c94 100644
--- a/src/plugins/dashboard/public/application/lib/load_dashboard_history_location_state.ts
+++ b/src/plugins/dashboard/public/application/lib/load_dashboard_history_location_state.ts
@@ -6,9 +6,9 @@
* Side Public License, v 1.
*/
-import { ForwardedDashboardState } from '../../locator';
import { DashboardState } from '../../types';
-import { convertSavedPanelsToPanelMap } from './convert_dashboard_panels';
+import { ForwardedDashboardState } from '../../locator';
+import { convertSavedPanelsToPanelMap } from '../../../common';
export const loadDashboardHistoryLocationState = (
state?: ForwardedDashboardState
diff --git a/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts
deleted file mode 100644
index 6a7eba0884abe..0000000000000
--- a/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.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 { ViewMode } from '@kbn/embeddable-plugin/public';
-import { getDashboard60Warning, dashboardLoadingErrorStrings } from '../../dashboard_strings';
-import { savedObjectToDashboardState } from './convert_dashboard_state';
-import { DashboardState, DashboardBuildContext } from '../../types';
-import { DashboardConstants, DashboardSavedObject } from '../..';
-import { migrateLegacyQuery } from './migrate_legacy_query';
-import { cleanFiltersForSerialize } from './filter_utils';
-import { pluginServices } from '../../services/plugin_services';
-
-interface LoadSavedDashboardStateReturn {
- savedDashboardState: DashboardState;
- savedDashboard: DashboardSavedObject;
-}
-
-/**
- * Loads, migrates, and returns state from a dashboard saved object.
- */
-export const loadSavedDashboardState = async ({
- history,
- savedDashboards,
- savedDashboardId,
-}: DashboardBuildContext & { savedDashboardId?: string }): Promise<
- LoadSavedDashboardStateReturn | undefined
-> => {
- const {
- dashboardCapabilities: { showWriteControls },
- data: {
- query: { queryString },
- },
- notifications: { toasts },
- } = pluginServices.getServices();
-
- // BWC - remove for 8.0
- if (savedDashboardId === 'create') {
- history.replace({
- ...history.location, // preserve query,
- pathname: DashboardConstants.CREATE_NEW_DASHBOARD_URL,
- });
-
- toasts.addWarning(getDashboard60Warning());
- return;
- }
- try {
- const savedDashboard = (await savedDashboards.get({
- id: savedDashboardId,
- useResolve: true,
- })) as DashboardSavedObject;
- const savedDashboardState = savedObjectToDashboardState({
- savedDashboard,
- });
-
- const isViewMode = !showWriteControls || Boolean(savedDashboard.id);
- savedDashboardState.viewMode = isViewMode ? ViewMode.VIEW : ViewMode.EDIT;
- savedDashboardState.filters = cleanFiltersForSerialize(savedDashboardState.filters);
- savedDashboardState.query = migrateLegacyQuery(
- savedDashboardState.query || queryString.getDefaultQuery()
- );
-
- return { savedDashboardState, savedDashboard };
- } catch (error) {
- // E.g. a corrupt or deleted dashboard
- toasts.addDanger(dashboardLoadingErrorStrings.getDashboardLoadError(error.message));
- history.push(DashboardConstants.LANDING_PAGE_PATH);
- return;
- }
-};
diff --git a/src/plugins/dashboard/public/application/lib/migrate_app_state.test.ts b/src/plugins/dashboard/public/application/lib/migrate_app_state.test.ts
deleted file mode 100644
index 578439070e970..0000000000000
--- a/src/plugins/dashboard/public/application/lib/migrate_app_state.test.ts
+++ /dev/null
@@ -1,164 +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 { pluginServices } from '../../services/plugin_services';
-import { SavedDashboardPanel } from '../../types';
-import { migrateAppState } from './migrate_app_state';
-
-pluginServices.getServices().initializerContext.kibanaVersion = '8.0';
-
-test('migrate app state from 6.0', async () => {
- const appState = {
- uiState: {
- 'P-1': { vis: { defaultColors: { '0+-+100': 'rgb(0,104,55)' } } },
- },
- panels: [
- {
- col: 1,
- id: 'Visualization-MetricChart',
- panelIndex: 1,
- row: 1,
- size_x: 6,
- size_y: 3,
- type: 'visualization',
- },
- ],
- };
- migrateAppState(appState as any);
- expect(appState.uiState).toBeUndefined();
-
- const newPanel = appState.panels[0] as unknown as SavedDashboardPanel;
-
- expect(newPanel.gridData.w).toBe(24);
- expect(newPanel.gridData.h).toBe(15);
- expect(newPanel.gridData.x).toBe(0);
- expect(newPanel.gridData.y).toBe(0);
-
- expect((newPanel.embeddableConfig as any).vis.defaultColors['0+-+100']).toBe('rgb(0,104,55)');
-});
-
-test('migrate sort from 6.1', async () => {
- const appState = {
- uiState: {
- 'P-1': { vis: { defaultColors: { '0+-+100': 'rgb(0,104,55)' } } },
- },
- panels: [
- {
- col: 1,
- id: 'Visualization-MetricChart',
- panelIndex: 1,
- row: 1,
- size_x: 6,
- size_y: 3,
- type: 'visualization',
- sort: 'sort',
- },
- ],
- useMargins: false,
- };
- migrateAppState(appState as any);
- expect(appState.uiState).toBeUndefined();
-
- const newPanel = appState.panels[0] as unknown as SavedDashboardPanel;
- expect(newPanel.gridData.w).toBe(24);
- expect(newPanel.gridData.h).toBe(15);
- expect((newPanel as any).sort).toBeUndefined();
-
- expect((newPanel.embeddableConfig as any).sort).toBe('sort');
- expect((newPanel.embeddableConfig as any).vis.defaultColors['0+-+100']).toBe('rgb(0,104,55)');
-});
-
-test('migrates 6.0 even when uiState does not exist', async () => {
- const appState = {
- panels: [
- {
- col: 1,
- id: 'Visualization-MetricChart',
- panelIndex: 1,
- row: 1,
- size_x: 6,
- size_y: 3,
- type: 'visualization',
- sort: 'sort',
- },
- ],
- };
- migrateAppState(appState as any);
- expect((appState as any).uiState).toBeUndefined();
-
- const newPanel = appState.panels[0] as unknown as SavedDashboardPanel;
- expect(newPanel.gridData.w).toBe(24);
- expect(newPanel.gridData.h).toBe(15);
- expect((newPanel as any).sort).toBeUndefined();
-
- expect((newPanel.embeddableConfig as any).sort).toBe('sort');
-});
-
-test('6.2 migration adjusts w & h without margins', async () => {
- const appState = {
- panels: [
- {
- id: 'Visualization-MetricChart',
- panelIndex: 1,
- gridData: {
- h: 3,
- w: 7,
- x: 2,
- y: 5,
- },
- type: 'visualization',
- sort: 'sort',
- version: '6.2.0',
- },
- ],
- useMargins: false,
- };
- migrateAppState(appState as any);
- expect((appState as any).uiState).toBeUndefined();
-
- const newPanel = appState.panels[0] as unknown as SavedDashboardPanel;
- expect(newPanel.gridData.w).toBe(28);
- expect(newPanel.gridData.h).toBe(15);
- expect(newPanel.gridData.x).toBe(8);
- expect(newPanel.gridData.y).toBe(25);
- expect((newPanel as any).sort).toBeUndefined();
-
- expect((newPanel.embeddableConfig as any).sort).toBe('sort');
-});
-
-test('6.2 migration adjusts w & h with margins', async () => {
- const appState = {
- panels: [
- {
- id: 'Visualization-MetricChart',
- panelIndex: 1,
- gridData: {
- h: 3,
- w: 7,
- x: 2,
- y: 5,
- },
- type: 'visualization',
- sort: 'sort',
- version: '6.2.0',
- },
- ],
- useMargins: true,
- };
- migrateAppState(appState as any);
- expect((appState as any).uiState).toBeUndefined();
-
- const newPanel = appState.panels[0] as unknown as SavedDashboardPanel;
- expect(newPanel.gridData.w).toBe(28);
- expect(newPanel.gridData.h).toBe(12);
- expect(newPanel.gridData.x).toBe(8);
- expect(newPanel.gridData.y).toBe(20);
- expect((newPanel as any).sort).toBeUndefined();
-
- expect((newPanel.embeddableConfig as any).sort).toBe('sort');
-});
diff --git a/src/plugins/dashboard/public/application/lib/migrate_app_state.ts b/src/plugins/dashboard/public/application/lib/migrate_app_state.ts
deleted file mode 100644
index e077aab89ea8b..0000000000000
--- a/src/plugins/dashboard/public/application/lib/migrate_app_state.ts
+++ /dev/null
@@ -1,87 +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 semverSatisfies from 'semver/functions/satisfies';
-
-import { i18n } from '@kbn/i18n';
-import { METRIC_TYPE } from '@kbn/analytics';
-import type { SerializableRecord } from '@kbn/utility-types';
-
-import { RawDashboardState, SavedDashboardPanel } from '../../types';
-import type {
- SavedDashboardPanelTo60,
- SavedDashboardPanel730ToLatest,
- SavedDashboardPanel610,
- SavedDashboardPanel630,
- SavedDashboardPanel640To720,
- SavedDashboardPanel620,
-} from '../../../common';
-import { migratePanelsTo730 } from '../../../common';
-import { pluginServices } from '../../services/plugin_services';
-
-/**
- * Attempts to migrate the state stored in the URL into the latest version of it.
- *
- * Once we hit a major version, we can remove support for older style URLs and get rid of this logic.
- */
-export function migrateAppState(
- appState: { [key: string]: any } & RawDashboardState
-): RawDashboardState {
- if (!appState.panels) {
- throw new Error(
- i18n.translate('dashboard.panel.invalidData', {
- defaultMessage: 'Invalid data in url',
- })
- );
- }
-
- const {
- usageCollection: { reportUiCounter },
- initializerContext: { kibanaVersion },
- } = pluginServices.getServices();
-
- const panelNeedsMigration = (
- appState.panels as Array<
- | SavedDashboardPanelTo60
- | SavedDashboardPanel610
- | SavedDashboardPanel620
- | SavedDashboardPanel630
- | SavedDashboardPanel640To720
- | SavedDashboardPanel730ToLatest
- >
- ).some((panel) => {
- if ((panel as { version?: string }).version === undefined) return true;
-
- const version = (panel as SavedDashboardPanel730ToLatest).version;
-
- if (reportUiCounter) {
- // This will help us figure out when to remove support for older style URLs.
- reportUiCounter('DashboardPanelVersionInUrl', METRIC_TYPE.LOADED, `${version}`);
- }
-
- return semverSatisfies(version, '<7.3');
- });
-
- if (panelNeedsMigration) {
- appState.panels = migratePanelsTo730(
- appState.panels as Array<
- | SavedDashboardPanelTo60
- | SavedDashboardPanel610
- | SavedDashboardPanel620
- | SavedDashboardPanel630
- | SavedDashboardPanel640To720
- >,
- kibanaVersion,
- appState.useMargins as boolean,
- appState.uiState as { [key: string]: SerializableRecord }
- ) as SavedDashboardPanel[];
- delete appState.uiState;
- }
-
- return appState;
-}
diff --git a/src/plugins/dashboard/public/application/lib/save_dashboard.ts b/src/plugins/dashboard/public/application/lib/save_dashboard.ts
deleted file mode 100644
index f3347ca3f2041..0000000000000
--- a/src/plugins/dashboard/public/application/lib/save_dashboard.ts
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import _ from 'lodash';
-
-import { isFilterPinned } from '@kbn/es-query';
-import type { RefreshInterval } from '@kbn/data-plugin/public';
-import type { SavedObjectSaveOpts } from '@kbn/saved-objects-plugin/public';
-
-import { convertTimeToUTCString } from '.';
-import type { DashboardSavedObject } from '../../saved_dashboards';
-import { dashboardSaveToastStrings } from '../../dashboard_strings';
-import { getHasTaggingCapabilitiesGuard } from './dashboard_tagging';
-import type { DashboardRedirect, DashboardState } from '../../types';
-import { serializeControlGroupToDashboardSavedObject } from './dashboard_control_group';
-import { convertPanelStateToSavedDashboardPanel } from '../../../common/embeddable/embeddable_saved_object_converters';
-import { pluginServices } from '../../services/plugin_services';
-
-export type SavedDashboardSaveOpts = SavedObjectSaveOpts & { stayInEditMode?: boolean };
-
-interface SaveDashboardProps {
- redirectTo: DashboardRedirect;
- currentState: DashboardState;
- saveOptions: SavedDashboardSaveOpts;
- savedDashboard: DashboardSavedObject;
-}
-
-export const saveDashboard = async ({
- redirectTo,
- saveOptions,
- currentState,
- savedDashboard,
-}: SaveDashboardProps): Promise<{ id?: string; redirected?: boolean; error?: any }> => {
- const {
- data: {
- query: {
- timefilter: { timefilter },
- },
- },
- dashboardSessionStorage,
- initializerContext: { kibanaVersion },
- notifications,
- } = pluginServices.getServices();
-
- const lastDashboardId = savedDashboard.id;
- const hasTaggingCapabilities = getHasTaggingCapabilitiesGuard();
-
- const { panels, title, tags, description, timeRestore, options } = currentState;
-
- const savedDashboardPanels = Object.values(panels).map((panel) =>
- convertPanelStateToSavedDashboardPanel(panel, kibanaVersion)
- );
-
- savedDashboard.title = title;
- savedDashboard.description = description;
- savedDashboard.timeRestore = timeRestore;
- savedDashboard.optionsJSON = JSON.stringify(options);
- savedDashboard.panelsJSON = JSON.stringify(savedDashboardPanels);
-
- // control group input
- serializeControlGroupToDashboardSavedObject(savedDashboard, currentState);
-
- if (hasTaggingCapabilities(savedDashboard)) {
- savedDashboard.setTags(tags);
- }
-
- const { from, to } = timefilter.getTime();
- savedDashboard.timeFrom = savedDashboard.timeRestore ? convertTimeToUTCString(from) : undefined;
- savedDashboard.timeTo = savedDashboard.timeRestore ? convertTimeToUTCString(to) : undefined;
-
- const timeRestoreObj: RefreshInterval = _.pick(timefilter.getRefreshInterval(), [
- 'display',
- 'pause',
- 'section',
- 'value',
- ]) as RefreshInterval;
- savedDashboard.refreshInterval = savedDashboard.timeRestore ? timeRestoreObj : undefined;
-
- // only save unpinned filters
- const unpinnedFilters = savedDashboard.getFilters().filter((filter) => !isFilterPinned(filter));
- savedDashboard.searchSource.setField('filter', unpinnedFilters);
-
- try {
- const newId = await savedDashboard.save(saveOptions);
- if (newId) {
- notifications.toasts.addSuccess({
- title: dashboardSaveToastStrings.getSuccessString(currentState.title),
- 'data-test-subj': 'saveDashboardSuccess',
- });
-
- /**
- * If the dashboard id has been changed, redirect to the new ID to keep the url param in sync.
- */
- if (newId !== lastDashboardId) {
- dashboardSessionStorage.clearState(lastDashboardId);
- redirectTo({
- id: newId,
- editMode: true,
- useReplace: true,
- destination: 'dashboard',
- });
- return { redirected: true, id: newId };
- }
- }
- return { id: newId };
- } catch (error) {
- notifications.toasts.addDanger(
- dashboardSaveToastStrings.getFailureString(currentState.title, error.message),
- {
- 'data-test-subj': 'saveDashboardFailure',
- }
- );
- return { error };
- }
-};
diff --git a/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts b/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts
index 67e098186f9e9..9e97beaad276f 100644
--- a/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts
+++ b/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts
@@ -10,12 +10,11 @@ import _ from 'lodash';
import { Subscription } from 'rxjs';
import { debounceTime, tap } from 'rxjs/operators';
-import { compareFilters, COMPARE_ALL_OPTIONS, type Filter } from '@kbn/es-query';
+import { compareFilters, COMPARE_ALL_OPTIONS } from '@kbn/es-query';
import { replaceUrlHashQuery } from '@kbn/kibana-utils-plugin/public';
-import type { Query } from '@kbn/es-query';
import type { DashboardContainer } from '../embeddable';
-import { DashboardConstants, type DashboardSavedObject } from '../..';
+import { DashboardConstants } from '../..';
import {
setControlGroupState,
setExpandedPanelId,
@@ -36,16 +35,13 @@ import { pluginServices } from '../../services/plugin_services';
type SyncDashboardContainerCommon = DashboardBuildContext & {
dashboardContainer: DashboardContainer;
- savedDashboard: DashboardSavedObject;
};
type ApplyStateChangesToContainerProps = SyncDashboardContainerCommon & {
force: boolean;
};
-type ApplyContainerChangesToStateProps = SyncDashboardContainerCommon & {
- applyFilters: (query: Query, filters: Filter[]) => void;
-};
+type ApplyContainerChangesToStateProps = SyncDashboardContainerCommon;
type SyncDashboardContainerProps = SyncDashboardContainerCommon & ApplyContainerChangesToStateProps;
@@ -94,7 +90,6 @@ export const syncDashboardContainerInput = (
};
export const applyContainerChangesToState = ({
- applyFilters,
dashboardContainer,
getLatestDashboardState,
dispatchDashboardStateChange,
@@ -112,7 +107,6 @@ export const applyContainerChangesToState = ({
if (!compareFilters(input.filters, filterManager.getFilters(), COMPARE_ALL_OPTIONS)) {
// Add filters modifies the object passed to it, hence the clone deep.
filterManager.addFilters(_.cloneDeep(input.filters));
- applyFilters(latestState.query, input.filters);
}
if (!_.isEqual(input.panels, latestState.panels)) {
@@ -144,7 +138,6 @@ export const applyContainerChangesToState = ({
export const applyStateChangesToContainer = ({
force,
history,
- savedDashboard,
dashboardContainer,
kbnUrlStateStorage,
isEmbeddedExternally,
@@ -161,7 +154,6 @@ export const applyStateChangesToContainer = ({
const currentDashboardStateAsInput = stateToDashboardContainerInput({
dashboardState: latestState,
isEmbeddedExternally,
- savedDashboard,
});
const differences = diffDashboardContainerInput(
dashboardContainer.getInput(),
diff --git a/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts b/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts
index d02e674936aef..0bce899e22fcd 100644
--- a/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts
+++ b/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts
@@ -8,25 +8,22 @@
import _ from 'lodash';
import { merge } from 'rxjs';
-import { debounceTime, finalize, map, switchMap, tap } from 'rxjs/operators';
+import { finalize, map, switchMap, tap } from 'rxjs/operators';
import {
connectToQueryState,
GlobalQueryStateFromUrl,
- syncQueryStateWithUrl,
+ syncGlobalQueryStateWithUrl,
waitUntilNextSessionCompletes$,
} from '@kbn/data-plugin/public';
import type { Filter, Query } from '@kbn/es-query';
import { cleanFiltersForSerialize } from '.';
-import { setQuery } from '../state';
import type { DashboardBuildContext, DashboardState } from '../../types';
-import type { DashboardSavedObject } from '../../saved_dashboards';
import { setFiltersAndQuery } from '../state/dashboard_state_slice';
import { pluginServices } from '../../services/plugin_services';
type SyncDashboardFilterStateProps = DashboardBuildContext & {
initialDashboardState: DashboardState;
- savedDashboard: DashboardSavedObject;
};
/**
@@ -35,7 +32,6 @@ type SyncDashboardFilterStateProps = DashboardBuildContext & {
* and the dashboard Redux store.
*/
export const syncDashboardFilterState = ({
- savedDashboard,
kbnUrlStateStorage,
initialDashboardState,
$checkForUnsavedChanges,
@@ -46,25 +42,17 @@ export const syncDashboardFilterState = ({
const {
data: { query: queryService, search },
} = pluginServices.getServices();
- const { filterManager, queryString, timefilter } = queryService;
+ const { queryString, timefilter } = queryService;
const { timefilter: timefilterService } = timefilter;
// apply initial dashboard filter state.
applyDashboardFilterState({
currentDashboardState: initialDashboardState,
kbnUrlStateStorage,
- savedDashboard,
});
- // this callback will be used any time new filters and query need to be applied.
- const applyFilters = (query: Query, filters: Filter[]) => {
- savedDashboard.searchSource.setField('query', query);
- savedDashboard.searchSource.setField('filter', filters);
- dispatchDashboardStateChange(setQuery(query));
- };
-
// starts syncing `_g` portion of url with query services
- const { stop: stopSyncingQueryServiceStateWithUrl } = syncQueryStateWithUrl(
+ const { stop: stopSyncingQueryServiceStateWithUrl } = syncGlobalQueryStateWithUrl(
queryService,
kbnUrlStateStorage
);
@@ -81,7 +69,6 @@ export const syncDashboardFilterState = ({
set: ({ filters, query }) => {
intermediateFilterState.filters = cleanFiltersForSerialize(filters ?? []) || [];
intermediateFilterState.query = query || queryString.getDefaultQuery();
- applyFilters(intermediateFilterState.query, intermediateFilterState.filters);
dispatchDashboardStateChange(setFiltersAndQuery(intermediateFilterState));
},
state$: $onDashboardStateChange.pipe(
@@ -97,11 +84,6 @@ export const syncDashboardFilterState = ({
}
);
- // apply filters when the filter manager changes
- const filterManagerSubscription = merge(filterManager.getUpdates$(), queryString.getUpdates$())
- .pipe(debounceTime(100))
- .subscribe(() => applyFilters(queryString.getQuery() as Query, filterManager.getFilters()));
-
const timeRefreshSubscription = merge(
timefilterService.getRefreshIntervalUpdate$(),
timefilterService.getTimeUpdate$()
@@ -127,26 +109,23 @@ export const syncDashboardFilterState = ({
.subscribe();
const stopSyncingDashboardFilterState = () => {
- filterManagerSubscription.unsubscribe();
forceRefreshSubscription.unsubscribe();
timeRefreshSubscription.unsubscribe();
stopSyncingQueryServiceStateWithUrl();
stopSyncingAppFilters();
};
- return { applyFilters, stopSyncingDashboardFilterState };
+ return { stopSyncingDashboardFilterState };
};
interface ApplyDashboardFilterStateProps {
kbnUrlStateStorage: DashboardBuildContext['kbnUrlStateStorage'];
currentDashboardState: DashboardState;
- savedDashboard: DashboardSavedObject;
}
export const applyDashboardFilterState = ({
currentDashboardState,
kbnUrlStateStorage,
- savedDashboard,
}: ApplyDashboardFilterStateProps) => {
const {
data: {
@@ -155,13 +134,9 @@ export const applyDashboardFilterState = ({
} = pluginServices.getServices();
const { timefilter: timefilterService } = timefilter;
- // apply filters to the query service and to the saved dashboard
+ // apply filters and query to the query service
filterManager.setAppFilters(_.cloneDeep(currentDashboardState.filters));
- savedDashboard.searchSource.setField('filter', currentDashboardState.filters);
-
- // apply query to the query service and to the saved dashboard
queryString.setQuery(currentDashboardState.query);
- savedDashboard.searchSource.setField('query', currentDashboardState.query);
/**
* If a global time range is not set explicitly and the time range was saved with the dashboard, apply
@@ -169,18 +144,11 @@ export const applyDashboardFilterState = ({
*/
if (currentDashboardState.timeRestore) {
const globalQueryState = kbnUrlStateStorage.get('_g');
- if (!globalQueryState?.time) {
- if (savedDashboard.timeFrom && savedDashboard.timeTo) {
- timefilterService.setTime({
- from: savedDashboard.timeFrom,
- to: savedDashboard.timeTo,
- });
- }
+ if (!globalQueryState?.time && currentDashboardState.timeRange) {
+ timefilterService.setTime(currentDashboardState.timeRange);
}
- if (!globalQueryState?.refreshInterval) {
- if (savedDashboard.refreshInterval) {
- timefilterService.setRefreshInterval(savedDashboard.refreshInterval);
- }
+ if (!globalQueryState?.refreshInterval && currentDashboardState.refreshInterval) {
+ timefilterService.setRefreshInterval(currentDashboardState.refreshInterval);
}
}
};
diff --git a/src/plugins/dashboard/public/application/lib/sync_dashboard_url_state.ts b/src/plugins/dashboard/public/application/lib/sync_dashboard_url_state.ts
index 947e3f5d69de7..31101ae3679f0 100644
--- a/src/plugins/dashboard/public/application/lib/sync_dashboard_url_state.ts
+++ b/src/plugins/dashboard/public/application/lib/sync_dashboard_url_state.ts
@@ -8,41 +8,52 @@
import _ from 'lodash';
import { debounceTime } from 'rxjs/operators';
+import semverSatisfies from 'semver/functions/satisfies';
import { replaceUrlHashQuery } from '@kbn/kibana-utils-plugin/public';
-import { migrateAppState } from '.';
-import { DashboardSavedObject } from '../..';
+
import { setDashboardState } from '../state';
import { migrateLegacyQuery } from './migrate_legacy_query';
-import { applyDashboardFilterState } from './sync_dashboard_filter_state';
+import { pluginServices } from '../../services/plugin_services';
import { DASHBOARD_STATE_STORAGE_KEY } from '../../dashboard_constants';
-import type {
- DashboardBuildContext,
- DashboardPanelMap,
- DashboardState,
- RawDashboardState,
-} from '../../types';
-import { convertSavedPanelsToPanelMap } from './convert_dashboard_panels';
+import { applyDashboardFilterState } from './sync_dashboard_filter_state';
+import { dashboardSavedObjectErrorStrings } from '../../dashboard_strings';
+import { convertSavedPanelsToPanelMap, DashboardPanelMap } from '../../../common';
+import type { DashboardBuildContext, DashboardState, RawDashboardState } from '../../types';
-type SyncDashboardUrlStateProps = DashboardBuildContext & { savedDashboard: DashboardSavedObject };
+/**
+ * We no longer support loading panels from a version older than 7.3 in the URL.
+ * @returns whether or not there is a panel in the URL state saved with a version before 7.3
+ */
+export const isPanelVersionTooOld = (panels: RawDashboardState['panels']) => {
+ for (const panel of panels) {
+ if (!panel.version || semverSatisfies(panel.version, '<7.3')) return true;
+ }
+ return false;
+};
export const syncDashboardUrlState = ({
dispatchDashboardStateChange,
getLatestDashboardState,
kbnUrlStateStorage,
- savedDashboard,
-}: SyncDashboardUrlStateProps) => {
+}: DashboardBuildContext) => {
/**
* Loads any dashboard state from the URL, and removes the state from the URL.
*/
const loadAndRemoveDashboardState = (): Partial => {
+ const {
+ notifications: { toasts },
+ } = pluginServices.getServices();
const rawAppStateInUrl = kbnUrlStateStorage.get(DASHBOARD_STATE_STORAGE_KEY);
if (!rawAppStateInUrl) return {};
- let panelsMap: DashboardPanelMap = {};
+ let panelsMap: DashboardPanelMap | undefined;
if (rawAppStateInUrl.panels && rawAppStateInUrl.panels.length > 0) {
- const rawState = migrateAppState(rawAppStateInUrl);
- panelsMap = convertSavedPanelsToPanelMap(rawState.panels);
+ if (isPanelVersionTooOld(rawAppStateInUrl.panels)) {
+ toasts.addWarning(dashboardSavedObjectErrorStrings.getPanelTooOldError());
+ } else {
+ panelsMap = convertSavedPanelsToPanelMap(rawAppStateInUrl.panels);
+ }
}
const migratedQuery = rawAppStateInUrl.query
@@ -58,7 +69,7 @@ export const syncDashboardUrlState = ({
return {
..._.omit(rawAppStateInUrl, ['panels', 'query']),
...(migratedQuery ? { query: migratedQuery } : {}),
- ...(rawAppStateInUrl.panels ? { panels: panelsMap } : {}),
+ ...(panelsMap ? { panels: panelsMap } : {}),
};
};
@@ -75,7 +86,6 @@ export const syncDashboardUrlState = ({
applyDashboardFilterState({
currentDashboardState: updatedDashboardState,
kbnUrlStateStorage,
- savedDashboard,
});
if (Object.keys(stateFromUrl).length === 0) return;
diff --git a/src/plugins/dashboard/public/application/lib/url.test.ts b/src/plugins/dashboard/public/application/lib/url.test.ts
deleted file mode 100644
index fc7e51b8c2e3e..0000000000000
--- a/src/plugins/dashboard/public/application/lib/url.test.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import { getDashboardIdFromUrl } from './url';
-
-test('getDashboardIdFromUrl', () => {
- let url =
- "http://localhost:5601/wev/app/dashboards#/create?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:'',filters:!()";
- expect(getDashboardIdFromUrl(url)).toEqual(undefined);
-
- url =
- "http://localhost:5601/wev/app/dashboards#/view/625357282?_a=(description:'',filters:!()&_g=(refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))";
- expect(getDashboardIdFromUrl(url)).toEqual('625357282');
-
- url = 'http://myserver.mydomain.com:5601/wev/app/dashboards#/view/777182';
- expect(getDashboardIdFromUrl(url)).toEqual('777182');
-
- url =
- "http://localhost:5601/app/dashboards#/create?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:'',filters:!()";
- expect(getDashboardIdFromUrl(url)).toEqual(undefined);
-
- url = '/view/test/?_g=(refreshInterval:';
- expect(getDashboardIdFromUrl(url)).toEqual('test');
-
- url = 'view/test/?_g=(refreshInterval:';
- expect(getDashboardIdFromUrl(url)).toEqual('test');
-
- url = '/other-app/test/';
- expect(getDashboardIdFromUrl(url)).toEqual(undefined);
-});
diff --git a/src/plugins/dashboard/public/application/lib/url.ts b/src/plugins/dashboard/public/application/lib/url.ts
deleted file mode 100644
index 0ff2809a92667..0000000000000
--- a/src/plugins/dashboard/public/application/lib/url.ts
+++ /dev/null
@@ -1,24 +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.
- */
-
-/**
- * Returns dashboard id from URL
- * literally looks from id after `dashboard/` string and before `/`, `?` and end of string
- * @param url to extract dashboardId from
- * input: http://localhost:5601/lib/app/kibana#/dashboard?param1=x¶m2=y¶m3=z
- * output: undefined
- * input: http://localhost:5601/lib/app/kibana#/dashboard/39292992?param1=x¶m2=y¶m3=z
- * output: 39292992
- */
-export function getDashboardIdFromUrl(url: string): string | undefined {
- const [, dashboardId] = url.match(/view\/(.*?)(\/|\?|$)/) ?? [
- undefined, // full match
- undefined, // group with dashboardId
- ];
- return dashboardId ?? undefined;
-}
diff --git a/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx b/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx
index 5712b4c6ee2f8..4a77249aeb39c 100644
--- a/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx
+++ b/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx
@@ -9,19 +9,15 @@
import React from 'react';
import { mount } from 'enzyme';
-import { I18nProvider, FormattedRelative } from '@kbn/i18n-react';
-import { SimpleSavedObject } from '@kbn/core/public';
-import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
-import { createKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public';
import {
TableListViewKibanaDependencies,
TableListViewKibanaProvider,
} from '@kbn/content-management-table-list';
+import { I18nProvider, FormattedRelative } from '@kbn/i18n-react';
+import { createKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public';
-import { DashboardAppServices } from '../../types';
-import { DashboardListing, DashboardListingProps } from './dashboard_listing';
-import { makeDefaultServices } from '../test_helpers';
import { pluginServices } from '../../services/plugin_services';
+import { DashboardListing, DashboardListingProps } from './dashboard_listing';
import { DASHBOARD_PANELS_UNSAVED_ID } from '../../services/dashboard_session_storage/dashboard_session_storage_service';
function makeDefaultProps(): DashboardListingProps {
@@ -31,14 +27,7 @@ function makeDefaultProps(): DashboardListingProps {
};
}
-function mountWith({
- props: incomingProps,
- services: incomingServices,
-}: {
- props?: DashboardListingProps;
- services?: DashboardAppServices;
-}) {
- const services = incomingServices ?? makeDefaultServices();
+function mountWith({ props: incomingProps }: { props?: DashboardListingProps }) {
const props = incomingProps ?? makeDefaultProps();
const wrappingComponent: React.FC<{
children: React.ReactNode;
@@ -47,35 +36,32 @@ function mountWith({
return (
- {/* Can't get rid of KibanaContextProvider here yet because of 'call to action when no dashboards exist' tests below */}
-
- null,
- },
+ null,
},
- } as unknown as TableListViewKibanaDependencies['savedObjectsTagging']
- }
- FormattedRelative={FormattedRelative}
- toMountPoint={() => () => () => undefined}
- >
- {children}
-
-
+ },
+ } as unknown as TableListViewKibanaDependencies['savedObjectsTagging']
+ }
+ FormattedRelative={FormattedRelative}
+ toMountPoint={() => () => () => undefined}
+ >
+ {children}
+
);
};
const component = mount( , { wrappingComponent });
- return { component, props, services };
+ return { component, props };
}
describe('after fetch', () => {
@@ -89,14 +75,14 @@ describe('after fetch', () => {
});
test('renders call to action when no dashboards exist', async () => {
- const services = makeDefaultServices();
- services.savedDashboards.find = () => {
- return Promise.resolve({
- total: 0,
- hits: [],
- });
- };
- const { component } = mountWith({ services });
+ (
+ pluginServices.getServices().dashboardSavedObject.findDashboards.findSavedObjects as jest.Mock
+ ).mockResolvedValue({
+ total: 0,
+ hits: [],
+ });
+
+ const { component } = mountWith({});
// Ensure all promises resolve
await new Promise((resolve) => process.nextTick(resolve));
// Ensure the state changes are reflected
@@ -105,18 +91,18 @@ describe('after fetch', () => {
});
test('renders call to action with continue when no dashboards exist but one is in progress', async () => {
- const services = makeDefaultServices();
- services.savedDashboards.find = () => {
- return Promise.resolve({
- total: 0,
- hits: [],
- });
- };
pluginServices.getServices().dashboardSessionStorage.getDashboardIdsWithUnsavedChanges = jest
.fn()
.mockReturnValueOnce([DASHBOARD_PANELS_UNSAVED_ID])
.mockReturnValue(['dashboardUnsavedOne', 'dashboardUnsavedTwo']);
- const { component } = mountWith({ services });
+ (
+ pluginServices.getServices().dashboardSavedObject.findDashboards.findSavedObjects as jest.Mock
+ ).mockResolvedValue({
+ total: 0,
+ hits: [],
+ });
+
+ const { component } = mountWith({});
// Ensure all promises resolve
await new Promise((resolve) => process.nextTick(resolve));
// Ensure the state changes are reflected
@@ -139,17 +125,9 @@ describe('after fetch', () => {
const title = 'search by title';
const props = makeDefaultProps();
props.title = title;
- pluginServices.getServices().savedObjects.client.find = () => {
- return Promise.resolve({
- perPage: 10,
- total: 2,
- page: 0,
- savedObjects: [
- { attributes: { title: `${title}_number1` }, id: 'hello there' } as SimpleSavedObject,
- { attributes: { title: `${title}_number2` }, id: 'goodbye' } as SimpleSavedObject,
- ],
- });
- };
+ (
+ pluginServices.getServices().dashboardSavedObject.findDashboards.findByTitle as jest.Mock
+ ).mockResolvedValue(undefined);
const { component } = mountWith({ props });
// Ensure all promises resolve
await new Promise((resolve) => process.nextTick(resolve));
@@ -163,14 +141,9 @@ describe('after fetch', () => {
const title = 'search by title';
const props = makeDefaultProps();
props.title = title;
- pluginServices.getServices().savedObjects.client.find = () => {
- return Promise.resolve({
- perPage: 10,
- total: 1,
- page: 0,
- savedObjects: [{ attributes: { title }, id: 'you_found_me' } as SimpleSavedObject],
- });
- };
+ (
+ pluginServices.getServices().dashboardSavedObject.findDashboards.findByTitle as jest.Mock
+ ).mockResolvedValue({ id: 'you_found_me' });
const { component } = mountWith({ props });
// Ensure all promises resolve
await new Promise((resolve) => process.nextTick(resolve));
diff --git a/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx b/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx
index 40753c556a56a..1e78b94303478 100644
--- a/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx
+++ b/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx
@@ -6,7 +6,10 @@
* Side Public License, v 1.
*/
+import useMount from 'react-use/lib/useMount';
import { FormattedMessage } from '@kbn/i18n-react';
+import React, { useCallback, useEffect, useMemo, useState } from 'react';
+
import {
EuiLink,
EuiButton,
@@ -15,30 +18,29 @@ import {
EuiFlexItem,
EuiButtonEmpty,
} from '@elastic/eui';
-import React, { useCallback, useEffect, useMemo, useState } from 'react';
-import type { SavedObjectsFindOptionsReference } from '@kbn/core/public';
-import useMount from 'react-use/lib/useMount';
-import type { SavedObjectReference } from '@kbn/core/types';
-import { useExecutionContext, useKibana } from '@kbn/kibana-react-plugin/public';
+import { useExecutionContext } from '@kbn/kibana-react-plugin/public';
import { syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public';
+import type { SavedObjectsFindOptionsReference, SimpleSavedObject } from '@kbn/core/public';
import type { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public';
import { TableListView, type UserContentCommonSchema } from '@kbn/content-management-table-list';
-import { attemptLoadDashboardByTitle } from '../lib';
-import { DashboardAppServices, DashboardRedirect } from '../../types';
import {
getDashboardBreadcrumb,
- dashboardListingTable,
+ dashboardListingTableStrings,
noItemsStrings,
dashboardUnsavedListingStrings,
getNewDashboardTitle,
+ dashboardSavedObjectErrorStrings,
} from '../../dashboard_strings';
+import { DashboardConstants } from '../..';
+import { DashboardRedirect } from '../../types';
+import { pluginServices } from '../../services/plugin_services';
import { DashboardUnsavedListing } from './dashboard_unsaved_listing';
-import { confirmCreateWithUnsaved, confirmDiscardUnsavedChanges } from './confirm_overlays';
import { getDashboardListItemLink } from './get_dashboard_list_item_link';
+import { confirmCreateWithUnsaved, confirmDiscardUnsavedChanges } from './confirm_overlays';
import { DashboardAppNoDataPage, isDashboardAppInNoDataState } from '../dashboard_app_no_data';
-import { pluginServices } from '../../services/plugin_services';
import { DASHBOARD_PANELS_UNSAVED_ID } from '../../services/dashboard_session_storage/dashboard_session_storage_service';
+import { DashboardAttributes } from '../embeddable';
const SAVED_OBJECTS_LIMIT_SETTING = 'savedObjects:listingLimit';
const SAVED_OBJECTS_PER_PAGE_SETTING = 'savedObjects:perPage';
@@ -52,17 +54,18 @@ interface DashboardSavedObjectUserContent extends UserContentCommonSchema {
}
const toTableListViewSavedObject = (
- savedObject: Record
+ savedObject: SimpleSavedObject
): DashboardSavedObjectUserContent => {
+ const { title, description, timeRestore } = savedObject.attributes;
return {
- id: savedObject.id as string,
- updatedAt: savedObject.updatedAt! as string,
- references: savedObject.references as SavedObjectReference[],
type: 'dashboard',
+ id: savedObject.id,
+ updatedAt: savedObject.updatedAt!,
+ references: savedObject.references,
attributes: {
- title: (savedObject.title as string) ?? '',
- description: savedObject.description as string,
- timeRestore: savedObject.timeRestore as boolean,
+ title,
+ description,
+ timeRestore,
},
};
};
@@ -80,19 +83,16 @@ export const DashboardListing = ({
initialFilter,
kbnUrlStateStorage,
}: DashboardListingProps) => {
- const {
- services: { savedDashboards },
- } = useKibana();
-
const {
application,
+ data: { query },
+ dashboardSessionStorage,
+ settings: { uiSettings },
+ notifications: { toasts },
chrome: { setBreadcrumbs },
coreContext: { executionContext },
dashboardCapabilities: { showWriteControls },
- dashboardSessionStorage,
- data: { query },
- savedObjects: { client },
- settings: { uiSettings },
+ dashboardSavedObject: { findDashboards, savedObjectsClient },
} = pluginServices.getServices();
const [showNoDataPage, setShowNoDataPage] = useState(false);
@@ -125,7 +125,7 @@ export const DashboardListing = ({
kbnUrlStateStorage
);
if (title) {
- attemptLoadDashboardByTitle(title).then((result) => {
+ findDashboards.findByTitle(title).then((result) => {
if (!result) return;
redirectTo({
destination: 'dashboard',
@@ -138,7 +138,7 @@ export const DashboardListing = ({
return () => {
stopSyncingQueryServiceStateWithUrl();
};
- }, [title, client, redirectTo, query, kbnUrlStateStorage]);
+ }, [title, redirectTo, query, kbnUrlStateStorage, findDashboards]);
const listingLimit = uiSettings.get(SAVED_OBJECTS_LIMIT_SETTING);
const initialPageSize = uiSettings.get(SAVED_OBJECTS_PER_PAGE_SETTING);
@@ -262,10 +262,11 @@ export const DashboardListing = ({
const fetchItems = useCallback(
(searchTerm: string, references?: SavedObjectsFindOptionsReference[]) => {
- return savedDashboards
- .find(searchTerm, {
- hasReference: references,
+ return findDashboards
+ .findSavedObjects({
+ search: searchTerm,
size: listingLimit,
+ hasReference: references,
})
.then(({ total, hits }) => {
return {
@@ -274,16 +275,24 @@ export const DashboardListing = ({
};
});
},
- [listingLimit, savedDashboards]
+ [findDashboards, listingLimit]
);
const deleteItems = useCallback(
- (dashboards: Array<{ id: string }>) => {
- dashboards.map((d) => dashboardSessionStorage.clearState(d.id));
+ async (dashboardsToDelete: Array<{ id: string }>) => {
+ await Promise.all(
+ dashboardsToDelete.map(({ id }) => {
+ dashboardSessionStorage.clearState(id);
+ return savedObjectsClient.delete(DashboardConstants.DASHBOARD_SAVED_OBJECT_TYPE, id);
+ })
+ ).catch((error) => {
+ toasts.addError(error, {
+ title: dashboardSavedObjectErrorStrings.getErrorDeletingDashboardToast(),
+ });
+ });
setUnsavedDashboardIds(dashboardSessionStorage.getDashboardIdsWithUnsavedChanges());
- return savedDashboards.delete(dashboards.map((d) => d.id));
},
- [savedDashboards, dashboardSessionStorage]
+ [savedObjectsClient, dashboardSessionStorage, toasts]
);
const editItem = useCallback(
@@ -292,7 +301,7 @@ export const DashboardListing = ({
[redirectTo]
);
- const { getEntityName, getTableListTitle, getEntityNamePlural } = dashboardListingTable;
+ const { getEntityName, getTableListTitle, getEntityNamePlural } = dashboardListingTableStrings;
return (
<>
{showNoDataPage && (
diff --git a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx
index 1feec9bbdc42f..34a78c5181b92 100644
--- a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx
+++ b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx
@@ -11,87 +11,46 @@ import { mount } from 'enzyme';
import { I18nProvider } from '@kbn/i18n-react';
import { waitFor } from '@testing-library/react';
import { findTestSubject } from '@elastic/eui/lib/test';
-import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
-import { DashboardSavedObject } from '../..';
-import { DashboardAppServices } from '../../types';
-import { makeDefaultServices } from '../test_helpers';
-import { SavedObjectLoader } from '../../services/saved_object_loader';
import { DashboardUnsavedListing, DashboardUnsavedListingProps } from './dashboard_unsaved_listing';
import { DASHBOARD_PANELS_UNSAVED_ID } from '../../services/dashboard_session_storage/dashboard_session_storage_service';
import { pluginServices } from '../../services/plugin_services';
-const mockedDashboards: { [key: string]: DashboardSavedObject } = {
- dashboardUnsavedOne: {
- id: `dashboardUnsavedOne`,
- title: `Dashboard Unsaved One`,
- } as DashboardSavedObject,
- dashboardUnsavedTwo: {
- id: `dashboardUnsavedTwo`,
- title: `Dashboard Unsaved Two`,
- } as DashboardSavedObject,
- dashboardUnsavedThree: {
- id: `dashboardUnsavedThree`,
- title: `Dashboard Unsaved Three`,
- } as DashboardSavedObject,
-};
-
-function makeServices(): DashboardAppServices {
- const services = makeDefaultServices();
- const savedDashboards = {} as SavedObjectLoader;
- savedDashboards.get = jest
- .fn()
- .mockImplementation((id: string) => Promise.resolve(mockedDashboards[id]));
- return {
- ...services,
- savedDashboards,
- };
-}
-
const makeDefaultProps = (): DashboardUnsavedListingProps => ({
redirectTo: jest.fn(),
unsavedDashboardIds: ['dashboardUnsavedOne', 'dashboardUnsavedTwo', 'dashboardUnsavedThree'],
refreshUnsavedDashboards: jest.fn(),
});
-function mountWith({
- services: incomingServices,
- props: incomingProps,
-}: {
- services?: DashboardAppServices;
- props?: DashboardUnsavedListingProps;
-}) {
- const services = incomingServices ?? makeServices();
+function mountWith({ props: incomingProps }: { props?: DashboardUnsavedListingProps }) {
const props = incomingProps ?? makeDefaultProps();
const wrappingComponent: React.FC<{
children: React.ReactNode;
}> = ({ children }) => {
- return (
-
- {/* Only the old savedObjects service is used for `DashboardUnsavedListing`, so will need to wrap this in
- `DashboardServicesProvider` instead once that is removed as part of https://github.com/elastic/kibana/pull/138774*/}
- {children}
-
- );
+ return {children} ;
};
const component = mount( , { wrappingComponent });
- return { component, props, services };
+ return { component, props };
}
describe('Unsaved listing', () => {
it('Gets information for each unsaved dashboard', async () => {
- const { services } = mountWith({});
+ mountWith({});
await waitFor(() => {
- expect(services.savedDashboards.get).toHaveBeenCalledTimes(3);
+ expect(
+ pluginServices.getServices().dashboardSavedObject.findDashboards.findByIds
+ ).toHaveBeenCalledTimes(1);
});
});
- it('Does not attempt to get unsaved dashboard id', async () => {
+ it('Does not attempt to get newly created dashboard', async () => {
const props = makeDefaultProps();
props.unsavedDashboardIds = ['dashboardUnsavedOne', DASHBOARD_PANELS_UNSAVED_ID];
- const { services } = mountWith({ props });
+ mountWith({ props });
await waitFor(() => {
- expect(services.savedDashboards.get).toHaveBeenCalledTimes(1);
+ expect(
+ pluginServices.getServices().dashboardSavedObject.findDashboards.findByIds
+ ).toHaveBeenCalledWith(['dashboardUnsavedOne']);
});
});
@@ -146,14 +105,22 @@ describe('Unsaved listing', () => {
});
it('removes unsaved changes from any dashboard which errors on fetch', async () => {
- const services = makeServices();
+ (
+ pluginServices.getServices().dashboardSavedObject.findDashboards.findByIds as jest.Mock
+ ).mockResolvedValue([
+ {
+ id: 'failCase1',
+ status: 'error',
+ error: { error: 'oh no', message: 'bwah', statusCode: 100 },
+ },
+ {
+ id: 'failCase2',
+ status: 'error',
+ error: { error: 'oh no', message: 'bwah', statusCode: 100 },
+ },
+ ]);
+
const props = makeDefaultProps();
- services.savedDashboards.get = jest.fn().mockImplementation((id: string) => {
- if (id === 'failCase1' || id === 'failCase2') {
- return Promise.reject(new Error());
- }
- return Promise.resolve(mockedDashboards[id]);
- });
props.unsavedDashboardIds = [
'dashboardUnsavedOne',
@@ -162,7 +129,7 @@ describe('Unsaved listing', () => {
'failCase1',
'failCase2',
];
- const { component } = mountWith({ services, props });
+ const { component } = mountWith({ props });
waitFor(() => {
component.update();
expect(pluginServices.getServices().dashboardSessionStorage.clearState).toHaveBeenCalledWith(
diff --git a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx
index a5c5b1b224a32..3aa862fe30264 100644
--- a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx
+++ b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx
@@ -6,8 +6,6 @@
* Side Public License, v 1.
*/
-import React, { useCallback, useEffect, useState } from 'react';
-
import {
EuiButtonEmpty,
EuiCallOut,
@@ -17,14 +15,14 @@ import {
EuiSpacer,
EuiTitle,
} from '@elastic/eui';
-import { useKibana } from '@kbn/kibana-react-plugin/public';
+import React, { useCallback, useEffect, useState } from 'react';
-import type { DashboardSavedObject } from '../..';
-import { dashboardUnsavedListingStrings, getNewDashboardTitle } from '../../dashboard_strings';
-import type { DashboardAppServices, DashboardRedirect } from '../../types';
-import { confirmDiscardUnsavedChanges } from './confirm_overlays';
+import type { DashboardRedirect } from '../../types';
import { pluginServices } from '../../services/plugin_services';
+import { confirmDiscardUnsavedChanges } from './confirm_overlays';
+import { dashboardUnsavedListingStrings, getNewDashboardTitle } from '../../dashboard_strings';
import { DASHBOARD_PANELS_UNSAVED_ID } from '../../services/dashboard_session_storage/dashboard_session_storage_service';
+import { DashboardAttributes } from '../embeddable';
const DashboardUnsavedItem = ({
id,
@@ -102,7 +100,7 @@ const DashboardUnsavedItem = ({
};
interface UnsavedItemMap {
- [key: string]: DashboardSavedObject;
+ [key: string]: DashboardAttributes;
}
export interface DashboardUnsavedListingProps {
@@ -117,10 +115,9 @@ export const DashboardUnsavedListing = ({
refreshUnsavedDashboards,
}: DashboardUnsavedListingProps) => {
const {
- services: { savedDashboards },
- } = useKibana();
-
- const { dashboardSessionStorage } = pluginServices.getServices();
+ dashboardSessionStorage,
+ dashboardSavedObject: { savedObjectsClient, findDashboards },
+ } = pluginServices.getServices();
const [items, setItems] = useState({});
@@ -146,28 +143,24 @@ export const DashboardUnsavedListing = ({
return;
}
let canceled = false;
- const dashPromises = unsavedDashboardIds
- .filter((id) => id !== DASHBOARD_PANELS_UNSAVED_ID)
- .map((dashboardId) => {
- return (savedDashboards.get(dashboardId) as Promise).catch(
- () => dashboardId
- );
- });
- Promise.all(dashPromises).then((dashboards: Array) => {
+ const existingDashboardsWithUnsavedChanges = unsavedDashboardIds.filter(
+ (id) => id !== DASHBOARD_PANELS_UNSAVED_ID
+ );
+ findDashboards.findByIds(existingDashboardsWithUnsavedChanges).then((results) => {
const dashboardMap = {};
if (canceled) {
return;
}
let hasError = false;
- const newItems = dashboards.reduce((map, dashboard) => {
- if (typeof dashboard === 'string') {
+ const newItems = results.reduce((map, result) => {
+ if (result.status === 'error') {
hasError = true;
- dashboardSessionStorage.clearState(dashboard);
+ dashboardSessionStorage.clearState(result.id);
return map;
}
return {
...map,
- [dashboard.id || DASHBOARD_PANELS_UNSAVED_ID]: dashboard,
+ [result.id || DASHBOARD_PANELS_UNSAVED_ID]: result.attributes,
};
}, dashboardMap);
if (hasError) {
@@ -179,7 +172,13 @@ export const DashboardUnsavedListing = ({
return () => {
canceled = true;
};
- }, [savedDashboards, dashboardSessionStorage, refreshUnsavedDashboards, unsavedDashboardIds]);
+ }, [
+ refreshUnsavedDashboards,
+ dashboardSessionStorage,
+ unsavedDashboardIds,
+ savedObjectsClient,
+ findDashboards,
+ ]);
return unsavedDashboardIds.length === 0 ? null : (
<>
diff --git a/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts b/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts
index f28d095c9b9b4..669bde5c3eb65 100644
--- a/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts
+++ b/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts
@@ -7,11 +7,14 @@
*/
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
-import { PersistableControlGroupInput } from '@kbn/controls-plugin/common';
-import { ViewMode } from '@kbn/embeddable-plugin/public';
+import { ViewMode } from '@kbn/embeddable-plugin/public';
+import { RefreshInterval } from '@kbn/data-plugin/common';
import type { Filter, Query, TimeRange } from '@kbn/es-query';
-import type { DashboardOptions, DashboardPanelMap, DashboardState } from '../../types';
+import { PersistableControlGroupInput } from '@kbn/controls-plugin/common';
+
+import { DashboardPanelMap } from '../../../common';
+import type { DashboardOptions, DashboardState } from '../../types';
export const dashboardStateSlice = createSlice({
name: 'dashboardState',
@@ -33,11 +36,15 @@ export const dashboardStateSlice = createSlice({
description: string;
tags?: string[];
timeRestore: boolean;
+ timeRange?: TimeRange;
+ refreshInterval?: RefreshInterval;
}>
) => {
state.title = action.payload.title;
state.description = action.payload.description;
state.timeRestore = action.payload.timeRestore;
+ state.timeRange = action.payload.timeRange;
+ state.refreshInterval = action.payload.refreshInterval;
if (action.payload.tags) {
state.tags = action.payload.tags;
}
diff --git a/src/plugins/dashboard/public/application/test_helpers/get_saved_dashboard_mock.ts b/src/plugins/dashboard/public/application/test_helpers/get_saved_dashboard_mock.ts
deleted file mode 100644
index 69da1dbbe56a2..0000000000000
--- a/src/plugins/dashboard/public/application/test_helpers/get_saved_dashboard_mock.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import { dataPluginMock } from '@kbn/data-plugin/public/mocks';
-import { DashboardSavedObject } from '../../saved_dashboards';
-
-export function getSavedDashboardMock(
- config?: Partial
-): DashboardSavedObject {
- const searchSource = dataPluginMock.createStartContract();
-
- return {
- id: '123',
- title: 'my dashboard',
- panelsJSON: '[]',
- searchSource: searchSource.search.searchSource.create(),
- copyOnSave: false,
- timeRestore: false,
- timeTo: 'now',
- timeFrom: 'now-15m',
- optionsJSON: '',
- lastSavedTitle: '',
- destroy: () => {},
- save: () => {
- return Promise.resolve('123');
- },
- getQuery: () => ({ query: '', language: 'kuery' }),
- getFilters: () => [],
- ...config,
- } as DashboardSavedObject;
-}
diff --git a/src/plugins/dashboard/public/application/test_helpers/index.ts b/src/plugins/dashboard/public/application/test_helpers/index.ts
index 7c8ae86074a46..c4d149e8c10b2 100644
--- a/src/plugins/dashboard/public/application/test_helpers/index.ts
+++ b/src/plugins/dashboard/public/application/test_helpers/index.ts
@@ -7,6 +7,4 @@
*/
export { getSampleDashboardInput, getSampleDashboardPanel } from './get_sample_dashboard_input';
-export { getSavedDashboardMock } from './get_saved_dashboard_mock';
-export { makeDefaultServices } from './make_default_services';
export { setupIntersectionObserverMock } from './intersection_observer_mock';
diff --git a/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts b/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts
deleted file mode 100644
index 3ffe9dc3b70e9..0000000000000
--- a/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts
+++ /dev/null
@@ -1,48 +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 {
- SavedObjectLoader,
- type SavedObjectLoaderFindOptions,
-} from '../../services/saved_object_loader';
-import { DashboardAppServices } from '../../types';
-import { getSavedDashboardMock } from './get_saved_dashboard_mock';
-
-// TODO: Remove as part of https://github.com/elastic/kibana/pull/138774
-export function makeDefaultServices(): DashboardAppServices {
- const savedDashboards = {} as SavedObjectLoader;
- savedDashboards.find = (search: string, sizeOrOptions: number | SavedObjectLoaderFindOptions) => {
- const size = typeof sizeOrOptions === 'number' ? sizeOrOptions : sizeOrOptions.size ?? 10;
- const hits = [];
- for (let i = 0; i < size; i++) {
- hits.push({
- id: `dashboard${i}`,
- title: `dashboard${i} - ${search} - title`,
- description: `dashboard${i} desc`,
- references: [],
- timeRestore: true,
- type: '',
- url: '',
- updatedAt: '',
- panelsJSON: '',
- lastSavedTitle: '',
- });
- }
- return Promise.resolve({
- total: size,
- hits,
- });
- };
- savedDashboards.get = jest
- .fn()
- .mockImplementation((id?: string) => Promise.resolve(getSavedDashboardMock({ id })));
-
- return {
- savedDashboards,
- };
-}
diff --git a/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx b/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx
index 86fd56c2ec6a0..97630c48dc784 100644
--- a/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx
+++ b/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx
@@ -6,46 +6,32 @@
* Side Public License, v 1.
*/
-import { METRIC_TYPE } from '@kbn/analytics';
-import { Required } from '@kbn/utility-types';
-import { EuiHorizontalRule } from '@elastic/eui';
import UseUnmount from 'react-use/lib/useUnmount';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
-import type { OverlayRef } from '@kbn/core/public';
-import type { TopNavMenuProps } from '@kbn/navigation-plugin/public';
-import type { BaseVisType, VisTypeAlias } from '@kbn/visualizations-plugin/public';
import {
- AddFromLibraryButton,
+ withSuspense,
LazyLabsFlyout,
- PrimaryActionButton,
+ SolutionToolbar,
QuickButtonGroup,
QuickButtonProps,
- SolutionToolbar,
- withSuspense,
+ PrimaryActionButton,
+ AddFromLibraryButton,
} from '@kbn/presentation-util-plugin/public';
-import type { SavedQuery } from '@kbn/data-plugin/common';
-import { isErrorEmbeddable, openAddPanelFlyout, ViewMode } from '@kbn/embeddable-plugin/public';
import {
- getSavedObjectFinder,
- type SaveResult,
showSaveModal,
+ type SaveResult,
+ getSavedObjectFinder,
} from '@kbn/saved-objects-plugin/public';
+import { METRIC_TYPE } from '@kbn/analytics';
+import { Required } from '@kbn/utility-types';
+import { EuiHorizontalRule } from '@elastic/eui';
+import type { OverlayRef } from '@kbn/core/public';
+import type { SavedQuery } from '@kbn/data-plugin/common';
+import type { TopNavMenuProps } from '@kbn/navigation-plugin/public';
+import type { BaseVisType, VisTypeAlias } from '@kbn/visualizations-plugin/public';
+import { isErrorEmbeddable, openAddPanelFlyout, ViewMode } from '@kbn/embeddable-plugin/public';
-import { saveDashboard } from '../lib';
-import { TopNavIds } from './top_nav_ids';
-import { EditorMenu } from './editor_menu';
-import { UI_SETTINGS } from '../../../common';
-import { DashboardSaveModal } from './save_modal';
-import { showCloneModal } from './show_clone_modal';
-import { ShowShareModal } from './show_share_modal';
-import { getTopNavConfig } from './get_top_nav_config';
-import { showOptionsPopover } from './show_options_popover';
-import { DashboardConstants } from '../../dashboard_constants';
-import { confirmDiscardUnsavedChanges } from '../listing/confirm_overlays';
-import type { DashboardAppState, DashboardSaveOptions, NavAction } from '../../types';
-import type { DashboardEmbedSettings, DashboardRedirect } from '../../types';
-import { getCreateVisualizationButtonTitle, unsavedChangesBadge } from '../../dashboard_strings';
import {
setFullScreenMode,
setHidePanelTitles,
@@ -58,8 +44,21 @@ import {
useDashboardDispatch,
useDashboardSelector,
} from '../state';
+import { TopNavIds } from './top_nav_ids';
+import { EditorMenu } from './editor_menu';
+import { UI_SETTINGS } from '../../../common';
+import { DashboardSaveModal } from './save_modal';
+import { showCloneModal } from './show_clone_modal';
+import { ShowShareModal } from './show_share_modal';
+import { getTopNavConfig } from './get_top_nav_config';
+import { showOptionsPopover } from './show_options_popover';
import { pluginServices } from '../../services/plugin_services';
+import { DashboardEmbedSettings, DashboardRedirect, DashboardState } from '../../types';
+import { confirmDiscardUnsavedChanges } from '../listing/confirm_overlays';
import { useDashboardMountContext } from '../hooks/dashboard_mount_context';
+import { DashboardConstants, getFullEditPath } from '../../dashboard_constants';
+import { DashboardAppState, DashboardSaveOptions, NavAction } from '../../types';
+import { getCreateVisualizationButtonTitle, unsavedChangesBadge } from '../../dashboard_strings';
export interface DashboardTopNavState {
chromeIsVisible: boolean;
@@ -70,18 +69,13 @@ export interface DashboardTopNavState {
type CompleteDashboardAppState = Required<
DashboardAppState,
- 'getLatestDashboardState' | 'dashboardContainer' | 'savedDashboard' | 'applyFilters'
+ 'getLatestDashboardState' | 'dashboardContainer'
>;
export const isCompleteDashboardAppState = (
state: DashboardAppState
): state is CompleteDashboardAppState => {
- return (
- Boolean(state.getLatestDashboardState) &&
- Boolean(state.dashboardContainer) &&
- Boolean(state.savedDashboard) &&
- Boolean(state.applyFilters)
- );
+ return Boolean(state.getLatestDashboardState) && Boolean(state.dashboardContainer);
};
export interface DashboardTopNavProps {
@@ -101,24 +95,28 @@ export function DashboardTopNav({
}: DashboardTopNavProps) {
const { setHeaderActionMenu } = useDashboardMountContext();
const {
+ dashboardSavedObject: {
+ checkForDuplicateDashboardTitle,
+ saveDashboardStateToSavedObject,
+ savedObjectsClient,
+ },
chrome: {
getIsVisible$: getChromeIsVisible$,
recentlyAccessed: chromeRecentlyAccessed,
docTitle,
},
coreContext: { i18nContext },
- dashboardCapabilities,
+ share,
+ overlays,
+ notifications,
+ usageCollection,
data: { query, search },
- embeddable: { getEmbeddableFactory, getEmbeddableFactories, getStateTransfer },
- initializerContext: { allowByValueEmbeddables },
navigation: { TopNavMenu },
- notifications,
- overlays,
- savedObjects,
- savedObjectsTagging: { hasTagDecoration, hasApi },
settings: { uiSettings, theme },
- share,
- usageCollection,
+ initializerContext: { allowByValueEmbeddables },
+ dashboardCapabilities: { showWriteControls, saveQuery: showSaveQuery },
+ savedObjectsTagging: { hasApi: hasSavedObjectsTagging },
+ embeddable: { getEmbeddableFactory, getEmbeddableFactories, getStateTransfer },
visualizations: { get: getVisualization, getAliases: getVisTypeAliases },
} = pluginServices.getServices();
@@ -144,24 +142,18 @@ export function DashboardTopNav({
const visibleSubscription = getChromeIsVisible$().subscribe((chromeIsVisible) => {
setState((s) => ({ ...s, chromeIsVisible }));
});
- const { id, title, getFullEditPath } = dashboardAppState.savedDashboard;
- if (id && title) {
+ const { savedObjectId, title, viewMode } = dashboardState;
+ if (savedObjectId && title) {
chromeRecentlyAccessed.add(
- getFullEditPath(dashboardState.viewMode === ViewMode.EDIT),
+ getFullEditPath(savedObjectId, viewMode === ViewMode.EDIT),
title,
- id
+ savedObjectId
);
}
return () => {
visibleSubscription.unsubscribe();
};
- }, [
- getChromeIsVisible$,
- chromeRecentlyAccessed,
- allowByValueEmbeddables,
- dashboardState.viewMode,
- dashboardAppState.savedDashboard,
- ]);
+ }, [allowByValueEmbeddables, chromeRecentlyAccessed, dashboardState, getChromeIsVisible$]);
const addFromLibrary = useCallback(() => {
if (!isErrorEmbeddable(dashboardAppState.dashboardContainer)) {
@@ -173,7 +165,7 @@ export function DashboardTopNav({
getFactory: getEmbeddableFactory,
notifications,
overlays,
- SavedObjectFinder: getSavedObjectFinder(savedObjects, uiSettings),
+ SavedObjectFinder: getSavedObjectFinder({ client: savedObjectsClient }, uiSettings),
reportUiCounter: usageCollection.reportUiCounter,
theme,
}),
@@ -181,14 +173,14 @@ export function DashboardTopNav({
}
}, [
dashboardAppState.dashboardContainer,
+ usageCollection.reportUiCounter,
getEmbeddableFactories,
getEmbeddableFactory,
+ savedObjectsClient,
notifications,
- savedObjects,
overlays,
- theme,
uiSettings,
- usageCollection,
+ theme,
]);
const createNewVisType = useCallback(
@@ -258,48 +250,71 @@ export function DashboardTopNav({
onTitleDuplicate,
isTitleDuplicateConfirmed,
}: DashboardSaveOptions): Promise => {
+ const {
+ timefilter: { timefilter },
+ } = query;
+
const saveOptions = {
confirmOverwrite: false,
isTitleDuplicateConfirmed,
onTitleDuplicate,
+ saveAsCopy: newCopyOnSave,
};
- const stateFromSaveModal = {
+ const stateFromSaveModal: Pick<
+ DashboardState,
+ 'title' | 'description' | 'timeRestore' | 'timeRange' | 'refreshInterval' | 'tags'
+ > = {
title: newTitle,
+ tags: [] as string[],
description: newDescription,
timeRestore: newTimeRestore,
- tags: [] as string[],
+ timeRange: newTimeRestore ? timefilter.getTime() : undefined,
+ refreshInterval: newTimeRestore ? timefilter.getRefreshInterval() : undefined,
};
- if (hasApi && newTags) {
- // remove `hasAPI` once the savedObjectsTagging service is optional
+ if (hasSavedObjectsTagging && newTags) {
+ // remove `hasSavedObjectsTagging` once the savedObjectsTagging service is optional
stateFromSaveModal.tags = newTags;
}
- dashboardAppState.savedDashboard.copyOnSave = newCopyOnSave;
- const saveResult = await saveDashboard({
+ if (
+ !(await checkForDuplicateDashboardTitle({
+ title: newTitle,
+ onTitleDuplicate,
+ lastSavedTitle: currentState.title,
+ copyOnSave: newCopyOnSave,
+ isTitleDuplicateConfirmed,
+ }))
+ ) {
+ // do not save if title is duplicate and is unconfirmed
+ return {};
+ }
+
+ const saveResult = await saveDashboardStateToSavedObject({
redirectTo,
saveOptions,
- savedDashboard: dashboardAppState.savedDashboard,
currentState: { ...currentState, ...stateFromSaveModal },
});
if (saveResult.id && !saveResult.redirected) {
dispatchDashboardStateChange(setStateFromSaveModal(stateFromSaveModal));
- dashboardAppState.updateLastSavedState?.();
- docTitle.change(stateFromSaveModal.title);
+ setTimeout(() => {
+ /**
+ * set timeout so dashboard state subject can update with the new title before updating the last saved state.
+ * TODO: Remove this timeout once the last saved state is also handled in Redux.
+ **/
+ dashboardAppState.updateLastSavedState?.();
+ docTitle.change(stateFromSaveModal.title);
+ }, 1);
}
- return saveResult.id ? { id: saveResult.id } : { error: saveResult.error };
+ return saveResult.id ? { id: saveResult.id } : { error: new Error(saveResult.error) };
};
- const lastDashboardId = dashboardAppState.savedDashboard.id;
- const savedTags = hasTagDecoration?.(dashboardAppState.savedDashboard)
- ? dashboardAppState.savedDashboard.getTags()
- : [];
- const currentTagsSet = new Set([...savedTags, ...currentState.tags]);
+ const lastDashboardId = currentState.savedObjectId;
const dashboardSaveModal = (
{}}
- tags={Array.from(currentTagsSet)}
+ tags={currentState.tags}
title={currentState.title}
timeRestore={currentState.timeRestore}
description={currentState.description}
@@ -309,24 +324,25 @@ export function DashboardTopNav({
closeAllFlyouts();
showSaveModal(dashboardSaveModal, i18nContext);
}, [
+ saveDashboardStateToSavedObject,
+ checkForDuplicateDashboardTitle,
dispatchDashboardStateChange,
- hasApi,
- hasTagDecoration,
+ hasSavedObjectsTagging,
dashboardAppState,
- i18nContext,
- docTitle,
closeAllFlyouts,
+ i18nContext,
redirectTo,
+ docTitle,
+ query,
]);
const runQuickSave = useCallback(async () => {
setState((s) => ({ ...s, isSaveInProgress: true }));
const currentState = dashboardAppState.getLatestDashboardState();
- const saveResult = await saveDashboard({
+ const saveResult = await saveDashboardStateToSavedObject({
redirectTo,
currentState,
saveOptions: {},
- savedDashboard: dashboardAppState.savedDashboard,
});
if (saveResult.id && !saveResult.redirected) {
dashboardAppState.updateLastSavedState?.();
@@ -336,7 +352,7 @@ export function DashboardTopNav({
if (!mounted) return;
setState((s) => ({ ...s, isSaveInProgress: false }));
}, DashboardConstants.CHANGE_CHECK_DEBOUNCE);
- }, [dashboardAppState, redirectTo, mounted]);
+ }, [dashboardAppState, saveDashboardStateToSavedObject, redirectTo, mounted]);
const runClone = useCallback(() => {
const currentState = dashboardAppState.getLatestDashboardState();
@@ -345,22 +361,33 @@ export function DashboardTopNav({
isTitleDuplicateConfirmed: boolean,
onTitleDuplicate: () => void
) => {
- dashboardAppState.savedDashboard.copyOnSave = true;
- const saveOptions = {
- confirmOverwrite: false,
- isTitleDuplicateConfirmed,
- onTitleDuplicate,
- };
- const saveResult = await saveDashboard({
+ if (
+ !(await checkForDuplicateDashboardTitle({
+ title: newTitle,
+ onTitleDuplicate,
+ lastSavedTitle: currentState.title,
+ copyOnSave: true,
+ isTitleDuplicateConfirmed,
+ }))
+ ) {
+ // do not clone if title is duplicate and is unconfirmed
+ return {};
+ }
+
+ const saveResult = await saveDashboardStateToSavedObject({
redirectTo,
- saveOptions,
- savedDashboard: dashboardAppState.savedDashboard,
+ saveOptions: { saveAsCopy: true },
currentState: { ...currentState, title: newTitle },
});
return saveResult.id ? { id: saveResult.id } : { error: saveResult.error };
};
showCloneModal({ onClone, title: currentState.title });
- }, [dashboardAppState, redirectTo]);
+ }, [
+ checkForDuplicateDashboardTitle,
+ saveDashboardStateToSavedObject,
+ dashboardAppState,
+ redirectTo,
+ ]);
const showOptions = useCallback(
(anchorElement: HTMLElement) => {
@@ -394,7 +421,6 @@ export function DashboardTopNav({
ShowShareModal({
anchorElement,
currentDashboardState: currentState,
- savedDashboard: dashboardAppState.savedDashboard,
isDirty: Boolean(dashboardAppState.hasUnsavedChanges),
});
},
@@ -442,7 +468,7 @@ export function DashboardTopNav({
});
const getNavBarProps = (): TopNavMenuProps => {
- const { hasUnsavedChanges, savedDashboard } = dashboardAppState;
+ const { hasUnsavedChanges } = dashboardAppState;
const shouldShowNavBarComponent = (forceShow: boolean): boolean =>
(forceShow || state.chromeIsVisible) && !dashboardState.fullScreenMode;
@@ -464,11 +490,11 @@ export function DashboardTopNav({
dashboardAppState.getLatestDashboardState().viewMode,
dashboardTopNavActions,
{
- showWriteControls: dashboardCapabilities.showWriteControls,
- isDirty: Boolean(dashboardAppState.hasUnsavedChanges),
- isSaveInProgress: state.isSaveInProgress,
- isNewDashboard: !savedDashboard.id,
isLabsEnabled,
+ showWriteControls,
+ isSaveInProgress: state.isSaveInProgress,
+ isNewDashboard: !dashboardState.savedObjectId,
+ isDirty: Boolean(dashboardAppState.hasUnsavedChanges),
}
);
@@ -485,22 +511,22 @@ export function DashboardTopNav({
return {
badges,
- appName: 'dashboard',
- config: showTopNavMenu ? topNav : undefined,
- className: isFullScreenMode ? 'kbnTopNavMenu-isFullScreen' : undefined,
screenTitle,
- showSearchBar,
showQueryBar,
+ showSearchBar,
+ showFilterBar,
+ showSaveQuery,
showQueryInput,
showDatePicker,
- showFilterBar,
- setMenuMountPoint: embedSettings ? undefined : setHeaderActionMenu,
- indexPatterns: dashboardAppState.dataViews,
- showSaveQuery: dashboardCapabilities.saveQuery,
+ appName: 'dashboard',
useDefaultBehaviors: true,
+ visible: printMode !== true,
savedQuery: state.savedQuery,
savedQueryId: dashboardState.savedQuery,
- visible: printMode !== true,
+ indexPatterns: dashboardAppState.dataViews,
+ config: showTopNavMenu ? topNav : undefined,
+ setMenuMountPoint: embedSettings ? undefined : setHeaderActionMenu,
+ className: isFullScreenMode ? 'kbnTopNavMenu-isFullScreen' : undefined,
onQuerySubmit: (_payload, isUpdate) => {
if (isUpdate === false) {
dashboardAppState.$triggerDashboardRefresh.next({ force: true });
diff --git a/src/plugins/dashboard/public/application/top_nav/show_share_modal.test.tsx b/src/plugins/dashboard/public/application/top_nav/show_share_modal.test.tsx
index ad9d85926a94b..7e76ef1789a38 100644
--- a/src/plugins/dashboard/public/application/top_nav/show_share_modal.test.tsx
+++ b/src/plugins/dashboard/public/application/top_nav/show_share_modal.test.tsx
@@ -10,10 +10,9 @@ import { Capabilities } from '@kbn/core/public';
import { DashboardState } from '../../types';
import { DashboardAppLocatorParams } from '../..';
+import { pluginServices } from '../../services/plugin_services';
import { stateToRawDashboardState } from '../lib/convert_dashboard_state';
-import { getSavedDashboardMock } from '../test_helpers';
import { showPublicUrlSwitch, ShowShareModal, ShowShareModalProps } from './show_share_modal';
-import { pluginServices } from '../../services/plugin_services';
describe('showPublicUrlSwitch', () => {
test('returns false if "dashboard" app is not available', () => {
@@ -75,9 +74,8 @@ describe('ShowShareModal', () => {
.mockReturnValue(unsavedState);
return {
isDirty: true,
- savedDashboard: getSavedDashboardMock(),
anchorElement: document.createElement('div'),
- currentDashboardState: { panels: {} } as unknown as DashboardState,
+ currentDashboardState: { panels: {} } as DashboardState,
};
};
@@ -139,7 +137,7 @@ describe('ShowShareModal', () => {
});
unsavedStateKeys.forEach((key) => {
expect(shareLocatorParams[key]).toStrictEqual(
- (rawDashboardState as Partial)[key]
+ (rawDashboardState as unknown as Partial)[key]
);
});
});
diff --git a/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx b/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx
index f93061f56d6ec..0f7d119427dd7 100644
--- a/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx
+++ b/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx
@@ -9,28 +9,26 @@
import moment from 'moment';
import React, { ReactElement, useState } from 'react';
-import { EuiCheckboxGroup } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
+import { EuiCheckboxGroup } from '@elastic/eui';
import type { Capabilities } from '@kbn/core/public';
-import type { SerializableControlGroupInput } from '@kbn/controls-plugin/common';
import { ViewMode } from '@kbn/embeddable-plugin/public';
import { setStateToKbnUrl, unhashUrl } from '@kbn/kibana-utils-plugin/public';
+import type { SerializableControlGroupInput } from '@kbn/controls-plugin/common';
-import type { DashboardSavedObject } from '../..';
-import { shareModalStrings } from '../../dashboard_strings';
-import { DashboardAppLocatorParams, DASHBOARD_APP_LOCATOR } from '../../locator';
import type { DashboardState } from '../../types';
import { dashboardUrlParams } from '../dashboard_router';
-import { stateToRawDashboardState } from '../lib/convert_dashboard_state';
-import { convertPanelMapToSavedPanels } from '../lib/convert_dashboard_panels';
+import { shareModalStrings } from '../../dashboard_strings';
+import { convertPanelMapToSavedPanels } from '../../../common';
import { pluginServices } from '../../services/plugin_services';
+import { stateToRawDashboardState } from '../lib/convert_dashboard_state';
+import { DashboardAppLocatorParams, DASHBOARD_APP_LOCATOR } from '../../locator';
const showFilterBarId = 'showFilterBar';
export interface ShowShareModalProps {
isDirty: boolean;
anchorElement: HTMLElement;
- savedDashboard: DashboardSavedObject;
currentDashboardState: DashboardState;
}
@@ -45,7 +43,6 @@ export const showPublicUrlSwitch = (anonymousUserCapabilities: Capabilities) =>
export function ShowShareModal({
isDirty,
anchorElement,
- savedDashboard,
currentDashboardState,
}: ShowShareModalProps) {
const {
@@ -59,6 +56,7 @@ export function ShowShareModal({
},
},
share: { toggleShareContextMenu },
+ initializerContext: { kibanaVersion },
} = pluginServices.getServices();
if (!toggleShareContextMenu) return; // TODO: Make this logic cleaner once share is an optional service
@@ -124,7 +122,9 @@ export function ShowShareModal({
DashboardAppLocatorParams,
'options' | 'query' | 'savedQuery' | 'filters' | 'panels' | 'controlGroupInput'
> = {};
- const unsavedDashboardState = dashboardSessionStorage.getState(savedDashboard.id);
+ const { savedObjectId, title } = currentDashboardState;
+ const unsavedDashboardState = dashboardSessionStorage.getState(savedObjectId);
+
if (unsavedDashboardState) {
unsavedStateForLocator = {
query: unsavedDashboardState.query,
@@ -133,13 +133,16 @@ export function ShowShareModal({
savedQuery: unsavedDashboardState.savedQuery,
controlGroupInput: unsavedDashboardState.controlGroupInput as SerializableControlGroupInput,
panels: unsavedDashboardState.panels
- ? convertPanelMapToSavedPanels(unsavedDashboardState.panels)
+ ? (convertPanelMapToSavedPanels(
+ unsavedDashboardState.panels,
+ kibanaVersion
+ ) as DashboardAppLocatorParams['panels'])
: undefined,
};
}
const locatorParams: DashboardAppLocatorParams = {
- dashboardId: savedDashboard.id,
+ dashboardId: savedObjectId,
preserveSavedFilters: true,
refreshInterval: undefined, // We don't share refresh interval externally
viewMode: ViewMode.VIEW, // For share locators we always load the dashboard in view mode
@@ -161,11 +164,11 @@ export function ShowShareModal({
{ useHash: false, storeInHashQuery: true },
unhashUrl(window.location.href)
),
- objectId: savedDashboard.id,
+ objectId: savedObjectId,
objectType: 'dashboard',
sharingData: {
title:
- savedDashboard.title ||
+ title ||
i18n.translate('dashboard.share.defaultDashboardTitle', {
defaultMessage: 'Dashboard [{date}]',
values: { date: moment().toISOString(true) },
diff --git a/src/plugins/dashboard/public/dashboard_constants.ts b/src/plugins/dashboard/public/dashboard_constants.ts
index badc14ddaee66..9bbe97681032d 100644
--- a/src/plugins/dashboard/public/dashboard_constants.ts
+++ b/src/plugins/dashboard/public/dashboard_constants.ts
@@ -6,9 +6,18 @@
* Side Public License, v 1.
*/
+import { ViewMode } from '@kbn/embeddable-plugin/common';
+import type { DashboardState } from './types';
+
export const DASHBOARD_STATE_STORAGE_KEY = '_a';
export const GLOBAL_STATE_STORAGE_KEY = '_g';
+export const DASHBOARD_GRID_COLUMN_COUNT = 48;
+export const DASHBOARD_GRID_HEIGHT = 20;
+export const DEFAULT_PANEL_WIDTH = DASHBOARD_GRID_COLUMN_COUNT / 2;
+export const DEFAULT_PANEL_HEIGHT = 15;
+export const DASHBOARD_CONTAINER_TYPE = 'dashboard';
+
export const DashboardConstants = {
LANDING_PAGE_PATH: '/list',
CREATE_NEW_DASHBOARD_URL: '/create',
@@ -18,11 +27,37 @@ export const DashboardConstants = {
ADD_EMBEDDABLE_TYPE: 'addEmbeddableType',
DASHBOARDS_ID: 'dashboards',
DASHBOARD_ID: 'dashboard',
+ DASHBOARD_SAVED_OBJECT_TYPE: 'dashboard',
SEARCH_SESSION_ID: 'searchSessionId',
CHANGE_CHECK_DEBOUNCE: 100,
CHANGE_APPLY_DEBOUNCE: 50,
};
+export const defaultDashboardState: DashboardState = {
+ viewMode: ViewMode.EDIT, // new dashboards start in edit mode.
+ fullScreenMode: false,
+ timeRestore: false,
+ query: { query: '', language: 'kuery' },
+ description: '',
+ filters: [],
+ panels: {},
+ title: '',
+ tags: [],
+ options: {
+ useMargins: true,
+ syncColors: false,
+ syncTooltips: false,
+ hidePanelTitles: false,
+ },
+};
+
+export const getFullPath = (aliasId?: string, id?: string) =>
+ `/app/dashboards#${createDashboardEditUrl(aliasId || id)}`;
+
+export const getFullEditPath = (id?: string, editMode?: boolean) => {
+ return `/app/dashboards#${createDashboardEditUrl(id, editMode)}`;
+};
+
export function createDashboardEditUrl(id?: string, editMode?: boolean) {
if (!id) {
return `${DashboardConstants.CREATE_NEW_DASHBOARD_URL}`;
diff --git a/src/plugins/dashboard/public/dashboard_strings.ts b/src/plugins/dashboard/public/dashboard_strings.ts
index 5679ac28f838b..6474c7dc2bba6 100644
--- a/src/plugins/dashboard/public/dashboard_strings.ts
+++ b/src/plugins/dashboard/public/dashboard_strings.ts
@@ -382,7 +382,7 @@ export const panelStorageErrorStrings = {
}),
};
-export const dashboardLoadingErrorStrings = {
+export const dashboardSavedObjectErrorStrings = {
getDashboardLoadError: (message: string) =>
i18n.translate('dashboard.loadingError.errorMessage', {
defaultMessage: 'Error encountered while loading saved dashboard: {message}',
@@ -393,6 +393,14 @@ export const dashboardLoadingErrorStrings = {
defaultMessage: 'Unable to load dashboard: {message}',
values: { message },
}),
+ getErrorDeletingDashboardToast: () =>
+ i18n.translate('dashboard.deleteError.toastDescription', {
+ defaultMessage: 'Error encountered while deleting dashboard',
+ }),
+ getPanelTooOldError: () =>
+ i18n.translate('dashboard.loadURLError.PanelTooOld', {
+ defaultMessage: 'Cannot load panels from a URL created in a version older than 7.3',
+ }),
};
/*
@@ -432,7 +440,7 @@ export const emptyScreenStrings = {
/*
Dashboard Listing Page
*/
-export const dashboardListingTable = {
+export const dashboardListingTableStrings = {
getEntityName: () =>
i18n.translate('dashboard.listing.table.entityName', {
defaultMessage: 'dashboard',
@@ -450,8 +458,8 @@ export const dashboardUnsavedListingStrings = {
defaultMessage: 'You have unsaved changes in the following {dash}:',
values: {
dash: plural
- ? dashboardListingTable.getEntityNamePlural()
- : dashboardListingTable.getEntityName(),
+ ? dashboardListingTableStrings.getEntityNamePlural()
+ : dashboardListingTableStrings.getEntityName(),
},
}),
getLoadingTitle: () =>
diff --git a/src/plugins/dashboard/public/index.ts b/src/plugins/dashboard/public/index.ts
index 7cb54db209c1d..598940bbd666c 100644
--- a/src/plugins/dashboard/public/index.ts
+++ b/src/plugins/dashboard/public/index.ts
@@ -9,11 +9,7 @@
import { PluginInitializerContext } from '@kbn/core/public';
import { DashboardPlugin } from './plugin';
-export {
- DashboardContainer,
- DashboardContainerFactoryDefinition,
- DASHBOARD_CONTAINER_TYPE,
-} from './application';
+export { DASHBOARD_CONTAINER_TYPE } from './dashboard_constants';
export { DashboardConstants, createDashboardEditUrl } from './dashboard_constants';
export type { DashboardSetup, DashboardStart, DashboardFeatureFlagConfig } from './plugin';
@@ -23,7 +19,6 @@ export {
cleanEmptyKeys,
} from './locator';
-export type { DashboardSavedObject } from './saved_dashboards';
export type { SavedDashboardPanel, DashboardContainerInput } from './types';
export function plugin(initializerContext: PluginInitializerContext) {
diff --git a/src/plugins/dashboard/public/locator.ts b/src/plugins/dashboard/public/locator.ts
index e3cd3f159f738..a66015afcb00b 100644
--- a/src/plugins/dashboard/public/locator.ts
+++ b/src/plugins/dashboard/public/locator.ts
@@ -94,7 +94,7 @@ export type DashboardAppLocatorParams = {
/**
* List of dashboard panels
*/
- panels?: SavedDashboardPanel[];
+ panels?: Array; // used SerializableRecord here to force the GridData type to be read as serializable
/**
* Saved query ID
diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx
index 9d1df9d2acb12..a0d35e2c7be48 100644
--- a/src/plugins/dashboard/public/plugin.tsx
+++ b/src/plugins/dashboard/public/plugin.tsx
@@ -9,73 +9,56 @@
import { BehaviorSubject } from 'rxjs';
import { filter, map } from 'rxjs/operators';
-import { Start as InspectorStartContract } from '@kbn/inspector-plugin/public';
-import type { UrlForwardingSetup, UrlForwardingStart } from '@kbn/url-forwarding-plugin/public';
-import { APP_WRAPPER_CLASS } from '@kbn/core/public';
import {
App,
Plugin,
- type CoreSetup,
- type CoreStart,
AppUpdater,
ScopedHistory,
+ type CoreSetup,
+ type CoreStart,
AppMountParameters,
DEFAULT_APP_CATEGORIES,
PluginInitializerContext,
SavedObjectsClientContract,
} from '@kbn/core/public';
-import {
- CONTEXT_MENU_TRIGGER,
- EmbeddableSetup,
- EmbeddableStart,
- PANEL_BADGE_TRIGGER,
- PANEL_NOTIFICATION_TRIGGER,
-} from '@kbn/embeddable-plugin/public';
import type {
ScreenshotModePluginSetup,
ScreenshotModePluginStart,
} from '@kbn/screenshot-mode-plugin/public';
-import type { SpacesPluginStart } from '@kbn/spaces-plugin/public';
-import type { HomePublicPluginSetup } from '@kbn/home-plugin/public';
-import { replaceUrlHashQuery } from '@kbn/kibana-utils-plugin/public';
-import { createKbnUrlTracker } from '@kbn/kibana-utils-plugin/public';
-import type { VisualizationsStart } from '@kbn/visualizations-plugin/public';
-import type { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public';
import type {
UsageCollectionSetup,
UsageCollectionStart,
} from '@kbn/usage-collection-plugin/public';
+import { APP_WRAPPER_CLASS } from '@kbn/core/public';
+import { replaceUrlHashQuery } from '@kbn/kibana-utils-plugin/public';
+import { createKbnUrlTracker } from '@kbn/kibana-utils-plugin/public';
+
+import type { SpacesPluginStart } from '@kbn/spaces-plugin/public';
+import type { HomePublicPluginSetup } from '@kbn/home-plugin/public';
+import type { SavedObjectsStart } from '@kbn/saved-objects-plugin/public';
+import type { VisualizationsStart } from '@kbn/visualizations-plugin/public';
+import type { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public';
import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public';
import type { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public';
+import type { Start as InspectorStartContract } from '@kbn/inspector-plugin/public';
import type { UiActionsSetup, UiActionsStart } from '@kbn/ui-actions-plugin/public';
+import type { EmbeddableSetup, EmbeddableStart } from '@kbn/embeddable-plugin/public';
import type { PresentationUtilPluginStart } from '@kbn/presentation-util-plugin/public';
+import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public';
import type { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public';
+import type { UrlForwardingSetup, UrlForwardingStart } from '@kbn/url-forwarding-plugin/public';
import type { SavedObjectTaggingOssPluginStart } from '@kbn/saved-objects-tagging-oss-plugin/public';
-import { getSavedObjectFinder, type SavedObjectsStart } from '@kbn/saved-objects-plugin/public';
-import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public';
import {
- ClonePanelAction,
- createDashboardContainerByValueRenderer,
- DASHBOARD_CONTAINER_TYPE,
- DashboardContainerFactory,
+ type DashboardContainerFactory,
DashboardContainerFactoryDefinition,
- ExpandPanelAction,
- ReplacePanelAction,
- UnlinkFromLibraryAction,
- AddToLibraryAction,
- LibraryNotificationAction,
- CopyToDashboardAction,
-} from './application';
-import { SavedObjectLoader } from './services/saved_object_loader';
-import { DashboardAppLocatorDefinition, DashboardAppLocator } from './locator';
-import { createSavedDashboardLoader } from './saved_dashboards';
-import { DashboardConstants } from './dashboard_constants';
-import { PlaceholderEmbeddableFactory } from './application/embeddable/placeholder';
-import { ExportCSVAction } from './application/actions/export_csv_action';
-import { dashboardFeatureCatalog } from './dashboard_strings';
-import { FiltersNotificationBadge } from './application/actions/filters_notification_badge';
+ createDashboardContainerByValueRenderer,
+} from './application/embeddable';
import type { DashboardMountContextProps } from './types';
+import { dashboardFeatureCatalog } from './dashboard_strings';
+import { type DashboardAppLocator, DashboardAppLocatorDefinition } from './locator';
+import { PlaceholderEmbeddableFactory } from './application/embeddable/placeholder';
+import { DashboardConstants, DASHBOARD_CONTAINER_TYPE } from './dashboard_constants';
export interface DashboardFeatureFlagConfig {
allowByValueEmbeddables: boolean;
@@ -118,7 +101,6 @@ export interface DashboardSetup {
}
export interface DashboardStart {
- getSavedDashboardLoader: () => SavedObjectLoader;
getDashboardContainerByValueRenderer: () => ReturnType<
typeof createDashboardContainerByValueRenderer
>;
@@ -159,9 +141,14 @@ export class DashboardPlugin
new DashboardAppLocatorDefinition({
useHashedUrl: core.uiSettings.get('state:storeInSessionStorage'),
getDashboardFilterFields: async (dashboardId: string) => {
- const [, , selfStart] = await core.getStartServices();
- const dashboard = await selfStart.getSavedDashboardLoader().get(dashboardId);
- return dashboard?.searchSource?.getField('filter') ?? [];
+ const { pluginServices } = await import('./services/plugin_services');
+ const {
+ dashboardSavedObject: { loadDashboardStateFromSavedObject },
+ } = pluginServices.getServices();
+ return (
+ (await loadDashboardStateFromSavedObject({ id: dashboardId })).dashboardState
+ ?.filters ?? []
+ );
},
})
);
@@ -305,58 +292,16 @@ export class DashboardPlugin
}
public start(core: CoreStart, plugins: DashboardStartDependencies): DashboardStart {
- const { uiSettings } = core;
- const { uiActions, share, presentationUtil } = plugins;
- this.startDashboardKibanaServices(core, plugins, this.initializerContext).then(() => {
- const clonePanelAction = new ClonePanelAction(core.savedObjects);
- uiActions.registerAction(clonePanelAction);
- uiActions.attachAction(CONTEXT_MENU_TRIGGER, clonePanelAction.id);
-
- const SavedObjectFinder = getSavedObjectFinder(core.savedObjects, uiSettings);
- const changeViewAction = new ReplacePanelAction(SavedObjectFinder);
- uiActions.registerAction(changeViewAction);
- uiActions.attachAction(CONTEXT_MENU_TRIGGER, changeViewAction.id);
-
- const panelLevelFiltersNotification = new FiltersNotificationBadge();
- uiActions.registerAction(panelLevelFiltersNotification);
- uiActions.attachAction(PANEL_BADGE_TRIGGER, panelLevelFiltersNotification.id);
-
- if (share) {
- const ExportCSVPlugin = new ExportCSVAction();
- uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, ExportCSVPlugin);
- }
-
- if (this.dashboardFeatureFlagConfig?.allowByValueEmbeddables) {
- const addToLibraryAction = new AddToLibraryAction();
- uiActions.registerAction(addToLibraryAction);
- uiActions.attachAction(CONTEXT_MENU_TRIGGER, addToLibraryAction.id);
-
- const unlinkFromLibraryAction = new UnlinkFromLibraryAction();
- uiActions.registerAction(unlinkFromLibraryAction);
- uiActions.attachAction(CONTEXT_MENU_TRIGGER, unlinkFromLibraryAction.id);
-
- const libraryNotificationAction = new LibraryNotificationAction(unlinkFromLibraryAction);
- uiActions.registerAction(libraryNotificationAction);
- uiActions.attachAction(PANEL_NOTIFICATION_TRIGGER, libraryNotificationAction.id);
-
- const copyToDashboardAction = new CopyToDashboardAction(presentationUtil.ContextProvider);
- uiActions.registerAction(copyToDashboardAction);
- uiActions.attachAction(CONTEXT_MENU_TRIGGER, copyToDashboardAction.id);
- }
- });
-
- const expandPanelAction = new ExpandPanelAction(); // this action does't rely on any services
- uiActions.registerAction(expandPanelAction);
- uiActions.attachAction(CONTEXT_MENU_TRIGGER, expandPanelAction.id);
-
- const savedDashboardLoader = createSavedDashboardLoader({
- savedObjectsClient: core.savedObjects.client,
- savedObjects: plugins.savedObjects,
- embeddableStart: plugins.embeddable,
+ this.startDashboardKibanaServices(core, plugins, this.initializerContext).then(async () => {
+ const { buildAllDashboardActions } = await import('./application/actions');
+ buildAllDashboardActions({
+ core,
+ plugins,
+ allowByValueEmbeddables: this.dashboardFeatureFlagConfig?.allowByValueEmbeddables,
+ });
});
return {
- getSavedDashboardLoader: () => savedDashboardLoader,
getDashboardContainerByValueRenderer: () => {
const dashboardContainerFactory =
plugins.embeddable.getEmbeddableFactory(DASHBOARD_CONTAINER_TYPE);
diff --git a/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts b/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts
deleted file mode 100644
index c23b6eb2a87e0..0000000000000
--- a/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts
+++ /dev/null
@@ -1,200 +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 { assign, cloneDeep } from 'lodash';
-import { SavedObjectsClientContract } from '@kbn/core/public';
-import type { ResolvedSimpleSavedObject } from '@kbn/core/public';
-import { SavedObjectAttributes, SavedObjectReference } from '@kbn/core/types';
-import { RawControlGroupAttributes } from '@kbn/controls-plugin/common';
-import { EmbeddableStart } from '@kbn/embeddable-plugin/public';
-import { ISearchSource } from '@kbn/data-plugin/common';
-import { RefreshInterval } from '@kbn/data-plugin/public';
-import { Query, Filter } from '@kbn/es-query';
-import type { SavedObject, SavedObjectsStart } from '@kbn/saved-objects-plugin/public';
-
-import { createDashboardEditUrl } from '../dashboard_constants';
-import { extractReferences, injectReferences } from '../../common/saved_dashboard_references';
-
-import { DashboardOptions } from '../types';
-
-export interface DashboardSavedObject extends SavedObject {
- id?: string;
- timeRestore: boolean;
- timeTo?: string;
- timeFrom?: string;
- description?: string;
- panelsJSON: string;
- optionsJSON?: string;
- // TODO: write a migration to rid of this, it's only around for bwc.
- uiStateJSON?: string;
- lastSavedTitle: string;
- refreshInterval?: RefreshInterval;
- searchSource: ISearchSource;
- getQuery(): Query;
- getFilters(): Filter[];
- getFullEditPath: (editMode?: boolean) => string;
- outcome?: ResolvedSimpleSavedObject['outcome'];
- aliasId?: ResolvedSimpleSavedObject['alias_target_id'];
- aliasPurpose?: ResolvedSimpleSavedObject['alias_purpose'];
-
- controlGroupInput?: Omit;
-}
-
-const defaults = {
- title: '',
- hits: 0,
- description: '',
- panelsJSON: '[]',
- optionsJSON: JSON.stringify({
- // for BWC reasons we can't default dashboards that already exist without this setting to true.
- useMargins: true,
- syncColors: false,
- syncTooltips: false,
- hidePanelTitles: false,
- } as DashboardOptions),
- version: 1,
- timeRestore: false,
- timeTo: undefined,
- timeFrom: undefined,
- refreshInterval: undefined,
-};
-
-// Used only by the savedDashboards service, usually no reason to change this
-export function createSavedDashboardClass(
- savedObjectStart: SavedObjectsStart,
- embeddableStart: EmbeddableStart,
- savedObjectsClient: SavedObjectsClientContract
-): new (id: string) => DashboardSavedObject {
- class SavedDashboard extends savedObjectStart.SavedObjectClass {
- // save these objects with the 'dashboard' type
- public static type = 'dashboard';
-
- // if type:dashboard has no mapping, we push this mapping into ES
- public static mapping = {
- title: 'text',
- hits: 'integer',
- description: 'text',
- panelsJSON: 'text',
- optionsJSON: 'text',
- version: 'integer',
- timeRestore: 'boolean',
- timeTo: 'keyword',
- timeFrom: 'keyword',
- refreshInterval: {
- type: 'object',
- properties: {
- display: { type: 'keyword' },
- pause: { type: 'boolean' },
- section: { type: 'integer' },
- value: { type: 'integer' },
- },
- },
- controlGroupInput: {
- type: 'object',
- properties: {
- controlStyle: { type: 'keyword' },
- panelsJSON: { type: 'text' },
- },
- },
- };
- public static fieldOrder = ['title', 'description'];
- public static searchSource = true;
- public showInRecentlyAccessed = true;
-
- public outcome?: ResolvedSimpleSavedObject['outcome'];
- public aliasId?: ResolvedSimpleSavedObject['alias_target_id'];
- public aliasPurpose?: ResolvedSimpleSavedObject['alias_purpose'];
-
- constructor(arg: { id: string; useResolve: boolean } | string) {
- super({
- type: SavedDashboard.type,
- mapping: SavedDashboard.mapping,
- searchSource: SavedDashboard.searchSource,
- extractReferences: (opts: {
- attributes: SavedObjectAttributes;
- references: SavedObjectReference[];
- }) => extractReferences(opts, { embeddablePersistableStateService: embeddableStart }),
- injectReferences: (so: DashboardSavedObject, references: SavedObjectReference[]) => {
- const newAttributes = injectReferences(
- { attributes: so._serialize().attributes, references },
- {
- embeddablePersistableStateService: embeddableStart,
- }
- );
- Object.assign(so, newAttributes);
- },
-
- // if this is null/undefined then the SavedObject will be assigned the defaults
- id: typeof arg === 'object' ? arg.id : arg,
-
- // default values that will get assigned if the doc is new
- defaults,
- });
-
- const id: string = typeof arg === 'object' ? arg.id : arg;
- const useResolve = typeof arg === 'object' ? arg.useResolve : false;
-
- this.getFullPath = () => `/app/dashboards#${createDashboardEditUrl(this.aliasId || this.id)}`;
-
- // Overwrite init if we want to use resolve
- if (useResolve || true) {
- this.init = async () => {
- const esType = SavedDashboard.type;
- // ensure that the esType is defined
- if (!esType) throw new Error('You must define a type name to use SavedObject objects.');
-
- if (!id) {
- // just assign the defaults and be done
- assign(this, defaults);
- await this.hydrateIndexPattern!();
-
- return this;
- }
-
- const {
- outcome,
- alias_target_id: aliasId,
- alias_purpose: aliasPurpose,
- saved_object: resp,
- } = await savedObjectsClient.resolve(esType, id);
-
- const respMapped = {
- _id: resp.id,
- _type: resp.type,
- _source: cloneDeep(resp.attributes),
- references: resp.references,
- found: !!resp._version,
- };
-
- this.outcome = outcome;
- this.aliasId = aliasId;
- this.aliasPurpose = aliasPurpose;
- await this.applyESResp(respMapped);
-
- return this;
- };
- }
- }
-
- getQuery() {
- return this.searchSource!.getOwnField('query') || { query: '', language: 'kuery' };
- }
-
- getFilters() {
- return this.searchSource!.getOwnField('filter') || [];
- }
-
- getFullEditPath = (editMode?: boolean) => {
- return `/app/dashboards#${createDashboardEditUrl(this.id, editMode)}`;
- };
- }
-
- // Unfortunately this throws a typescript error without the casting. I think it's due to the
- // convoluted way SavedObjects are created.
- return SavedDashboard as unknown as new (id: string) => DashboardSavedObject;
-}
diff --git a/src/plugins/dashboard/public/saved_dashboards/saved_dashboards.ts b/src/plugins/dashboard/public/saved_dashboards/saved_dashboards.ts
deleted file mode 100644
index a154fdad96562..0000000000000
--- a/src/plugins/dashboard/public/saved_dashboards/saved_dashboards.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import { SavedObjectsClientContract } from '@kbn/core/public';
-import { EmbeddableStart } from '@kbn/embeddable-plugin/public';
-import type { SavedObjectsStart } from '@kbn/saved-objects-plugin/public';
-
-import { SavedObjectLoader } from '../services/saved_object_loader';
-import { createSavedDashboardClass } from './saved_dashboard';
-
-interface Services {
- savedObjectsClient: SavedObjectsClientContract;
- savedObjects: SavedObjectsStart;
- embeddableStart: EmbeddableStart;
-}
-
-/**
- * @param services
- */
-export function createSavedDashboardLoader({
- savedObjects,
- savedObjectsClient,
- embeddableStart,
-}: Services) {
- const SavedDashboard = createSavedDashboardClass(
- savedObjects,
- embeddableStart,
- savedObjectsClient
- );
- return new SavedObjectLoader(SavedDashboard, savedObjectsClient);
-}
diff --git a/src/plugins/dashboard/public/services/dashboard_saved_object/dashboard_saved_object.stub.ts b/src/plugins/dashboard/public/services/dashboard_saved_object/dashboard_saved_object.stub.ts
new file mode 100644
index 0000000000000..c23a76746404d
--- /dev/null
+++ b/src/plugins/dashboard/public/services/dashboard_saved_object/dashboard_saved_object.stub.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 and the Server Side Public License, v 1; you may 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 { savedObjectsServiceMock } from '@kbn/core/public/mocks';
+import { PluginServiceFactory } from '@kbn/presentation-util-plugin/public';
+import { DashboardAttributes } from '../../application';
+import { FindDashboardSavedObjectsResponse } from './lib/find_dashboard_saved_objects';
+
+import { DashboardSavedObjectService } from './types';
+import { LoadDashboardFromSavedObjectReturn } from './lib/load_dashboard_state_from_saved_object';
+
+type DashboardSavedObjectServiceFactory = PluginServiceFactory;
+
+export const dashboardSavedObjectServiceFactory: DashboardSavedObjectServiceFactory = () => {
+ const { client: savedObjectsClient } = savedObjectsServiceMock.createStartContract();
+ return {
+ loadDashboardStateFromSavedObject: jest.fn().mockImplementation(() =>
+ Promise.resolve({
+ dashboardState: {},
+ } as LoadDashboardFromSavedObjectReturn)
+ ),
+ saveDashboardStateToSavedObject: jest.fn(),
+ findDashboards: {
+ findSavedObjects: jest.fn().mockImplementation(({ search, size }) => {
+ const sizeToUse = size ?? 10;
+ const hits: FindDashboardSavedObjectsResponse['hits'] = [];
+ for (let i = 0; i < sizeToUse; i++) {
+ hits.push({
+ type: 'dashboard',
+ id: `dashboard${i}`,
+ attributes: {
+ description: `dashboard${i} desc`,
+ title: `dashboard${i} - ${search} - title`,
+ },
+ } as FindDashboardSavedObjectsResponse['hits'][0]);
+ }
+ return Promise.resolve({
+ total: sizeToUse,
+ hits,
+ });
+ }),
+ findByIds: jest.fn().mockImplementation(() =>
+ Promise.resolve([
+ {
+ id: `dashboardUnsavedOne`,
+ status: 'success',
+ attributes: {
+ title: `Dashboard Unsaved One`,
+ } as unknown as DashboardAttributes,
+ },
+ {
+ id: `dashboardUnsavedTwo`,
+ status: 'success',
+ attributes: {
+ title: `Dashboard Unsaved Two`,
+ } as unknown as DashboardAttributes,
+ },
+ {
+ id: `dashboardUnsavedThree`,
+ status: 'success',
+ attributes: {
+ title: `Dashboard Unsaved Three`,
+ } as unknown as DashboardAttributes,
+ },
+ ])
+ ),
+ findByTitle: jest.fn(),
+ },
+ checkForDuplicateDashboardTitle: jest.fn(),
+ savedObjectsClient,
+ };
+};
diff --git a/src/plugins/dashboard/public/services/dashboard_saved_object/dashboard_saved_object_service.ts b/src/plugins/dashboard/public/services/dashboard_saved_object/dashboard_saved_object_service.ts
new file mode 100644
index 0000000000000..7fb558309936e
--- /dev/null
+++ b/src/plugins/dashboard/public/services/dashboard_saved_object/dashboard_saved_object_service.ts
@@ -0,0 +1,62 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { KibanaPluginServiceFactory } from '@kbn/presentation-util-plugin/public';
+
+import type { DashboardStartDependencies } from '../../plugin';
+import { checkForDuplicateDashboardTitle } from './lib/check_for_duplicate_dashboard_title';
+import {
+ findDashboardIdByTitle,
+ findDashboardSavedObjects,
+ findDashboardSavedObjectsByIds,
+} from './lib/find_dashboard_saved_objects';
+import { loadDashboardStateFromSavedObject } from './lib/load_dashboard_state_from_saved_object';
+import { saveDashboardStateToSavedObject } from './lib/save_dashboard_state_to_saved_object';
+import type { DashboardSavedObjectRequiredServices, DashboardSavedObjectService } from './types';
+
+export type DashboardSavedObjectServiceFactory = KibanaPluginServiceFactory<
+ DashboardSavedObjectService,
+ DashboardStartDependencies,
+ DashboardSavedObjectRequiredServices
+>;
+
+export const dashboardSavedObjectServiceFactory: DashboardSavedObjectServiceFactory = (
+ { coreStart },
+ requiredServices
+) => {
+ const {
+ savedObjects: { client: savedObjectsClient },
+ } = coreStart;
+
+ return {
+ loadDashboardStateFromSavedObject: ({ id, getScopedHistory }) =>
+ loadDashboardStateFromSavedObject({
+ id,
+ getScopedHistory,
+ savedObjectsClient,
+ ...requiredServices,
+ }),
+ saveDashboardStateToSavedObject: ({ currentState, redirectTo, saveOptions }) =>
+ saveDashboardStateToSavedObject({
+ redirectTo,
+ saveOptions,
+ currentState,
+ savedObjectsClient,
+ ...requiredServices,
+ }),
+ findDashboards: {
+ findSavedObjects: ({ hasReference, search, size }) =>
+ findDashboardSavedObjects({ hasReference, search, size, savedObjectsClient }),
+ findByIds: (ids) => findDashboardSavedObjectsByIds(savedObjectsClient, ids),
+ findByTitle: (title) => findDashboardIdByTitle(title, savedObjectsClient),
+ },
+ checkForDuplicateDashboardTitle: (props) =>
+ checkForDuplicateDashboardTitle(props, savedObjectsClient),
+ savedObjectsClient,
+ };
+};
diff --git a/src/plugins/dashboard/public/services/dashboard_saved_object/lib/check_for_duplicate_dashboard_title.ts b/src/plugins/dashboard/public/services/dashboard_saved_object/lib/check_for_duplicate_dashboard_title.ts
new file mode 100644
index 0000000000000..e03345e78c41f
--- /dev/null
+++ b/src/plugins/dashboard/public/services/dashboard_saved_object/lib/check_for_duplicate_dashboard_title.ts
@@ -0,0 +1,62 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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/public';
+
+import { DashboardConstants } from '../../..';
+import type { DashboardAttributes } from '../../../application';
+
+export interface DashboardDuplicateTitleCheckProps {
+ title: string;
+ copyOnSave: boolean;
+ lastSavedTitle: string;
+ onTitleDuplicate: () => void;
+ isTitleDuplicateConfirmed: boolean;
+}
+
+/**
+ * check for an existing dashboard with the same title in ES
+ * returns Promise when there is no duplicate, or runs the provided onTitleDuplicate
+ * function when the title already exists
+ */
+export async function checkForDuplicateDashboardTitle(
+ {
+ title,
+ copyOnSave,
+ lastSavedTitle,
+ onTitleDuplicate,
+ isTitleDuplicateConfirmed,
+ }: DashboardDuplicateTitleCheckProps,
+ savedObjectsClient: SavedObjectsClientContract
+): Promise {
+ // Don't check for duplicates if user has already confirmed save with duplicate title
+ if (isTitleDuplicateConfirmed) {
+ return true;
+ }
+
+ // Don't check if the user isn't updating the title, otherwise that would become very annoying to have
+ // to confirm the save every time, except when copyOnSave is true, then we do want to check.
+ if (title === lastSavedTitle && !copyOnSave) {
+ return true;
+ }
+ const response = await savedObjectsClient.find({
+ perPage: 10,
+ fields: ['title'],
+ search: `"${title}"`,
+ searchFields: ['title'],
+ type: DashboardConstants.DASHBOARD_SAVED_OBJECT_TYPE,
+ });
+ const duplicate = response.savedObjects.find(
+ (obj) => obj.get('title').toLowerCase() === title.toLowerCase()
+ );
+ if (!duplicate) {
+ return true;
+ }
+ onTitleDuplicate?.();
+ return false;
+}
diff --git a/src/plugins/dashboard/public/services/dashboard_saved_object/lib/find_dashboard_saved_objects.ts b/src/plugins/dashboard/public/services/dashboard_saved_object/lib/find_dashboard_saved_objects.ts
new file mode 100644
index 0000000000000..c24511f56d3e2
--- /dev/null
+++ b/src/plugins/dashboard/public/services/dashboard_saved_object/lib/find_dashboard_saved_objects.ts
@@ -0,0 +1,93 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 {
+ SavedObjectError,
+ SavedObjectsClientContract,
+ SavedObjectsFindOptionsReference,
+ SimpleSavedObject,
+} from '@kbn/core/public';
+
+import { DashboardConstants } from '../../..';
+import type { DashboardAttributes } from '../../../application';
+
+export interface FindDashboardSavedObjectsArgs {
+ hasReference?: SavedObjectsFindOptionsReference[];
+ savedObjectsClient: SavedObjectsClientContract;
+ search: string;
+ size: number;
+}
+
+export interface FindDashboardSavedObjectsResponse {
+ total: number;
+ hits: Array>;
+}
+
+export async function findDashboardSavedObjects({
+ savedObjectsClient,
+ hasReference,
+ search,
+ size,
+}: FindDashboardSavedObjectsArgs): Promise {
+ const { total, savedObjects } = await savedObjectsClient.find({
+ type: DashboardConstants.DASHBOARD_SAVED_OBJECT_TYPE,
+ search: search ? `${search}*` : undefined,
+ searchFields: ['title^3', 'description'],
+ defaultSearchOperator: 'AND' as 'AND',
+ perPage: size,
+ hasReference,
+ page: 1,
+ });
+ return {
+ total,
+ hits: savedObjects,
+ };
+}
+
+export type FindDashboardBySavedObjectIdsResult = { id: string } & (
+ | { status: 'success'; attributes: DashboardAttributes }
+ | { status: 'error'; error: SavedObjectError }
+);
+
+export async function findDashboardSavedObjectsByIds(
+ savedObjectsClient: SavedObjectsClientContract,
+ ids: string[]
+): Promise {
+ const { savedObjects } = await savedObjectsClient.bulkGet(
+ ids.map((id) => ({ id, type: DashboardConstants.DASHBOARD_SAVED_OBJECT_TYPE }))
+ );
+
+ return savedObjects.map((savedObjectResult) => {
+ if (savedObjectResult.error)
+ return { status: 'error', error: savedObjectResult.error, id: savedObjectResult.id };
+ const { attributes, id } = savedObjectResult;
+ return {
+ id,
+ status: 'success',
+ attributes: attributes as DashboardAttributes,
+ };
+ });
+}
+
+export async function findDashboardIdByTitle(
+ title: string,
+ savedObjectsClient: SavedObjectsClientContract
+): Promise<{ id: string } | undefined> {
+ const results = await savedObjectsClient.find({
+ search: `"${title}"`,
+ searchFields: ['title'],
+ type: 'dashboard',
+ });
+ // The search isn't an exact match, lets see if we can find a single exact match to use
+ const matchingDashboards = results.savedObjects.filter(
+ (dashboard) => dashboard.attributes.title.toLowerCase() === title.toLowerCase()
+ );
+ if (matchingDashboards.length === 1) {
+ return { id: matchingDashboards[0].id };
+ }
+}
diff --git a/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts b/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts
new file mode 100644
index 0000000000000..963814013dc30
--- /dev/null
+++ b/src/plugins/dashboard/public/services/dashboard_saved_object/lib/load_dashboard_state_from_saved_object.ts
@@ -0,0 +1,201 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import { ReactElement } from 'react';
+
+import { Filter } from '@kbn/es-query';
+import { ViewMode } from '@kbn/embeddable-plugin/public';
+import { SavedObjectNotFound } from '@kbn/kibana-utils-plugin/public';
+import { rawControlGroupAttributesToControlGroupInput } from '@kbn/controls-plugin/common';
+import { parseSearchSourceJSON, injectSearchSourceReferences } from '@kbn/data-plugin/public';
+import { SavedObjectAttributes, SavedObjectsClientContract, ScopedHistory } from '@kbn/core/public';
+
+import { migrateLegacyQuery } from '../../../application/lib/migrate_legacy_query';
+
+import {
+ DashboardConstants,
+ defaultDashboardState,
+ createDashboardEditUrl,
+} from '../../../dashboard_constants';
+import type { DashboardAttributes } from '../../../application';
+import { DashboardSavedObjectRequiredServices } from '../types';
+import { DashboardOptions, DashboardState } from '../../../types';
+import { cleanFiltersForSerialize } from '../../../application/lib';
+import { convertSavedPanelsToPanelMap, injectReferences } from '../../../../common';
+
+export type LoadDashboardFromSavedObjectProps = DashboardSavedObjectRequiredServices & {
+ id?: string;
+ getScopedHistory?: () => ScopedHistory;
+ savedObjectsClient: SavedObjectsClientContract;
+};
+
+export interface LoadDashboardFromSavedObjectReturn {
+ redirectedToAlias?: boolean;
+ dashboardState?: DashboardState;
+ createConflictWarning?: () => ReactElement | undefined;
+}
+
+type SuccessfulLoadDashboardFromSavedObjectReturn = LoadDashboardFromSavedObjectReturn & {
+ dashboardState: DashboardState;
+};
+
+export const dashboardStateLoadWasSuccessful = (
+ incoming?: LoadDashboardFromSavedObjectReturn
+): incoming is SuccessfulLoadDashboardFromSavedObjectReturn => {
+ return Boolean(incoming && incoming?.dashboardState && !incoming.redirectedToAlias);
+};
+
+export const loadDashboardStateFromSavedObject = async ({
+ savedObjectsTagging,
+ savedObjectsClient,
+ getScopedHistory,
+ screenshotMode,
+ embeddable,
+ spaces,
+ data,
+ id,
+}: LoadDashboardFromSavedObjectProps): Promise => {
+ const {
+ search: dataSearchService,
+ query: { queryString },
+ } = data;
+
+ /**
+ * This is a newly created dashboard, so there is no saved object state to load.
+ */
+ if (!id) return { dashboardState: defaultDashboardState };
+
+ /**
+ * Load the saved object
+ */
+ const {
+ outcome,
+ alias_purpose: aliasPurpose,
+ alias_target_id: aliasId,
+ saved_object: rawDashboardSavedObject,
+ } = await savedObjectsClient.resolve(
+ DashboardConstants.DASHBOARD_SAVED_OBJECT_TYPE,
+ id
+ );
+ if (!rawDashboardSavedObject._version) {
+ throw new SavedObjectNotFound(DashboardConstants.DASHBOARD_SAVED_OBJECT_TYPE, id);
+ }
+
+ /**
+ * Inject saved object references back into the saved object attributes
+ */
+ const { references, attributes: rawAttributes } = rawDashboardSavedObject;
+ const attributes = (() => {
+ if (!references || references.length === 0) return rawAttributes;
+ return injectReferences(
+ { references, attributes: rawAttributes as unknown as SavedObjectAttributes },
+ {
+ embeddablePersistableStateService: embeddable,
+ }
+ ) as unknown as DashboardAttributes;
+ })();
+
+ /**
+ * Handle saved object resolve alias outcome by redirecting
+ */
+ const scopedHistory = getScopedHistory?.();
+ if (scopedHistory && outcome === 'aliasMatch' && id && aliasId) {
+ const path = scopedHistory.location.hash.replace(id, aliasId);
+ if (screenshotMode.isScreenshotMode()) {
+ scopedHistory.replace(path);
+ } else {
+ await spaces.redirectLegacyUrl?.({ path, aliasPurpose });
+ }
+ return { redirectedToAlias: true };
+ }
+
+ /**
+ * Create conflict warning component if there is a saved object id conflict
+ */
+ const createConflictWarning =
+ scopedHistory && outcome === 'conflict' && aliasId
+ ? () =>
+ spaces.getLegacyUrlConflict?.({
+ currentObjectId: id,
+ otherObjectId: aliasId,
+ otherObjectPath: `#${createDashboardEditUrl(aliasId)}${scopedHistory.location.search}`,
+ })
+ : undefined;
+
+ /**
+ * Create search source and pull filters and query from it.
+ */
+ const searchSourceJSON = attributes.kibanaSavedObjectMeta.searchSourceJSON;
+ const searchSource = await (async () => {
+ if (!searchSourceJSON) {
+ return await dataSearchService.searchSource.create();
+ }
+ try {
+ let searchSourceValues = parseSearchSourceJSON(searchSourceJSON);
+ searchSourceValues = injectSearchSourceReferences(searchSourceValues as any, references);
+ return await dataSearchService.searchSource.create(searchSourceValues);
+ } catch (error: any) {
+ return await dataSearchService.searchSource.create();
+ }
+ })();
+
+ const filters = cleanFiltersForSerialize((searchSource?.getOwnField('filter') as Filter[]) ?? []);
+
+ const query = migrateLegacyQuery(
+ searchSource?.getOwnField('query') || queryString.getDefaultQuery() // TODO SAVED DASHBOARDS determine if migrateLegacyQuery is still needed
+ );
+
+ const {
+ refreshInterval,
+ description,
+ timeRestore,
+ optionsJSON,
+ panelsJSON,
+ timeFrom,
+ timeTo,
+ title,
+ } = attributes;
+
+ const timeRange =
+ timeRestore && timeFrom && timeTo
+ ? {
+ from: timeFrom,
+ to: timeTo,
+ }
+ : undefined;
+
+ /**
+ * Parse panels and options from JSON
+ */
+ const options: DashboardOptions = optionsJSON ? JSON.parse(optionsJSON) : undefined;
+ const panels = convertSavedPanelsToPanelMap(panelsJSON ? JSON.parse(panelsJSON) : []);
+
+ return {
+ createConflictWarning,
+ dashboardState: {
+ ...defaultDashboardState,
+
+ savedObjectId: id,
+ refreshInterval,
+ timeRestore,
+ description,
+ timeRange,
+ options,
+ filters,
+ panels,
+ title,
+ query,
+
+ viewMode: ViewMode.VIEW, // dashboards loaded from saved object default to view mode. If it was edited recently, the view mode from session storage will override this.
+ tags: savedObjectsTagging.getTagIdsFromReferences?.(references) ?? [],
+
+ controlGroupInput:
+ attributes.controlGroupInput &&
+ rawControlGroupAttributesToControlGroupInput(attributes.controlGroupInput),
+ },
+ };
+};
diff --git a/src/plugins/dashboard/public/services/dashboard_saved_object/lib/save_dashboard_state_to_saved_object.ts b/src/plugins/dashboard/public/services/dashboard_saved_object/lib/save_dashboard_state_to_saved_object.ts
new file mode 100644
index 0000000000000..11c6988d22f96
--- /dev/null
+++ b/src/plugins/dashboard/public/services/dashboard_saved_object/lib/save_dashboard_state_to_saved_object.ts
@@ -0,0 +1,182 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { pick } from 'lodash';
+
+import { isFilterPinned } from '@kbn/es-query';
+import { SavedObjectsClientContract } from '@kbn/core/public';
+import { SavedObjectAttributes } from '@kbn/core-saved-objects-common';
+
+import { extractSearchSourceReferences, RefreshInterval } from '@kbn/data-plugin/public';
+import { SavedObjectSaveOpts } from '@kbn/saved-objects-plugin/public';
+
+import type { DashboardAttributes } from '../../../application';
+import { DashboardSavedObjectRequiredServices } from '../types';
+import { DashboardConstants } from '../../../dashboard_constants';
+import { convertTimeToUTCString } from '../../../application/lib';
+import { DashboardRedirect, DashboardState } from '../../../types';
+import { dashboardSaveToastStrings } from '../../../dashboard_strings';
+import { convertPanelMapToSavedPanels, extractReferences } from '../../../../common';
+import { serializeControlGroupInput } from '../../../application/lib/dashboard_control_group';
+
+export type SavedDashboardSaveOpts = SavedObjectSaveOpts & { saveAsCopy?: boolean };
+
+export type SaveDashboardProps = DashboardSavedObjectRequiredServices & {
+ currentState: DashboardState;
+ redirectTo: DashboardRedirect;
+ saveOptions: SavedDashboardSaveOpts;
+ savedObjectsClient: SavedObjectsClientContract;
+};
+
+export interface SaveDashboardReturn {
+ id?: string;
+ error?: string;
+ redirected?: boolean;
+}
+
+export const saveDashboardStateToSavedObject = async ({
+ data,
+ redirectTo,
+ embeddable,
+ saveOptions,
+ currentState,
+ savedObjectsClient,
+ savedObjectsTagging,
+ dashboardSessionStorage,
+ notifications: { toasts },
+ initializerContext: { kibanaVersion },
+}: SaveDashboardProps): Promise => {
+ const {
+ search: dataSearchService,
+ query: {
+ timefilter: { timefilter },
+ },
+ } = data;
+
+ const {
+ tags,
+ query,
+ title,
+ panels,
+ filters,
+ options,
+ timeRestore,
+ description,
+ savedObjectId,
+ controlGroupInput,
+ } = currentState;
+
+ /**
+ * Stringify filters and query into search source JSON
+ */
+ const { searchSourceJSON, searchSourceReferences } = await (async () => {
+ const searchSource = await dataSearchService.searchSource.create();
+ searchSource.setField(
+ 'filter', // save only unpinned filters
+ filters.filter((filter) => !isFilterPinned(filter))
+ );
+ searchSource.setField('query', query);
+
+ const rawSearchSourceFields = searchSource.getSerializedFields();
+ const [fields, references] = extractSearchSourceReferences(rawSearchSourceFields);
+ return { searchSourceReferences: references, searchSourceJSON: JSON.stringify(fields) };
+ })();
+
+ /**
+ * Stringify options and panels
+ */
+ const optionsJSON = JSON.stringify(options);
+ const panelsJSON = JSON.stringify(convertPanelMapToSavedPanels(panels, kibanaVersion));
+
+ /**
+ * Parse global time filter settings
+ */
+ const { from, to } = timefilter.getTime();
+ const timeFrom = timeRestore ? convertTimeToUTCString(from) : undefined;
+ const timeTo = timeRestore ? convertTimeToUTCString(to) : undefined;
+ const refreshInterval = timeRestore
+ ? (pick(timefilter.getRefreshInterval(), [
+ 'display',
+ 'pause',
+ 'section',
+ 'value',
+ ]) as RefreshInterval)
+ : undefined;
+
+ const rawDashboardAttributes: DashboardAttributes = {
+ controlGroupInput: serializeControlGroupInput(controlGroupInput),
+ kibanaSavedObjectMeta: { searchSourceJSON },
+ refreshInterval,
+ timeRestore,
+ optionsJSON,
+ description,
+ panelsJSON,
+ timeFrom,
+ title,
+ timeTo,
+ version: 1, // todo - where does version come from? Why is it needed?
+ };
+
+ /**
+ * Extract references from raw attributes and tags into the references array.
+ */
+ const { attributes, references: dashboardReferences } = extractReferences(
+ {
+ attributes: rawDashboardAttributes as unknown as SavedObjectAttributes,
+ references: searchSourceReferences,
+ },
+ { embeddablePersistableStateService: embeddable }
+ );
+ const references = savedObjectsTagging.updateTagsReferences
+ ? savedObjectsTagging.updateTagsReferences(dashboardReferences, tags)
+ : dashboardReferences;
+
+ /**
+ * Save the saved object using the saved objects client
+ */
+ const idToSaveTo = saveOptions.saveAsCopy ? undefined : savedObjectId;
+ try {
+ const { id: newId } = await savedObjectsClient.create(
+ DashboardConstants.DASHBOARD_SAVED_OBJECT_TYPE,
+ attributes,
+ {
+ id: idToSaveTo,
+ overwrite: true,
+ references,
+ }
+ );
+
+ if (newId) {
+ toasts.addSuccess({
+ title: dashboardSaveToastStrings.getSuccessString(currentState.title),
+ 'data-test-subj': 'saveDashboardSuccess',
+ });
+
+ /**
+ * If the dashboard id has been changed, redirect to the new ID to keep the url param in sync.
+ */
+ if (newId !== savedObjectId) {
+ dashboardSessionStorage.clearState(savedObjectId);
+ redirectTo({
+ id: newId,
+ editMode: true,
+ useReplace: true,
+ destination: 'dashboard',
+ });
+ return { redirected: true, id: newId };
+ }
+ }
+ return { id: newId };
+ } catch (error) {
+ toasts.addDanger({
+ title: dashboardSaveToastStrings.getFailureString(currentState.title, error.message),
+ 'data-test-subj': 'saveDashboardFailure',
+ });
+ return { error };
+ }
+};
diff --git a/src/plugins/dashboard/public/services/dashboard_saved_object/types.ts b/src/plugins/dashboard/public/services/dashboard_saved_object/types.ts
new file mode 100644
index 0000000000000..dd817c751aa8d
--- /dev/null
+++ b/src/plugins/dashboard/public/services/dashboard_saved_object/types.ts
@@ -0,0 +1,63 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { SavedObjectsClientContract } from '@kbn/core/public';
+
+import { DashboardDataService } from '../data/types';
+import { DashboardSpacesService } from '../spaces/types';
+import { DashboardEmbeddableService } from '../embeddable/types';
+import { DashboardNotificationsService } from '../notifications/types';
+import { DashboardScreenshotModeService } from '../screenshot_mode/types';
+import { DashboardInitializerContextService } from '../initializer_context/types';
+import { DashboardSavedObjectsTaggingService } from '../saved_objects_tagging/types';
+import { DashboardSessionStorageServiceType } from '../dashboard_session_storage/types';
+
+import {
+ LoadDashboardFromSavedObjectProps,
+ LoadDashboardFromSavedObjectReturn,
+} from './lib/load_dashboard_state_from_saved_object';
+import {
+ SaveDashboardProps,
+ SaveDashboardReturn,
+} from './lib/save_dashboard_state_to_saved_object';
+import {
+ FindDashboardBySavedObjectIdsResult,
+ FindDashboardSavedObjectsArgs,
+ FindDashboardSavedObjectsResponse,
+} from './lib/find_dashboard_saved_objects';
+import { DashboardDuplicateTitleCheckProps } from './lib/check_for_duplicate_dashboard_title';
+
+export interface DashboardSavedObjectRequiredServices {
+ screenshotMode: DashboardScreenshotModeService;
+ embeddable: DashboardEmbeddableService;
+ spaces: DashboardSpacesService;
+ data: DashboardDataService;
+ initializerContext: DashboardInitializerContextService;
+ notifications: DashboardNotificationsService;
+ savedObjectsTagging: DashboardSavedObjectsTaggingService;
+ dashboardSessionStorage: DashboardSessionStorageServiceType;
+}
+
+export interface DashboardSavedObjectService {
+ loadDashboardStateFromSavedObject: (
+ props: Pick
+ ) => Promise;
+
+ saveDashboardStateToSavedObject: (
+ props: Pick
+ ) => Promise;
+ findDashboards: {
+ findSavedObjects: (
+ props: Pick
+ ) => Promise;
+ findByIds: (ids: string[]) => Promise;
+ findByTitle: (title: string) => Promise<{ id: string } | undefined>;
+ };
+ checkForDuplicateDashboardTitle: (meta: DashboardDuplicateTitleCheckProps) => Promise;
+ savedObjectsClient: SavedObjectsClientContract;
+}
diff --git a/src/plugins/dashboard/public/services/embeddable/embeddable.stub.ts b/src/plugins/dashboard/public/services/embeddable/embeddable.stub.ts
index 18f952d4620e2..a1a6b2973664f 100644
--- a/src/plugins/dashboard/public/services/embeddable/embeddable.stub.ts
+++ b/src/plugins/dashboard/public/services/embeddable/embeddable.stub.ts
@@ -16,9 +16,13 @@ export const embeddableServiceFactory: EmbeddableServiceFactory = () => {
const pluginMock = embeddablePluginMock.createStartContract();
return {
- getEmbeddableFactory: pluginMock.getEmbeddableFactory,
getEmbeddableFactories: pluginMock.getEmbeddableFactories,
+ getEmbeddableFactory: pluginMock.getEmbeddableFactory,
getStateTransfer: pluginMock.getStateTransfer,
+ getAllMigrations: pluginMock.getAllMigrations,
EmbeddablePanel: pluginMock.EmbeddablePanel,
+ telemetry: pluginMock.telemetry,
+ extract: pluginMock.extract,
+ inject: pluginMock.inject,
};
};
diff --git a/src/plugins/dashboard/public/services/embeddable/embeddable_service.ts b/src/plugins/dashboard/public/services/embeddable/embeddable_service.ts
index 258c11f697bc5..c796bbde2d7da 100644
--- a/src/plugins/dashboard/public/services/embeddable/embeddable_service.ts
+++ b/src/plugins/dashboard/public/services/embeddable/embeddable_service.ts
@@ -6,7 +6,10 @@
* Side Public License, v 1.
*/
+import { pick } from 'lodash';
+
import type { KibanaPluginServiceFactory } from '@kbn/presentation-util-plugin/public';
+
import type { DashboardStartDependencies } from '../../plugin';
import type { DashboardEmbeddableService } from './types';
@@ -15,14 +18,16 @@ export type EmbeddableServiceFactory = KibanaPluginServiceFactory<
DashboardStartDependencies
>;
export const embeddableServiceFactory: EmbeddableServiceFactory = ({ startPlugins }) => {
- const {
- embeddable: { getEmbeddableFactory, getEmbeddableFactories, getStateTransfer, EmbeddablePanel },
- } = startPlugins;
+ const { embeddable } = startPlugins;
- return {
- getEmbeddableFactory,
- getEmbeddableFactories,
- getStateTransfer,
- EmbeddablePanel,
- };
+ return pick(embeddable, [
+ 'getEmbeddableFactory',
+ 'getEmbeddableFactories',
+ 'getStateTransfer',
+ 'EmbeddablePanel',
+ 'getAllMigrations',
+ 'telemetry',
+ 'extract',
+ 'inject',
+ ]);
};
diff --git a/src/plugins/dashboard/public/services/embeddable/types.ts b/src/plugins/dashboard/public/services/embeddable/types.ts
index ef24db7c2e624..40d0ae02bfa7c 100644
--- a/src/plugins/dashboard/public/services/embeddable/types.ts
+++ b/src/plugins/dashboard/public/services/embeddable/types.ts
@@ -8,9 +8,14 @@
import type { EmbeddableStart } from '@kbn/embeddable-plugin/public';
-export interface DashboardEmbeddableService {
- getEmbeddableFactory: EmbeddableStart['getEmbeddableFactory'];
- getEmbeddableFactories: EmbeddableStart['getEmbeddableFactories'];
- getStateTransfer: EmbeddableStart['getStateTransfer'];
- EmbeddablePanel: EmbeddableStart['EmbeddablePanel'];
-}
+export type DashboardEmbeddableService = Pick<
+ EmbeddableStart,
+ | 'getEmbeddableFactories'
+ | 'getEmbeddableFactory'
+ | 'getAllMigrations'
+ | 'getStateTransfer'
+ | 'EmbeddablePanel'
+ | 'telemetry'
+ | 'extract'
+ | 'inject'
+>;
diff --git a/src/plugins/dashboard/public/services/plugin_services.stub.ts b/src/plugins/dashboard/public/services/plugin_services.stub.ts
index c703b8b6767ac..b8c39909dd61a 100644
--- a/src/plugins/dashboard/public/services/plugin_services.stub.ts
+++ b/src/plugins/dashboard/public/services/plugin_services.stub.ts
@@ -29,7 +29,6 @@ import { initializerContextServiceFactory } from './initializer_context/initiali
import { navigationServiceFactory } from './navigation/navigation.stub';
import { notificationsServiceFactory } from './notifications/notifications.stub';
import { overlaysServiceFactory } from './overlays/overlays.stub';
-import { savedObjectsServiceFactory } from './saved_objects/saved_objects.stub';
import { savedObjectsTaggingServiceFactory } from './saved_objects_tagging/saved_objects_tagging.stub';
import { screenshotModeServiceFactory } from './screenshot_mode/screenshot_mode.stub';
import { settingsServiceFactory } from './settings/settings.stub';
@@ -38,8 +37,10 @@ import { usageCollectionServiceFactory } from './usage_collection/usage_collecti
import { spacesServiceFactory } from './spaces/spaces.stub';
import { urlForwardingServiceFactory } from './url_forwarding/url_fowarding.stub';
import { visualizationsServiceFactory } from './visualizations/visualizations.stub';
+import { dashboardSavedObjectServiceFactory } from './dashboard_saved_object/dashboard_saved_object.stub';
export const providers: PluginServiceProviders = {
+ dashboardSavedObject: new PluginServiceProvider(dashboardSavedObjectServiceFactory),
analytics: new PluginServiceProvider(analyticsServiceFactory),
application: new PluginServiceProvider(applicationServiceFactory),
chrome: new PluginServiceProvider(chromeServiceFactory),
@@ -55,7 +56,6 @@ export const providers: PluginServiceProviders = {
navigation: new PluginServiceProvider(navigationServiceFactory),
notifications: new PluginServiceProvider(notificationsServiceFactory),
overlays: new PluginServiceProvider(overlaysServiceFactory),
- savedObjects: new PluginServiceProvider(savedObjectsServiceFactory),
savedObjectsTagging: new PluginServiceProvider(savedObjectsTaggingServiceFactory),
screenshotMode: new PluginServiceProvider(screenshotModeServiceFactory),
settings: new PluginServiceProvider(settingsServiceFactory),
diff --git a/src/plugins/dashboard/public/services/plugin_services.ts b/src/plugins/dashboard/public/services/plugin_services.ts
index 421b5e75c482c..b4ee1b566a8ac 100644
--- a/src/plugins/dashboard/public/services/plugin_services.ts
+++ b/src/plugins/dashboard/public/services/plugin_services.ts
@@ -30,7 +30,6 @@ import { navigationServiceFactory } from './navigation/navigation_service';
import { notificationsServiceFactory } from './notifications/notifications_service';
import { overlaysServiceFactory } from './overlays/overlays_service';
import { screenshotModeServiceFactory } from './screenshot_mode/screenshot_mode_service';
-import { savedObjectsServiceFactory } from './saved_objects/saved_objects_service';
import { savedObjectsTaggingServiceFactory } from './saved_objects_tagging/saved_objects_tagging_service';
import { settingsServiceFactory } from './settings/settings_service';
import { shareServiceFactory } from './share/share_services';
@@ -39,17 +38,29 @@ import { urlForwardingServiceFactory } from './url_forwarding/url_forwarding_ser
import { visualizationsServiceFactory } from './visualizations/visualizations_service';
import { usageCollectionServiceFactory } from './usage_collection/usage_collection_service';
import { analyticsServiceFactory } from './analytics/analytics_service';
+import { dashboardSavedObjectServiceFactory } from './dashboard_saved_object/dashboard_saved_object_service';
const providers: PluginServiceProviders = {
+ dashboardSavedObject: new PluginServiceProvider(dashboardSavedObjectServiceFactory, [
+ 'dashboardSessionStorage',
+ 'savedObjectsTagging',
+ 'initializerContext',
+ 'screenshotMode',
+ 'notifications',
+ 'embeddable',
+ 'spaces',
+ 'data',
+ ]),
+ dashboardSessionStorage: new PluginServiceProvider(dashboardSessionStorageServiceFactory, [
+ 'notifications',
+ 'spaces',
+ ]),
+
analytics: new PluginServiceProvider(analyticsServiceFactory),
application: new PluginServiceProvider(applicationServiceFactory),
chrome: new PluginServiceProvider(chromeServiceFactory),
coreContext: new PluginServiceProvider(coreContextServiceFactory),
dashboardCapabilities: new PluginServiceProvider(dashboardCapabilitiesServiceFactory),
- dashboardSessionStorage: new PluginServiceProvider(dashboardSessionStorageServiceFactory, [
- 'notifications',
- 'spaces',
- ]),
data: new PluginServiceProvider(dataServiceFactory),
dataViewEditor: new PluginServiceProvider(dataViewEditorServiceFactory),
documentationLinks: new PluginServiceProvider(documentationLinksServiceFactory),
@@ -59,7 +70,6 @@ const providers: PluginServiceProviders SavedObject;
- public type: string;
- public lowercaseType: string;
- public loaderProperties: Record;
-
- constructor(
- SavedObjectClass: any,
- private readonly savedObjectsClient: SavedObjectsClientContract
- ) {
- this.type = SavedObjectClass.type;
- this.Class = SavedObjectClass;
- this.lowercaseType = this.type.toLowerCase();
-
- this.loaderProperties = {
- name: `${this.lowercaseType}s`,
- noun: upperFirst(this.type),
- nouns: `${this.lowercaseType}s`,
- };
- }
-
- /**
- * Retrieve a saved object by id or create new one.
- * Returns a promise that completes when the object finishes
- * initializing.
- * @param opts
- * @returns {Promise}
- */
- async get(opts?: Record | string) {
- // can accept object as argument in accordance to SavedVis class
- // see src/plugins/saved_objects/public/saved_object/saved_object_loader.ts
- // @ts-ignore
- const obj = new this.Class(opts);
- return obj.init();
- }
-
- urlFor(id: string) {
- return `#/${this.lowercaseType}/${encodeURIComponent(id)}`;
- }
-
- async delete(ids: string | string[]) {
- const idsUsed = !Array.isArray(ids) ? [ids] : ids;
-
- const deletions = idsUsed.map((id) => {
- // @ts-ignore
- const savedObject = new this.Class(id);
- return savedObject.delete();
- });
- await Promise.all(deletions);
- }
-
- /**
- * Updates source to contain an id, url and references fields, and returns the updated
- * source object.
- * @param source
- * @param id
- * @param references
- * @returns {source} The modified source object, with an id and url field.
- */
- mapHitSource(
- source: Record,
- id: string,
- references: SavedObjectReference[] = [],
- updatedAt?: string
- ): Record {
- return {
- ...source,
- id,
- url: this.urlFor(id),
- references,
- updatedAt,
- };
- }
-
- /**
- * Updates hit.attributes to contain an id and url field, and returns the updated
- * attributes object.
- * @param hit
- * @returns {hit.attributes} The modified hit.attributes object, with an id and url field.
- */
- mapSavedObjectApiHits({
- attributes,
- id,
- references = [],
- updatedAt,
- }: {
- attributes: Record;
- id: string;
- references?: SavedObjectReference[];
- updatedAt?: string;
- }) {
- return this.mapHitSource(attributes, id, references, updatedAt);
- }
-
- /**
- * TODO: Rather than use a hardcoded limit, implement pagination. See
- * https://github.com/elastic/kibana/issues/8044 for reference.
- *
- * @param search
- * @param size
- * @param fields
- * @returns {Promise}
- */
- private findAll(
- search: string = '',
- { size = 100, fields, hasReference }: SavedObjectLoaderFindOptions
- ) {
- return this.savedObjectsClient
- .find>({
- type: this.lowercaseType,
- search: search ? `${search}*` : undefined,
- perPage: size,
- page: 1,
- searchFields: ['title^3', 'description'],
- defaultSearchOperator: 'AND',
- fields,
- hasReference,
- } as SavedObjectsFindOptions)
- .then((resp) => {
- return {
- total: resp.total,
- hits: resp.savedObjects.map((savedObject) => this.mapSavedObjectApiHits(savedObject)),
- };
- });
- }
-
- find(search: string = '', sizeOrOptions: number | SavedObjectLoaderFindOptions = 100) {
- const options: SavedObjectLoaderFindOptions =
- typeof sizeOrOptions === 'number'
- ? {
- size: sizeOrOptions,
- }
- : sizeOrOptions;
-
- return this.findAll(search, options).then((resp) => {
- return {
- total: resp.total,
- hits: resp.hits.filter((savedObject) => !savedObject.error),
- };
- });
- }
-}
diff --git a/src/plugins/dashboard/public/services/saved_objects/saved_objects.stub.ts b/src/plugins/dashboard/public/services/saved_objects/saved_objects.stub.ts
deleted file mode 100644
index f26e36392603f..0000000000000
--- a/src/plugins/dashboard/public/services/saved_objects/saved_objects.stub.ts
+++ /dev/null
@@ -1,21 +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 { savedObjectsServiceMock } from '@kbn/core-saved-objects-browser-mocks';
-import { PluginServiceFactory } from '@kbn/presentation-util-plugin/public';
-import { DashboardSavedObjectsService } from './types';
-
-type SavedObjectsServiceFactory = PluginServiceFactory;
-
-export const savedObjectsServiceFactory: SavedObjectsServiceFactory = () => {
- const pluginMock = savedObjectsServiceMock.createStartContract();
-
- return {
- client: pluginMock.client,
- };
-};
diff --git a/src/plugins/dashboard/public/services/saved_objects/saved_objects_service.ts b/src/plugins/dashboard/public/services/saved_objects/saved_objects_service.ts
deleted file mode 100644
index 3fff4d9e1c361..0000000000000
--- a/src/plugins/dashboard/public/services/saved_objects/saved_objects_service.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may 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 { KibanaPluginServiceFactory } from '@kbn/presentation-util-plugin/public';
-import type { DashboardStartDependencies } from '../../plugin';
-import type { DashboardSavedObjectsService } from './types';
-
-export type SavedObjectsServiceFactory = KibanaPluginServiceFactory<
- DashboardSavedObjectsService,
- DashboardStartDependencies
->;
-
-export const savedObjectsServiceFactory: SavedObjectsServiceFactory = ({ coreStart }) => {
- const {
- savedObjects: { client },
- } = coreStart;
-
- return {
- client,
- };
-};
diff --git a/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging.stub.ts b/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging.stub.ts
index d526eedbc1e47..1a1bcd6ca93bf 100644
--- a/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging.stub.ts
+++ b/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging.stub.ts
@@ -20,9 +20,10 @@ export const savedObjectsTaggingServiceFactory: SavedObjectsTaggingServiceFactor
// I'm not defining components so that I don't have to update the snapshot of `save_modal.test`
// However, if it's ever necessary, it can be done via: `components: pluginMock.components`,
- getSearchBarFilter: pluginMock.getSearchBarFilter,
- getTableColumnDefinition: pluginMock.getTableColumnDefinition,
hasTagDecoration: pluginMock.hasTagDecoration,
parseSearchQuery: pluginMock.parseSearchQuery,
+ getSearchBarFilter: pluginMock.getSearchBarFilter,
+ getTagIdsFromReferences: pluginMock.getTagIdsFromReferences,
+ getTableColumnDefinition: pluginMock.getTableColumnDefinition,
};
};
diff --git a/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging_service.ts b/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging_service.ts
index 7e252ed79d7b7..a100282b4cff2 100644
--- a/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging_service.ts
+++ b/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging_service.ts
@@ -27,19 +27,23 @@ export const savedObjectsTaggingServiceFactory: SavedObjectsTaggingServiceFactor
const {
ui: {
components,
+ parseSearchQuery,
+ hasTagDecoration,
getSearchBarFilter,
+ updateTagsReferences,
+ getTagIdsFromReferences,
getTableColumnDefinition,
- hasTagDecoration,
- parseSearchQuery,
},
} = taggingApi;
return {
hasApi: true,
components,
- getSearchBarFilter,
- getTableColumnDefinition,
hasTagDecoration,
parseSearchQuery,
+ getSearchBarFilter,
+ updateTagsReferences,
+ getTagIdsFromReferences,
+ getTableColumnDefinition,
};
};
diff --git a/src/plugins/dashboard/public/services/saved_objects_tagging/types.ts b/src/plugins/dashboard/public/services/saved_objects_tagging/types.ts
index 803db5ff46d9a..ba08a53709346 100644
--- a/src/plugins/dashboard/public/services/saved_objects_tagging/types.ts
+++ b/src/plugins/dashboard/public/services/saved_objects_tagging/types.ts
@@ -12,9 +12,10 @@ export interface DashboardSavedObjectsTaggingService {
hasApi: boolean; // remove this once the entire service is optional
components?: SavedObjectsTaggingApi['ui']['components'];
- getSearchBarFilter?: SavedObjectsTaggingApi['ui']['getSearchBarFilter'];
- getTableColumnDefinition?: SavedObjectsTaggingApi['ui']['getTableColumnDefinition'];
hasTagDecoration?: SavedObjectsTaggingApi['ui']['hasTagDecoration'];
parseSearchQuery?: SavedObjectsTaggingApi['ui']['parseSearchQuery'];
+ getSearchBarFilter?: SavedObjectsTaggingApi['ui']['getSearchBarFilter'];
+ updateTagsReferences?: SavedObjectsTaggingApi['ui']['updateTagsReferences'];
getTagIdsFromReferences?: SavedObjectsTaggingApi['ui']['getTagIdsFromReferences'];
+ getTableColumnDefinition?: SavedObjectsTaggingApi['ui']['getTableColumnDefinition'];
}
diff --git a/src/plugins/dashboard/public/services/types.ts b/src/plugins/dashboard/public/services/types.ts
index 3309ce0575971..5d14b59e8a125 100644
--- a/src/plugins/dashboard/public/services/types.ts
+++ b/src/plugins/dashboard/public/services/types.ts
@@ -15,6 +15,7 @@ import { DashboardApplicationService } from './application/types';
import { DashboardChromeService } from './chrome/types';
import { DashboardCoreContextService } from './core_context/types';
import { DashboardCapabilitiesService } from './dashboard_capabilities/types';
+import { DashboardSavedObjectService } from './dashboard_saved_object/types';
import { DashboardSessionStorageServiceType } from './dashboard_session_storage/types';
import { DashboardDataService } from './data/types';
import { DashboardDataViewEditorService } from './data_view_editor/types';
@@ -25,7 +26,6 @@ import { DashboardInitializerContextService } from './initializer_context/types'
import { DashboardNavigationService } from './navigation/types';
import { DashboardNotificationsService } from './notifications/types';
import { DashboardOverlaysService } from './overlays/types';
-import { DashboardSavedObjectsService } from './saved_objects/types';
import { DashboardSavedObjectsTaggingService } from './saved_objects_tagging/types';
import { DashboardScreenshotModeService } from './screenshot_mode/types';
import { DashboardSettingsService } from './settings/types';
@@ -39,12 +39,14 @@ export type DashboardPluginServiceParams = KibanaPluginServiceParams void;
-export interface SavedDashboardPanelMap {
- [key: string]: SavedDashboardPanel;
-}
-
-export interface DashboardPanelMap {
- [key: string]: DashboardPanelState;
-}
/**
* DashboardState contains all pieces of tracked state for an individual dashboard
@@ -48,11 +41,13 @@ export interface DashboardState {
description: string;
savedQuery?: string;
timeRestore: boolean;
+ timeRange?: TimeRange;
+ savedObjectId?: string;
fullScreenMode: boolean;
expandedPanelId?: string;
options: DashboardOptions;
panels: DashboardPanelMap;
- timeRange?: TimeRange;
+ refreshInterval?: RefreshInterval;
timeslice?: [number, number];
controlGroupInput?: PersistableControlGroupInput;
@@ -95,19 +90,17 @@ export interface DashboardAppState {
dataViews?: DataView[];
updateLastSavedState?: () => void;
resetToLastSavedState?: () => void;
- savedDashboard?: DashboardSavedObject;
dashboardContainer?: DashboardContainer;
+ createConflictWarning?: () => ReactElement | undefined;
getLatestDashboardState?: () => DashboardState;
$triggerDashboardRefresh: Subject<{ force?: boolean }>;
$onDashboardStateChange: BehaviorSubject;
- applyFilters?: (query: Query, filters: Filter[]) => void;
}
/**
* The shared services and tools used to build a dashboard from a saved object ID.
*/
-// TODO: Remove reference to DashboardAppServices as part of https://github.com/elastic/kibana/pull/138774
-export type DashboardBuildContext = Pick & {
+export interface DashboardBuildContext {
locatorState?: DashboardAppLocatorParams;
history: History;
isEmbeddedExternally: boolean;
@@ -118,7 +111,7 @@ export type DashboardBuildContext = Pick;
$onDashboardStateChange: BehaviorSubject;
executionContext?: KibanaExecutionContext;
-};
+}
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
export type DashboardOptions = {
@@ -156,8 +149,3 @@ export interface DashboardMountContextProps {
onAppLeave: AppMountParameters['onAppLeave'];
setHeaderActionMenu: AppMountParameters['setHeaderActionMenu'];
}
-
-// TODO: Remove DashboardAppServices as part of https://github.com/elastic/kibana/pull/138774
-export interface DashboardAppServices {
- savedDashboards: SavedObjectLoader;
-}
diff --git a/src/plugins/dashboard/server/embeddable/dashboard_container_embeddable_factory.ts b/src/plugins/dashboard/server/embeddable/dashboard_container_embeddable_factory.ts
index 31c236da607a4..df183f631a3ec 100644
--- a/src/plugins/dashboard/server/embeddable/dashboard_container_embeddable_factory.ts
+++ b/src/plugins/dashboard/server/embeddable/dashboard_container_embeddable_factory.ts
@@ -8,10 +8,7 @@
import { EmbeddablePersistableStateService } from '@kbn/embeddable-plugin/common';
import { EmbeddableRegistryDefinition } from '@kbn/embeddable-plugin/server';
-import {
- createExtract,
- createInject,
-} from '../../common/embeddable/dashboard_container_persistable_state';
+import { createExtract, createInject } from '../../common';
export const dashboardPersistableStateServiceFactory = (
persistableStateService: EmbeddablePersistableStateService
diff --git a/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts b/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts
deleted file mode 100644
index b3625bec3e8a9..0000000000000
--- a/src/plugins/dashboard/server/saved_objects/dashboard_migrations.ts
+++ /dev/null
@@ -1,318 +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 { Serializable } from '@kbn/utility-types';
-import { get, flow, mapValues } from 'lodash';
-import {
- SavedObjectAttributes,
- SavedObjectMigrationFn,
- SavedObjectMigrationMap,
-} from '@kbn/core/server';
-
-import { EmbeddableSetup } from '@kbn/embeddable-plugin/server';
-import { SavedObjectEmbeddableInput } from '@kbn/embeddable-plugin/common';
-import { DATA_VIEW_SAVED_OBJECT_TYPE } from '@kbn/data-plugin/common';
-import {
- mergeMigrationFunctionMaps,
- MigrateFunction,
- MigrateFunctionsObject,
-} from '@kbn/kibana-utils-plugin/common';
-import {
- CONTROL_GROUP_TYPE,
- rawControlGroupAttributesToSerializable,
- serializableToRawControlGroupAttributes,
-} from '@kbn/controls-plugin/common';
-import { migrations730 } from './migrations_730';
-import { SavedDashboardPanel } from '../../common/types';
-import { migrateMatchAllQuery } from './migrate_match_all_query';
-import { DashboardDoc700To720, DashboardDoc730ToLatest } from '../../common';
-import { injectReferences, extractReferences } from '../../common/saved_dashboard_references';
-import {
- convertPanelStateToSavedDashboardPanel,
- convertSavedDashboardPanelToPanelState,
-} from '../../common/embeddable/embeddable_saved_object_converters';
-import { replaceIndexPatternReference } from './replace_index_pattern_reference';
-
-function migrateIndexPattern(doc: DashboardDoc700To720) {
- const searchSourceJSON = get(doc, 'attributes.kibanaSavedObjectMeta.searchSourceJSON');
- if (typeof searchSourceJSON !== 'string') {
- return;
- }
- let searchSource;
- try {
- searchSource = JSON.parse(searchSourceJSON);
- } catch (e) {
- // Let it go, the data is invalid and we'll leave it as is
- return;
- }
- if (searchSource.index) {
- searchSource.indexRefName = 'kibanaSavedObjectMeta.searchSourceJSON.index';
- doc.references.push({
- name: searchSource.indexRefName,
- type: DATA_VIEW_SAVED_OBJECT_TYPE,
- id: searchSource.index,
- });
- delete searchSource.index;
- }
- if (searchSource.filter) {
- searchSource.filter.forEach((filterRow: any, i: number) => {
- if (!filterRow.meta || !filterRow.meta.index) {
- return;
- }
- filterRow.meta.indexRefName = `kibanaSavedObjectMeta.searchSourceJSON.filter[${i}].meta.index`;
- doc.references.push({
- name: filterRow.meta.indexRefName,
- type: DATA_VIEW_SAVED_OBJECT_TYPE,
- id: filterRow.meta.index,
- });
- delete filterRow.meta.index;
- });
- }
- doc.attributes.kibanaSavedObjectMeta.searchSourceJSON = JSON.stringify(searchSource);
-}
-
-const migrations700: SavedObjectMigrationFn = (doc): DashboardDoc700To720 => {
- // Set new "references" attribute
- doc.references = doc.references || [];
-
- // Migrate index pattern
- migrateIndexPattern(doc as DashboardDoc700To720);
- // Migrate panels
- const panelsJSON = get(doc, 'attributes.panelsJSON');
- if (typeof panelsJSON !== 'string') {
- return doc as DashboardDoc700To720;
- }
- let panels;
- try {
- panels = JSON.parse(panelsJSON);
- } catch (e) {
- // Let it go, the data is invalid and we'll leave it as is
- return doc as DashboardDoc700To720;
- }
- if (!Array.isArray(panels)) {
- return doc as DashboardDoc700To720;
- }
- panels.forEach((panel, i) => {
- if (!panel.type || !panel.id) {
- return;
- }
- panel.panelRefName = `panel_${i}`;
- doc.references!.push({
- name: `panel_${i}`,
- type: panel.type,
- id: panel.id,
- });
- delete panel.type;
- delete panel.id;
- });
- doc.attributes.panelsJSON = JSON.stringify(panels);
- return doc as DashboardDoc700To720;
-};
-
-/**
- * In 7.8.0 we introduced dashboard drilldowns which are stored inside dashboard saved object as part of embeddable state
- * In 7.11.0 we created an embeddable references/migrations system that allows to properly extract embeddable persistable state
- * https://github.com/elastic/kibana/issues/71409
- * The idea of this migration is to inject all the embeddable panel references and then run the extraction again.
- * As the result of the extraction:
- * 1. In addition to regular `panel_` we will get new references which are extracted by `embeddablePersistableStateService` (dashboard drilldown references)
- * 2. `panel_` references will be regenerated
- * All other references like index-patterns are forwarded non touched
- * @param deps
- */
-function createExtractPanelReferencesMigration(
- deps: DashboardSavedObjectTypeMigrationsDeps
-): SavedObjectMigrationFn {
- return (doc) => {
- const references = doc.references ?? [];
-
- /**
- * Remembering this because dashboard's extractReferences won't return those
- * All other references like `panel_` will be overwritten
- */
- const oldNonPanelReferences = references.filter((ref) => !ref.name.startsWith('panel_'));
-
- const injectedAttributes = injectReferences(
- {
- attributes: doc.attributes as unknown as SavedObjectAttributes,
- references,
- },
- { embeddablePersistableStateService: deps.embeddable }
- );
-
- const { attributes, references: newPanelReferences } = extractReferences(
- { attributes: injectedAttributes, references: [] },
- { embeddablePersistableStateService: deps.embeddable }
- );
-
- return {
- ...doc,
- references: [...oldNonPanelReferences, ...newPanelReferences],
- attributes,
- };
- };
-}
-
-type ValueOrReferenceInput = SavedObjectEmbeddableInput & {
- attributes?: Serializable;
- savedVis?: Serializable;
-};
-
-/**
- * Before 7.10, hidden panel titles were stored as a blank string on the title attribute. In 7.10, this was replaced
- * with a usage of the existing hidePanelTitles key. Even though blank string titles still technically work
- * in versions > 7.10, they are less explicit than using the hidePanelTitles key. This migration transforms all
- * blank string titled panels to panels with the titles explicitly hidden.
- */
-export const migrateExplicitlyHiddenTitles: SavedObjectMigrationFn = (doc) => {
- const { attributes } = doc;
-
- // Skip if panelsJSON is missing
- if (typeof attributes?.panelsJSON !== 'string') return doc;
-
- try {
- const panels = JSON.parse(attributes.panelsJSON) as SavedDashboardPanel[];
- // Same here, prevent failing saved object import if ever panels aren't an array.
- if (!Array.isArray(panels)) return doc;
-
- const newPanels: SavedDashboardPanel[] = [];
- panels.forEach((panel) => {
- // Convert each panel into the dashboard panel state
- const originalPanelState =
- convertSavedDashboardPanelToPanelState(panel);
- newPanels.push(
- convertPanelStateToSavedDashboardPanel(
- {
- ...originalPanelState,
- explicitInput: {
- ...originalPanelState.explicitInput,
- ...(originalPanelState.explicitInput.title === '' &&
- !originalPanelState.explicitInput.hidePanelTitles
- ? { hidePanelTitles: true }
- : {}),
- },
- },
- panel.version
- )
- );
- });
- return {
- ...doc,
- attributes: {
- ...attributes,
- panelsJSON: JSON.stringify(newPanels),
- },
- };
- } catch {
- return doc;
- }
-};
-
-// Runs the embeddable migrations on each panel
-const migrateByValuePanels =
- (migrate: MigrateFunction, version: string): SavedObjectMigrationFn =>
- (doc: any) => {
- const { attributes } = doc;
-
- if (attributes?.controlGroupInput) {
- const controlGroupInput = rawControlGroupAttributesToSerializable(
- attributes.controlGroupInput
- );
- const migratedControlGroupInput = migrate({
- ...controlGroupInput,
- type: CONTROL_GROUP_TYPE,
- });
- attributes.controlGroupInput =
- serializableToRawControlGroupAttributes(migratedControlGroupInput);
- }
-
- // Skip if panelsJSON is missing otherwise this will cause saved object import to fail when
- // importing objects without panelsJSON. At development time of this, there is no guarantee each saved
- // object has panelsJSON in all previous versions of kibana.
- if (typeof attributes?.panelsJSON !== 'string') {
- return doc;
- }
-
- const panels = JSON.parse(attributes.panelsJSON) as SavedDashboardPanel[];
- // Same here, prevent failing saved object import if ever panels aren't an array.
- if (!Array.isArray(panels)) {
- return doc;
- }
- const newPanels: SavedDashboardPanel[] = [];
- panels.forEach((panel) => {
- // Convert each panel into a state that can be passed to EmbeddablesSetup.migrate
- const originalPanelState =
- convertSavedDashboardPanelToPanelState(panel);
-
- // saved vis is used to store by value input for Visualize. This should eventually be renamed to `attributes` to align with Lens and Maps
- if (
- originalPanelState.explicitInput.attributes ||
- originalPanelState.explicitInput.savedVis
- ) {
- // If this panel is by value, migrate the state using embeddable migrations
- const migratedInput = migrate({
- ...originalPanelState.explicitInput,
- type: originalPanelState.type,
- });
- // Convert the embeddable state back into the panel shape
- newPanels.push(
- convertPanelStateToSavedDashboardPanel(
- {
- ...originalPanelState,
- explicitInput: { ...migratedInput, id: migratedInput.id as string },
- },
- version
- )
- );
- } else {
- newPanels.push(panel);
- }
- });
- return {
- ...doc,
- attributes: {
- ...attributes,
- panelsJSON: JSON.stringify(newPanels),
- },
- };
- };
-
-export interface DashboardSavedObjectTypeMigrationsDeps {
- embeddable: EmbeddableSetup;
-}
-
-export const createDashboardSavedObjectTypeMigrations = (
- deps: DashboardSavedObjectTypeMigrationsDeps
-): SavedObjectMigrationMap => {
- const embeddableMigrations = mapValues(
- deps.embeddable.getAllMigrations(),
- migrateByValuePanels
- ) as MigrateFunctionsObject;
-
- const dashboardMigrations = {
- /**
- * We need to have this migration twice, once with a version prior to 7.0.0 once with a version
- * after it. The reason for that is, that this migration has been introduced once 7.0.0 was already
- * released. Thus a user who already had 7.0.0 installed already got the 7.0.0 migrations below running,
- * so we need a version higher than that. But this fix was backported to the 6.7 release, meaning if we
- * would only have the 7.0.1 migration in here a user on the 6.7 release will migrate their saved objects
- * to the 7.0.1 state, and thus when updating their Kibana to 7.0, will never run the 7.0.0 migrations introduced
- * in that version. So we apply this twice, once with 6.7.2 and once with 7.0.1 while the backport to 6.7
- * only contained the 6.7.2 migration and not the 7.0.1 migration.
- */
- '6.7.2': flow(migrateMatchAllQuery),
- '7.0.0': flow(migrations700),
- '7.3.0': flow(migrations730),
- '7.9.3': flow(migrateMatchAllQuery),
- '7.11.0': flow(createExtractPanelReferencesMigration(deps)),
- '7.14.0': flow(replaceIndexPatternReference),
- '7.17.3': flow(migrateExplicitlyHiddenTitles),
- };
-
- return mergeMigrationFunctionMaps(dashboardMigrations, embeddableMigrations);
-};
diff --git a/src/plugins/dashboard/server/saved_objects/dashboard.ts b/src/plugins/dashboard/server/saved_objects/dashboard_saved_object.ts
similarity index 97%
rename from src/plugins/dashboard/server/saved_objects/dashboard.ts
rename to src/plugins/dashboard/server/saved_objects/dashboard_saved_object.ts
index 953852bee59cf..b8474149ca87b 100644
--- a/src/plugins/dashboard/server/saved_objects/dashboard.ts
+++ b/src/plugins/dashboard/server/saved_objects/dashboard_saved_object.ts
@@ -10,7 +10,7 @@ import { SavedObjectsType } from '@kbn/core/server';
import {
createDashboardSavedObjectTypeMigrations,
DashboardSavedObjectTypeMigrationsDeps,
-} from './dashboard_migrations';
+} from './migrations/dashboard_saved_object_migrations';
export const createDashboardSavedObjectType = ({
migrationDeps,
diff --git a/src/plugins/dashboard/server/saved_objects/index.ts b/src/plugins/dashboard/server/saved_objects/index.ts
index af3de2dfca529..c16af55945f9d 100644
--- a/src/plugins/dashboard/server/saved_objects/index.ts
+++ b/src/plugins/dashboard/server/saved_objects/index.ts
@@ -6,4 +6,4 @@
* Side Public License, v 1.
*/
-export { createDashboardSavedObjectType } from './dashboard';
+export { createDashboardSavedObjectType } from './dashboard_saved_object';
diff --git a/src/plugins/dashboard/server/saved_objects/is_dashboard_doc.ts b/src/plugins/dashboard/server/saved_objects/is_dashboard_doc.ts
deleted file mode 100644
index cea39fc45b0fe..0000000000000
--- a/src/plugins/dashboard/server/saved_objects/is_dashboard_doc.ts
+++ /dev/null
@@ -1,37 +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 { SavedObjectUnsanitizedDoc } from '@kbn/core/server';
-import { DashboardDoc730ToLatest } from '../../common';
-
-function isDoc(
- doc: { [key: string]: unknown } | SavedObjectUnsanitizedDoc
-): doc is SavedObjectUnsanitizedDoc {
- return (
- typeof doc.id === 'string' &&
- typeof doc.type === 'string' &&
- doc.attributes !== null &&
- typeof doc.attributes === 'object' &&
- doc.references !== null &&
- typeof doc.references === 'object'
- );
-}
-
-export function isDashboardDoc(
- doc: { [key: string]: unknown } | DashboardDoc730ToLatest
-): doc is DashboardDoc730ToLatest {
- if (!isDoc(doc)) {
- return false;
- }
-
- if (typeof (doc as DashboardDoc730ToLatest).attributes.panelsJSON !== 'string') {
- return false;
- }
-
- return true;
-}
diff --git a/src/plugins/dashboard/server/saved_objects/dashboard_migrations.test.ts b/src/plugins/dashboard/server/saved_objects/migrations/dashboard_saved_object_migrations.test.ts
similarity index 99%
rename from src/plugins/dashboard/server/saved_objects/dashboard_migrations.test.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/dashboard_saved_object_migrations.test.ts
index 0cefab5104d7d..1a2655c481835 100644
--- a/src/plugins/dashboard/server/saved_objects/dashboard_migrations.test.ts
+++ b/src/plugins/dashboard/server/saved_objects/migrations/dashboard_saved_object_migrations.test.ts
@@ -6,17 +6,15 @@
* Side Public License, v 1.
*/
-import { SavedObjectReference, SavedObjectUnsanitizedDoc } from '@kbn/core/server';
+import { SerializableRecord } from '@kbn/utility-types';
import { savedObjectsServiceMock } from '@kbn/core/server/mocks';
import { createEmbeddableSetupMock } from '@kbn/embeddable-plugin/server/mocks';
-import { createDashboardSavedObjectTypeMigrations } from './dashboard_migrations';
-import { DashboardDoc730ToLatest } from '../../common';
-import {
- createExtract,
- createInject,
-} from '../../common/embeddable/dashboard_container_persistable_state';
+import { SavedObjectReference, SavedObjectUnsanitizedDoc } from '@kbn/core/server';
+
+import { createExtract, createInject } from '../../../common';
import { EmbeddableStateWithType } from '@kbn/embeddable-plugin/common';
-import { SerializableRecord } from '@kbn/utility-types';
+import { createDashboardSavedObjectTypeMigrations } from './dashboard_saved_object_migrations';
+import { DashboardDoc730ToLatest } from './migrate_to_730/types';
const embeddableSetupMock = createEmbeddableSetupMock();
const extract = createExtract(embeddableSetupMock);
diff --git a/src/plugins/dashboard/server/saved_objects/migrations/dashboard_saved_object_migrations.ts b/src/plugins/dashboard/server/saved_objects/migrations/dashboard_saved_object_migrations.ts
new file mode 100644
index 0000000000000..2f93c038065bb
--- /dev/null
+++ b/src/plugins/dashboard/server/saved_objects/migrations/dashboard_saved_object_migrations.ts
@@ -0,0 +1,48 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { flow, mapValues } from 'lodash';
+
+import {
+ mergeMigrationFunctionMaps,
+ MigrateFunctionsObject,
+} from '@kbn/kibana-utils-plugin/common';
+import { EmbeddableSetup } from '@kbn/embeddable-plugin/server';
+import { SavedObjectMigrationFn, SavedObjectMigrationMap } from '@kbn/core/server';
+
+import { migrations730, migrations700 } from './migrate_to_730';
+import { migrateMatchAllQuery } from './migrate_match_all_query';
+import { migrateExplicitlyHiddenTitles } from './migrate_hidden_titles';
+import { replaceIndexPatternReference } from './migrate_index_pattern_reference';
+import { migrateByValueDashboardPanels } from './migrate_by_value_dashboard_panels';
+import { createExtractPanelReferencesMigration } from './migrate_extract_panel_references';
+
+export interface DashboardSavedObjectTypeMigrationsDeps {
+ embeddable: EmbeddableSetup;
+}
+
+export const createDashboardSavedObjectTypeMigrations = (
+ deps: DashboardSavedObjectTypeMigrationsDeps
+): SavedObjectMigrationMap => {
+ const embeddableMigrations = mapValues(
+ deps.embeddable.getAllMigrations(),
+ migrateByValueDashboardPanels
+ ) as MigrateFunctionsObject;
+
+ const dashboardMigrations = {
+ '6.7.2': flow(migrateMatchAllQuery),
+ '7.0.0': flow(migrations700),
+ '7.3.0': flow(migrations730),
+ '7.9.3': flow(migrateMatchAllQuery),
+ '7.11.0': flow(createExtractPanelReferencesMigration(deps)),
+ '7.14.0': flow(replaceIndexPatternReference),
+ '7.17.3': flow(migrateExplicitlyHiddenTitles),
+ };
+
+ return mergeMigrationFunctionMaps(dashboardMigrations, embeddableMigrations);
+};
diff --git a/src/plugins/dashboard/server/saved_objects/migrations/migrate_by_value_dashboard_panels.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_by_value_dashboard_panels.ts
new file mode 100644
index 0000000000000..3bad12b537103
--- /dev/null
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_by_value_dashboard_panels.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 {
+ CONTROL_GROUP_TYPE,
+ rawControlGroupAttributesToSerializable,
+ serializableToRawControlGroupAttributes,
+} from '@kbn/controls-plugin/common';
+import { Serializable } from '@kbn/utility-types';
+import { SavedObjectMigrationFn } from '@kbn/core/server';
+import { MigrateFunction } from '@kbn/kibana-utils-plugin/common';
+import { SavedObjectEmbeddableInput } from '@kbn/embeddable-plugin/common';
+
+import {
+ convertPanelStateToSavedDashboardPanel,
+ convertSavedDashboardPanelToPanelState,
+ SavedDashboardPanel,
+} from '../../../common';
+
+type ValueOrReferenceInput = SavedObjectEmbeddableInput & {
+ attributes?: Serializable;
+ savedVis?: Serializable;
+};
+
+// Runs the embeddable migrations on each panel
+export const migrateByValueDashboardPanels =
+ (migrate: MigrateFunction, version: string): SavedObjectMigrationFn =>
+ (doc: any) => {
+ const { attributes } = doc;
+
+ if (attributes?.controlGroupInput) {
+ const controlGroupInput = rawControlGroupAttributesToSerializable(
+ attributes.controlGroupInput
+ );
+ const migratedControlGroupInput = migrate({
+ ...controlGroupInput,
+ type: CONTROL_GROUP_TYPE,
+ });
+ attributes.controlGroupInput =
+ serializableToRawControlGroupAttributes(migratedControlGroupInput);
+ }
+
+ // Skip if panelsJSON is missing otherwise this will cause saved object import to fail when
+ // importing objects without panelsJSON. At development time of this, there is no guarantee each saved
+ // object has panelsJSON in all previous versions of kibana.
+ if (typeof attributes?.panelsJSON !== 'string') {
+ return doc;
+ }
+
+ const panels = JSON.parse(attributes.panelsJSON) as SavedDashboardPanel[];
+ // Same here, prevent failing saved object import if ever panels aren't an array.
+ if (!Array.isArray(panels)) {
+ return doc;
+ }
+ const newPanels: SavedDashboardPanel[] = [];
+ panels.forEach((panel) => {
+ // Convert each panel into a state that can be passed to EmbeddablesSetup.migrate
+ const originalPanelState =
+ convertSavedDashboardPanelToPanelState(panel);
+
+ // saved vis is used to store by value input for Visualize. This should eventually be renamed to `attributes` to align with Lens and Maps
+ if (
+ originalPanelState.explicitInput.attributes ||
+ originalPanelState.explicitInput.savedVis
+ ) {
+ // If this panel is by value, migrate the state using embeddable migrations
+ const migratedInput = migrate({
+ ...originalPanelState.explicitInput,
+ type: originalPanelState.type,
+ });
+ // Convert the embeddable state back into the panel shape
+ newPanels.push(
+ convertPanelStateToSavedDashboardPanel(
+ {
+ ...originalPanelState,
+ explicitInput: { ...migratedInput, id: migratedInput.id as string },
+ },
+ version
+ )
+ );
+ } else {
+ newPanels.push(panel);
+ }
+ });
+ return {
+ ...doc,
+ attributes: {
+ ...attributes,
+ panelsJSON: JSON.stringify(newPanels),
+ },
+ };
+ };
diff --git a/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts
new file mode 100644
index 0000000000000..5a8de73af988b
--- /dev/null
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_extract_panel_references.ts
@@ -0,0 +1,56 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { SavedObjectAttributes, SavedObjectMigrationFn } from '@kbn/core/server';
+
+import { DashboardAttributes, extractReferences, injectReferences } from '../../../common';
+import { DashboardSavedObjectTypeMigrationsDeps } from './dashboard_saved_object_migrations';
+
+/**
+ * In 7.8.0 we introduced dashboard drilldowns which are stored inside dashboard saved object as part of embeddable state
+ * In 7.11.0 we created an embeddable references/migrations system that allows to properly extract embeddable persistable state
+ * https://github.com/elastic/kibana/issues/71409
+ * The idea of this migration is to inject all the embeddable panel references and then run the extraction again.
+ * As the result of the extraction:
+ * 1. In addition to regular `panel_` we will get new references which are extracted by `embeddablePersistableStateService` (dashboard drilldown references)
+ * 2. `panel_` references will be regenerated
+ * All other references like index-patterns are forwarded non touched
+ * @param deps
+ */
+export function createExtractPanelReferencesMigration(
+ deps: DashboardSavedObjectTypeMigrationsDeps
+): SavedObjectMigrationFn {
+ return (doc) => {
+ const references = doc.references ?? [];
+
+ /**
+ * Remembering this because dashboard's extractReferences won't return those
+ * All other references like `panel_` will be overwritten
+ */
+ const oldNonPanelReferences = references.filter((ref) => !ref.name.startsWith('panel_'));
+
+ const injectedAttributes = injectReferences(
+ {
+ attributes: doc.attributes as unknown as SavedObjectAttributes,
+ references,
+ },
+ { embeddablePersistableStateService: deps.embeddable }
+ );
+
+ const { attributes, references: newPanelReferences } = extractReferences(
+ { attributes: injectedAttributes, references: [] },
+ { embeddablePersistableStateService: deps.embeddable }
+ );
+
+ return {
+ ...doc,
+ references: [...oldNonPanelReferences, ...newPanelReferences],
+ attributes,
+ };
+ };
+}
diff --git a/src/plugins/dashboard/server/saved_objects/migrations/migrate_hidden_titles.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_hidden_titles.ts
new file mode 100644
index 0000000000000..8a9a917231204
--- /dev/null
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_hidden_titles.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { SavedObjectMigrationFn } from '@kbn/core/server';
+import { EmbeddableInput } from '@kbn/embeddable-plugin/common';
+
+import {
+ convertSavedDashboardPanelToPanelState,
+ convertPanelStateToSavedDashboardPanel,
+ SavedDashboardPanel,
+} from '../../../common';
+
+/**
+ * Before 7.10, hidden panel titles were stored as a blank string on the title attribute. In 7.10, this was replaced
+ * with a usage of the existing hidePanelTitles key. Even though blank string titles still technically work
+ * in versions > 7.10, they are less explicit than using the hidePanelTitles key. This migration transforms all
+ * blank string titled panels to panels with the titles explicitly hidden.
+ */
+export const migrateExplicitlyHiddenTitles: SavedObjectMigrationFn = (doc) => {
+ const { attributes } = doc;
+
+ // Skip if panelsJSON is missing
+ if (typeof attributes?.panelsJSON !== 'string') return doc;
+
+ try {
+ const panels = JSON.parse(attributes.panelsJSON) as SavedDashboardPanel[];
+ // Same here, prevent failing saved object import if ever panels aren't an array.
+ if (!Array.isArray(panels)) return doc;
+
+ const newPanels: SavedDashboardPanel[] = [];
+ panels.forEach((panel) => {
+ // Convert each panel into the dashboard panel state
+ const originalPanelState = convertSavedDashboardPanelToPanelState(panel);
+ newPanels.push(
+ convertPanelStateToSavedDashboardPanel(
+ {
+ ...originalPanelState,
+ explicitInput: {
+ ...originalPanelState.explicitInput,
+ ...(originalPanelState.explicitInput.title === '' &&
+ !originalPanelState.explicitInput.hidePanelTitles
+ ? { hidePanelTitles: true }
+ : {}),
+ },
+ },
+ panel.version
+ )
+ );
+ });
+ return {
+ ...doc,
+ attributes: {
+ ...attributes,
+ panelsJSON: JSON.stringify(newPanels),
+ },
+ };
+ } catch {
+ return doc;
+ }
+};
diff --git a/src/plugins/dashboard/server/saved_objects/replace_index_pattern_reference.test.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_index_pattern_reference.test.ts
similarity index 94%
rename from src/plugins/dashboard/server/saved_objects/replace_index_pattern_reference.test.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_index_pattern_reference.test.ts
index 13db82790c9d0..a9682bdb8719d 100644
--- a/src/plugins/dashboard/server/saved_objects/replace_index_pattern_reference.test.ts
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_index_pattern_reference.test.ts
@@ -7,7 +7,7 @@
*/
import type { SavedObjectMigrationContext, SavedObjectMigrationFn } from '@kbn/core/server';
-import { replaceIndexPatternReference } from './replace_index_pattern_reference';
+import { replaceIndexPatternReference } from './migrate_index_pattern_reference';
describe('replaceIndexPatternReference', () => {
const savedObjectMigrationContext = null as unknown as SavedObjectMigrationContext;
diff --git a/src/plugins/dashboard/server/saved_objects/replace_index_pattern_reference.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_index_pattern_reference.ts
similarity index 100%
rename from src/plugins/dashboard/server/saved_objects/replace_index_pattern_reference.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_index_pattern_reference.ts
diff --git a/src/plugins/dashboard/server/saved_objects/migrate_match_all_query.test.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_match_all_query.test.ts
similarity index 100%
rename from src/plugins/dashboard/server/saved_objects/migrate_match_all_query.test.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_match_all_query.test.ts
diff --git a/src/plugins/dashboard/server/saved_objects/migrate_match_all_query.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_match_all_query.ts
similarity index 100%
rename from src/plugins/dashboard/server/saved_objects/migrate_match_all_query.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_match_all_query.ts
index 147aa47a7a6e9..a7c1f0ff6bdb5 100644
--- a/src/plugins/dashboard/server/saved_objects/migrate_match_all_query.ts
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_match_all_query.ts
@@ -6,9 +6,9 @@
* Side Public License, v 1.
*/
-import { SavedObjectMigrationFn } from '@kbn/core/server';
import { get } from 'lodash';
import { DEFAULT_QUERY_LANGUAGE } from '@kbn/data-plugin/common';
+import { SavedObjectMigrationFn } from '@kbn/core/server';
/**
* This migration script is related to:
diff --git a/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/index.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/index.ts
new file mode 100644
index 0000000000000..2cf0813583235
--- /dev/null
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/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 { migrations730 } from './migrations_730';
+export { migrations700 } from './migrations_700';
diff --git a/src/plugins/dashboard/common/migrate_to_730_panels.test.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrate_to_730_panels.test.ts
similarity index 99%
rename from src/plugins/dashboard/common/migrate_to_730_panels.test.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrate_to_730_panels.test.ts
index bdcd3bf8cedc0..4eacf9b93d85d 100644
--- a/src/plugins/dashboard/common/migrate_to_730_panels.test.ts
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrate_to_730_panels.test.ts
@@ -8,13 +8,14 @@
import { migratePanelsTo730 } from './migrate_to_730_panels';
import {
+ SavedDashboardPanel730ToLatest,
+ RawSavedDashboardPanel640To720,
RawSavedDashboardPanelTo60,
RawSavedDashboardPanel630,
- RawSavedDashboardPanel640To720,
RawSavedDashboardPanel610,
RawSavedDashboardPanel620,
-} from './bwc/types';
-import { SavedDashboardPanelTo60, SavedDashboardPanel730ToLatest } from './types';
+ SavedDashboardPanelTo60,
+} from './types';
test('6.0 migrates uiState, sort, scales, and gridData', async () => {
const uiState = {
diff --git a/src/plugins/dashboard/common/migrate_to_730_panels.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrate_to_730_panels.ts
similarity index 98%
rename from src/plugins/dashboard/common/migrate_to_730_panels.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrate_to_730_panels.ts
index f40240bd7247c..531a0715038d5 100644
--- a/src/plugins/dashboard/common/migrate_to_730_panels.ts
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrate_to_730_panels.ts
@@ -6,25 +6,25 @@
* Side Public License, v 1.
*/
+import uuid from 'uuid';
+import semverSatisfies from 'semver/functions/satisfies';
+
import { i18n } from '@kbn/i18n';
import type { SerializableRecord } from '@kbn/utility-types';
-import semverSatisfies from 'semver/functions/satisfies';
-import uuid from 'uuid';
+
import {
- GridData,
- SavedDashboardPanelTo60,
SavedDashboardPanel620,
SavedDashboardPanel630,
SavedDashboardPanel610,
-} from '.';
-import {
- RawSavedDashboardPanelTo60,
+ SavedDashboardPanelTo60,
RawSavedDashboardPanel630,
- RawSavedDashboardPanel640To720,
- RawSavedDashboardPanel730ToLatest,
RawSavedDashboardPanel610,
RawSavedDashboardPanel620,
-} from './bwc/types';
+ RawSavedDashboardPanelTo60,
+ RawSavedDashboardPanel640To720,
+ RawSavedDashboardPanel730ToLatest,
+} from './types';
+import { GridData } from '../../../../common';
const PANEL_HEIGHT_SCALE_FACTOR = 5;
const PANEL_HEIGHT_SCALE_FACTOR_WITH_MARGINS = 4;
@@ -266,7 +266,6 @@ export function migratePanelsTo730(
| RawSavedDashboardPanel620
| RawSavedDashboardPanel630
| RawSavedDashboardPanel640To720
- // We run these on post processed panels too for url BWC
| SavedDashboardPanelTo60
| SavedDashboardPanel610
| SavedDashboardPanel620
diff --git a/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_700.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_700.ts
new file mode 100644
index 0000000000000..d1954e8266d88
--- /dev/null
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_700.ts
@@ -0,0 +1,90 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { get } from 'lodash';
+
+import { SavedObjectMigrationFn } from '@kbn/core/server';
+import { DATA_VIEW_SAVED_OBJECT_TYPE } from '@kbn/data-views-plugin/common';
+
+import { DashboardDoc700To720 } from './types';
+
+function migrateIndexPattern(doc: DashboardDoc700To720) {
+ const searchSourceJSON = get(doc, 'attributes.kibanaSavedObjectMeta.searchSourceJSON');
+ if (typeof searchSourceJSON !== 'string') {
+ return;
+ }
+ let searchSource;
+ try {
+ searchSource = JSON.parse(searchSourceJSON);
+ } catch (e) {
+ // Let it go, the data is invalid and we'll leave it as is
+ return;
+ }
+ if (searchSource.index) {
+ searchSource.indexRefName = 'kibanaSavedObjectMeta.searchSourceJSON.index';
+ doc.references.push({
+ name: searchSource.indexRefName,
+ type: DATA_VIEW_SAVED_OBJECT_TYPE,
+ id: searchSource.index,
+ });
+ delete searchSource.index;
+ }
+ if (searchSource.filter) {
+ searchSource.filter.forEach((filterRow: any, i: number) => {
+ if (!filterRow.meta || !filterRow.meta.index) {
+ return;
+ }
+ filterRow.meta.indexRefName = `kibanaSavedObjectMeta.searchSourceJSON.filter[${i}].meta.index`;
+ doc.references.push({
+ name: filterRow.meta.indexRefName,
+ type: DATA_VIEW_SAVED_OBJECT_TYPE,
+ id: filterRow.meta.index,
+ });
+ delete filterRow.meta.index;
+ });
+ }
+ doc.attributes.kibanaSavedObjectMeta.searchSourceJSON = JSON.stringify(searchSource);
+}
+
+export const migrations700: SavedObjectMigrationFn = (doc): DashboardDoc700To720 => {
+ // Set new "references" attribute
+ doc.references = doc.references || [];
+
+ // Migrate index pattern
+ migrateIndexPattern(doc as DashboardDoc700To720);
+ // Migrate panels
+ const panelsJSON = get(doc, 'attributes.panelsJSON');
+ if (typeof panelsJSON !== 'string') {
+ return doc as DashboardDoc700To720;
+ }
+ let panels;
+ try {
+ panels = JSON.parse(panelsJSON);
+ } catch (e) {
+ // Let it go, the data is invalid and we'll leave it as is
+ return doc as DashboardDoc700To720;
+ }
+ if (!Array.isArray(panels)) {
+ return doc as DashboardDoc700To720;
+ }
+ panels.forEach((panel, i) => {
+ if (!panel.type || !panel.id) {
+ return;
+ }
+ panel.panelRefName = `panel_${i}`;
+ doc.references!.push({
+ name: `panel_${i}`,
+ type: panel.type,
+ id: panel.id,
+ });
+ delete panel.type;
+ delete panel.id;
+ });
+ doc.attributes.panelsJSON = JSON.stringify(panels);
+ return doc as DashboardDoc700To720;
+};
diff --git a/src/plugins/dashboard/server/saved_objects/migrations_730.test.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.test.ts
similarity index 96%
rename from src/plugins/dashboard/server/saved_objects/migrations_730.test.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.test.ts
index 2fc999b067496..6314546b5933a 100644
--- a/src/plugins/dashboard/server/saved_objects/migrations_730.test.ts
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.test.ts
@@ -7,12 +7,17 @@
*/
import { savedObjectsServiceMock } from '@kbn/core/server/mocks';
-import { createDashboardSavedObjectTypeMigrations } from './dashboard_migrations';
-import { migrations730 } from './migrations_730';
-import { DashboardDoc700To720, DashboardDoc730ToLatest, DashboardDocPre700 } from '../../common';
-import { RawSavedDashboardPanel730ToLatest } from '../../common';
import { createEmbeddableSetupMock } from '@kbn/embeddable-plugin/server/mocks';
+import {
+ DashboardDocPre700,
+ DashboardDoc700To720,
+ DashboardDoc730ToLatest,
+ RawSavedDashboardPanel730ToLatest,
+} from './types';
+import { migrations730 } from './migrations_730';
+import { createDashboardSavedObjectTypeMigrations } from '../dashboard_saved_object_migrations';
+
const mockContext = savedObjectsServiceMock.createMigrationContext();
const migrations = createDashboardSavedObjectTypeMigrations({
embeddable: createEmbeddableSetupMock(),
diff --git a/src/plugins/dashboard/server/saved_objects/migrations_730.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts
similarity index 69%
rename from src/plugins/dashboard/server/saved_objects/migrations_730.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts
index 3cc34d8513a45..dcd1c2f2cb878 100644
--- a/src/plugins/dashboard/server/saved_objects/migrations_730.ts
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/migrations_730.ts
@@ -7,11 +7,38 @@
*/
import { inspect } from 'util';
-import { SavedObjectMigrationContext } from '@kbn/core/server';
-import { DashboardDoc730ToLatest } from '../../common';
-import { isDashboardDoc } from './is_dashboard_doc';
+import { SavedObjectMigrationContext, SavedObjectUnsanitizedDoc } from '@kbn/core/server';
+
import { moveFiltersToQuery } from './move_filters_to_query';
-import { migratePanelsTo730, DashboardDoc700To720 } from '../../common';
+import { migratePanelsTo730 } from './migrate_to_730_panels';
+import { DashboardDoc730ToLatest, DashboardDoc700To720 } from './types';
+
+function isDoc(
+ doc: { [key: string]: unknown } | SavedObjectUnsanitizedDoc
+): doc is SavedObjectUnsanitizedDoc {
+ return (
+ typeof doc.id === 'string' &&
+ typeof doc.type === 'string' &&
+ doc.attributes !== null &&
+ typeof doc.attributes === 'object' &&
+ doc.references !== null &&
+ typeof doc.references === 'object'
+ );
+}
+
+export function isDashboardDoc(
+ doc: { [key: string]: unknown } | DashboardDoc730ToLatest
+): doc is DashboardDoc730ToLatest {
+ if (!isDoc(doc)) {
+ return false;
+ }
+
+ if (typeof (doc as DashboardDoc730ToLatest).attributes.panelsJSON !== 'string') {
+ return false;
+ }
+
+ return true;
+}
export const migrations730 = (doc: DashboardDoc700To720, { log }: SavedObjectMigrationContext) => {
if (!isDashboardDoc(doc)) {
diff --git a/src/plugins/dashboard/server/saved_objects/move_filters_to_query.test.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/move_filters_to_query.test.ts
similarity index 100%
rename from src/plugins/dashboard/server/saved_objects/move_filters_to_query.test.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/move_filters_to_query.test.ts
diff --git a/src/plugins/dashboard/server/saved_objects/move_filters_to_query.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/move_filters_to_query.ts
similarity index 100%
rename from src/plugins/dashboard/server/saved_objects/move_filters_to_query.ts
rename to src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/move_filters_to_query.ts
diff --git a/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/readme.md b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/readme.md
new file mode 100644
index 0000000000000..50f1b3283ca3f
--- /dev/null
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/readme.md
@@ -0,0 +1,3 @@
+## Legacy Pre 7.3 Migrations
+
+This folder contains legacy migrations that migrate dashboard saved object from any previous version into Kibana 7.3.0. The migrations in this folder need to be able to handle state from any older version of dashboard from as early as 5.0 because Saved Object Migrations did not exist, and in-place migrations were used instead. After 7.3.0, saved object migrations are in place, so it can be assumed that any saved migration that is registered there will receive state from the version before.
diff --git a/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/types.ts b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/types.ts
new file mode 100644
index 0000000000000..2257b05c0a64e
--- /dev/null
+++ b/src/plugins/dashboard/server/saved_objects/migrations/migrate_to_730/types.ts
@@ -0,0 +1,182 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { Serializable } from '@kbn/utility-types';
+import { SavedObjectReference } from '@kbn/core/server';
+
+import type {
+ GridData,
+ DashboardAttributes as CurrentDashboardAttributes, // Dashboard attributes from common are the source of truth for the current version.
+} from '../../../../common';
+
+interface SavedObjectAttributes {
+ kibanaSavedObjectMeta: {
+ searchSourceJSON: string;
+ };
+}
+
+interface Doc {
+ references: SavedObjectReference[];
+ attributes: Attributes;
+ id: string;
+ type: string;
+}
+
+interface DocPre700 {
+ attributes: Attributes;
+ id: string;
+ type: string;
+}
+
+interface DashboardAttributesTo720 extends SavedObjectAttributes {
+ panelsJSON: string;
+ description: string;
+ uiStateJSON?: string;
+ version: number;
+ timeRestore: boolean;
+ useMargins?: boolean;
+ title: string;
+ optionsJSON?: string;
+}
+
+export type DashboardDoc730ToLatest = Doc;
+
+export type DashboardDoc700To720 = Doc;
+
+export type DashboardDocPre700 = DocPre700;
+
+// Note that these types are prefixed with `Raw` because there are some post processing steps
+// that happen before the saved objects even reach the client. Namely, injecting type and id
+// parameters back into the panels, where the raw saved objects actually have them stored elsewhere.
+//
+// Ideally, everywhere in the dashboard code would use references at the top level instead of
+// embedded in the panels. The reason this is stored at the top level is so the references can be uniformly
+// updated across all saved object types that have references.
+
+// Starting in 7.3 we introduced the possibility of embeddables existing without an id
+// parameter. If there was no id, then type remains on the panel. So it either will have a name,
+// or a type property.
+export type RawSavedDashboardPanel730ToLatest = Pick<
+ RawSavedDashboardPanel640To720,
+ Exclude
+> & {
+ // Should be either type, and not name (not backed by a saved object), or name but not type (backed by a
+ // saved object and type and id are stored on references). Had trouble with oring the two types
+ // because of optional properties being marked as required: https://github.com/microsoft/TypeScript/issues/20722
+ readonly type?: string;
+ readonly name?: string;
+
+ panelIndex: string;
+ panelRefName?: string;
+};
+
+// NOTE!!
+// All of these types can actually exist in 7.2! The names are pretty confusing because we did
+// in place migrations for so long. For example, `RawSavedDashboardPanelTo60` is what a panel
+// created in 6.0 will look like after it's been migrated up to 7.2, *not* what it would look like in 6.0.
+// That's why it actually doesn't have id or type, but has a name property, because that was a migration
+// added in 7.0.
+
+// Hopefully since we finally have a formal saved object migration system and we can do less in place
+// migrations, this will be easier to understand moving forward.
+
+// Starting in 6.4 we added an in-place edit on panels to remove columns and sort properties and put them
+// inside the embeddable config (https://github.com/elastic/kibana/pull/17446).
+// Note that this was not added as a saved object migration until 7.3, so there can still exist panels in
+// this shape in v 7.2.
+export type RawSavedDashboardPanel640To720 = Pick<
+ RawSavedDashboardPanel630,
+ Exclude
+>;
+
+// In 6.3.0 we expanded the number of grid columns and rows: https://github.com/elastic/kibana/pull/16763
+// We added in-place migrations to multiply older x,y,h,w numbers. Note the typescript shape here is the same
+// because it's just multiplying existing fields.
+// Note that this was not added as a saved object migration until 7.3, so there can still exist panels in 7.2
+// that need to be modified.
+export type RawSavedDashboardPanel630 = RawSavedDashboardPanel620;
+
+// In 6.2 we added an inplace migration, moving uiState into each panel's new embeddableConfig property.
+// Source: https://github.com/elastic/kibana/pull/14949
+export type RawSavedDashboardPanel620 = RawSavedDashboardPanel610 & {
+ embeddableConfig: { [key: string]: Serializable };
+ version: string;
+};
+
+// In 6.1 we switched from an angular grid to react grid layout (https://github.com/elastic/kibana/pull/13853)
+// This used gridData instead of size_x, size_y, row and col. We also started tracking the version this panel
+// was created in to make future migrations easier.
+// Note that this was not added as a saved object migration until 7.3, so there can still exist panels in
+// this shape in v 7.2.
+export type RawSavedDashboardPanel610 = Pick<
+ RawSavedDashboardPanelTo60,
+ Exclude
+> & { gridData: GridData; version: string };
+
+export interface RawSavedDashboardPanelTo60 {
+ readonly columns?: string[];
+ readonly sort?: string;
+ readonly size_x?: number;
+ readonly size_y?: number;
+ readonly row: number;
+ readonly col: number;
+ panelIndex?: number | string; // earlier versions allowed this to be number or string. Some very early versions seem to be missing this entirely
+ readonly name: string;
+
+ // This is where custom panel titles are stored prior to Embeddable API v2
+ title?: string;
+}
+
+export type SavedDashboardPanel640To720 = Pick<
+ RawSavedDashboardPanel640To720,
+ Exclude
+> & {
+ readonly id: string;
+ readonly type: string;
+};
+
+export type SavedDashboardPanel630 = Pick<
+ RawSavedDashboardPanel630,
+ Exclude
+> & {
+ readonly id: string;
+ readonly type: string;
+};
+
+export type SavedDashboardPanel620 = Pick<
+ RawSavedDashboardPanel620,
+ Exclude
+> & {
+ readonly id: string;
+ readonly type: string;
+};
+
+export type SavedDashboardPanel610 = Pick<
+ RawSavedDashboardPanel610,
+ Exclude
+> & {
+ readonly id: string;
+ readonly type: string;
+};
+
+export type SavedDashboardPanelTo60 = Pick<
+ RawSavedDashboardPanelTo60,
+ Exclude
+> & {
+ readonly id: string;
+ readonly type: string;
+};
+
+// id becomes optional starting in 7.3.0
+export type SavedDashboardPanel730ToLatest = Pick<
+ RawSavedDashboardPanel730ToLatest,
+ Exclude
+> & {
+ readonly id?: string;
+ readonly type: string;
+};
diff --git a/src/plugins/dashboard/server/usage/dashboard_telemetry.test.ts b/src/plugins/dashboard/server/usage/dashboard_telemetry.test.ts
index ea981be3515f8..25a4986208d31 100644
--- a/src/plugins/dashboard/server/usage/dashboard_telemetry.test.ts
+++ b/src/plugins/dashboard/server/usage/dashboard_telemetry.test.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import { SavedDashboardPanel730ToLatest } from '../../common';
+import { SavedDashboardPanel } from '../../common';
import { getEmptyDashboardData, collectPanelsByType } from './dashboard_telemetry';
import { EmbeddableStateWithType } from '@kbn/embeddable-plugin/common';
import { createEmbeddablePersistableStateServiceMock } from '@kbn/embeddable-plugin/common/mocks';
@@ -18,7 +18,7 @@ const visualizationType1ByValue = {
},
},
type: 'visualization',
-} as unknown as SavedDashboardPanel730ToLatest;
+} as unknown as SavedDashboardPanel;
const visualizationType2ByValue = {
embeddableConfig: {
@@ -27,7 +27,7 @@ const visualizationType2ByValue = {
},
},
type: 'visualization',
-} as unknown as SavedDashboardPanel730ToLatest;
+} as unknown as SavedDashboardPanel;
const visualizationType2ByReference = {
...visualizationType2ByValue,
@@ -41,7 +41,7 @@ const lensTypeAByValue = {
visualizationType: 'a',
},
},
-} as unknown as SavedDashboardPanel730ToLatest;
+} as unknown as SavedDashboardPanel;
const lensTypeAByReference = {
...lensTypeAByValue,
@@ -60,7 +60,7 @@ const lensXYSeriesA = {
},
},
},
-} as unknown as SavedDashboardPanel730ToLatest;
+} as unknown as SavedDashboardPanel;
const lensXYSeriesB = {
type: 'lens',
@@ -90,7 +90,7 @@ const lensXYSeriesB = {
},
},
},
-} as unknown as SavedDashboardPanel730ToLatest;
+} as unknown as SavedDashboardPanel;
const embeddablePersistableStateService = createEmbeddablePersistableStateServiceMock();
diff --git a/src/plugins/dashboard/server/usage/dashboard_telemetry.ts b/src/plugins/dashboard/server/usage/dashboard_telemetry.ts
index ce41c50834689..1e8a0192ec38a 100644
--- a/src/plugins/dashboard/server/usage/dashboard_telemetry.ts
+++ b/src/plugins/dashboard/server/usage/dashboard_telemetry.ts
@@ -16,7 +16,7 @@ import {
} from '@kbn/controls-plugin/common';
import { initializeControlGroupTelemetry } from '@kbn/controls-plugin/server';
import { TaskManagerStartContract } from '@kbn/task-manager-plugin/server';
-import { SavedDashboardPanel730ToLatest } from '../../common';
+import type { SavedDashboardPanel } from '../../common';
import { TASK_ID, DashboardTelemetryTaskState } from './dashboard_telemetry_collection_task';
export interface DashboardCollectorData {
panels: {
@@ -55,7 +55,7 @@ export const getEmptyPanelTypeData = () => ({
});
export const collectPanelsByType = (
- panels: SavedDashboardPanel730ToLatest[],
+ panels: SavedDashboardPanel[],
collectorData: DashboardCollectorData,
embeddableService: EmbeddablePersistableStateService
) => {
diff --git a/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts b/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts
index 823b5fadaaeae..1ca13b4308586 100644
--- a/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts
+++ b/src/plugins/dashboard/server/usage/dashboard_telemetry_collection_task.ts
@@ -14,17 +14,13 @@ import {
TaskManagerStartContract,
} from '@kbn/task-manager-plugin/server';
import { EmbeddableSetup } from '@kbn/embeddable-plugin/server';
-import { SavedDashboardPanel730ToLatest } from '../../common';
-import {
- injectReferences,
- SavedObjectAttributesAndReferences,
-} from '../../common/saved_dashboard_references';
import {
controlsCollectorFactory,
collectPanelsByType,
getEmptyDashboardData,
DashboardCollectorData,
} from './dashboard_telemetry';
+import { injectReferences, SavedDashboardPanel } from '../../common';
// This task is responsible for running daily and aggregating all the Dashboard telemerty data
// into a single document. This is an effort to make sure the load of fetching/parsing all of the
@@ -32,6 +28,11 @@ import {
const TELEMETRY_TASK_TYPE = 'dashboard_telemetry';
export const TASK_ID = `Dashboard-${TELEMETRY_TASK_TYPE}`;
+interface SavedObjectAttributesAndReferences {
+ attributes: SavedObjectAttributes;
+ references: SavedObjectReference[];
+}
+
export interface DashboardTelemetryTaskState {
runs: number;
telemetry: DashboardCollectorData;
@@ -102,7 +103,7 @@ export function dashboardTaskRunner(logger: Logger, core: CoreSetup, embeddable:
try {
const panels = JSON.parse(
attributes.panelsJSON as string
- ) as unknown as SavedDashboardPanel730ToLatest[];
+ ) as unknown as SavedDashboardPanel[];
collectPanelsByType(panels, dashboardData, embeddable);
} catch (e) {
diff --git a/src/plugins/dashboard/server/usage/find_by_value_embeddables.test.ts b/src/plugins/dashboard/server/usage/find_by_value_embeddables.test.ts
index 8a3cdd71539f8..c5e8da8acbd4a 100644
--- a/src/plugins/dashboard/server/usage/find_by_value_embeddables.test.ts
+++ b/src/plugins/dashboard/server/usage/find_by_value_embeddables.test.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import { SavedDashboardPanel730ToLatest } from '../../common';
+import type { SavedDashboardPanel } from '../../common';
import { findByValueEmbeddables } from './find_by_value_embeddables';
const visualizationByValue = {
@@ -14,18 +14,18 @@ const visualizationByValue = {
value: 'visualization-by-value',
},
type: 'visualization',
-} as unknown as SavedDashboardPanel730ToLatest;
+} as unknown as SavedDashboardPanel;
const mapByValue = {
embeddableConfig: {
value: 'map-by-value',
},
type: 'map',
-} as unknown as SavedDashboardPanel730ToLatest;
+} as unknown as SavedDashboardPanel;
const embeddableByRef = {
panelRefName: 'panel_ref_1',
-} as unknown as SavedDashboardPanel730ToLatest;
+} as unknown as SavedDashboardPanel;
describe('findByValueEmbeddables', () => {
it('finds the by value embeddables for the given type', async () => {
diff --git a/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts b/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts
index 694fe2007f844..502ba828944d4 100644
--- a/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts
+++ b/src/plugins/dashboard/server/usage/find_by_value_embeddables.ts
@@ -7,7 +7,7 @@
*/
import { ISavedObjectsRepository, SavedObjectAttributes } from '@kbn/core/server';
-import { SavedDashboardPanel730ToLatest } from '../../common';
+import type { SavedDashboardPanel } from '../../common';
export const findByValueEmbeddables = async (
savedObjectClient: Pick,
@@ -22,7 +22,7 @@ export const findByValueEmbeddables = async (
try {
return JSON.parse(
dashboard.attributes.panelsJSON as string
- ) as unknown as SavedDashboardPanel730ToLatest[];
+ ) as unknown as SavedDashboardPanel[];
} catch (exception) {
return [];
}
diff --git a/src/plugins/data/common/index.ts b/src/plugins/data/common/index.ts
index f76b6b903fe95..38e4d802cd838 100644
--- a/src/plugins/data/common/index.ts
+++ b/src/plugins/data/common/index.ts
@@ -21,7 +21,8 @@ export {
getTime,
isQuery,
isTimeRange,
- queryStateToExpressionAst,
+ textBasedQueryStateToAstWithValidation,
+ textBasedQueryStateToExpressionAst,
} from './query';
export type { QueryState } from './query';
export * from './search';
diff --git a/src/plugins/data/common/query/index.ts b/src/plugins/data/common/query/index.ts
index dedc4b6a4d839..1aebdd09244e4 100644
--- a/src/plugins/data/common/query/index.ts
+++ b/src/plugins/data/common/query/index.ts
@@ -10,4 +10,5 @@ export * from './timefilter';
export * from './types';
export * from './is_query';
export * from './query_state';
-export { queryStateToExpressionAst } from './to_expression_ast';
+export { textBasedQueryStateToAstWithValidation } from './text_based_query_state_to_ast_with_validation';
+export { textBasedQueryStateToExpressionAst } from './text_based_query_state_to_ast';
diff --git a/src/plugins/data/common/query/to_expression_ast.test.ts b/src/plugins/data/common/query/text_based_query_state_to_ast.test.ts
similarity index 65%
rename from src/plugins/data/common/query/to_expression_ast.test.ts
rename to src/plugins/data/common/query/text_based_query_state_to_ast.test.ts
index d7c1424869aa8..64f9c5ca59111 100644
--- a/src/plugins/data/common/query/to_expression_ast.test.ts
+++ b/src/plugins/data/common/query/text_based_query_state_to_ast.test.ts
@@ -5,20 +5,17 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
-import { DataViewsContract } from '@kbn/data-views-plugin/common';
-import { queryStateToExpressionAst } from './to_expression_ast';
+import { textBasedQueryStateToExpressionAst } from './text_based_query_state_to_ast';
-describe('queryStateToExpressionAst', () => {
+describe('textBasedQueryStateToExpressionAst', () => {
it('returns an object with the correct structure', async () => {
- const dataViewsService = {} as unknown as DataViewsContract;
- const actual = await queryStateToExpressionAst({
+ const actual = await textBasedQueryStateToExpressionAst({
filters: [],
query: { language: 'lucene', query: '' },
time: {
from: 'now',
to: 'now+7d',
},
- dataViewsService,
});
expect(actual).toHaveProperty(
@@ -33,31 +30,13 @@ describe('queryStateToExpressionAst', () => {
});
it('returns an object with the correct structure for an SQL query', async () => {
- const dataViewsService = {
- getIdsWithTitle: jest.fn(() => {
- return [
- {
- title: 'foo',
- id: 'bar',
- },
- ];
- }),
- get: jest.fn(() => {
- return {
- title: 'foo',
- id: 'bar',
- timeFieldName: 'baz',
- };
- }),
- } as unknown as DataViewsContract;
- const actual = await queryStateToExpressionAst({
+ const actual = await textBasedQueryStateToExpressionAst({
filters: [],
query: { sql: 'SELECT * FROM foo' },
time: {
from: 'now',
to: 'now+7d',
},
- dataViewsService,
});
expect(actual).toHaveProperty(
diff --git a/src/plugins/data/common/query/to_expression_ast.ts b/src/plugins/data/common/query/text_based_query_state_to_ast.ts
similarity index 62%
rename from src/plugins/data/common/query/to_expression_ast.ts
rename to src/plugins/data/common/query/text_based_query_state_to_ast.ts
index daf75ceb7a0c2..cb34d9c9c405c 100644
--- a/src/plugins/data/common/query/to_expression_ast.ts
+++ b/src/plugins/data/common/query/text_based_query_state_to_ast.ts
@@ -5,14 +5,8 @@
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
-import {
- isOfAggregateQueryType,
- getAggregateQueryMode,
- getIndexPatternFromSQLQuery,
- Query,
-} from '@kbn/es-query';
+import { isOfAggregateQueryType, getAggregateQueryMode, Query } from '@kbn/es-query';
import { buildExpression, buildExpressionFunction } from '@kbn/expressions-plugin/common';
-import type { DataViewsContract } from '@kbn/data-views-plugin/common';
import {
ExpressionFunctionKibana,
ExpressionFunctionKibanaContext,
@@ -24,7 +18,7 @@ import {
} from '..';
interface Args extends QueryState {
- dataViewsService: DataViewsContract;
+ timeFieldName?: string;
inputQuery?: Query;
}
@@ -34,12 +28,12 @@ interface Args extends QueryState {
* @param query kibana query or aggregate query
* @param time kibana time range
*/
-export async function queryStateToExpressionAst({
+export function textBasedQueryStateToExpressionAst({
filters,
query,
inputQuery,
time,
- dataViewsService,
+ timeFieldName,
}: Args) {
const kibana = buildExpressionFunction('kibana', {});
let q;
@@ -52,24 +46,15 @@ export async function queryStateToExpressionAst({
filters: filters && filtersToAst(filters),
});
const ast = buildExpression([kibana, kibanaContext]).toAst();
+
if (query && isOfAggregateQueryType(query)) {
const mode = getAggregateQueryMode(query);
// sql query
if (mode === 'sql' && 'sql' in query) {
- const idxPattern = getIndexPatternFromSQLQuery(query.sql);
- const idsTitles = await dataViewsService.getIdsWithTitle();
- const dataViewIdTitle = idsTitles.find(({ title }) => title === idxPattern);
-
- if (dataViewIdTitle) {
- const dataView = await dataViewsService.get(dataViewIdTitle.id);
- const timeFieldName = dataView.timeFieldName;
- const essql = aggregateQueryToAst(query, timeFieldName);
+ const essql = aggregateQueryToAst(query, timeFieldName);
- if (essql) {
- ast.chain.push(essql);
- }
- } else {
- throw new Error(`No data view found for index pattern ${idxPattern}`);
+ if (essql) {
+ ast.chain.push(essql);
}
}
}
diff --git a/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.test.ts b/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.test.ts
new file mode 100644
index 0000000000000..d326f9cc70fa1
--- /dev/null
+++ b/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.test.ts
@@ -0,0 +1,102 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { DataViewsContract } from '@kbn/data-views-plugin/common';
+import { textBasedQueryStateToAstWithValidation } from './text_based_query_state_to_ast_with_validation';
+
+describe('textBasedQueryStateToAstWithValidation', () => {
+ it('returns undefined for a non text based query', async () => {
+ const dataViewsService = {} as unknown as DataViewsContract;
+ const actual = await textBasedQueryStateToAstWithValidation({
+ filters: [],
+ query: { language: 'lucene', query: '' },
+ time: {
+ from: 'now',
+ to: 'now+7d',
+ },
+ dataViewsService,
+ });
+
+ expect(actual).toBeUndefined();
+ });
+
+ it('returns an object with the correct structure for an SQL query with existing dataview', async () => {
+ const dataViewsService = {
+ getIdsWithTitle: jest.fn(() => {
+ return [
+ {
+ title: 'foo',
+ id: 'bar',
+ },
+ ];
+ }),
+ get: jest.fn(() => {
+ return {
+ title: 'foo',
+ id: 'bar',
+ timeFieldName: 'baz',
+ };
+ }),
+ } as unknown as DataViewsContract;
+ const actual = await textBasedQueryStateToAstWithValidation({
+ filters: [],
+ query: { sql: 'SELECT * FROM foo' },
+ time: {
+ from: 'now',
+ to: 'now+7d',
+ },
+ dataViewsService,
+ });
+
+ expect(actual).toHaveProperty(
+ 'chain.1.arguments.timeRange.0.chain.0.arguments',
+ expect.objectContaining({
+ from: ['now'],
+ to: ['now+7d'],
+ })
+ );
+
+ expect(actual).toHaveProperty(
+ 'chain.2.arguments',
+ expect.objectContaining({
+ query: ['SELECT * FROM foo'],
+ })
+ );
+ });
+
+ it('returns an error for text based language with non existing dataview', async () => {
+ const dataViewsService = {
+ getIdsWithTitle: jest.fn(() => {
+ return [
+ {
+ title: 'foo',
+ id: 'bar',
+ },
+ ];
+ }),
+ get: jest.fn(() => {
+ return {
+ title: 'foo',
+ id: 'bar',
+ timeFieldName: 'baz',
+ };
+ }),
+ } as unknown as DataViewsContract;
+
+ await expect(
+ textBasedQueryStateToAstWithValidation({
+ filters: [],
+ query: { sql: 'SELECT * FROM another_dataview' },
+ time: {
+ from: 'now',
+ to: 'now+7d',
+ },
+ dataViewsService,
+ })
+ ).rejects.toThrow('No data view found for index pattern another_dataview');
+ });
+});
diff --git a/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.ts b/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.ts
new file mode 100644
index 0000000000000..c065e8af8e914
--- /dev/null
+++ b/src/plugins/data/common/query/text_based_query_state_to_ast_with_validation.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+import {
+ isOfAggregateQueryType,
+ getIndexPatternFromSQLQuery,
+ Query,
+ AggregateQuery,
+} from '@kbn/es-query';
+import type { DataViewsContract } from '@kbn/data-views-plugin/common';
+import type { QueryState } from '..';
+import { textBasedQueryStateToExpressionAst } from './text_based_query_state_to_ast';
+
+interface Args extends QueryState {
+ dataViewsService: DataViewsContract;
+ inputQuery?: Query;
+}
+
+const getIndexPatternFromAggregateQuery = (query: AggregateQuery) => {
+ if ('sql' in query) {
+ return getIndexPatternFromSQLQuery(query.sql);
+ }
+};
+
+/**
+ * Converts QueryState to expression AST
+ * @param filters array of kibana filters
+ * @param query kibana query or aggregate query
+ * @param time kibana time range
+ */
+export async function textBasedQueryStateToAstWithValidation({
+ filters,
+ query,
+ inputQuery,
+ time,
+ dataViewsService,
+}: Args) {
+ let ast;
+ if (query && isOfAggregateQueryType(query)) {
+ // sql query
+ const idxPattern = getIndexPatternFromAggregateQuery(query);
+ const idsTitles = await dataViewsService.getIdsWithTitle();
+ const dataViewIdTitle = idsTitles.find(({ title }) => title === idxPattern);
+
+ if (dataViewIdTitle) {
+ const dataView = await dataViewsService.get(dataViewIdTitle.id);
+ const timeFieldName = dataView.timeFieldName;
+
+ ast = textBasedQueryStateToExpressionAst({
+ filters,
+ query,
+ inputQuery,
+ time,
+ timeFieldName,
+ });
+ } else {
+ throw new Error(`No data view found for index pattern ${idxPattern}`);
+ }
+ }
+ return ast;
+}
diff --git a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx
index c9baa374ed1de..08a13c7f43d48 100644
--- a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx
+++ b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx
@@ -10,7 +10,12 @@ import React, { useState, useEffect, useCallback, useRef } from 'react';
import { EuiTitle, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiLoadingSpinner } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import memoizeOne from 'memoize-one';
-import { DataViewField } from '@kbn/data-views-plugin/public';
+import {
+ DataViewField,
+ DataViewsPublicPluginStart,
+ INDEX_PATTERN_TYPE,
+ MatchedItem,
+} from '@kbn/data-views-plugin/public';
import {
DataView,
@@ -23,16 +28,14 @@ import {
UseField,
} from '../shared_imports';
-import { ensureMinimumTime, getIndices, extractTimeFields, getMatchedIndices } from '../lib';
+import { ensureMinimumTime, extractTimeFields, getMatchedIndices } from '../lib';
import { FlyoutPanels } from './flyout_panels';
import { removeSpaces } from '../lib';
import {
- MatchedItem,
DataViewEditorContext,
RollupIndicesCapsResponse,
- INDEX_PATTERN_TYPE,
IndexPatternConfig,
MatchedIndicesSet,
FormInternal,
@@ -176,18 +179,19 @@ const IndexPatternEditorFlyoutContentComponent = ({
// load all data sources and set initial matchedIndices
const loadSources = useCallback(() => {
- getIndices({
- http,
- isRollupIndex: () => false,
- pattern: '*',
- showAllIndices: allowHidden,
- }).then((dataSources) => {
- setAllSources(dataSources);
- const matchedSet = getMatchedIndices(dataSources, [], [], allowHidden);
- setMatchedIndices(matchedSet);
- setIsLoadingSources(false);
- });
- }, [http, allowHidden]);
+ dataViews
+ .getIndices({
+ isRollupIndex: () => false,
+ pattern: '*',
+ showAllIndices: allowHidden,
+ })
+ .then((dataSources) => {
+ setAllSources(dataSources);
+ const matchedSet = getMatchedIndices(dataSources, [], [], allowHidden);
+ setMatchedIndices(matchedSet);
+ setIsLoadingSources(false);
+ });
+ }, [allowHidden, dataViews]);
// loading list of index patterns
useEffect(() => {
@@ -271,7 +275,7 @@ const IndexPatternEditorFlyoutContentComponent = ({
const { matchedIndicesResult, exactMatched } = !isLoadingSources
? await loadMatchedIndices(query, allowHidden, allSources, {
isRollupIndex,
- http,
+ dataViews,
})
: {
matchedIndicesResult: {
@@ -302,7 +306,7 @@ const IndexPatternEditorFlyoutContentComponent = ({
return fetchIndices(newTitle);
},
- [http, allowHidden, allSources, type, rollupIndicesCapabilities, isLoadingSources]
+ [dataViews, allowHidden, allSources, type, rollupIndicesCapabilities, isLoadingSources]
);
// If editData exists, loadSources so that MatchedIndices can be loaded for the Timestampfields
@@ -453,10 +457,10 @@ const loadMatchedIndices = memoizeOne(
allSources: MatchedItem[],
{
isRollupIndex,
- http,
+ dataViews,
}: {
isRollupIndex: (index: string) => boolean;
- http: DataViewEditorContext['http'];
+ dataViews: DataViewsPublicPluginStart;
}
): Promise<{
matchedIndicesResult: MatchedIndicesSet;
@@ -466,8 +470,7 @@ const loadMatchedIndices = memoizeOne(
const indexRequests = [];
if (query?.endsWith('*')) {
- const exactMatchedQuery = getIndices({
- http,
+ const exactMatchedQuery = dataViews.getIndices({
isRollupIndex,
pattern: query,
showAllIndices: allowHidden,
@@ -476,14 +479,12 @@ const loadMatchedIndices = memoizeOne(
// provide default value when not making a request for the partialMatchQuery
indexRequests.push(Promise.resolve([]));
} else {
- const exactMatchQuery = getIndices({
- http,
+ const exactMatchQuery = dataViews.getIndices({
isRollupIndex,
pattern: query,
showAllIndices: allowHidden,
});
- const partialMatchQuery = getIndices({
- http,
+ const partialMatchQuery = dataViews.getIndices({
isRollupIndex,
pattern: `${query}*`,
showAllIndices: allowHidden,
diff --git a/src/plugins/data_view_editor/public/components/form_fields/title_field.tsx b/src/plugins/data_view_editor/public/components/form_fields/title_field.tsx
index 822de9506500a..9a4c209a56ebf 100644
--- a/src/plugins/data_view_editor/public/components/form_fields/title_field.tsx
+++ b/src/plugins/data_view_editor/public/components/form_fields/title_field.tsx
@@ -9,6 +9,7 @@
import React, { ChangeEvent, useState, useMemo } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiFormRow, EuiFieldText } from '@elastic/eui';
+import { MatchedItem } from '@kbn/data-views-plugin/public';
import {
UseField,
getFieldValidityAndErrorMessage,
@@ -17,12 +18,7 @@ import {
} from '../../shared_imports';
import { canAppendWildcard, removeSpaces } from '../../lib';
import { schema } from '../form_schema';
-import {
- MatchedItem,
- RollupIndicesCapsResponse,
- IndexPatternConfig,
- MatchedIndicesSet,
-} from '../../types';
+import { RollupIndicesCapsResponse, IndexPatternConfig, MatchedIndicesSet } from '../../types';
interface RefreshMatchedIndicesResult {
matchedIndicesResult: MatchedIndicesSet;
diff --git a/src/plugins/data_view_editor/public/components/form_fields/type_field.tsx b/src/plugins/data_view_editor/public/components/form_fields/type_field.tsx
index 11b46c7ee31fa..b11d8ac2e03ea 100644
--- a/src/plugins/data_view_editor/public/components/form_fields/type_field.tsx
+++ b/src/plugins/data_view_editor/public/components/form_fields/type_field.tsx
@@ -20,9 +20,10 @@ import {
EuiBadge,
} from '@elastic/eui';
+import { INDEX_PATTERN_TYPE } from '@kbn/data-views-plugin/public';
import { UseField } from '../../shared_imports';
-import { INDEX_PATTERN_TYPE, IndexPatternConfig } from '../../types';
+import { IndexPatternConfig } from '../../types';
interface TypeFieldProps {
onChange: (type: INDEX_PATTERN_TYPE) => void;
diff --git a/src/plugins/data_view_editor/public/components/form_schema.ts b/src/plugins/data_view_editor/public/components/form_schema.ts
index 98c3a3b5322eb..59e195a1f1280 100644
--- a/src/plugins/data_view_editor/public/components/form_schema.ts
+++ b/src/plugins/data_view_editor/public/components/form_schema.ts
@@ -6,9 +6,9 @@
* Side Public License, v 1.
*/
+import { INDEX_PATTERN_TYPE } from '@kbn/data-views-plugin/public';
import { i18n } from '@kbn/i18n';
import { fieldValidators, ValidationFunc } from '../shared_imports';
-import { INDEX_PATTERN_TYPE } from '../types';
export const singleAstriskValidator = (
...args: Parameters
diff --git a/src/plugins/data_view_editor/public/components/preview_panel/indices_list/indices_list.test.tsx b/src/plugins/data_view_editor/public/components/preview_panel/indices_list/indices_list.test.tsx
index cad9f323f95ed..074865006a385 100644
--- a/src/plugins/data_view_editor/public/components/preview_panel/indices_list/indices_list.test.tsx
+++ b/src/plugins/data_view_editor/public/components/preview_panel/indices_list/indices_list.test.tsx
@@ -9,7 +9,7 @@
import React from 'react';
import { IndicesList } from '.';
import { shallow } from 'enzyme';
-import { MatchedItem } from '../../../types';
+import { MatchedItem } from '@kbn/data-views-plugin/public';
const indices = [
{ name: 'kibana', tags: [] },
diff --git a/src/plugins/data_view_editor/public/components/preview_panel/indices_list/indices_list.tsx b/src/plugins/data_view_editor/public/components/preview_panel/indices_list/indices_list.tsx
index db3d1dc491453..51405efc58790 100644
--- a/src/plugins/data_view_editor/public/components/preview_panel/indices_list/indices_list.tsx
+++ b/src/plugins/data_view_editor/public/components/preview_panel/indices_list/indices_list.tsx
@@ -27,7 +27,7 @@ import {
import { Pager } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
-import { MatchedItem, Tag } from '../../../types';
+import { MatchedItem, Tag } from '@kbn/data-views-plugin/public';
interface IndicesListProps {
indices: MatchedItem[];
diff --git a/src/plugins/data_view_editor/public/components/preview_panel/preview_panel.tsx b/src/plugins/data_view_editor/public/components/preview_panel/preview_panel.tsx
index 28413debdb2a9..26f6b2b1c2a70 100644
--- a/src/plugins/data_view_editor/public/components/preview_panel/preview_panel.tsx
+++ b/src/plugins/data_view_editor/public/components/preview_panel/preview_panel.tsx
@@ -8,10 +8,11 @@
import React from 'react';
import { EuiSpacer } from '@elastic/eui';
+import { INDEX_PATTERN_TYPE } from '@kbn/data-views-plugin/public';
import { StatusMessage } from './status_message';
import { IndicesList } from './indices_list';
-import { INDEX_PATTERN_TYPE, MatchedIndicesSet } from '../../types';
+import { MatchedIndicesSet } from '../../types';
interface Props {
type: INDEX_PATTERN_TYPE;
diff --git a/src/plugins/data_view_editor/public/components/preview_panel/status_message/status_message.test.tsx b/src/plugins/data_view_editor/public/components/preview_panel/status_message/status_message.test.tsx
index 858a00f025e9c..23f0e1b8a6b01 100644
--- a/src/plugins/data_view_editor/public/components/preview_panel/status_message/status_message.test.tsx
+++ b/src/plugins/data_view_editor/public/components/preview_panel/status_message/status_message.test.tsx
@@ -9,7 +9,7 @@
import React from 'react';
import { StatusMessage } from '.';
import { shallow } from 'enzyme';
-import { MatchedItem } from '../../../types';
+import { MatchedItem } from '@kbn/data-views-plugin/public';
const tagsPartial = {
tags: [],
diff --git a/src/plugins/data_view_editor/public/lib/get_matched_indices.test.ts b/src/plugins/data_view_editor/public/lib/get_matched_indices.test.ts
index b1c80791a1343..a5f12f7221ab1 100644
--- a/src/plugins/data_view_editor/public/lib/get_matched_indices.test.ts
+++ b/src/plugins/data_view_editor/public/lib/get_matched_indices.test.ts
@@ -6,8 +6,9 @@
* Side Public License, v 1.
*/
+import { MatchedItem } from '@kbn/data-views-plugin/public';
+import { Tag } from '@kbn/data-views-plugin/public/types';
import { getMatchedIndices } from './get_matched_indices';
-import { Tag, MatchedItem } from '../types';
jest.mock('../constants', () => ({
MAX_NUMBER_OF_MATCHING_INDICES: 6,
diff --git a/src/plugins/data_view_editor/public/lib/get_matched_indices.ts b/src/plugins/data_view_editor/public/lib/get_matched_indices.ts
index 0b659aa5fbc76..e35ba8f1e8fae 100644
--- a/src/plugins/data_view_editor/public/lib/get_matched_indices.ts
+++ b/src/plugins/data_view_editor/public/lib/get_matched_indices.ts
@@ -6,6 +6,7 @@
* Side Public License, v 1.
*/
+import { MatchedItem } from '@kbn/data-views-plugin/public';
import { MAX_NUMBER_OF_MATCHING_INDICES } from '../constants';
function isSystemIndex(index: string): boolean {
@@ -50,7 +51,7 @@ function filterSystemIndices(indices: MatchedItem[], isIncludingSystemIndices: b
We call this `exact` matches because ES is telling us exactly what it matches
*/
-import { MatchedItem, MatchedIndicesSet } from '../types';
+import { MatchedIndicesSet } from '../types';
export function getMatchedIndices(
unfilteredAllIndices: MatchedItem[],
diff --git a/src/plugins/data_view_editor/public/lib/index.ts b/src/plugins/data_view_editor/public/lib/index.ts
index 981c9df03527b..97a1f08d35045 100644
--- a/src/plugins/data_view_editor/public/lib/index.ts
+++ b/src/plugins/data_view_editor/public/lib/index.ts
@@ -10,8 +10,6 @@ export { canAppendWildcard } from './can_append_wildcard';
export { ensureMinimumTime } from './ensure_minimum_time';
-export { getIndices } from './get_indices';
-
export { getMatchedIndices } from './get_matched_indices';
export { containsIllegalCharacters } from './contains_illegal_characters';
diff --git a/src/plugins/data_view_editor/public/types.ts b/src/plugins/data_view_editor/public/types.ts
index 5b177f65b0602..4500e522119d5 100644
--- a/src/plugins/data_view_editor/public/types.ts
+++ b/src/plugins/data_view_editor/public/types.ts
@@ -17,7 +17,12 @@ import {
import { EuiComboBoxOptionOption } from '@elastic/eui';
-import type { DataView, DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
+import type {
+ DataView,
+ DataViewsPublicPluginStart,
+ INDEX_PATTERN_TYPE,
+ MatchedItem,
+} from '@kbn/data-views-plugin/public';
import { DataPublicPluginStart, IndexPatternAggRestrictions } from './shared_imports';
export interface DataViewEditorContext {
@@ -80,51 +85,6 @@ export interface StartPlugins {
export type CloseEditor = () => void;
-export interface MatchedItem {
- name: string;
- tags: Tag[];
- item: {
- name: string;
- backing_indices?: string[];
- timestamp_field?: string;
- indices?: string[];
- aliases?: string[];
- attributes?: ResolveIndexResponseItemIndexAttrs[];
- data_stream?: string;
- };
-}
-
-// for showing index matches
-export interface ResolveIndexResponse {
- indices?: ResolveIndexResponseItemIndex[];
- aliases?: ResolveIndexResponseItemAlias[];
- data_streams?: ResolveIndexResponseItemDataStream[];
-}
-
-export interface ResolveIndexResponseItem {
- name: string;
-}
-
-export interface ResolveIndexResponseItemDataStream extends ResolveIndexResponseItem {
- backing_indices: string[];
- timestamp_field: string;
-}
-
-export interface ResolveIndexResponseItemAlias extends ResolveIndexResponseItem {
- indices: string[];
-}
-
-export interface ResolveIndexResponseItemIndex extends ResolveIndexResponseItem {
- aliases?: string[];
- attributes?: ResolveIndexResponseItemIndexAttrs[];
- data_stream?: string;
-}
-
-export interface Tag {
- name: string;
- key: string;
- color: string;
-}
// end for index matches
export interface IndexPatternTableItem {
@@ -135,13 +95,6 @@ export interface IndexPatternTableItem {
sort: string;
}
-export enum ResolveIndexResponseItemIndexAttrs {
- OPEN = 'open',
- CLOSED = 'closed',
- HIDDEN = 'hidden',
- FROZEN = 'frozen',
-}
-
export interface RollupIndiciesCapability {
aggs: Record;
error: string;
@@ -149,11 +102,6 @@ export interface RollupIndiciesCapability {
export type RollupIndicesCapsResponse = Record;
-export enum INDEX_PATTERN_TYPE {
- ROLLUP = 'rollup',
- DEFAULT = 'default',
-}
-
export interface IndexPatternConfig {
title: string;
timestampField?: EuiComboBoxOptionOption;
diff --git a/src/plugins/data_views/public/data_views_service_public.ts b/src/plugins/data_views/public/data_views_service_public.ts
index 4693e7000b2a3..30625b1b59da5 100644
--- a/src/plugins/data_views/public/data_views_service_public.ts
+++ b/src/plugins/data_views/public/data_views_service_public.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import { DataViewsService } from '.';
+import { DataViewsService, MatchedItem } from '.';
import { DataViewsServiceDeps } from '../common/data_views/data_views';
import { HasDataService } from '../common';
@@ -24,6 +24,11 @@ export interface DataViewsServicePublicDeps extends DataViewsServiceDeps {
* Has data service
*/
hasData: HasDataService;
+ getIndices: (props: {
+ pattern: string;
+ showAllIndices?: boolean;
+ isRollupIndex: (indexName: string) => boolean;
+ }) => Promise;
}
/**
@@ -32,6 +37,12 @@ export interface DataViewsServicePublicDeps extends DataViewsServiceDeps {
*/
export class DataViewsServicePublic extends DataViewsService {
public getCanSaveSync: () => boolean;
+
+ public getIndices: (props: {
+ pattern: string;
+ showAllIndices?: boolean;
+ isRollupIndex: (indexName: string) => boolean;
+ }) => Promise;
public hasData: HasDataService;
/**
@@ -43,5 +54,6 @@ export class DataViewsServicePublic extends DataViewsService {
super(deps);
this.getCanSaveSync = deps.getCanSaveSync;
this.hasData = deps.hasData;
+ this.getIndices = deps.getIndices;
}
}
diff --git a/src/plugins/data_views/public/index.ts b/src/plugins/data_views/public/index.ts
index f886d60696b8a..8ee149622f39f 100644
--- a/src/plugins/data_views/public/index.ts
+++ b/src/plugins/data_views/public/index.ts
@@ -32,7 +32,14 @@ export {
getFieldSubtypeNested,
} from '../common';
-export type { DataViewsPublicSetupDependencies, DataViewsPublicStartDependencies } from './types';
+export type {
+ DataViewsPublicSetupDependencies,
+ DataViewsPublicStartDependencies,
+ MatchedItem,
+ Tag,
+} from './types';
+
+export { INDEX_PATTERN_TYPE } from './types';
export type {
DataViewsServicePublic,
diff --git a/src/plugins/data_views/public/plugin.ts b/src/plugins/data_views/public/plugin.ts
index df379ab18964e..415a6c97bc73a 100644
--- a/src/plugins/data_views/public/plugin.ts
+++ b/src/plugins/data_views/public/plugin.ts
@@ -21,7 +21,7 @@ import { SavedObjectsClientPublicToCommon } from './saved_objects_client_wrapper
import { UiSettingsPublicToCommon } from './ui_settings_wrapper';
import { DataViewsServicePublic } from './data_views_service_public';
-import { HasData } from './services';
+import { getIndices, HasData } from './services';
import { debounceByKey } from './debounce_by_key';
@@ -76,6 +76,7 @@ export class DataViewsPublicPlugin
getCanSaveSync: () => application.capabilities.indexPatterns.save === true,
getCanSaveAdvancedSettings: () =>
Promise.resolve(application.capabilities.advancedSettings.save === true),
+ getIndices: (props) => getIndices({ ...props, http: core.http }),
});
}
diff --git a/src/plugins/data_view_editor/public/lib/__snapshots__/get_indices.test.ts.snap b/src/plugins/data_views/public/services/__snapshots__/get_indices.test.ts.snap
similarity index 100%
rename from src/plugins/data_view_editor/public/lib/__snapshots__/get_indices.test.ts.snap
rename to src/plugins/data_views/public/services/__snapshots__/get_indices.test.ts.snap
diff --git a/src/plugins/data_view_editor/public/lib/get_indices.test.ts b/src/plugins/data_views/public/services/get_indices.test.ts
similarity index 100%
rename from src/plugins/data_view_editor/public/lib/get_indices.test.ts
rename to src/plugins/data_views/public/services/get_indices.test.ts
diff --git a/src/plugins/data_view_editor/public/lib/get_indices.ts b/src/plugins/data_views/public/services/get_indices.ts
similarity index 90%
rename from src/plugins/data_view_editor/public/lib/get_indices.ts
rename to src/plugins/data_views/public/services/get_indices.ts
index 2c04d6e389964..fba5004367526 100644
--- a/src/plugins/data_view_editor/public/lib/get_indices.ts
+++ b/src/plugins/data_views/public/services/get_indices.ts
@@ -12,20 +12,20 @@ import { i18n } from '@kbn/i18n';
import { Tag, INDEX_PATTERN_TYPE } from '../types';
import { MatchedItem, ResolveIndexResponse, ResolveIndexResponseItemIndexAttrs } from '../types';
-const aliasLabel = i18n.translate('indexPatternEditor.aliasLabel', { defaultMessage: 'Alias' });
-const dataStreamLabel = i18n.translate('indexPatternEditor.dataStreamLabel', {
+const aliasLabel = i18n.translate('dataViews.aliasLabel', { defaultMessage: 'Alias' });
+const dataStreamLabel = i18n.translate('dataViews.dataStreamLabel', {
defaultMessage: 'Data stream',
});
-const indexLabel = i18n.translate('indexPatternEditor.indexLabel', {
+const indexLabel = i18n.translate('dataViews.indexLabel', {
defaultMessage: 'Index',
});
-const frozenLabel = i18n.translate('indexPatternEditor.frozenLabel', {
+const frozenLabel = i18n.translate('dataViews.frozenLabel', {
defaultMessage: 'Frozen',
});
-const rollupLabel = i18n.translate('indexPatternEditor.rollupLabel', {
+const rollupLabel = i18n.translate('dataViews.rollupLabel', {
defaultMessage: 'Rollup',
});
diff --git a/src/plugins/data_views/public/services/index.ts b/src/plugins/data_views/public/services/index.ts
index 36d35d69bcb54..af3787bd5dbd1 100644
--- a/src/plugins/data_views/public/services/index.ts
+++ b/src/plugins/data_views/public/services/index.ts
@@ -6,4 +6,17 @@
* Side Public License, v 1.
*/
+import { HttpStart } from '@kbn/core/public';
+import { MatchedItem } from '../types';
+
export * from './has_data';
+
+export async function getIndices(props: {
+ http: HttpStart;
+ pattern: string;
+ showAllIndices?: boolean;
+ isRollupIndex: (indexName: string) => boolean;
+}): Promise {
+ const { getIndices: getIndicesLazy } = await import('./get_indices');
+ return getIndicesLazy(props);
+}
diff --git a/src/plugins/data_views/public/types.ts b/src/plugins/data_views/public/types.ts
index fc888d2c42c87..637d4191c671e 100644
--- a/src/plugins/data_views/public/types.ts
+++ b/src/plugins/data_views/public/types.ts
@@ -11,6 +11,11 @@ import { FieldFormatsSetup, FieldFormatsStart } from '@kbn/field-formats-plugin/
import { DataViewsServicePublicMethods } from './data_views';
import { HasDataService } from '../common';
+export enum INDEX_PATTERN_TYPE {
+ ROLLUP = 'rollup',
+ DEFAULT = 'default',
+}
+
export enum IndicesResponseItemIndexAttrs {
OPEN = 'open',
CLOSED = 'closed',
@@ -98,6 +103,11 @@ export interface DataViewsPublicPluginSetup {}
export interface DataViewsServicePublic extends DataViewsServicePublicMethods {
getCanSaveSync: () => boolean;
hasData: HasDataService;
+ getIndices: (props: {
+ pattern: string;
+ showAllIndices?: boolean;
+ isRollupIndex: (indexName: string) => boolean;
+ }) => Promise;
}
export type DataViewsContract = DataViewsServicePublic;
@@ -106,3 +116,55 @@ export type DataViewsContract = DataViewsServicePublic;
* Data views plugin public Start contract
*/
export type DataViewsPublicPluginStart = DataViewsServicePublic;
+
+export interface MatchedItem {
+ name: string;
+ tags: Tag[];
+ item: {
+ name: string;
+ backing_indices?: string[];
+ timestamp_field?: string;
+ indices?: string[];
+ aliases?: string[];
+ attributes?: ResolveIndexResponseItemIndexAttrs[];
+ data_stream?: string;
+ };
+}
+
+// for showing index matches
+export interface ResolveIndexResponse {
+ indices?: ResolveIndexResponseItemIndex[];
+ aliases?: ResolveIndexResponseItemAlias[];
+ data_streams?: ResolveIndexResponseItemDataStream[];
+}
+
+export interface ResolveIndexResponseItem {
+ name: string;
+}
+
+export interface ResolveIndexResponseItemDataStream extends ResolveIndexResponseItem {
+ backing_indices: string[];
+ timestamp_field: string;
+}
+
+export interface ResolveIndexResponseItemAlias extends ResolveIndexResponseItem {
+ indices: string[];
+}
+
+export interface ResolveIndexResponseItemIndex extends ResolveIndexResponseItem {
+ aliases?: string[];
+ attributes?: ResolveIndexResponseItemIndexAttrs[];
+ data_stream?: string;
+}
+
+export interface Tag {
+ name: string;
+ key: string;
+ color: string;
+}
+export enum ResolveIndexResponseItemIndexAttrs {
+ OPEN = 'open',
+ CLOSED = 'closed',
+ HIDDEN = 'hidden',
+ FROZEN = 'frozen',
+}
diff --git a/src/plugins/data_views/server/rest_api_routes/update_data_view.ts b/src/plugins/data_views/server/rest_api_routes/update_data_view.ts
index 22598a8251096..1ac504ac652b8 100644
--- a/src/plugins/data_views/server/rest_api_routes/update_data_view.ts
+++ b/src/plugins/data_views/server/rest_api_routes/update_data_view.ts
@@ -9,7 +9,7 @@
import { schema } from '@kbn/config-schema';
import { UsageCounter } from '@kbn/usage-collection-plugin/server';
import { IRouter, StartServicesAccessor } from '@kbn/core/server';
-import { DataViewsService } from '../../common/data_views';
+import { DataViewsService, DataView } from '../../common/data_views';
import { DataViewSpec } from '../../common/types';
import { handleErrors } from './util/handle_errors';
import { fieldSpecSchema, runtimeFieldSchema, serializedFieldFormatSchema } from './util/schemas';
@@ -37,6 +37,7 @@ const indexPatternUpdateSchema = schema.object({
fields: schema.maybe(schema.recordOf(schema.string(), fieldSpecSchema)),
allowNoIndex: schema.maybe(schema.boolean()),
runtimeFieldMap: schema.maybe(schema.recordOf(schema.string(), runtimeFieldSchema)),
+ name: schema.maybe(schema.string()),
});
interface UpdateDataViewArgs {
@@ -67,43 +68,49 @@ export const updateDataView = async ({
typeMeta,
fields,
runtimeFieldMap,
+ name,
} = spec;
- let changeCount = 0;
+ let isChanged = false;
let doRefreshFields = false;
if (title !== undefined && title !== dataView.title) {
- changeCount++;
+ isChanged = true;
dataView.title = title;
}
if (timeFieldName !== undefined && timeFieldName !== dataView.timeFieldName) {
- changeCount++;
+ isChanged = true;
dataView.timeFieldName = timeFieldName;
}
if (sourceFilters !== undefined) {
- changeCount++;
+ isChanged = true;
dataView.sourceFilters = sourceFilters;
}
if (fieldFormats !== undefined) {
- changeCount++;
+ isChanged = true;
dataView.fieldFormatMap = fieldFormats;
}
if (type !== undefined) {
- changeCount++;
+ isChanged = true;
dataView.type = type;
}
if (typeMeta !== undefined) {
- changeCount++;
+ isChanged = true;
dataView.typeMeta = typeMeta;
}
+ if (name !== undefined) {
+ isChanged = true;
+ dataView.name = name;
+ }
+
if (fields !== undefined) {
- changeCount++;
+ isChanged = true;
doRefreshFields = true;
dataView.fields.replaceAll(
Object.values(fields || {}).map((field) => ({
@@ -115,19 +122,19 @@ export const updateDataView = async ({
}
if (runtimeFieldMap !== undefined) {
- changeCount++;
+ isChanged = true;
dataView.replaceAllRuntimeFields(runtimeFieldMap);
}
- if (changeCount < 1) {
- throw new Error('Index pattern change set is empty.');
- }
+ if (isChanged) {
+ const result = (await dataViewsService.updateSavedObject(dataView)) as DataView;
- await dataViewsService.updateSavedObject(dataView);
-
- if (doRefreshFields && refreshFields) {
- await dataViewsService.refreshFields(dataView);
+ if (doRefreshFields && refreshFields) {
+ await dataViewsService.refreshFields(dataView);
+ }
+ return result;
}
+
return dataView;
};
diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.test.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.test.tsx
index 22d33215b1eaf..666b75a689499 100644
--- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.test.tsx
+++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.test.tsx
@@ -194,4 +194,14 @@ describe('discover sidebar', function () {
const createDataViewButton = findTestSubject(compWithPickerInViewerMode, 'dataview-create-new');
expect(createDataViewButton.length).toBe(0);
});
+
+ it('should render the Visualize in Lens button in text based languages mode', () => {
+ const compInViewerMode = mountWithIntl(
+
+
+
+ );
+ const visualizeField = findTestSubject(compInViewerMode, 'textBased-visualize');
+ expect(visualizeField.length).toBe(1);
+ });
});
diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx
index d7e227df94b8c..355512da5c52c 100644
--- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx
+++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar.tsx
@@ -22,6 +22,7 @@ import {
useResizeObserver,
EuiButton,
} from '@elastic/eui';
+import { isOfAggregateQueryType } from '@kbn/es-query';
import useShallowCompareEffect from 'react-use/lib/useShallowCompareEffect';
import { isEqual } from 'lodash';
import { FormattedMessage } from '@kbn/i18n-react';
@@ -39,6 +40,7 @@ import { DiscoverSidebarResponsiveProps } from './discover_sidebar_responsive';
import { VIEW_MODE } from '../../../../components/view_mode_toggle';
import { DISCOVER_TOUR_STEP_ANCHOR_IDS } from '../../../../components/discover_tour';
import type { DataTableRecord } from '../../../../types';
+import { triggerVisualizeActionsTextBasedLanguages } from './lib/visualize_trigger_utils';
/**
* Default number of available fields displayed and added on scroll
@@ -309,6 +311,12 @@ export function DiscoverSidebarComponent({
const filterChanged = useMemo(() => isEqual(fieldFilter, getDefaultFieldFilter()), [fieldFilter]);
+ const visualizeAggregateQuery = useCallback(() => {
+ const aggregateQuery =
+ state.query && isOfAggregateQueryType(state.query) ? state.query : undefined;
+ triggerVisualizeActionsTextBasedLanguages(columns, selectedDataView, aggregateQuery);
+ }, [columns, selectedDataView, state.query]);
+
if (!selectedDataView) {
return null;
}
@@ -532,6 +540,20 @@ export function DiscoverSidebarComponent({
)}
+ {isPlainRecord && (
+
+
+ {i18n.translate('discover.textBasedLanguages.visualize.label', {
+ defaultMessage: 'Visualize in Lens',
+ })}
+
+
+ )}
);
diff --git a/src/plugins/discover/public/application/main/components/sidebar/lib/visualize_trigger_utils.ts b/src/plugins/discover/public/application/main/components/sidebar/lib/visualize_trigger_utils.ts
index 005accf3021f3..85537df2ef364 100644
--- a/src/plugins/discover/public/application/main/components/sidebar/lib/visualize_trigger_utils.ts
+++ b/src/plugins/discover/public/application/main/components/sidebar/lib/visualize_trigger_utils.ts
@@ -12,6 +12,7 @@ import {
visualizeFieldTrigger,
visualizeGeoFieldTrigger,
} from '@kbn/ui-actions-plugin/public';
+import type { AggregateQuery } from '@kbn/es-query';
import type { DataViewField, DataView } from '@kbn/data-views-plugin/public';
import { KBN_FIELD_TYPES } from '@kbn/data-plugin/public';
import { getUiActions } from '../../../../../kibana_services';
@@ -59,6 +60,22 @@ export function triggerVisualizeActions(
getUiActions().getTrigger(trigger).exec(triggerOptions);
}
+export function triggerVisualizeActionsTextBasedLanguages(
+ contextualFields: string[],
+ dataView?: DataView,
+ query?: AggregateQuery
+) {
+ if (!dataView) return;
+ const triggerOptions = {
+ dataViewSpec: dataView.toSpec(false),
+ fieldName: '',
+ contextualFields,
+ originatingApp: PLUGIN_ID,
+ query,
+ };
+ getUiActions().getTrigger(VISUALIZE_FIELD_TRIGGER).exec(triggerOptions);
+}
+
export interface VisualizeInformation {
field: DataViewField;
href?: string;
diff --git a/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx b/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx
index 241a20a0a1559..82f3b1aadadbf 100644
--- a/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx
+++ b/src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx
@@ -66,7 +66,7 @@ export const DiscoverTopNav = ({
[dataView]
);
const services = useDiscoverServices();
- const { dataViewEditor, navigation, dataViewFieldEditor, data, uiSettings } = services;
+ const { dataViewEditor, navigation, dataViewFieldEditor, data, uiSettings, dataViews } = services;
const canEditDataView = Boolean(dataViewEditor?.userPermissions.editDataView());
@@ -141,6 +141,19 @@ export const DiscoverTopNav = ({
[canEditDataView, dataViewEditor, onChangeDataView]
);
+ const onCreateDefaultAdHocDataView = useCallback(
+ async (pattern: string) => {
+ const newDataView = await dataViews.create({
+ title: pattern,
+ });
+ if (newDataView.fields.getByName('@timestamp')?.type === 'date') {
+ newDataView.timeFieldName = '@timestamp';
+ }
+ onChangeDataView(newDataView.id!);
+ },
+ [dataViews, onChangeDataView]
+ );
+
const topNavMenu = useMemo(
() =>
getTopNavLinks({
@@ -201,6 +214,7 @@ export const DiscoverTopNav = ({
currentDataViewId: dataView?.id,
onAddField: addField,
onDataViewCreated: createNewDataView,
+ onCreateDefaultAdHocDataView,
onChangeDataView,
textBasedLanguages: supportedTextBasedLanguages as DataViewPickerProps['textBasedLanguages'],
adHocDataViews: adHocDataViewList,
diff --git a/src/plugins/discover/public/application/main/utils/fetch_sql.ts b/src/plugins/discover/public/application/main/utils/fetch_sql.ts
index 2faa821bc66ec..057ddc5886da5 100644
--- a/src/plugins/discover/public/application/main/utils/fetch_sql.ts
+++ b/src/plugins/discover/public/application/main/utils/fetch_sql.ts
@@ -12,7 +12,7 @@ import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
import type { ExpressionsStart } from '@kbn/expressions-plugin/public';
import type { Datatable } from '@kbn/expressions-plugin/public';
import type { DataViewsContract } from '@kbn/data-views-plugin/common';
-import { queryStateToExpressionAst } from '@kbn/data-plugin/common';
+import { textBasedQueryStateToAstWithValidation } from '@kbn/data-plugin/common';
import { DataTableRecord } from '../../../types';
interface SQLErrorResponse {
@@ -31,7 +31,7 @@ export function fetchSql(
inputQuery?: Query
) {
const timeRange = data.query.timefilter.timefilter.getTime();
- return queryStateToExpressionAst({
+ return textBasedQueryStateToAstWithValidation({
filters,
query,
time: timeRange,
diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts
index 3f7ddf34331ca..3c0fe05348324 100644
--- a/src/plugins/discover/server/ui_settings.ts
+++ b/src/plugins/discover/server/ui_settings.ts
@@ -329,7 +329,7 @@ export const getUiSettings: (docLinks: DocLinksServiceSetup) => Record` +
diff --git a/src/plugins/expressions/common/execution/execution.test.ts b/src/plugins/expressions/common/execution/execution.test.ts
index 75a95035bb89f..a5e03084a6977 100644
--- a/src/plugins/expressions/common/execution/execution.test.ts
+++ b/src/plugins/expressions/common/execution/execution.test.ts
@@ -488,6 +488,63 @@ describe('Execution', () => {
expect(spy.fn).toHaveBeenCalledTimes(0);
});
+
+ test('continues execution when error state is gone', async () => {
+ testScheduler.run(({ cold, expectObservable, flush }) => {
+ const a = 1;
+ const b = 2;
+ const c = 3;
+ const observable$ = cold('abc|', { a, b, c });
+ const flakyFn = jest
+ .fn()
+ .mockImplementationOnce((value) => value)
+ .mockImplementationOnce(() => {
+ throw new Error('Some error.');
+ })
+ .mockImplementationOnce((value) => value);
+ const spyFn = jest.fn((value) => value);
+
+ const executor = createUnitTestExecutor();
+ executor.registerFunction({
+ name: 'observable',
+ args: {},
+ help: '',
+ fn: () => observable$,
+ });
+ executor.registerFunction({
+ name: 'flaky',
+ args: {},
+ help: '',
+ fn: (value) => flakyFn(value),
+ });
+ executor.registerFunction({
+ name: 'spy',
+ args: {},
+ help: '',
+ fn: (value) => spyFn(value),
+ });
+
+ const result = executor.run('observable | flaky | spy', null, {});
+
+ expectObservable(result).toBe('abc|', {
+ a: { partial: true, result: a },
+ b: {
+ partial: true,
+ result: {
+ type: 'error',
+ error: expect.objectContaining({ message: '[flaky] > Some error.' }),
+ },
+ },
+ c: { partial: false, result: c },
+ });
+
+ flush();
+
+ expect(spyFn).toHaveBeenCalledTimes(2);
+ expect(spyFn).toHaveBeenNthCalledWith(1, a);
+ expect(spyFn).toHaveBeenNthCalledWith(2, c);
+ });
+ });
});
describe('state', () => {
diff --git a/src/plugins/expressions/common/execution/execution.ts b/src/plugins/expressions/common/execution/execution.ts
index b4ef83389ce28..68cebaa65569b 100644
--- a/src/plugins/expressions/common/execution/execution.ts
+++ b/src/plugins/expressions/common/execution/execution.ts
@@ -295,87 +295,86 @@ export class Execution<
}
invokeChain(
- chainArr: ExpressionAstFunction[],
+ [head, ...tail]: ExpressionAstFunction[],
input: unknown
- ): Observable {
+ ): Observable {
+ if (!head) {
+ return of(input as ChainOutput);
+ }
+
return of(input).pipe(
- ...(chainArr.map((link) =>
- switchMap((currentInput) => {
- const { function: fnName, arguments: fnArgs } = link;
- const fn = getByAlias(
- this.state.get().functions,
- fnName,
- this.execution.params.namespace
- );
+ switchMap((currentInput) => {
+ const { function: fnName, arguments: fnArgs } = head;
+ const fn = getByAlias(this.state.get().functions, fnName, this.execution.params.namespace);
+
+ if (!fn) {
+ throw createError({
+ name: 'fn not found',
+ message: i18n.translate('expressions.execution.functionNotFound', {
+ defaultMessage: `Function {fnName} could not be found.`,
+ values: {
+ fnName,
+ },
+ }),
+ });
+ }
- if (!fn) {
- throw createError({
- name: 'fn not found',
- message: i18n.translate('expressions.execution.functionNotFound', {
- defaultMessage: `Function {fnName} could not be found.`,
- values: {
- fnName,
- },
- }),
- });
- }
+ if (fn.disabled) {
+ throw createError({
+ name: 'fn is disabled',
+ message: i18n.translate('expressions.execution.functionDisabled', {
+ defaultMessage: `Function {fnName} is disabled.`,
+ values: {
+ fnName,
+ },
+ }),
+ });
+ }
- if (fn.disabled) {
- throw createError({
- name: 'fn is disabled',
- message: i18n.translate('expressions.execution.functionDisabled', {
- defaultMessage: `Function {fnName} is disabled.`,
- values: {
- fnName,
- },
- }),
- });
- }
+ if (fn.deprecated) {
+ this.logger?.warn(`Function '${fnName}' is deprecated`);
+ }
- if (fn.deprecated) {
- this.logger?.warn(`Function '${fnName}' is deprecated`);
- }
+ if (this.execution.params.debug) {
+ head.debug = {
+ args: {},
+ duration: 0,
+ fn: fn.name,
+ input: currentInput,
+ success: true,
+ };
+ }
- if (this.execution.params.debug) {
- link.debug = {
- args: {},
- duration: 0,
- fn: fn.name,
- input: currentInput,
- success: true,
- };
- }
+ const timeStart = this.execution.params.debug ? now() : 0;
+
+ // `resolveArgs` returns an object because the arguments themselves might
+ // actually have `then` or `subscribe` methods which would be treated as a `Promise`
+ // or an `Observable` accordingly.
+ return this.resolveArgs(fn, currentInput, fnArgs).pipe(
+ tap((args) => this.execution.params.debug && Object.assign(head.debug, { args })),
+ switchMap((args) => this.invokeFunction(fn, currentInput, args)),
+ switchMap((output) => (getType(output) === 'error' ? throwError(output) : of(output))),
+ tap((output) => this.execution.params.debug && Object.assign(head.debug, { output })),
+ switchMap((output) => this.invokeChain(tail, output)),
+ catchError((rawError) => {
+ const error = createError(rawError);
+ error.error.message = `[${fnName}] > ${error.error.message}`;
+
+ if (this.execution.params.debug) {
+ Object.assign(head.debug, { error, rawError, success: false });
+ }
- const timeStart = this.execution.params.debug ? now() : 0;
-
- // `resolveArgs` returns an object because the arguments themselves might
- // actually have `then` or `subscribe` methods which would be treated as a `Promise`
- // or an `Observable` accordingly.
- return this.resolveArgs(fn, currentInput, fnArgs).pipe(
- tap((args) => this.execution.params.debug && Object.assign(link.debug, { args })),
- switchMap((args) => this.invokeFunction(fn, currentInput, args)),
- switchMap((output) => (getType(output) === 'error' ? throwError(output) : of(output))),
- tap((output) => this.execution.params.debug && Object.assign(link.debug, { output })),
- catchError((rawError) => {
- const error = createError(rawError);
- error.error.message = `[${fnName}] > ${error.error.message}`;
-
- if (this.execution.params.debug) {
- Object.assign(link.debug, { error, rawError, success: false });
- }
-
- return throwError(error);
- }),
- finalize(() => {
- if (this.execution.params.debug) {
- Object.assign(link.debug, { duration: now() - timeStart });
- }
- })
- );
- })
- ) as Parameters['pipe']>),
+ return of(error);
+ }),
+ finalize(() => {
+ if (this.execution.params.debug) {
+ Object.assign(head.debug, { duration: now() - timeStart });
+ }
+ })
+ );
+ }),
catchError((error) => of(error))
- ) as Observable;
+ );
}
invokeFunction(
diff --git a/src/plugins/guided_onboarding/common/index.ts b/src/plugins/guided_onboarding/common/constants.ts
similarity index 100%
rename from src/plugins/guided_onboarding/common/index.ts
rename to src/plugins/guided_onboarding/common/constants.ts
diff --git a/src/plugins/guided_onboarding/common/types.ts b/src/plugins/guided_onboarding/common/types.ts
new file mode 100644
index 0000000000000..412154ede98b0
--- /dev/null
+++ b/src/plugins/guided_onboarding/common/types.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.
+ */
+
+export type GuideId = 'observability' | 'security' | 'search';
+
+export type ObservabilityStepIds = 'add_data' | 'view_dashboard' | 'tour_observability';
+export type SecurityStepIds = 'add_data' | 'rules' | 'alerts' | 'cases';
+export type SearchStepIds = 'add_data' | 'browse_docs' | 'search_experience';
+
+export type GuideStepIds = ObservabilityStepIds | SecurityStepIds | SearchStepIds;
+
+/**
+ * Allowed states for a guide:
+ * in_progress: Guide has been started
+ * ready_to_complete: All steps have been completed, but the "Continue using Elastic" button has not been clicked
+ * complete: All steps and the guide have been completed
+ */
+export type GuideStatus = 'in_progress' | 'ready_to_complete' | 'complete';
+
+/**
+ * Allowed states for each step in a guide:
+ * inactive: Step has not started
+ * active: Step is ready to start (i.e., the guide has been started)
+ * in_progress: Step has been started and is in progress
+ * complete: Step has been completed
+ */
+export type StepStatus = 'inactive' | 'active' | 'in_progress' | 'complete';
+
+export interface GuideStep {
+ id: GuideStepIds;
+ status: StepStatus;
+}
+
+export interface GuideState {
+ guideId: GuideId;
+ status: GuideStatus;
+ isActive?: boolean; // Drives the current guide shown in the dropdown panel
+ steps: GuideStep[];
+}
diff --git a/src/plugins/guided_onboarding/public/components/guide_panel.test.tsx b/src/plugins/guided_onboarding/public/components/guide_panel.test.tsx
index 5eaf24163d2ae..3506c15fcba35 100644
--- a/src/plugins/guided_onboarding/public/components/guide_panel.test.tsx
+++ b/src/plugins/guided_onboarding/public/components/guide_panel.test.tsx
@@ -13,18 +13,39 @@ import { applicationServiceMock } from '@kbn/core-application-browser-mocks';
import { httpServiceMock } from '@kbn/core/public/mocks';
import { HttpSetup } from '@kbn/core/public';
-import { apiService } from '../services/api';
import { guidesConfig } from '../constants/guides_config';
+import type { GuideState } from '../../common/types';
+import { apiService } from '../services/api';
import { GuidePanel } from './guide_panel';
import { registerTestBed, TestBed } from '@kbn/test-jest-helpers';
const applicationMock = applicationServiceMock.createStartContract();
+const mockActiveSearchGuideState: GuideState = {
+ guideId: 'search',
+ isActive: true,
+ status: 'in_progress',
+ steps: [
+ {
+ id: 'add_data',
+ status: 'active',
+ },
+ {
+ id: 'browse_docs',
+ status: 'inactive',
+ },
+ {
+ id: 'search_experience',
+ status: 'inactive',
+ },
+ ],
+};
+
const getGuidePanel = () => () => {
return ;
};
-describe('GuidePanel', () => {
+describe('Guided setup', () => {
let httpClient: jest.Mocked;
let testBed: TestBed;
@@ -32,7 +53,7 @@ describe('GuidePanel', () => {
httpClient = httpServiceMock.createStartContract({ basePath: '/base/path' });
// Set default state on initial request (no active guides)
httpClient.get.mockResolvedValue({
- state: { activeGuide: 'unset', activeStep: 'unset' },
+ state: [],
});
apiService.setup(httpClient);
@@ -48,29 +69,164 @@ describe('GuidePanel', () => {
jest.restoreAllMocks();
});
- test('it should be disabled in there is no active guide', async () => {
- const { exists } = testBed;
- expect(exists('disabledGuideButton')).toBe(true);
- expect(exists('guideButton')).toBe(false);
- expect(exists('guidePanel')).toBe(false);
+ describe('Button component', () => {
+ test('should be disabled in there is no active guide', async () => {
+ const { exists } = testBed;
+ expect(exists('disabledGuideButton')).toBe(true);
+ expect(exists('guideButton')).toBe(false);
+ expect(exists('guidePanel')).toBe(false);
+ });
+
+ test('should be enabled if there is an active guide', async () => {
+ const { exists, component, find } = testBed;
+
+ await act(async () => {
+ // Enable the "search" guide
+ await apiService.updateGuideState(mockActiveSearchGuideState, true);
+ });
+
+ component.update();
+
+ expect(exists('disabledGuideButton')).toBe(false);
+ expect(exists('guideButton')).toBe(true);
+ expect(find('guideButton').text()).toEqual('Setup guide');
+ });
+
+ test('should show the step number in the button label if a step is active', async () => {
+ const { component, find } = testBed;
+
+ const mockInProgressSearchGuideState: GuideState = {
+ ...mockActiveSearchGuideState,
+ steps: [
+ {
+ id: mockActiveSearchGuideState.steps[0].id,
+ status: 'in_progress',
+ },
+ mockActiveSearchGuideState.steps[1],
+ mockActiveSearchGuideState.steps[2],
+ ],
+ };
+
+ await act(async () => {
+ await apiService.updateGuideState(mockInProgressSearchGuideState, true);
+ });
+
+ component.update();
+
+ expect(find('guideButton').text()).toEqual('Setup guide: step 1');
+ });
});
- test('it should be enabled if there is an active guide', async () => {
- const { exists, component, find } = testBed;
+ describe('Panel component', () => {
+ test('should be enabled if a guide is activated', async () => {
+ const { exists, component, find } = testBed;
- await act(async () => {
- // Enable the "search" guide
- await apiService.updateGuideState({
- activeGuide: 'search',
- activeStep: guidesConfig.search.steps[0].id,
+ await act(async () => {
+ // Enable the "search" guide
+ await apiService.updateGuideState(mockActiveSearchGuideState, true);
});
+
+ component.update();
+
+ expect(exists('guidePanel')).toBe(true);
+ expect(exists('guideProgress')).toBe(false);
+ expect(find('guidePanelStep').length).toEqual(guidesConfig.search.steps.length);
});
- component.update();
+ test('should show the progress bar if the first step has been completed', async () => {
+ const { component, exists } = testBed;
- expect(exists('disabledGuideButton')).toBe(false);
- expect(exists('guideButton')).toBe(true);
- expect(exists('guidePanel')).toBe(true);
- expect(find('guidePanelStep').length).toEqual(guidesConfig.search.steps.length);
+ const mockInProgressSearchGuideState: GuideState = {
+ ...mockActiveSearchGuideState,
+ steps: [
+ {
+ id: mockActiveSearchGuideState.steps[0].id,
+ status: 'complete',
+ },
+ mockActiveSearchGuideState.steps[1],
+ mockActiveSearchGuideState.steps[2],
+ ],
+ };
+
+ await act(async () => {
+ await apiService.updateGuideState(mockInProgressSearchGuideState, true);
+ });
+
+ component.update();
+
+ expect(exists('guidePanel')).toBe(true);
+ expect(exists('guideProgress')).toBe(true);
+ });
+
+ test('should show the "Continue using Elastic" button when all steps has been completed', async () => {
+ const { component, exists } = testBed;
+
+ const readyToCompleteGuideState: GuideState = {
+ guideId: 'search',
+ status: 'ready_to_complete',
+ isActive: true,
+ steps: [
+ {
+ id: 'add_data',
+ status: 'complete',
+ },
+ {
+ id: 'browse_docs',
+ status: 'complete',
+ },
+ {
+ id: 'search_experience',
+ status: 'complete',
+ },
+ ],
+ };
+
+ await act(async () => {
+ await apiService.updateGuideState(readyToCompleteGuideState, true);
+ });
+
+ component.update();
+
+ expect(exists('useElasticButton')).toBe(true);
+ });
+
+ describe('Steps', () => {
+ test('should show "Start" button label if step has not been started', async () => {
+ const { component, find } = testBed;
+
+ await act(async () => {
+ // Enable the "search" guide
+ await apiService.updateGuideState(mockActiveSearchGuideState, true);
+ });
+
+ component.update();
+
+ expect(find('activeStepButtonLabel').text()).toEqual('Start');
+ });
+
+ test('should show "Continue" button label if step is in progress', async () => {
+ const { component, find } = testBed;
+
+ const mockInProgressSearchGuideState: GuideState = {
+ ...mockActiveSearchGuideState,
+ steps: [
+ {
+ id: mockActiveSearchGuideState.steps[0].id,
+ status: 'in_progress',
+ },
+ mockActiveSearchGuideState.steps[1],
+ mockActiveSearchGuideState.steps[2],
+ ],
+ };
+
+ await act(async () => {
+ await apiService.updateGuideState(mockInProgressSearchGuideState, true);
+ });
+
+ component.update();
+
+ expect(find('activeStepButtonLabel').text()).toEqual('Continue');
+ });
+ });
});
});
diff --git a/src/plugins/guided_onboarding/public/components/guide_panel.tsx b/src/plugins/guided_onboarding/public/components/guide_panel.tsx
index f32f55e42b340..bf57d502918d2 100644
--- a/src/plugins/guided_onboarding/public/components/guide_panel.tsx
+++ b/src/plugins/guided_onboarding/public/components/guide_panel.tsx
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import React, { useState, useEffect, useRef } from 'react';
+import React, { useState, useEffect } from 'react';
import {
EuiFlyout,
EuiFlyoutBody,
@@ -30,7 +30,9 @@ import { ApplicationStart } from '@kbn/core-application-browser';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import { guidesConfig } from '../constants/guides_config';
-import type { GuideConfig, StepStatus, GuidedOnboardingState, StepConfig } from '../types';
+import type { GuideState, GuideStepIds } from '../../common/types';
+import type { GuideConfig, StepConfig } from '../types';
+
import type { ApiService } from '../services/api';
import { GuideStep } from './guide_panel_step';
@@ -41,47 +43,48 @@ interface GuidePanelProps {
application: ApplicationStart;
}
-const getConfig = (state?: GuidedOnboardingState): GuideConfig | undefined => {
- if (state?.activeGuide && state.activeGuide !== 'unset') {
- return guidesConfig[state.activeGuide];
+const getConfig = (state?: GuideState): GuideConfig | undefined => {
+ if (state) {
+ return guidesConfig[state.guideId];
}
return undefined;
};
-const getCurrentStep = (
- steps?: StepConfig[],
- state?: GuidedOnboardingState
-): number | undefined => {
- if (steps && state?.activeStep) {
- const activeStepIndex = steps.findIndex((step: StepConfig) => step.id === state.activeStep);
- if (activeStepIndex > -1) {
- return activeStepIndex + 1;
- }
+const getStepNumber = (state?: GuideState): number | undefined => {
+ let stepNumber: number | undefined;
- return undefined;
- }
-};
+ state?.steps.forEach((step, stepIndex) => {
+ // If the step is in_progress, show that step number
+ if (step.status === 'in_progress') {
+ stepNumber = stepIndex + 1;
+ }
-const getStepStatus = (steps: StepConfig[], stepIndex: number, activeStep?: string): StepStatus => {
- const activeStepIndex = steps.findIndex((step: StepConfig) => step.id === activeStep);
+ // If the step is active, show the previous step number
+ if (step.status === 'active') {
+ stepNumber = stepIndex;
+ }
+ });
- if (activeStepIndex < stepIndex) {
- return 'incomplete';
- }
+ return stepNumber;
+};
- if (activeStepIndex === stepIndex) {
- return 'in_progress';
+const getProgress = (state?: GuideState): number => {
+ if (state) {
+ return state.steps.reduce((acc, currentVal) => {
+ if (currentVal.status === 'complete') {
+ acc = acc + 1;
+ }
+ return acc;
+ }, 0);
}
-
- return 'complete';
+ return 0;
};
export const GuidePanel = ({ api, application }: GuidePanelProps) => {
const { euiTheme } = useEuiTheme();
const [isGuideOpen, setIsGuideOpen] = useState(false);
- const [guideState, setGuideState] = useState(undefined);
- const isFirstRender = useRef(true);
+ const [guideState, setGuideState] = useState(undefined);
const styles = getGuidePanelStyles(euiTheme);
@@ -89,10 +92,10 @@ export const GuidePanel = ({ api, application }: GuidePanelProps) => {
setIsGuideOpen((prevIsGuideOpen) => !prevIsGuideOpen);
};
- const navigateToStep = (step: StepConfig) => {
- setIsGuideOpen(false);
- if (step.location) {
- application.navigateToApp(step.location.appID, { path: step.location.path });
+ const navigateToStep = async (stepId: GuideStepIds, stepLocation: StepConfig['location']) => {
+ await api.startGuideStep(guideState!.guideId, stepId);
+ if (stepLocation) {
+ application.navigateToApp(stepLocation.appID, { path: stepLocation.path });
}
};
@@ -101,22 +104,25 @@ export const GuidePanel = ({ api, application }: GuidePanelProps) => {
application.navigateToApp('home', { path: '#getting_started' });
};
+ const completeGuide = async () => {
+ await api.completeGuide(guideState!.guideId);
+ };
+
useEffect(() => {
- const subscription = api.fetchGuideState$().subscribe((newState) => {
- if (
- guideState?.activeGuide !== newState.activeGuide ||
- guideState?.activeStep !== newState.activeStep
- ) {
- if (isFirstRender.current) {
- isFirstRender.current = false;
- } else {
- setIsGuideOpen(true);
- }
+ const subscription = api.fetchActiveGuideState$().subscribe((newGuideState) => {
+ if (newGuideState) {
+ setGuideState(newGuideState);
}
- setGuideState(newState);
});
return () => subscription.unsubscribe();
- }, [api, guideState?.activeGuide, guideState?.activeStep]);
+ }, [api]);
+
+ useEffect(() => {
+ const subscription = api.isGuidePanelOpen$.subscribe((isGuidePanelOpen) => {
+ setIsGuideOpen(isGuidePanelOpen);
+ });
+ return () => subscription.unsubscribe();
+ }, [api]);
const guideConfig = getConfig(guideState);
@@ -139,16 +145,17 @@ export const GuidePanel = ({ api, application }: GuidePanelProps) => {
);
}
- const currentStep = getCurrentStep(guideConfig.steps, guideState);
+ const stepNumber = getStepNumber(guideState);
+ const stepsCompleted = getProgress(guideState);
return (
<>
- {currentStep
+ {Boolean(stepNumber)
? i18n.translate('guidedOnboarding.guidedSetupStepButtonLabel', {
- defaultMessage: 'Setup guide: Step {currentStep}',
+ defaultMessage: 'Setup guide: step {stepNumber}',
values: {
- currentStep,
+ stepNumber,
},
})
: i18n.translate('guidedOnboarding.guidedSetupButtonLabel', {
@@ -203,46 +210,61 @@ export const GuidePanel = ({ api, application }: GuidePanelProps) => {
>
)}
-
-
- {/*
- TODO: Progress bar should only show after the first step has been started
- We need to make changes to the state itself in order to support this
- */}
-
-
-
+ {/* Progress bar should only show after the first step has been complete */}
+ {stepsCompleted > 0 && (
+ <>
+
+
+
+
+ >
+ )}
{guideConfig?.steps.map((step, index, steps) => {
const accordionId = htmlIdGenerator(`accordion${index}`)();
- const stepStatus = getStepStatus(steps, index, guideState?.activeStep);
-
- return (
-
- );
+ const stepState = guideState?.steps[index];
+
+ if (stepState) {
+ return (
+
+ );
+ }
})}
+
+ {guideState?.status === 'ready_to_complete' && (
+
+
+
+ {i18n.translate('guidedOnboarding.dropdownPanel.elasticButtonLabel', {
+ defaultMessage: 'Continue using Elastic',
+ })}
+
+
+
+ )}
diff --git a/src/plugins/guided_onboarding/public/components/guide_panel_step.tsx b/src/plugins/guided_onboarding/public/components/guide_panel_step.tsx
index e6a300b6b6742..8a98d87debf1a 100644
--- a/src/plugins/guided_onboarding/public/components/guide_panel_step.tsx
+++ b/src/plugins/guided_onboarding/public/components/guide_panel_step.tsx
@@ -20,7 +20,8 @@ import {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
-import type { StepStatus, StepConfig } from '../types';
+import type { StepStatus, GuideStepIds } from '../../common/types';
+import type { StepConfig } from '../types';
import { getGuidePanelStepStyles } from './guide_panel_step.styles';
interface GuideStepProps {
@@ -28,7 +29,7 @@ interface GuideStepProps {
stepStatus: StepStatus;
stepConfig: StepConfig;
stepNumber: number;
- navigateToStep: (step: StepConfig) => void;
+ navigateToStep: (stepId: GuideStepIds, stepLocation: StepConfig['location']) => void;
}
export const GuideStep = ({
@@ -64,7 +65,7 @@ export const GuideStep = ({
id={accordionId}
buttonContent={buttonContent}
arrowDisplay="right"
- forceState={stepStatus === 'in_progress' ? 'open' : 'closed'}
+ forceState={stepStatus === 'in_progress' || stepStatus === 'active' ? 'open' : 'closed'}
>
<>
@@ -78,14 +79,21 @@ export const GuideStep = ({
- {stepStatus === 'in_progress' && (
+ {(stepStatus === 'in_progress' || stepStatus === 'active') && (
- navigateToStep(stepConfig)} fill>
- {/* TODO: Support for conditional "Continue" button label if user revists a step - https://github.com/elastic/kibana/issues/139752 */}
- {i18n.translate('guidedOnboarding.dropdownPanel.startStepButtonLabel', {
- defaultMessage: 'Start',
- })}
+ navigateToStep(stepConfig.id, stepConfig.location)}
+ fill
+ data-test-subj="activeStepButtonLabel"
+ >
+ {stepStatus === 'active'
+ ? i18n.translate('guidedOnboarding.dropdownPanel.startStepButtonLabel', {
+ defaultMessage: 'Start',
+ })
+ : i18n.translate('guidedOnboarding.dropdownPanel.continueStepButtonLabel', {
+ defaultMessage: 'Continue',
+ })}
diff --git a/src/plugins/guided_onboarding/public/constants/guides_config.ts b/src/plugins/guided_onboarding/public/constants/guides_config/index.ts
similarity index 92%
rename from src/plugins/guided_onboarding/public/constants/guides_config.ts
rename to src/plugins/guided_onboarding/public/constants/guides_config/index.ts
index 0cbee9d4b12b6..9ce81cf9d4698 100644
--- a/src/plugins/guided_onboarding/public/constants/guides_config.ts
+++ b/src/plugins/guided_onboarding/public/constants/guides_config/index.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import { GuidesConfig } from '../types';
+import type { GuidesConfig } from '../../types';
import { securityConfig } from './security';
import { observabilityConfig } from './observability';
import { searchConfig } from './search';
diff --git a/src/plugins/guided_onboarding/public/constants/observability.ts b/src/plugins/guided_onboarding/public/constants/guides_config/observability.ts
similarity index 97%
rename from src/plugins/guided_onboarding/public/constants/observability.ts
rename to src/plugins/guided_onboarding/public/constants/guides_config/observability.ts
index 3f96ad1268173..91b69490131b3 100644
--- a/src/plugins/guided_onboarding/public/constants/observability.ts
+++ b/src/plugins/guided_onboarding/public/constants/guides_config/observability.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import type { GuideConfig } from '../types';
+import type { GuideConfig } from '../../types';
export const observabilityConfig: GuideConfig = {
title: 'Observe my infrastructure',
diff --git a/src/plugins/guided_onboarding/public/constants/search.ts b/src/plugins/guided_onboarding/public/constants/guides_config/search.ts
similarity index 93%
rename from src/plugins/guided_onboarding/public/constants/search.ts
rename to src/plugins/guided_onboarding/public/constants/guides_config/search.ts
index 1f2a26b5f0b93..57d81fdfe1301 100644
--- a/src/plugins/guided_onboarding/public/constants/search.ts
+++ b/src/plugins/guided_onboarding/public/constants/guides_config/search.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import type { GuideConfig } from '../types';
+import type { GuideConfig } from '../../types';
export const searchConfig: GuideConfig = {
title: 'Search my data',
@@ -50,6 +50,10 @@ export const searchConfig: GuideConfig = {
'Nullam ligula enim, malesuada a finibus vel, cursus sed risus.',
'Vivamus pretium, elit dictum lacinia aliquet, libero nibh dictum enim, a rhoncus leo magna in sapien.',
],
+ location: {
+ appID: 'guidedOnboardingExample',
+ path: 'stepThree',
+ },
},
],
};
diff --git a/src/plugins/guided_onboarding/public/constants/security.ts b/src/plugins/guided_onboarding/public/constants/guides_config/security.ts
similarity index 97%
rename from src/plugins/guided_onboarding/public/constants/security.ts
rename to src/plugins/guided_onboarding/public/constants/guides_config/security.ts
index 2c19e7acc2bed..df17d00d7f2d4 100644
--- a/src/plugins/guided_onboarding/public/constants/security.ts
+++ b/src/plugins/guided_onboarding/public/constants/guides_config/security.ts
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import type { GuideConfig } from '../types';
+import type { GuideConfig } from '../../types';
export const securityConfig: GuideConfig = {
title: 'Get started with SIEM',
diff --git a/src/plugins/guided_onboarding/public/index.ts b/src/plugins/guided_onboarding/public/index.ts
index 5b950b190c375..08ae777bb360f 100755
--- a/src/plugins/guided_onboarding/public/index.ts
+++ b/src/plugins/guided_onboarding/public/index.ts
@@ -12,9 +12,8 @@ import { GuidedOnboardingPlugin } from './plugin';
export function plugin(ctx: PluginInitializerContext) {
return new GuidedOnboardingPlugin(ctx);
}
-export type {
- GuidedOnboardingPluginSetup,
- GuidedOnboardingPluginStart,
- GuidedOnboardingState,
- UseCase,
-} from './types';
+export type { GuidedOnboardingPluginSetup, GuidedOnboardingPluginStart } from './types';
+
+export type { GuideId, GuideStepIds, GuideState, GuideStep } from '../common/types';
+
+export { guidesConfig } from './constants/guides_config';
diff --git a/src/plugins/guided_onboarding/public/plugin.tsx b/src/plugins/guided_onboarding/public/plugin.tsx
index 902acaa899e3a..f74e19a03300f 100755
--- a/src/plugins/guided_onboarding/public/plugin.tsx
+++ b/src/plugins/guided_onboarding/public/plugin.tsx
@@ -20,7 +20,7 @@ import {
} from '@kbn/core/public';
import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
-import {
+import type {
ClientConfigType,
GuidedOnboardingPluginSetup,
GuidedOnboardingPluginStart,
diff --git a/src/plugins/guided_onboarding/public/services/api.test.ts b/src/plugins/guided_onboarding/public/services/api.test.ts
index 9f5e20cb9f89d..ffe5596bd7e35 100644
--- a/src/plugins/guided_onboarding/public/services/api.test.ts
+++ b/src/plugins/guided_onboarding/public/services/api.test.ts
@@ -10,15 +10,33 @@ import { HttpSetup } from '@kbn/core/public';
import { httpServiceMock } from '@kbn/core/public/mocks';
import { firstValueFrom, Subscription } from 'rxjs';
-import { API_BASE_PATH } from '../../common';
-import { ApiService } from './api';
-import { GuidedOnboardingState } from '..';
+import { API_BASE_PATH } from '../../common/constants';
import { guidesConfig } from '../constants/guides_config';
+import type { GuideState } from '../../common/types';
+import { ApiService } from './api';
const searchGuide = 'search';
const firstStep = guidesConfig[searchGuide].steps[0].id;
-const secondStep = guidesConfig[searchGuide].steps[1].id;
-const lastStep = guidesConfig[searchGuide].steps[2].id;
+
+const mockActiveSearchGuideState: GuideState = {
+ guideId: searchGuide,
+ isActive: true,
+ status: 'in_progress',
+ steps: [
+ {
+ id: 'add_data',
+ status: 'active',
+ },
+ {
+ id: 'browse_docs',
+ status: 'inactive',
+ },
+ {
+ id: 'search_experience',
+ status: 'inactive',
+ },
+ ],
+};
describe('GuidedOnboarding ApiService', () => {
let httpClient: jest.Mocked;
@@ -41,40 +59,67 @@ describe('GuidedOnboarding ApiService', () => {
jest.restoreAllMocks();
});
- describe('fetchGuideState$', () => {
+ describe('fetchActiveGuideState$', () => {
it('sends a request to the get API', () => {
- subscription = apiService.fetchGuideState$().subscribe();
+ subscription = apiService.fetchActiveGuideState$().subscribe();
expect(httpClient.get).toHaveBeenCalledTimes(1);
- expect(httpClient.get).toHaveBeenCalledWith(`${API_BASE_PATH}/state`);
+ expect(httpClient.get).toHaveBeenCalledWith(`${API_BASE_PATH}/state`, {
+ query: { active: true },
+ });
});
it('broadcasts the updated state', async () => {
- await apiService.updateGuideState({
- activeGuide: searchGuide,
- activeStep: secondStep,
- });
+ await apiService.activateGuide(searchGuide);
+
+ const state = await firstValueFrom(apiService.fetchActiveGuideState$());
+ expect(state).toEqual(mockActiveSearchGuideState);
+ });
+ });
- const state = await firstValueFrom(apiService.fetchGuideState$());
- expect(state).toEqual({ activeGuide: searchGuide, activeStep: secondStep });
+ describe('fetchAllGuidesState', () => {
+ it('sends a request to the get API', async () => {
+ await apiService.fetchAllGuidesState();
+ expect(httpClient.get).toHaveBeenCalledTimes(1);
+ expect(httpClient.get).toHaveBeenCalledWith(`${API_BASE_PATH}/state`);
});
});
describe('updateGuideState', () => {
it('sends a request to the put API', async () => {
- const state = {
- activeGuide: searchGuide,
- activeStep: secondStep,
+ const updatedState: GuideState = {
+ ...mockActiveSearchGuideState,
+ steps: [
+ {
+ id: mockActiveSearchGuideState.steps[0].id,
+ status: 'in_progress', // update the first step status
+ },
+ mockActiveSearchGuideState.steps[1],
+ mockActiveSearchGuideState.steps[2],
+ ],
};
- await apiService.updateGuideState(state as GuidedOnboardingState);
+ await apiService.updateGuideState(updatedState, false);
expect(httpClient.put).toHaveBeenCalledTimes(1);
expect(httpClient.put).toHaveBeenCalledWith(`${API_BASE_PATH}/state`, {
- body: JSON.stringify(state),
+ body: JSON.stringify(updatedState),
});
});
});
describe('isGuideStepActive$', () => {
- it('returns true if the step is active', async (done) => {
+ it('returns true if the step has been started', async (done) => {
+ const updatedState: GuideState = {
+ ...mockActiveSearchGuideState,
+ steps: [
+ {
+ id: mockActiveSearchGuideState.steps[0].id,
+ status: 'in_progress',
+ },
+ mockActiveSearchGuideState.steps[1],
+ mockActiveSearchGuideState.steps[2],
+ ],
+ };
+ await apiService.updateGuideState(updatedState, false);
+
subscription = apiService
.isGuideStepActive$(searchGuide, firstStep)
.subscribe((isStepActive) => {
@@ -84,9 +129,10 @@ describe('GuidedOnboarding ApiService', () => {
});
});
- it('returns false if the step is not active', async (done) => {
+ it('returns false if the step is not been started', async (done) => {
+ await apiService.updateGuideState(mockActiveSearchGuideState, false);
subscription = apiService
- .isGuideStepActive$(searchGuide, secondStep)
+ .isGuideStepActive$(searchGuide, firstStep)
.subscribe((isStepActive) => {
if (!isStepActive) {
done();
@@ -95,40 +141,192 @@ describe('GuidedOnboarding ApiService', () => {
});
});
- describe('completeGuideStep', () => {
- it(`completes the step when it's active`, async () => {
- await apiService.completeGuideStep(searchGuide, firstStep);
+ describe('activateGuide', () => {
+ it('activates a new guide', async () => {
+ await apiService.activateGuide(searchGuide);
+
expect(httpClient.put).toHaveBeenCalledTimes(1);
- // this assertion depends on the guides config, we are checking for the next step
expect(httpClient.put).toHaveBeenCalledWith(`${API_BASE_PATH}/state`, {
body: JSON.stringify({
- activeGuide: searchGuide,
- activeStep: secondStep,
+ isActive: true,
+ status: 'in_progress',
+ steps: [
+ {
+ id: 'add_data',
+ status: 'active',
+ },
+ {
+ id: 'browse_docs',
+ status: 'inactive',
+ },
+ {
+ id: 'search_experience',
+ status: 'inactive',
+ },
+ ],
+ guideId: searchGuide,
}),
});
});
- it(`completes the guide when the last step is active`, async () => {
- httpClient.get.mockResolvedValue({
- // this state depends on the guides config
- state: { activeGuide: searchGuide, activeStep: lastStep },
- });
- apiService.setup(httpClient);
+ it('reactivates a guide that has already been started', async () => {
+ await apiService.activateGuide(searchGuide, mockActiveSearchGuideState);
- await apiService.completeGuideStep(searchGuide, lastStep);
expect(httpClient.put).toHaveBeenCalledTimes(1);
- // this assertion depends on the guides config, we are checking for the last step
expect(httpClient.put).toHaveBeenCalledWith(`${API_BASE_PATH}/state`, {
body: JSON.stringify({
- activeGuide: searchGuide,
- activeStep: 'completed',
+ ...mockActiveSearchGuideState,
+ isActive: true,
+ }),
+ });
+ });
+ });
+
+ describe('completeGuide', () => {
+ const readyToCompleteGuideState: GuideState = {
+ ...mockActiveSearchGuideState,
+ steps: [
+ {
+ id: 'add_data',
+ status: 'complete',
+ },
+ {
+ id: 'browse_docs',
+ status: 'complete',
+ },
+ {
+ id: 'search_experience',
+ status: 'complete',
+ },
+ ],
+ };
+
+ beforeEach(async () => {
+ await apiService.updateGuideState(readyToCompleteGuideState, false);
+ });
+
+ it('updates the selected guide and marks it as complete', async () => {
+ await apiService.completeGuide(searchGuide);
+
+ expect(httpClient.put).toHaveBeenCalledWith(`${API_BASE_PATH}/state`, {
+ body: JSON.stringify({
+ ...readyToCompleteGuideState,
+ isActive: false,
+ status: 'complete',
}),
});
});
- it(`does nothing if the step is not active`, async () => {
- await apiService.completeGuideStep(searchGuide, secondStep);
- expect(httpClient.put).not.toHaveBeenCalled();
+ it('returns undefined if the selected guide is not active', async () => {
+ const completedState = await apiService.completeGuide('observability'); // not active
+ expect(completedState).not.toBeDefined();
+ });
+
+ it('returns undefined if the selected guide has uncompleted steps', async () => {
+ const incompleteGuideState: GuideState = {
+ ...mockActiveSearchGuideState,
+ steps: [
+ {
+ id: 'add_data',
+ status: 'complete',
+ },
+ {
+ id: 'browse_docs',
+ status: 'complete',
+ },
+ {
+ id: 'search_experience',
+ status: 'in_progress',
+ },
+ ],
+ };
+ await apiService.updateGuideState(incompleteGuideState, false);
+
+ const completedState = await apiService.completeGuide(searchGuide);
+ expect(completedState).not.toBeDefined();
+ });
+ });
+
+ describe('startGuideStep', () => {
+ beforeEach(async () => {
+ await apiService.updateGuideState(mockActiveSearchGuideState, false);
+ });
+
+ it('updates the selected step and marks it as in_progress', async () => {
+ await apiService.startGuideStep(searchGuide, firstStep);
+
+ expect(httpClient.put).toHaveBeenCalledWith(`${API_BASE_PATH}/state`, {
+ body: JSON.stringify({
+ ...mockActiveSearchGuideState,
+ isActive: true,
+ status: 'in_progress',
+ steps: [
+ {
+ id: mockActiveSearchGuideState.steps[0].id,
+ status: 'in_progress',
+ },
+ mockActiveSearchGuideState.steps[1],
+ mockActiveSearchGuideState.steps[2],
+ ],
+ }),
+ });
+ });
+
+ it('returns undefined if the selected guide is not active', async () => {
+ const startState = await apiService.startGuideStep('observability', 'add_data'); // not active
+ expect(startState).not.toBeDefined();
+ });
+ });
+
+ describe('completeGuideStep', () => {
+ it(`completes the step when it's in progress`, async () => {
+ const updatedState: GuideState = {
+ ...mockActiveSearchGuideState,
+ steps: [
+ {
+ id: mockActiveSearchGuideState.steps[0].id,
+ status: 'in_progress', // Mark a step as in_progress in order to test the "completeGuideStep" behavior
+ },
+ mockActiveSearchGuideState.steps[1],
+ mockActiveSearchGuideState.steps[2],
+ ],
+ };
+ await apiService.updateGuideState(updatedState, false);
+
+ await apiService.completeGuideStep(searchGuide, firstStep);
+
+ // Once on update, once on complete
+ expect(httpClient.put).toHaveBeenCalledTimes(2);
+ // Verify the completed step now has a "complete" status, and the subsequent step is "active"
+ expect(httpClient.put).toHaveBeenLastCalledWith(`${API_BASE_PATH}/state`, {
+ body: JSON.stringify({
+ ...updatedState,
+ steps: [
+ {
+ id: mockActiveSearchGuideState.steps[0].id,
+ status: 'complete',
+ },
+ {
+ id: mockActiveSearchGuideState.steps[1].id,
+ status: 'active',
+ },
+ mockActiveSearchGuideState.steps[2],
+ ],
+ }),
+ });
+ });
+
+ it('returns undefined if the selected guide is not active', async () => {
+ const startState = await apiService.completeGuideStep('observability', 'add_data'); // not active
+ expect(startState).not.toBeDefined();
+ });
+
+ it('does nothing if the step is not in progress', async () => {
+ await apiService.updateGuideState(mockActiveSearchGuideState, false);
+
+ await apiService.completeGuideStep(searchGuide, firstStep);
+ // Expect only 1 call from updateGuideState()
+ expect(httpClient.put).toHaveBeenCalledTimes(1);
});
});
});
diff --git a/src/plugins/guided_onboarding/public/services/api.ts b/src/plugins/guided_onboarding/public/services/api.ts
index b99975c3a837a..1adfaa5d8cc23 100644
--- a/src/plugins/guided_onboarding/public/services/api.ts
+++ b/src/plugins/guided_onboarding/public/services/api.ts
@@ -9,31 +9,42 @@
import { HttpSetup } from '@kbn/core/public';
import { BehaviorSubject, map, from, concatMap, of, Observable, firstValueFrom } from 'rxjs';
-import { API_BASE_PATH } from '../../common';
-import { GuidedOnboardingState, UseCase } from '../types';
-import { getNextStep, isLastStep } from './helpers';
+import { API_BASE_PATH } from '../../common/constants';
+import type { GuideState, GuideId, GuideStep, GuideStepIds } from '../../common/types';
+import { isLastStep, getGuideConfig } from './helpers';
export class ApiService {
private client: HttpSetup | undefined;
- private onboardingGuideState$!: BehaviorSubject;
+ private onboardingGuideState$!: BehaviorSubject;
+ public isGuidePanelOpen$: BehaviorSubject = new BehaviorSubject(false);
public setup(httpClient: HttpSetup): void {
this.client = httpClient;
- this.onboardingGuideState$ = new BehaviorSubject(undefined);
+ this.onboardingGuideState$ = new BehaviorSubject(undefined);
}
/**
- * An Observable with the guided onboarding state.
+ * An Observable with the active guide state.
* Initially the state is fetched from the backend.
* Subsequently, the observable is updated automatically, when the state changes.
*/
- public fetchGuideState$(): Observable {
+ public fetchActiveGuideState$(): Observable {
// TODO add error handling if this.client has not been initialized or request fails
return this.onboardingGuideState$.pipe(
concatMap((state) =>
state === undefined
- ? from(this.client!.get<{ state: GuidedOnboardingState }>(`${API_BASE_PATH}/state`)).pipe(
- map((response) => response.state)
+ ? from(
+ this.client!.get<{ state: GuideState[] }>(`${API_BASE_PATH}/state`, {
+ query: {
+ active: true,
+ },
+ })
+ ).pipe(
+ map((response) => {
+ // There should only be 1 active guide
+ const hasState = response.state.length === 1;
+ return hasState ? response.state[0] : undefined;
+ })
)
: of(state)
)
@@ -41,25 +52,45 @@ export class ApiService {
}
/**
- * Updates the state of the guided onboarding
- * @param {GuidedOnboardingState} newState the new state of the guided onboarding
- * @return {Promise} a promise with the updated state or undefined if the update fails
+ * Async operation to fetch state for all guides
+ * This is useful for the onboarding landing page,
+ * where all guides are displayed with their corresponding status
+ */
+ public async fetchAllGuidesState(): Promise<{ state: GuideState[] } | undefined> {
+ if (!this.client) {
+ throw new Error('ApiService has not be initialized.');
+ }
+
+ try {
+ return await this.client.get<{ state: GuideState[] }>(`${API_BASE_PATH}/state`);
+ } catch (error) {
+ // TODO handle error
+ // eslint-disable-next-line no-console
+ console.error(error);
+ }
+ }
+
+ /**
+ * Updates the SO with the updated guide state and refreshes the observables
+ * This is largely used internally and for tests
+ * @param {GuideState} guideState the updated guide state
+ * @param {boolean} panelState boolean to determine whether the dropdown panel should open or not
+ * @return {Promise} a promise with the updated guide state
*/
public async updateGuideState(
- newState: GuidedOnboardingState
- ): Promise<{ state: GuidedOnboardingState } | undefined> {
+ newState: GuideState,
+ panelState: boolean
+ ): Promise<{ state: GuideState } | undefined> {
if (!this.client) {
throw new Error('ApiService has not be initialized.');
}
try {
- const response = await this.client.put<{ state: GuidedOnboardingState }>(
- `${API_BASE_PATH}/state`,
- {
- body: JSON.stringify(newState),
- }
- );
+ const response = await this.client.put<{ state: GuideState }>(`${API_BASE_PATH}/state`, {
+ body: JSON.stringify(newState),
+ });
this.onboardingGuideState$.next(newState);
+ this.isGuidePanelOpen$.next(panelState);
return response;
} catch (error) {
// TODO handle error
@@ -69,47 +100,204 @@ export class ApiService {
}
/**
- * An observable with the boolean value if the step is active.
- * Returns true, if the passed params identify the guide step that is currently active.
+ * Activates a guide by guideId
+ * This is useful for the onboarding landing page, when a user selects a guide to start or continue
+ * @param {GuideId} guideID the id of the guide (one of search, observability, security)
+ * @param {GuideState} guideState (optional) the selected guide state, if it exists (i.e., if a user is continuing a guide)
+ * @return {Promise} a promise with the updated guide state
+ */
+ public async activateGuide(
+ guideId: GuideId,
+ guide?: GuideState
+ ): Promise<{ state: GuideState } | undefined> {
+ // If we already have the guide state (i.e., user has already started the guide at some point),
+ // simply pass it through so they can continue where they left off, and update the guide to active
+ if (guide) {
+ return await this.updateGuideState(
+ {
+ ...guide,
+ isActive: true,
+ },
+ true
+ );
+ }
+
+ // If this is the 1st-time attempt, we need to create the default state
+ const guideConfig = getGuideConfig(guideId);
+
+ if (guideConfig) {
+ const updatedSteps: GuideStep[] = guideConfig.steps.map((step, stepIndex) => {
+ const isFirstStep = stepIndex === 0;
+ return {
+ id: step.id,
+ // Only the first step should be activated when activating a new guide
+ status: isFirstStep ? 'active' : 'inactive',
+ };
+ });
+
+ const updatedGuide: GuideState = {
+ isActive: true,
+ status: 'in_progress',
+ steps: updatedSteps,
+ guideId,
+ };
+
+ return await this.updateGuideState(updatedGuide, true);
+ }
+ }
+
+ /**
+ * Completes a guide
+ * Updates the overall guide status to 'complete', and marks it as inactive
+ * This is useful for the dropdown panel, when the user clicks the "Continue using Elastic" button after completing all steps
+ * @param {GuideId} guideID the id of the guide (one of search, observability, security)
+ * @return {Promise} a promise with the updated guide state
+ */
+ public async completeGuide(guideId: GuideId): Promise<{ state: GuideState } | undefined> {
+ const guideState = await firstValueFrom(this.fetchActiveGuideState$());
+
+ // For now, returning undefined if consumer attempts to complete a guide that is not active
+ if (guideState?.guideId !== guideId) {
+ return undefined;
+ }
+
+ // All steps should be complete at this point
+ // However, we do a final check here as a safeguard
+ const allStepsComplete =
+ Boolean(guideState.steps.find((step) => step.status !== 'complete')) === false;
+
+ if (allStepsComplete) {
+ const updatedGuide: GuideState = {
+ ...guideState,
+ isActive: false,
+ status: 'complete',
+ };
+
+ return await this.updateGuideState(updatedGuide, false);
+ }
+ }
+
+ /**
+ * An observable with the boolean value if the step is in progress (i.e., user clicked "Start" on a step).
+ * Returns true, if the passed params identify the guide step that is currently in progress.
* Returns false otherwise.
- * @param {string} guideID the id of the guide (one of search, observability, security)
- * @param {string} stepID the id of the step in the guide
+ * @param {GuideId} guideId the id of the guide (one of search, observability, security)
+ * @param {GuideStepIds} stepId the id of the step in the guide
* @return {Observable} an observable with the boolean value
*/
- public isGuideStepActive$(guideID: string, stepID: string): Observable {
- return this.fetchGuideState$().pipe(
- map((state) => {
- return state ? state.activeGuide === guideID && state.activeStep === stepID : false;
+ public isGuideStepActive$(guideId: GuideId, stepId: GuideStepIds): Observable {
+ return this.fetchActiveGuideState$().pipe(
+ map((activeGuideState) => {
+ // Return false right away if the guide itself is not active
+ if (activeGuideState?.guideId !== guideId) {
+ return false;
+ }
+
+ // If the guide is active, next check the step
+ const selectedStep = activeGuideState.steps.find((step) => step.id === stepId);
+ return selectedStep ? selectedStep.status === 'in_progress' : false;
})
);
}
+ /**
+ * Updates the selected step to 'in_progress' state
+ * This is useful for the dropdown panel, when the user clicks the "Start" button for the active step
+ * @param {GuideId} guideId the id of the guide (one of search, observability, security)
+ * @param {GuideStepIds} stepId the id of the step
+ * @return {Promise} a promise with the updated guide state
+ */
+ public async startGuideStep(
+ guideId: GuideId,
+ stepId: GuideStepIds
+ ): Promise<{ state: GuideState } | undefined> {
+ const guideState = await firstValueFrom(this.fetchActiveGuideState$());
+
+ // For now, returning undefined if consumer attempts to start a step for a guide that isn't active
+ if (guideState?.guideId !== guideId) {
+ return undefined;
+ }
+
+ const updatedSteps: GuideStep[] = guideState.steps.map((step) => {
+ // Mark the current step as in_progress
+ if (step.id === stepId) {
+ return {
+ id: step.id,
+ status: 'in_progress',
+ };
+ }
+
+ // All other steps return as-is
+ return step;
+ });
+
+ const currentGuide: GuideState = {
+ guideId,
+ isActive: true,
+ status: 'in_progress',
+ steps: updatedSteps,
+ };
+
+ return await this.updateGuideState(currentGuide, false);
+ }
+
/**
* Completes the guide step identified by the passed params.
* A noop if the passed step is not active.
- * Completes the current guide, if the step is the last one in the guide.
- * @param {string} guideID the id of the guide (one of search, observability, security)
- * @param {string} stepID the id of the step in the guide
+ * @param {GuideId} guideId the id of the guide (one of search, observability, security)
+ * @param {GuideStepIds} stepId the id of the step in the guide
* @return {Promise} a promise with the updated state or undefined if the operation fails
*/
public async completeGuideStep(
- guideID: string,
- stepID: string
- ): Promise<{ state: GuidedOnboardingState } | undefined> {
- const isStepActive = await firstValueFrom(this.isGuideStepActive$(guideID, stepID));
- if (isStepActive) {
- if (isLastStep(guideID, stepID)) {
- await this.updateGuideState({ activeGuide: guideID as UseCase, activeStep: 'completed' });
- } else {
- const nextStepID = getNextStep(guideID, stepID);
- if (nextStepID !== undefined) {
- await this.updateGuideState({
- activeGuide: guideID as UseCase,
- activeStep: nextStepID,
- });
+ guideId: GuideId,
+ stepId: GuideStepIds
+ ): Promise<{ state: GuideState } | undefined> {
+ const guideState = await firstValueFrom(this.fetchActiveGuideState$());
+
+ // For now, returning undefined if consumer attempts to complete a step for a guide that isn't active
+ if (guideState?.guideId !== guideId) {
+ return undefined;
+ }
+
+ const currentStepIndex = guideState.steps.findIndex((step) => step.id === stepId);
+ const currentStep = guideState.steps[currentStepIndex];
+ const isCurrentStepInProgress = currentStep ? currentStep.status === 'in_progress' : false;
+
+ if (isCurrentStepInProgress) {
+ const updatedSteps: GuideStep[] = guideState.steps.map((step, stepIndex) => {
+ const isCurrentStep = step.id === currentStep!.id;
+ const isNextStep = stepIndex === currentStepIndex + 1;
+
+ // Mark the current step as complete
+ if (isCurrentStep) {
+ return {
+ id: step.id,
+ status: 'complete',
+ };
}
- }
+
+ // Update the next step to active status
+ if (isNextStep) {
+ return {
+ id: step.id,
+ status: 'active',
+ };
+ }
+
+ // All other steps return as-is
+ return step;
+ });
+
+ const currentGuide: GuideState = {
+ guideId,
+ isActive: true,
+ status: isLastStep(guideId, stepId) ? 'ready_to_complete' : 'in_progress',
+ steps: updatedSteps,
+ };
+
+ return await this.updateGuideState(currentGuide, true);
}
+
return undefined;
}
}
diff --git a/src/plugins/guided_onboarding/public/services/helpers.test.ts b/src/plugins/guided_onboarding/public/services/helpers.test.ts
index 6e1a3cc3e0049..bc09a9185424c 100644
--- a/src/plugins/guided_onboarding/public/services/helpers.test.ts
+++ b/src/plugins/guided_onboarding/public/services/helpers.test.ts
@@ -7,11 +7,10 @@
*/
import { guidesConfig } from '../constants/guides_config';
-import { getNextStep, isLastStep } from './helpers';
+import { isLastStep } from './helpers';
const searchGuide = 'search';
const firstStep = guidesConfig[searchGuide].steps[0].id;
-const secondStep = guidesConfig[searchGuide].steps[1].id;
const lastStep = guidesConfig[searchGuide].steps[2].id;
describe('GuidedOnboarding ApiService helpers', () => {
@@ -27,21 +26,4 @@ describe('GuidedOnboarding ApiService helpers', () => {
expect(result).toBe(false);
});
});
-
- describe('getNextStep', () => {
- it('returns id of the next step', () => {
- const result = getNextStep(searchGuide, firstStep);
- expect(result).toEqual(secondStep);
- });
-
- it('returns undefined if the params are not part of the config', () => {
- const result = getNextStep('some_guide', 'some_step');
- expect(result).toBeUndefined();
- });
-
- it(`returns undefined if it's the last step`, () => {
- const result = getNextStep(searchGuide, lastStep);
- expect(result).toBeUndefined();
- });
- });
});
diff --git a/src/plugins/guided_onboarding/public/services/helpers.ts b/src/plugins/guided_onboarding/public/services/helpers.ts
index 3eb0bfca9b751..ea4245be99150 100644
--- a/src/plugins/guided_onboarding/public/services/helpers.ts
+++ b/src/plugins/guided_onboarding/public/services/helpers.ts
@@ -6,12 +6,13 @@
* Side Public License, v 1.
*/
+import type { GuideId } from '../../common/types';
import { guidesConfig } from '../constants/guides_config';
-import { GuideConfig, StepConfig, UseCase } from '../types';
+import type { GuideConfig, StepConfig } from '../types';
export const getGuideConfig = (guideID?: string): GuideConfig | undefined => {
if (guideID && Object.keys(guidesConfig).includes(guideID)) {
- return guidesConfig[guideID as UseCase];
+ return guidesConfig[guideID as GuideId];
}
};
@@ -32,11 +33,3 @@ export const isLastStep = (guideID: string, stepID: string): boolean => {
}
return false;
};
-
-export const getNextStep = (guideID: string, stepID: string): string | undefined => {
- const guide = getGuideConfig(guideID);
- const activeStepIndex = getStepIndex(guideID, stepID);
- if (activeStepIndex > -1 && guide?.steps[activeStepIndex + 1]) {
- return guide?.steps[activeStepIndex + 1].id;
- }
-};
diff --git a/src/plugins/guided_onboarding/public/types.ts b/src/plugins/guided_onboarding/public/types.ts
index 7925fa8ae69d7..4a16c16336c6b 100755
--- a/src/plugins/guided_onboarding/public/types.ts
+++ b/src/plugins/guided_onboarding/public/types.ts
@@ -7,6 +7,7 @@
*/
import { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public';
+import { GuideId, GuideStepIds, StepStatus } from '../common/types';
import { ApiService } from './services/api';
// eslint-disable-next-line @typescript-eslint/no-empty-interface
@@ -20,11 +21,12 @@ export interface AppPluginStartDependencies {
navigation: NavigationPublicPluginStart;
}
-export type UseCase = 'observability' | 'security' | 'search';
-export type StepStatus = 'incomplete' | 'complete' | 'in_progress';
+export interface ClientConfigType {
+ ui: boolean;
+}
export interface StepConfig {
- id: string;
+ id: GuideStepIds;
title: string;
descriptionList: string[];
location?: {
@@ -33,7 +35,6 @@ export interface StepConfig {
};
status?: StepStatus;
}
-
export interface GuideConfig {
title: string;
description: string;
@@ -45,14 +46,5 @@ export interface GuideConfig {
}
export type GuidesConfig = {
- [key in UseCase]: GuideConfig;
+ [key in GuideId]: GuideConfig;
};
-
-export interface GuidedOnboardingState {
- activeGuide: UseCase | 'unset';
- activeStep: string | 'unset' | 'completed';
-}
-
-export interface ClientConfigType {
- ui: boolean;
-}
diff --git a/src/plugins/guided_onboarding/server/routes/index.ts b/src/plugins/guided_onboarding/server/routes/index.ts
index e4e4fcaae5054..cce5aad08b1e5 100755
--- a/src/plugins/guided_onboarding/server/routes/index.ts
+++ b/src/plugins/guided_onboarding/server/routes/index.ts
@@ -7,92 +7,154 @@
*/
import { schema } from '@kbn/config-schema';
-import { IRouter, SavedObjectsClient } from '@kbn/core/server';
-import {
- guidedSetupDefaultState,
- guidedSetupSavedObjectsId,
- guidedSetupSavedObjectsType,
-} from '../saved_objects';
-
-const doesGuidedSetupExist = async (savedObjectsClient: SavedObjectsClient): Promise => {
- return savedObjectsClient
- .find({ type: guidedSetupSavedObjectsType })
- .then((foundSavedObjects) => foundSavedObjects.total > 0);
+import type { IRouter, SavedObjectsClient } from '@kbn/core/server';
+import type { GuideState } from '../../common/types';
+import { guidedSetupSavedObjectsType } from '../saved_objects';
+
+const findGuideById = async (savedObjectsClient: SavedObjectsClient, guideId: string) => {
+ return savedObjectsClient.find({
+ type: guidedSetupSavedObjectsType,
+ search: `"${guideId}"`,
+ searchFields: ['guideId'],
+ });
+};
+
+const findActiveGuide = async (savedObjectsClient: SavedObjectsClient) => {
+ return savedObjectsClient.find({
+ type: guidedSetupSavedObjectsType,
+ search: 'true',
+ searchFields: ['isActive'],
+ });
+};
+
+const findAllGuides = async (savedObjectsClient: SavedObjectsClient) => {
+ return savedObjectsClient.find({ type: guidedSetupSavedObjectsType });
};
export function defineRoutes(router: IRouter) {
+ // Fetch all guides state; optionally pass the query param ?active=true to only return the active guide
router.get(
{
path: '/api/guided_onboarding/state',
- validate: false,
+ validate: {
+ query: schema.object({
+ active: schema.maybe(schema.boolean()),
+ }),
+ },
},
async (context, request, response) => {
const coreContext = await context.core;
const soClient = coreContext.savedObjects.client as SavedObjectsClient;
- const stateExists = await doesGuidedSetupExist(soClient);
- if (stateExists) {
- const guidedSetupSO = await soClient.get(
- guidedSetupSavedObjectsType,
- guidedSetupSavedObjectsId
- );
+ const existingGuides =
+ request.query.active === true
+ ? await findActiveGuide(soClient)
+ : await findAllGuides(soClient);
+
+ if (existingGuides.total > 0) {
+ const guidesState = existingGuides.saved_objects.map((guide) => guide.attributes);
return response.ok({
- body: { state: guidedSetupSO.attributes },
+ body: { state: guidesState },
});
} else {
+ // If no SO exists, we assume state hasn't been stored yet and return an empty array
return response.ok({
- body: { state: guidedSetupDefaultState },
+ body: { state: [] },
});
}
}
);
+ // Update the guide state for the passed guideId;
+ // will also check any existing active guides and update them to an "inactive" state
router.put(
{
path: '/api/guided_onboarding/state',
validate: {
body: schema.object({
- activeGuide: schema.maybe(schema.string()),
- activeStep: schema.maybe(schema.string()),
+ status: schema.string(),
+ guideId: schema.string(),
+ isActive: schema.boolean(),
+ steps: schema.arrayOf(
+ schema.object({
+ status: schema.string(),
+ id: schema.string(),
+ })
+ ),
}),
},
},
async (context, request, response) => {
- const activeGuide = request.body.activeGuide;
- const activeStep = request.body.activeStep;
- const attributes = {
- activeGuide: activeGuide ?? 'unset',
- activeStep: activeStep ?? 'unset',
- };
+ const updatedGuideState = request.body;
+
const coreContext = await context.core;
- const soClient = coreContext.savedObjects.client as SavedObjectsClient;
+ const savedObjectsClient = coreContext.savedObjects.client as SavedObjectsClient;
- const stateExists = await doesGuidedSetupExist(soClient);
+ const selectedGuideSO = await findGuideById(savedObjectsClient, updatedGuideState.guideId);
+
+ // If the SO already exists, update it, else create a new SO
+ if (selectedGuideSO.total > 0) {
+ const updatedGuides = [];
+ const selectedGuide = selectedGuideSO.saved_objects[0];
+
+ updatedGuides.push({
+ type: guidedSetupSavedObjectsType,
+ id: selectedGuide.id,
+ attributes: {
+ ...updatedGuideState,
+ },
+ });
+
+ // If we are activating a new guide, we need to check if there is a different, existing active guide
+ // If yes, we need to mark it as inactive (only 1 guide can be active at a time)
+ if (updatedGuideState.isActive) {
+ const activeGuideSO = await findActiveGuide(savedObjectsClient);
+
+ if (activeGuideSO.total > 0) {
+ const activeGuide = activeGuideSO.saved_objects[0];
+ if (activeGuide.attributes.guideId !== updatedGuideState.guideId) {
+ updatedGuides.push({
+ type: guidedSetupSavedObjectsType,
+ id: activeGuide.id,
+ attributes: {
+ ...activeGuide.attributes,
+ isActive: false,
+ },
+ });
+ }
+ }
+ }
+
+ const updatedGuidesResponse = await savedObjectsClient.bulkUpdate(updatedGuides);
- if (stateExists) {
- const updatedGuidedSetupSO = await soClient.update(
- guidedSetupSavedObjectsType,
- guidedSetupSavedObjectsId,
- attributes
- );
return response.ok({
- body: { state: updatedGuidedSetupSO.attributes },
+ body: {
+ state: updatedGuidesResponse,
+ },
});
} else {
- const guidedSetupSO = await soClient.create(
- guidedSetupSavedObjectsType,
- {
- ...guidedSetupDefaultState,
- ...attributes,
- },
- {
- id: guidedSetupSavedObjectsId,
+ // If we are activating a new guide, we need to check if there is an existing active guide
+ // If yes, we need to mark it as inactive (only 1 guide can be active at a time)
+ if (updatedGuideState.isActive) {
+ const activeGuideSO = await findActiveGuide(savedObjectsClient);
+
+ if (activeGuideSO.total > 0) {
+ const activeGuide = activeGuideSO.saved_objects[0];
+ await savedObjectsClient.update(guidedSetupSavedObjectsType, activeGuide.id, {
+ ...activeGuide.attributes,
+ isActive: false,
+ });
}
+ }
+
+ const createdGuideResponse = await savedObjectsClient.create(
+ guidedSetupSavedObjectsType,
+ updatedGuideState
);
return response.ok({
body: {
- state: guidedSetupSO.attributes,
+ state: createdGuideResponse,
},
});
}
diff --git a/src/plugins/guided_onboarding/server/saved_objects/guided_setup.ts b/src/plugins/guided_onboarding/server/saved_objects/guided_setup.ts
index 2576148868597..6fe0a90339f69 100644
--- a/src/plugins/guided_onboarding/server/saved_objects/guided_setup.ts
+++ b/src/plugins/guided_onboarding/server/saved_objects/guided_setup.ts
@@ -8,12 +8,8 @@
import { SavedObjectsType } from '@kbn/core/server';
-export const guidedSetupSavedObjectsType = 'guided-setup-state';
-export const guidedSetupSavedObjectsId = 'guided-setup-state-id';
-export const guidedSetupDefaultState = {
- activeGuide: 'unset',
- activeStep: 'unset',
-};
+export const guidedSetupSavedObjectsType = 'guided-onboarding-guide-state';
+
export const guidedSetupSavedObjects: SavedObjectsType = {
name: guidedSetupSavedObjectsType,
hidden: false,
@@ -22,11 +18,11 @@ export const guidedSetupSavedObjects: SavedObjectsType = {
mappings: {
dynamic: false,
properties: {
- activeGuide: {
+ guideId: {
type: 'keyword',
},
- activeStep: {
- type: 'keyword',
+ isActive: {
+ type: 'boolean',
},
},
},
diff --git a/src/plugins/guided_onboarding/server/saved_objects/index.ts b/src/plugins/guided_onboarding/server/saved_objects/index.ts
index 2fa5366cc2b9e..58195618a0ec4 100644
--- a/src/plugins/guided_onboarding/server/saved_objects/index.ts
+++ b/src/plugins/guided_onboarding/server/saved_objects/index.ts
@@ -6,9 +6,4 @@
* Side Public License, v 1.
*/
-export {
- guidedSetupSavedObjects,
- guidedSetupSavedObjectsType,
- guidedSetupSavedObjectsId,
- guidedSetupDefaultState,
-} from './guided_setup';
+export { guidedSetupSavedObjects, guidedSetupSavedObjectsType } from './guided_setup';
diff --git a/src/plugins/home/kibana.json b/src/plugins/home/kibana.json
index 02b33e814e2a1..72b4d6cb8fd0b 100644
--- a/src/plugins/home/kibana.json
+++ b/src/plugins/home/kibana.json
@@ -8,6 +8,6 @@
"server": true,
"ui": true,
"requiredPlugins": ["dataViews", "share", "urlForwarding"],
- "optionalPlugins": ["usageCollection", "customIntegrations"],
+ "optionalPlugins": ["usageCollection", "customIntegrations", "cloud"],
"requiredBundles": ["kibanaReact"]
}
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
index f6720bf0e3e51..a48a4a05318bb 100644
Binary files a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard.webp 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.webp b/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.webp
index b9263441d1f22..cccee38594e9c 100644
Binary files a/src/plugins/home/public/assets/sample_data_resources/ecommerce/dashboard_dark.webp 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.webp b/src/plugins/home/public/assets/sample_data_resources/flights/dashboard.webp
index f73ae849befc9..2c50c8a1471e9 100644
Binary files a/src/plugins/home/public/assets/sample_data_resources/flights/dashboard.webp 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.webp b/src/plugins/home/public/assets/sample_data_resources/flights/dashboard_dark.webp
index 3cea45093ddac..0c3769a3c8268 100644
Binary files a/src/plugins/home/public/assets/sample_data_resources/flights/dashboard_dark.webp 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.webp b/src/plugins/home/public/assets/sample_data_resources/logs/dashboard.webp
index c5b2250190ae0..8defebcc5fbbb 100644
Binary files a/src/plugins/home/public/assets/sample_data_resources/logs/dashboard.webp 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.webp b/src/plugins/home/public/assets/sample_data_resources/logs/dashboard_dark.webp
index 0c5ff2f6cd9f1..6f4dad0dad1f9 100644
Binary files a/src/plugins/home/public/assets/sample_data_resources/logs/dashboard_dark.webp and b/src/plugins/home/public/assets/sample_data_resources/logs/dashboard_dark.webp differ
diff --git a/src/plugins/home/public/plugin.test.ts b/src/plugins/home/public/plugin.test.ts
index 12243944ef0f0..a6c6012a28ed6 100644
--- a/src/plugins/home/public/plugin.test.ts
+++ b/src/plugins/home/public/plugin.test.ts
@@ -11,6 +11,7 @@ import { HomePublicPlugin } from './plugin';
import { coreMock } from '@kbn/core/public/mocks';
import { urlForwardingPluginMock } from '@kbn/url-forwarding-plugin/public/mocks';
import { SharePluginSetup } from '@kbn/share-plugin/public';
+import { cloudMock } from '@kbn/cloud-plugin/public/mocks';
const mockInitializerContext = coreMock.createPluginInitializerContext();
const mockShare = {} as SharePluginSetup;
@@ -24,14 +25,11 @@ describe('HomePublicPlugin', () => {
});
describe('setup', () => {
- test('registers tutorial directory to feature catalogue', async () => {
- const setup = await new HomePublicPlugin(mockInitializerContext).setup(
- coreMock.createSetup() as any,
- {
- share: mockShare,
- urlForwarding: urlForwardingPluginMock.createSetupContract(),
- }
- );
+ test('registers tutorial directory to feature catalogue', () => {
+ const setup = new HomePublicPlugin(mockInitializerContext).setup(coreMock.createSetup(), {
+ share: mockShare,
+ urlForwarding: urlForwardingPluginMock.createSetupContract(),
+ });
expect(setup).toHaveProperty('featureCatalogue');
expect(setup.featureCatalogue.register).toHaveBeenCalledTimes(1);
expect(setup.featureCatalogue.register).toHaveBeenCalledWith(
@@ -44,53 +42,73 @@ describe('HomePublicPlugin', () => {
);
});
- test('wires up and returns registry', async () => {
- const setup = await new HomePublicPlugin(mockInitializerContext).setup(
- coreMock.createSetup() as any,
- {
- share: mockShare,
- urlForwarding: urlForwardingPluginMock.createSetupContract(),
- }
- );
+ test('wires up and returns registry', () => {
+ const setup = new HomePublicPlugin(mockInitializerContext).setup(coreMock.createSetup(), {
+ share: mockShare,
+ urlForwarding: urlForwardingPluginMock.createSetupContract(),
+ });
expect(setup).toHaveProperty('featureCatalogue');
expect(setup.featureCatalogue).toHaveProperty('register');
});
- test('wires up and returns environment service', async () => {
- const setup = await new HomePublicPlugin(mockInitializerContext).setup(
- coreMock.createSetup() as any,
- {
- share: {} as SharePluginSetup,
- urlForwarding: urlForwardingPluginMock.createSetupContract(),
- }
- );
+ test('wires up and returns environment service', () => {
+ const setup = new HomePublicPlugin(mockInitializerContext).setup(coreMock.createSetup(), {
+ share: {} as SharePluginSetup,
+ urlForwarding: urlForwardingPluginMock.createSetupContract(),
+ });
expect(setup).toHaveProperty('environment');
expect(setup.environment).toHaveProperty('update');
});
- test('wires up and returns tutorial service', async () => {
- const setup = await new HomePublicPlugin(mockInitializerContext).setup(
- coreMock.createSetup() as any,
- {
- share: mockShare,
- urlForwarding: urlForwardingPluginMock.createSetupContract(),
- }
- );
+ test('wires up and returns tutorial service', () => {
+ const setup = new HomePublicPlugin(mockInitializerContext).setup(coreMock.createSetup(), {
+ share: mockShare,
+ urlForwarding: urlForwardingPluginMock.createSetupContract(),
+ });
expect(setup).toHaveProperty('tutorials');
expect(setup.tutorials).toHaveProperty('setVariable');
});
- test('wires up and returns welcome service', async () => {
- const setup = await new HomePublicPlugin(mockInitializerContext).setup(
- coreMock.createSetup() as any,
- {
- share: mockShare,
- urlForwarding: urlForwardingPluginMock.createSetupContract(),
- }
- );
+ test('wires up and returns welcome service', () => {
+ const setup = new HomePublicPlugin(mockInitializerContext).setup(coreMock.createSetup(), {
+ share: mockShare,
+ urlForwarding: urlForwardingPluginMock.createSetupContract(),
+ });
expect(setup).toHaveProperty('welcomeScreen');
expect(setup.welcomeScreen).toHaveProperty('registerOnRendered');
expect(setup.welcomeScreen).toHaveProperty('registerTelemetryNoticeRenderer');
});
+
+ test('sets the cloud environment variable when the cloud plugin is present but isCloudEnabled: false', () => {
+ const cloud = { ...cloudMock.createSetup(), isCloudEnabled: false };
+ const plugin = new HomePublicPlugin(mockInitializerContext);
+ const setup = plugin.setup(coreMock.createSetup(), {
+ cloud,
+ share: mockShare,
+ urlForwarding: urlForwardingPluginMock.createSetupContract(),
+ });
+ expect(setup.environment.update).toHaveBeenCalledTimes(1);
+ expect(setup.environment.update).toHaveBeenCalledWith({ cloud: false });
+ expect(setup.tutorials.setVariable).toHaveBeenCalledTimes(0);
+ });
+
+ test('when cloud is enabled, it sets the cloud environment and the tutorials variable "cloud"', () => {
+ const cloud = { ...cloudMock.createSetup(), isCloudEnabled: true };
+ const plugin = new HomePublicPlugin(mockInitializerContext);
+ const setup = plugin.setup(coreMock.createSetup(), {
+ cloud,
+ share: mockShare,
+ urlForwarding: urlForwardingPluginMock.createSetupContract(),
+ });
+ expect(setup.environment.update).toHaveBeenCalledTimes(1);
+ expect(setup.environment.update).toHaveBeenCalledWith({ cloud: true });
+ expect(setup.tutorials.setVariable).toHaveBeenCalledTimes(1);
+ expect(setup.tutorials.setVariable).toHaveBeenCalledWith('cloud', {
+ id: 'mock-cloud-id',
+ baseUrl: 'base-url',
+ deploymentUrl: 'deployment-url',
+ profileUrl: 'profile-url',
+ });
+ });
});
});
diff --git a/src/plugins/home/public/plugin.ts b/src/plugins/home/public/plugin.ts
index 642a8d575e078..e27ddf107a5ee 100644
--- a/src/plugins/home/public/plugin.ts
+++ b/src/plugins/home/public/plugin.ts
@@ -20,6 +20,7 @@ import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public';
import { UrlForwardingSetup, UrlForwardingStart } from '@kbn/url-forwarding-plugin/public';
import { AppNavLinkStatus } from '@kbn/core/public';
import { SharePluginSetup } from '@kbn/share-plugin/public';
+import type { CloudSetup } from '@kbn/cloud-plugin/public';
import { PLUGIN_ID, HOME_APP_BASE_PATH } from '../common/constants';
import { setServices } from './application/kibana_services';
import { ConfigSchema } from '../config';
@@ -42,6 +43,7 @@ export interface HomePluginStartDependencies {
}
export interface HomePluginSetupDependencies {
+ cloud?: CloudSetup;
share: SharePluginSetup;
usageCollection?: UsageCollectionSetup;
urlForwarding: UrlForwardingSetup;
@@ -66,7 +68,7 @@ export class HomePublicPlugin
public setup(
core: CoreSetup,
- { share, urlForwarding, usageCollection }: HomePluginSetupDependencies
+ { cloud, share, urlForwarding, usageCollection }: HomePluginSetupDependencies
): HomePublicPluginSetup {
core.application.register({
id: PLUGIN_ID,
@@ -127,10 +129,25 @@ export class HomePublicPlugin
order: 500,
});
+ const environment = { ...this.environmentService.setup() };
+ const tutorials = { ...this.tutorialService.setup() };
+ if (cloud) {
+ environment.update({ cloud: cloud.isCloudEnabled });
+ if (cloud.isCloudEnabled) {
+ tutorials.setVariable('cloud', {
+ id: cloud.cloudId,
+ baseUrl: cloud.baseUrl,
+ // Cloud's API already provides the full URLs
+ profileUrl: cloud.profileUrl?.replace(cloud.baseUrl ?? '', ''),
+ deploymentUrl: cloud.deploymentUrl?.replace(cloud.baseUrl ?? '', ''),
+ });
+ }
+ }
+
return {
featureCatalogue,
- environment: { ...this.environmentService.setup() },
- tutorials: { ...this.tutorialService.setup() },
+ environment,
+ tutorials,
addData: { ...this.addDataService.setup() },
welcomeScreen: { ...this.welcomeService.setup() },
};
diff --git a/src/plugins/home/public/services/environment/environment.mock.ts b/src/plugins/home/public/services/environment/environment.mock.ts
index 713a59ceac7bf..f2d4747d44d6a 100644
--- a/src/plugins/home/public/services/environment/environment.mock.ts
+++ b/src/plugins/home/public/services/environment/environment.mock.ts
@@ -18,14 +18,13 @@ const createSetupMock = (): jest.Mocked => {
const createMock = (): jest.Mocked> => {
const service = {
- setup: jest.fn(),
+ setup: jest.fn(createSetupMock),
getEnvironment: jest.fn(() => ({
cloud: false,
apmUi: false,
ml: false,
})),
};
- service.setup.mockImplementation(createSetupMock);
return service;
};
diff --git a/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts b/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts
index ad334470205aa..d90d6855879bb 100644
--- a/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts
+++ b/src/plugins/home/server/services/sample_data/data_sets/ecommerce/saved_objects.ts
@@ -189,44 +189,6 @@ export const getSavedObjects = (): SavedObject[] => [
updated_at: '2021-08-05T12:43:35.817Z',
version: 'WzE3MSwxXQ==',
},
- {
- attributes: {
- description: '',
- kibanaSavedObjectMeta: {
- searchSourceJSON: '{"query":{"query":"","language":"kuery"},"filter":[]}',
- },
- title: '[eCommerce] Controls',
- uiStateJSON: '{}',
- version: 1,
- visState:
- '{"title":"[eCommerce] Controls","type":"input_control_vis","params":{"controls":[{"id":"1536977437774","fieldName":"manufacturer.keyword","parent":"","label":"Manufacturer","type":"list","options":{"type":"terms","multiselect":true,"dynamicOptions":true,"size":5,"order":"desc"},"indexPatternRefName":"control_0_index_pattern"},{"id":"1536977465554","fieldName":"category.keyword","parent":"","label":"Category","type":"list","options":{"type":"terms","multiselect":true,"dynamicOptions":true,"size":5,"order":"desc"},"indexPatternRefName":"control_1_index_pattern"},{"id":"1536977596163","fieldName":"total_quantity","parent":"","label":"Quantity","type":"range","options":{"decimalPlaces":0,"step":1},"indexPatternRefName":"control_2_index_pattern"}],"updateFiltersOnChange":false,"useTimeFilter":true,"pinFilters":false},"aggs":[]}',
- },
- coreMigrationVersion: '8.0.0',
- id: 'c3378480-f5ea-11eb-a78e-83aac3c38a60',
- migrationVersion: {
- visualization: '7.14.0',
- },
- references: [
- {
- id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f',
- name: 'control_0_index_pattern',
- type: 'index-pattern',
- },
- {
- id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f',
- name: 'control_1_index_pattern',
- type: 'index-pattern',
- },
- {
- id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f',
- name: 'control_2_index_pattern',
- type: 'index-pattern',
- },
- ],
- type: 'visualization',
- updated_at: '2021-08-05T12:43:41.128Z',
- version: 'WzE3NiwxXQ==',
- },
{
attributes: {
state: {
@@ -1285,113 +1247,132 @@ export const getSavedObjects = (): SavedObject[] => [
version: 'WzIzMywxXQ==',
},
{
+ id: '722b74f0-b882-11e8-a6d9-e546fe2bba5f',
+ type: 'dashboard',
+ namespaces: ['default'],
+ updated_at: '2022-09-26T17:19:19.470Z',
+ version: 'WzQ1MTgsMV0=',
attributes: {
+ title: i18n.translate('home.sampleData.ecommerceSpec.revenueDashboardTitle', {
+ defaultMessage: '[eCommerce] Revenue Dashboard',
+ }),
+ hits: 0,
description: i18n.translate('home.sampleData.ecommerceSpec.revenueDashboardDescription', {
defaultMessage: 'Analyze mock eCommerce orders and revenue',
}),
- hits: 0,
- kibanaSavedObjectMeta: {
- searchSourceJSON: '{"query":{"language":"kuery","query":""},"filter":[]}',
- },
- optionsJSON: '{"hidePanelTitles":false,"useMargins":true}',
panelsJSON:
- '[{"version":"8.0.0-SNAPSHOT","type":"visualization","gridData":{"x":0,"y":22,"w":24,"h":10,"i":"5"},"panelIndex":"5","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_5"},{"version":"8.0.0-SNAPSHOT","type":"visualization","gridData":{"x":36,"y":15,"w":12,"h":7,"i":"7"},"panelIndex":"7","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_7"},{"version":"8.0.0-SNAPSHOT","type":"search","gridData":{"x":0,"y":55,"w":48,"h":18,"i":"10"},"panelIndex":"10","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_10"},{"version":"8.0.0-SNAPSHOT","type":"map","gridData":{"x":0,"y":32,"w":24,"h":14,"i":"11"},"panelIndex":"11","embeddableConfig":{"isLayerTOCOpen":false,"enhancements":{},"mapCenter":{"lat":45.88578,"lon":-15.07605,"zoom":2.11},"mapBuffer":{"minLon":-135,"minLat":0,"maxLon":90,"maxLat":66.51326},"openTOCDetails":[],"hiddenLayers":[]},"panelRefName":"panel_11"},{"version":"8.0.0-SNAPSHOT","type":"visualization","gridData":{"x":0,"y":0,"w":18,"h":7,"i":"a71cf076-6895-491c-8878-63592e429ed5"},"panelIndex":"a71cf076-6895-491c-8878-63592e429ed5","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_a71cf076-6895-491c-8878-63592e429ed5"},{"version":"8.0.0-SNAPSHOT","type":"visualization","gridData":{"x":18,"y":0,"w":30,"h":7,"i":"adc0a2f4-481c-45eb-b422-0ea59a3e5163"},"panelIndex":"adc0a2f4-481c-45eb-b422-0ea59a3e5163","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_adc0a2f4-481c-45eb-b422-0ea59a3e5163"},{"version":"8.0.0-SNAPSHOT","type":"lens","gridData":{"x":0,"y":7,"w":24,"h":8,"i":"7077b79f-2a99-4fcb-bbd4-456982843278"},"panelIndex":"7077b79f-2a99-4fcb-bbd4-456982843278","embeddableConfig":{"enhancements":{},"hidePanelTitles":false},"title":"% of target revenue ($10k)","panelRefName":"panel_7077b79f-2a99-4fcb-bbd4-456982843278"},{"version":"8.0.0-SNAPSHOT","type":"lens","gridData":{"x":24,"y":7,"w":12,"h":8,"i":"19a3c101-ad2e-4421-a71b-a4734ec1f03e"},"panelIndex":"19a3c101-ad2e-4421-a71b-a4734ec1f03e","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_19a3c101-ad2e-4421-a71b-a4734ec1f03e"},{"version":"8.0.0-SNAPSHOT","type":"lens","gridData":{"x":36,"y":7,"w":12,"h":8,"i":"491469e7-7d24-4216-aeb3-bca00e5c8c1b"},"panelIndex":"491469e7-7d24-4216-aeb3-bca00e5c8c1b","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_491469e7-7d24-4216-aeb3-bca00e5c8c1b"},{"version":"8.0.0-SNAPSHOT","type":"lens","gridData":{"x":0,"y":15,"w":24,"h":7,"i":"a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef"},"panelIndex":"a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef"},{"version":"8.0.0-SNAPSHOT","type":"lens","gridData":{"x":24,"y":15,"w":12,"h":7,"i":"da51079b-952f-43dc-96e6-6f9415a3708b"},"panelIndex":"da51079b-952f-43dc-96e6-6f9415a3708b","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_da51079b-952f-43dc-96e6-6f9415a3708b"},{"version":"8.0.0-SNAPSHOT","type":"lens","gridData":{"x":24,"y":22,"w":24,"h":10,"i":"64fd5dcf-30c5-4f5a-a78c-70b1fbf87e5b"},"panelIndex":"64fd5dcf-30c5-4f5a-a78c-70b1fbf87e5b","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_64fd5dcf-30c5-4f5a-a78c-70b1fbf87e5b"},{"version":"8.0.0-SNAPSHOT","type":"lens","gridData":{"x":24,"y":32,"w":24,"h":14,"i":"bd330ede-2eef-4e2a-8100-22a21abf5038"},"panelIndex":"bd330ede-2eef-4e2a-8100-22a21abf5038","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_bd330ede-2eef-4e2a-8100-22a21abf5038"},{"version":"8.0.0-SNAPSHOT","type":"lens","gridData":{"x":0,"y":46,"w":24,"h":9,"i":"b897d4be-cf83-46fb-a111-c7fbec9ef403"},"panelIndex":"b897d4be-cf83-46fb-a111-c7fbec9ef403","embeddableConfig":{"hidePanelTitles":false,"enhancements":{}},"title":"Top products this week","panelRefName":"panel_b897d4be-cf83-46fb-a111-c7fbec9ef403"},{"version":"8.0.0-SNAPSHOT","type":"lens","gridData":{"x":24,"y":46,"w":24,"h":9,"i":"e0f68f93-30f2-4da7-889a-6cd128a68d3f"},"panelIndex":"e0f68f93-30f2-4da7-889a-6cd128a68d3f","embeddableConfig":{"timeRange":{"from":"now-2w","to":"now-1w"},"hidePanelTitles":false,"enhancements":{}},"title":"Top products last week","panelRefName":"panel_e0f68f93-30f2-4da7-889a-6cd128a68d3f"}]',
+ '[{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":21,"w":24,"h":10,"i":"5"},"panelIndex":"5","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_5"},{"version":"8.6.0","type":"visualization","gridData":{"x":36,"y":7,"w":12,"h":7,"i":"7"},"panelIndex":"7","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_7"},{"version":"8.6.0","type":"search","gridData":{"x":0,"y":54,"w":48,"h":18,"i":"10"},"panelIndex":"10","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_10"},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":31,"w":24,"h":14,"i":"11"},"panelIndex":"11","embeddableConfig":{"isLayerTOCOpen":false,"enhancements":{},"mapCenter":{"lat":45.88578,"lon":-15.07605,"zoom":2.11},"mapBuffer":{"minLon":-135,"minLat":0,"maxLon":90,"maxLat":66.51326},"openTOCDetails":[],"hiddenLayers":[]},"panelRefName":"panel_11"},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":0,"w":24,"h":7,"i":"a71cf076-6895-491c-8878-63592e429ed5"},"panelIndex":"a71cf076-6895-491c-8878-63592e429ed5","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_a71cf076-6895-491c-8878-63592e429ed5"},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":7,"w":12,"h":7,"i":"da51079b-952f-43dc-96e6-6f9415a3708b"},"panelIndex":"da51079b-952f-43dc-96e6-6f9415a3708b","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_da51079b-952f-43dc-96e6-6f9415a3708b"},{"version":"8.6.0","type":"lens","gridData":{"x":36,"y":0,"w":12,"h":7,"i":"491469e7-7d24-4216-aeb3-bca00e5c8c1b"},"panelIndex":"491469e7-7d24-4216-aeb3-bca00e5c8c1b","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_491469e7-7d24-4216-aeb3-bca00e5c8c1b"},{"version":"8.6.0","type":"lens","gridData":{"x":0,"y":7,"w":24,"h":7,"i":"7077b79f-2a99-4fcb-bbd4-456982843278"},"panelIndex":"7077b79f-2a99-4fcb-bbd4-456982843278","embeddableConfig":{"enhancements":{},"hidePanelTitles":false},"title":"% of target revenue ($10k)","panelRefName":"panel_7077b79f-2a99-4fcb-bbd4-456982843278"},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":0,"w":12,"h":7,"i":"19a3c101-ad2e-4421-a71b-a4734ec1f03e"},"panelIndex":"19a3c101-ad2e-4421-a71b-a4734ec1f03e","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_19a3c101-ad2e-4421-a71b-a4734ec1f03e"},{"version":"8.6.0","type":"lens","gridData":{"x":0,"y":14,"w":24,"h":7,"i":"a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef"},"panelIndex":"a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef"},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":14,"w":24,"h":17,"i":"64fd5dcf-30c5-4f5a-a78c-70b1fbf87e5b"},"panelIndex":"64fd5dcf-30c5-4f5a-a78c-70b1fbf87e5b","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_64fd5dcf-30c5-4f5a-a78c-70b1fbf87e5b"},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":31,"w":24,"h":14,"i":"bd330ede-2eef-4e2a-8100-22a21abf5038"},"panelIndex":"bd330ede-2eef-4e2a-8100-22a21abf5038","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_bd330ede-2eef-4e2a-8100-22a21abf5038"},{"version":"8.6.0","type":"lens","gridData":{"x":0,"y":45,"w":24,"h":9,"i":"b897d4be-cf83-46fb-a111-c7fbec9ef403"},"panelIndex":"b897d4be-cf83-46fb-a111-c7fbec9ef403","embeddableConfig":{"hidePanelTitles":false,"enhancements":{}},"title":"Top products this week","panelRefName":"panel_b897d4be-cf83-46fb-a111-c7fbec9ef403"},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":45,"w":24,"h":9,"i":"e0f68f93-30f2-4da7-889a-6cd128a68d3f"},"panelIndex":"e0f68f93-30f2-4da7-889a-6cd128a68d3f","embeddableConfig":{"timeRange":{"from":"now-2w","to":"now-1w"},"hidePanelTitles":false,"enhancements":{}},"title":"Top products last week","panelRefName":"panel_e0f68f93-30f2-4da7-889a-6cd128a68d3f"}]',
+ optionsJSON: '{"hidePanelTitles":false,"useMargins":true}',
+ version: 1,
+ timeRestore: true,
+ timeTo: 'now',
+ timeFrom: 'now-7d',
refreshInterval: {
pause: true,
value: 0,
},
- timeFrom: 'now-7d',
- timeRestore: true,
- timeTo: 'now',
- title: i18n.translate('home.sampleData.ecommerceSpec.revenueDashboardTitle', {
- defaultMessage: '[eCommerce] Revenue Dashboard',
- }),
- version: 1,
- },
- coreMigrationVersion: '8.0.0',
- id: '722b74f0-b882-11e8-a6d9-e546fe2bba5f',
- migrationVersion: {
- dashboard: '7.14.0',
+ controlGroupInput: {
+ controlStyle: 'oneLine',
+ chainingSystem: 'HIERARCHICAL',
+ panelsJSON:
+ '{"1ee1617f-fd8e-45e4-bc6a-d5736710ea20":{"order":0,"width":"small","grow":true,"type":"optionsListControl","explicitInput":{"title":"Manufacturer","fieldName":"manufacturer.keyword","parentFieldName":"manufacturer","id":"1ee1617f-fd8e-45e4-bc6a-d5736710ea20","enhancements":{}}},"afa9fa0f-a002-41a5-bab9-b738316d2590":{"order":1,"width":"small","grow":true,"type":"optionsListControl","explicitInput":{"title":"Category","fieldName":"category.keyword","parentFieldName":"category","id":"afa9fa0f-a002-41a5-bab9-b738316d2590","enhancements":{}}},"d3f766cb-5f96-4a12-8d3c-034e08be8855":{"order":2,"width":"small","grow":true,"type":"rangeSliderControl","explicitInput":{"title":"Quantity","fieldName":"total_quantity","id":"d3f766cb-5f96-4a12-8d3c-034e08be8855","enhancements":{}}}}',
+ ignoreParentSettingsJSON:
+ '{"ignoreFilters":false,"ignoreQuery":false,"ignoreTimerange":false,"ignoreValidations":false}',
+ },
+ kibanaSavedObjectMeta: {
+ searchSourceJSON: '{"query":{"language":"kuery","query":""},"filter":[]}',
+ },
},
references: [
{
- id: '45e07720-b890-11e8-a6d9-e546fe2bba5f',
name: '5:panel_5',
type: 'visualization',
+ id: '45e07720-b890-11e8-a6d9-e546fe2bba5f',
},
{
- id: 'b80e6540-b891-11e8-a6d9-e546fe2bba5f',
name: '7:panel_7',
type: 'visualization',
+ id: 'b80e6540-b891-11e8-a6d9-e546fe2bba5f',
},
{
- id: '3ba638e0-b894-11e8-a6d9-e546fe2bba5f',
name: '10:panel_10',
type: 'search',
+ id: '3ba638e0-b894-11e8-a6d9-e546fe2bba5f',
},
{
- id: '9c6f83f0-bb4d-11e8-9c84-77068524bcab',
name: '11:panel_11',
type: 'visualization',
+ id: '9c6f83f0-bb4d-11e8-9c84-77068524bcab',
},
{
- id: 'c00d1f90-f5ea-11eb-a78e-83aac3c38a60',
name: 'a71cf076-6895-491c-8878-63592e429ed5:panel_a71cf076-6895-491c-8878-63592e429ed5',
type: 'visualization',
+ id: 'c00d1f90-f5ea-11eb-a78e-83aac3c38a60',
},
{
- id: 'c3378480-f5ea-11eb-a78e-83aac3c38a60',
- name: 'adc0a2f4-481c-45eb-b422-0ea59a3e5163:panel_adc0a2f4-481c-45eb-b422-0ea59a3e5163',
- type: 'visualization',
- },
- {
- id: 'c762b7a0-f5ea-11eb-a78e-83aac3c38a60',
- name: '7077b79f-2a99-4fcb-bbd4-456982843278:panel_7077b79f-2a99-4fcb-bbd4-456982843278',
+ name: 'da51079b-952f-43dc-96e6-6f9415a3708b:panel_da51079b-952f-43dc-96e6-6f9415a3708b',
type: 'lens',
+ id: 'e3902840-f5ea-11eb-a78e-83aac3c38a60',
},
{
- id: 'ce02e260-f5ea-11eb-a78e-83aac3c38a60',
- name: '19a3c101-ad2e-4421-a71b-a4734ec1f03e:panel_19a3c101-ad2e-4421-a71b-a4734ec1f03e',
+ name: '491469e7-7d24-4216-aeb3-bca00e5c8c1b:panel_491469e7-7d24-4216-aeb3-bca00e5c8c1b',
type: 'lens',
+ id: 'd5f90030-f5ea-11eb-a78e-83aac3c38a60',
},
{
- id: 'd5f90030-f5ea-11eb-a78e-83aac3c38a60',
- name: '491469e7-7d24-4216-aeb3-bca00e5c8c1b:panel_491469e7-7d24-4216-aeb3-bca00e5c8c1b',
+ name: '7077b79f-2a99-4fcb-bbd4-456982843278:panel_7077b79f-2a99-4fcb-bbd4-456982843278',
type: 'lens',
+ id: 'c762b7a0-f5ea-11eb-a78e-83aac3c38a60',
},
{
- id: 'dde978b0-f5ea-11eb-a78e-83aac3c38a60',
- name: 'a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef:panel_a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef',
+ name: '19a3c101-ad2e-4421-a71b-a4734ec1f03e:panel_19a3c101-ad2e-4421-a71b-a4734ec1f03e',
type: 'lens',
+ id: 'ce02e260-f5ea-11eb-a78e-83aac3c38a60',
},
{
- id: 'e3902840-f5ea-11eb-a78e-83aac3c38a60',
- name: 'da51079b-952f-43dc-96e6-6f9415a3708b:panel_da51079b-952f-43dc-96e6-6f9415a3708b',
+ name: 'a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef:panel_a1b03eb9-a36b-4e12-aa1b-bb29b5d6c4ef',
type: 'lens',
+ id: 'dde978b0-f5ea-11eb-a78e-83aac3c38a60',
},
{
- id: 'eddf7850-f5ea-11eb-a78e-83aac3c38a60',
name: '64fd5dcf-30c5-4f5a-a78c-70b1fbf87e5b:panel_64fd5dcf-30c5-4f5a-a78c-70b1fbf87e5b',
type: 'lens',
+ id: 'eddf7850-f5ea-11eb-a78e-83aac3c38a60',
},
{
- id: 'ff6a21b0-f5ea-11eb-a78e-83aac3c38a60',
name: 'bd330ede-2eef-4e2a-8100-22a21abf5038:panel_bd330ede-2eef-4e2a-8100-22a21abf5038',
type: 'lens',
+ id: 'ff6a21b0-f5ea-11eb-a78e-83aac3c38a60',
},
{
- id: '03071e90-f5eb-11eb-a78e-83aac3c38a60',
name: 'b897d4be-cf83-46fb-a111-c7fbec9ef403:panel_b897d4be-cf83-46fb-a111-c7fbec9ef403',
type: 'lens',
+ id: '03071e90-f5eb-11eb-a78e-83aac3c38a60',
},
{
- id: '06379e00-f5eb-11eb-a78e-83aac3c38a60',
name: 'e0f68f93-30f2-4da7-889a-6cd128a68d3f:panel_e0f68f93-30f2-4da7-889a-6cd128a68d3f',
type: 'lens',
+ id: '06379e00-f5eb-11eb-a78e-83aac3c38a60',
+ },
+ {
+ name: 'controlGroup_1ee1617f-fd8e-45e4-bc6a-d5736710ea20:optionsListDataView',
+ type: 'index-pattern',
+ id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f',
+ },
+ {
+ name: 'controlGroup_afa9fa0f-a002-41a5-bab9-b738316d2590:optionsListDataView',
+ type: 'index-pattern',
+ id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f',
+ },
+ {
+ name: 'controlGroup_d3f766cb-5f96-4a12-8d3c-034e08be8855:rangeSliderDataView',
+ type: 'index-pattern',
+ id: 'ff959d40-b880-11e8-a6d9-e546fe2bba5f',
},
],
- type: 'dashboard',
- updated_at: '2021-08-05T12:45:46.525Z',
- version: 'WzIzOSwxXQ==',
+ migrationVersion: {
+ dashboard: '8.5.0',
+ },
+ coreMigrationVersion: '8.6.0',
},
];
diff --git a/src/plugins/home/server/services/sample_data/data_sets/flights/saved_objects.ts b/src/plugins/home/server/services/sample_data/data_sets/flights/saved_objects.ts
index 2e4413dcba0d3..db6d9ce049d23 100644
--- a/src/plugins/home/server/services/sample_data/data_sets/flights/saved_objects.ts
+++ b/src/plugins/home/server/services/sample_data/data_sets/flights/saved_objects.ts
@@ -220,62 +220,81 @@ export const getSavedObjects = (): SavedObject[] => [
{
id: '7adfa750-4c81-11e8-b3d7-01146121b73d',
type: 'dashboard',
- updated_at: '2021-07-07T14:16:23.001Z',
- version: '5',
+ namespaces: ['default'],
+ updated_at: '2022-09-26T17:13:00.935Z',
+ version: 'WzMzMTIsMV0=',
+ attributes: {
+ title: i18n.translate('home.sampleData.flightsSpec.globalFlightDashboardTitle', {
+ defaultMessage: '[Flights] Global Flight Dashboard',
+ }),
+ hits: 0,
+ description: i18n.translate('home.sampleData.flightsSpec.globalFlightDashboardDescription', {
+ defaultMessage:
+ 'Analyze mock flight data for ES-Air, Logstash Airways, Kibana Airlines and JetBeats',
+ }),
+ panelsJSON:
+ '[{"version":"8.6.0","type":"search","gridData":{"x":0,"y":69,"w":48,"h":15,"i":"4"},"panelIndex":"4","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_4"},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":16,"w":24,"h":9,"i":"7"},"panelIndex":"7","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_7"},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":58,"w":24,"h":11,"i":"10"},"panelIndex":"10","embeddableConfig":{"vis":{"colors":{"Count":"#1F78C1"},"legendOpen":false},"enhancements":{}},"panelRefName":"panel_10"},{"version":"8.6.0","type":"visualization","gridData":{"x":36,"y":58,"w":12,"h":11,"i":"21"},"panelIndex":"21","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_21"},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":36,"w":24,"h":22,"i":"23"},"panelIndex":"23","embeddableConfig":{"isLayerTOCOpen":true,"enhancements":{},"mapCenter":{"lat":34.65823,"lon":-112.44472,"zoom":4.28},"mapBuffer":{"minLon":-135,"minLat":21.94305,"maxLon":-90,"maxLat":48.9225},"openTOCDetails":[],"hiddenLayers":[]},"panelRefName":"panel_23"},{"version":"8.6.0","type":"visualization","gridData":{"x":24,"y":36,"w":24,"h":22,"i":"31"},"panelIndex":"31","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_31"},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":0,"w":24,"h":8,"i":"6afc61f7-e2d5-45a3-9e7a-281160ad3eb9"},"panelIndex":"6afc61f7-e2d5-45a3-9e7a-281160ad3eb9","embeddableConfig":{"savedVis":{"title":"[Flights] Markdown Instructions","description":"","type":"markdown","params":{"fontSize":10,"openLinksInNewTab":true,"markdown":"## Sample Flight data\\nThis dashboard contains sample data for you to play with. You can view it, search it, and interact with the visualizations. For more information about Kibana, check our [docs](https://www.elastic.co/guide/en/kibana/current/index.html)."},"uiState":{},"data":{"aggs":[],"searchSource":{}}},"hidePanelTitles":true,"enhancements":{}}},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":0,"w":8,"h":8,"i":"392b4936-f753-47bc-a98d-a4e41a0a4cd4"},"panelIndex":"392b4936-f753-47bc-a98d-a4e41a0a4cd4","embeddableConfig":{"enhancements":{},"attributes":{"title":"[Flights] Total Flights","description":"","visualizationType":"lnsLegacyMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"8fa993db-c147-4954-adf7-4ff264d42576":{"columns":{"81124c45-6ab6-42f4-8859-495d55eb8065":{"label":"Total flights","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true}},"columnOrder":["81124c45-6ab6-42f4-8859-495d55eb8065"],"incompleteColumns":{}}}}},"visualization":{"layerId":"8fa993db-c147-4954-adf7-4ff264d42576","accessor":"81124c45-6ab6-42f4-8859-495d55eb8065","layerType":"data","textAlign":"center","titlePosition":"bottom","size":"xl"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-8fa993db-c147-4954-adf7-4ff264d42576","type":"index-pattern"}]},"hidePanelTitles":true}},{"version":"8.6.0","type":"lens","gridData":{"x":32,"y":0,"w":8,"h":4,"i":"9271deff-5a61-4665-83fc-f9fdc6bf0c0b"},"panelIndex":"9271deff-5a61-4665-83fc-f9fdc6bf0c0b","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsLegacyMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"b4712d43-1e84-4f5b-878d-8e38ba748317":{"columns":{"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0":{"label":"Part of count(kql=\'FlightDelay : true\') / count()","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","filter":{"query":"FlightDelay : true","language":"kuery"},"customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1":{"label":"Part of count(kql=\'FlightDelay : true\') / count()","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2":{"label":"Part of count(kql=\'FlightDelay : true\') / count()","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1"],"location":{"min":0,"max":41},"text":"count(kql=\'FlightDelay : true\') / count()"}},"references":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1"],"customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ec":{"label":"Delayed","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'FlightDelay : true\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2"],"customLabel":true}},"columnOrder":["7e8fe9b1-f45c-4f3d-9561-30febcd357ec","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2"],"incompleteColumns":{}}}}},"visualization":{"layerId":"b4712d43-1e84-4f5b-878d-8e38ba748317","accessor":"7e8fe9b1-f45c-4f3d-9561-30febcd357ec","layerType":"data","textAlign":"center","titlePosition":"bottom","size":"xl"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-b4712d43-1e84-4f5b-878d-8e38ba748317","type":"index-pattern"}]},"enhancements":{}}},{"version":"8.6.0","type":"lens","gridData":{"x":40,"y":0,"w":8,"h":4,"i":"aa591c29-1a31-4ee1-a71d-b829c06fd162"},"panelIndex":"aa591c29-1a31-4ee1-a71d-b829c06fd162","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsLegacyMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"b4712d43-1e84-4f5b-878d-8e38ba748317":{"columns":{"c7851241-5526-499a-960b-357af8c2ce5bX0":{"label":"Part of Delayed","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5bX1":{"label":"Part of Delayed","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","timeShift":"1w","customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5bX2":{"label":"Part of Delayed","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"subtract","args":[{"type":"function","name":"divide","args":["c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"location":{"min":0,"max":28},"text":"count() / count(shift=\'1w\') "},1],"location":{"min":0,"max":31},"text":"count() / count(shift=\'1w\') - 1"}},"references":["c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5b":{"label":"Delayed vs 1 week earlier","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count() / count(shift=\'1w\') - 1","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["c7851241-5526-499a-960b-357af8c2ce5bX2"],"customLabel":true}},"columnOrder":["c7851241-5526-499a-960b-357af8c2ce5b","c7851241-5526-499a-960b-357af8c2ce5bX2","c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"incompleteColumns":{}}}}},"visualization":{"layerId":"b4712d43-1e84-4f5b-878d-8e38ba748317","accessor":"c7851241-5526-499a-960b-357af8c2ce5b","layerType":"data","textAlign":"center","titlePosition":"bottom","size":"xl"},"query":{"query":"","language":"kuery"},"filters":[{"meta":{"alias":null,"negate":false,"disabled":false,"type":"phrase","key":"FlightDelay","params":{"query":true},"index":"filter-index-pattern-0"},"query":{"match_phrase":{"FlightDelay":true}},"$state":{"store":"appState"}}]},"references":[{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-b4712d43-1e84-4f5b-878d-8e38ba748317","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"filter-index-pattern-0","type":"index-pattern"}]},"enhancements":{}}},{"version":"8.6.0","type":"lens","gridData":{"x":32,"y":4,"w":8,"h":4,"i":"b766e3b8-4544-46ed-99e6-9ecc4847e2a2"},"panelIndex":"b766e3b8-4544-46ed-99e6-9ecc4847e2a2","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsLegacyMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"b4712d43-1e84-4f5b-878d-8e38ba748317":{"columns":{"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0":{"label":"Part of Cancelled","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","filter":{"query":"Cancelled : true","language":"kuery"},"customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1":{"label":"Part of Cancelled","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2":{"label":"Part of Cancelled","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1"],"location":{"min":0,"max":39},"text":"count(kql=\'Cancelled : true\') / count()"}},"references":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1"],"customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ec":{"label":"Cancelled","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'Cancelled : true\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2"],"customLabel":true}},"columnOrder":["7e8fe9b1-f45c-4f3d-9561-30febcd357ec","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2"],"incompleteColumns":{}}}}},"visualization":{"layerId":"b4712d43-1e84-4f5b-878d-8e38ba748317","accessor":"7e8fe9b1-f45c-4f3d-9561-30febcd357ec","layerType":"data","textAlign":"center","titlePosition":"bottom","size":"xl"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-b4712d43-1e84-4f5b-878d-8e38ba748317","type":"index-pattern"}]},"enhancements":{}}},{"version":"8.6.0","type":"lens","gridData":{"x":40,"y":4,"w":8,"h":4,"i":"2e33ade5-96e5-40b4-b460-493e5d4fa834"},"panelIndex":"2e33ade5-96e5-40b4-b460-493e5d4fa834","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsLegacyMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"b4712d43-1e84-4f5b-878d-8e38ba748317":{"columns":{"c7851241-5526-499a-960b-357af8c2ce5bX0":{"label":"Part of Delayed vs 1 week earlier","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5bX1":{"label":"Part of Delayed vs 1 week earlier","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","timeShift":"1w","customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5bX2":{"label":"Part of Delayed vs 1 week earlier","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"subtract","args":[{"type":"function","name":"divide","args":["c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"location":{"min":0,"max":28},"text":"count() / count(shift=\'1w\') "},1],"location":{"min":0,"max":31},"text":"count() / count(shift=\'1w\') - 1"}},"references":["c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5b":{"label":"Cancelled vs 1 week earlier","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count() / count(shift=\'1w\') - 1","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["c7851241-5526-499a-960b-357af8c2ce5bX2"],"customLabel":true}},"columnOrder":["c7851241-5526-499a-960b-357af8c2ce5b","c7851241-5526-499a-960b-357af8c2ce5bX2","c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"incompleteColumns":{}}}}},"visualization":{"layerId":"b4712d43-1e84-4f5b-878d-8e38ba748317","accessor":"c7851241-5526-499a-960b-357af8c2ce5b","layerType":"data","textAlign":"center","titlePosition":"bottom","size":"xl"},"query":{"query":"","language":"kuery"},"filters":[{"meta":{"alias":null,"negate":false,"disabled":false,"type":"phrase","key":"Cancelled","params":{"query":true},"index":"filter-index-pattern-0"},"query":{"match_phrase":{"Cancelled":true}},"$state":{"store":"appState"}}]},"references":[{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-b4712d43-1e84-4f5b-878d-8e38ba748317","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"filter-index-pattern-0","type":"index-pattern"}]},"enhancements":{}}},{"version":"8.6.0","type":"lens","gridData":{"x":0,"y":8,"w":24,"h":8,"i":"086ac2e9-dd16-4b45-92b8-1e43ff7e3f65"},"panelIndex":"086ac2e9-dd16-4b45-92b8-1e43ff7e3f65","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsXY","state":{"datasourceStates":{"indexpattern":{"layers":{"03c34665-471c-49c7-acf1-5a11f517421c":{"columns":{"a5b94e30-4e77-4b0a-9187-1d8b13de1456":{"label":"timestamp","dataType":"date","operationType":"date_histogram","sourceField":"timestamp","isBucketed":true,"scale":"interval","params":{"interval":"auto","includeEmptyRows":true}},"3e267327-7317-4310-aee3-320e0f7c1e70":{"label":"Count of records","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___"}},"columnOrder":["a5b94e30-4e77-4b0a-9187-1d8b13de1456","3e267327-7317-4310-aee3-320e0f7c1e70"],"incompleteColumns":{}}}}},"visualization":{"legend":{"isVisible":true,"position":"right","legendSize":"auto"},"valueLabels":"hide","fittingFunction":"None","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"custom","lowerBound":0,"upperBound":1},"axisTitlesVisibilitySettings":{"x":false,"yLeft":false,"yRight":true},"tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"preferredSeriesType":"bar_stacked","layers":[{"layerId":"03c34665-471c-49c7-acf1-5a11f517421c","accessors":["3e267327-7317-4310-aee3-320e0f7c1e70"],"position":"top","seriesType":"bar_stacked","showGridlines":false,"xAccessor":"a5b94e30-4e77-4b0a-9187-1d8b13de1456","layerType":"data"}]},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-03c34665-471c-49c7-acf1-5a11f517421c","type":"index-pattern"}]},"hidePanelTitles":false,"enhancements":{}},"title":"[Flights] Flight count"},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":8,"w":24,"h":28,"i":"fb86b32f-fb7a-45cf-9511-f366fef51bbd"},"panelIndex":"fb86b32f-fb7a-45cf-9511-f366fef51bbd","embeddableConfig":{"attributes":{"title":"Cities by delay, cancellation","type":"lens","visualizationType":"lnsDatatable","state":{"datasourceStates":{"indexpattern":{"layers":{"f26e8f7a-4118-4227-bea0-5c02d8b270f7":{"columns":{"3dd24cb4-45ef-4dd8-b22a-d7b802cb6da0":{"label":"Top values of OriginCityName","dataType":"string","operationType":"terms","scale":"ordinal","sourceField":"OriginCityName","isBucketed":true,"params":{"size":1000,"orderBy":{"type":"alphabetical","fallback":true},"orderDirection":"asc","otherBucket":true,"missingBucket":false}},"52f6f2e9-6242-4c44-be63-b799150e7e60X0":{"label":"Part of Delay %","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","filter":{"query":"FlightDelay : true ","language":"kuery"},"customLabel":true},"52f6f2e9-6242-4c44-be63-b799150e7e60X1":{"label":"Part of Delay %","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"52f6f2e9-6242-4c44-be63-b799150e7e60X2":{"label":"Part of Delay %","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["52f6f2e9-6242-4c44-be63-b799150e7e60X0","52f6f2e9-6242-4c44-be63-b799150e7e60X1"],"location":{"min":0,"max":42},"text":"count(kql=\'FlightDelay : true \') / count()"}},"references":["52f6f2e9-6242-4c44-be63-b799150e7e60X0","52f6f2e9-6242-4c44-be63-b799150e7e60X1"],"customLabel":true},"52f6f2e9-6242-4c44-be63-b799150e7e60":{"label":"Delay %","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'FlightDelay : true \') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":0}}},"references":["52f6f2e9-6242-4c44-be63-b799150e7e60X2"],"customLabel":true},"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X0":{"label":"Part of Cancel %","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","filter":{"query":"Cancelled: true","language":"kuery"},"customLabel":true},"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X1":{"label":"Part of Cancel %","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X2":{"label":"Part of Cancel %","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X0","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X1"],"location":{"min":0,"max":38},"text":"count(kql=\'Cancelled: true\') / count()"}},"references":["7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X0","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X1"],"customLabel":true},"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6":{"label":"Cancel %","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'Cancelled: true\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":0}}},"references":["7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X2"],"customLabel":true}},"columnOrder":["3dd24cb4-45ef-4dd8-b22a-d7b802cb6da0","52f6f2e9-6242-4c44-be63-b799150e7e60","52f6f2e9-6242-4c44-be63-b799150e7e60X0","52f6f2e9-6242-4c44-be63-b799150e7e60X1","52f6f2e9-6242-4c44-be63-b799150e7e60X2","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X0","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X1","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X2","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6"],"incompleteColumns":{}}}}},"visualization":{"columns":[{"isTransposed":false,"columnId":"3dd24cb4-45ef-4dd8-b22a-d7b802cb6da0","width":262.75},{"columnId":"52f6f2e9-6242-4c44-be63-b799150e7e60","isTransposed":false,"width":302.5,"colorMode":"cell","palette":{"name":"custom","type":"palette","params":{"steps":5,"stops":[{"color":"#f7e0b8","stop":0.6},{"color":"#e7664c","stop":1}],"name":"custom","colorStops":[{"color":"#f7e0b8","stop":0.2},{"color":"#e7664c","stop":0.6}],"rangeType":"number","rangeMin":0.2,"rangeMax":0.6}},"alignment":"center"},{"columnId":"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6","isTransposed":false,"alignment":"center","colorMode":"cell","palette":{"name":"custom","type":"palette","params":{"steps":5,"stops":[{"color":"#f7e0b8","stop":0.6},{"color":"#e7664c","stop":0.6666666666666666}],"rangeType":"number","name":"custom","colorStops":[{"color":"#f7e0b8","stop":0.2},{"color":"#e7664c","stop":0.6}],"rangeMin":0.2,"rangeMax":0.6}}}],"layerId":"f26e8f7a-4118-4227-bea0-5c02d8b270f7","sorting":{"columnId":"52f6f2e9-6242-4c44-be63-b799150e7e60","direction":"desc"},"layerType":"data","rowHeight":"single","rowHeightLines":1},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-f26e8f7a-4118-4227-bea0-5c02d8b270f7","type":"index-pattern"}]},"enhancements":{},"hidePanelTitles":false},"title":"[Flights] Most delayed cities"},{"version":"8.6.0","type":"lens","gridData":{"x":0,"y":25,"w":24,"h":11,"i":"0cc42484-16f7-42ec-b38c-9bf8be69cde7"},"panelIndex":"0cc42484-16f7-42ec-b38c-9bf8be69cde7","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsXY","state":{"datasourceStates":{"indexpattern":{"layers":{"e80cc05e-c52a-4e5f-ac71-4b37274867f5":{"columns":{"caf7421e-93a3-439e-ab0a-fbdead93c21c":{"label":"Top values of FlightDelayType","dataType":"string","operationType":"terms","scale":"ordinal","sourceField":"FlightDelayType","isBucketed":true,"params":{"size":10,"orderBy":{"type":"column","columnId":"0233d302-ec81-4fbe-96cb-7fac84cf035c"},"orderDirection":"desc","otherBucket":true,"missingBucket":false}},"13ec79e3-9d73-4536-9056-3d92802bb30a":{"label":"timestamp","dataType":"date","operationType":"date_histogram","sourceField":"timestamp","isBucketed":true,"scale":"interval","params":{"interval":"auto","includeEmptyRows":true}},"0233d302-ec81-4fbe-96cb-7fac84cf035c":{"label":"Count of records","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___"}},"columnOrder":["caf7421e-93a3-439e-ab0a-fbdead93c21c","13ec79e3-9d73-4536-9056-3d92802bb30a","0233d302-ec81-4fbe-96cb-7fac84cf035c"],"incompleteColumns":{}}}}},"visualization":{"legend":{"isVisible":true,"position":"bottom","legendSize":"auto"},"valueLabels":"hide","fittingFunction":"None","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"},"axisTitlesVisibilitySettings":{"x":true,"yLeft":false,"yRight":true},"tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"preferredSeriesType":"bar_percentage_stacked","layers":[{"layerId":"e80cc05e-c52a-4e5f-ac71-4b37274867f5","accessors":["0233d302-ec81-4fbe-96cb-7fac84cf035c"],"position":"top","seriesType":"bar_percentage_stacked","showGridlines":false,"palette":{"type":"palette","name":"cool"},"xAccessor":"13ec79e3-9d73-4536-9056-3d92802bb30a","splitAccessor":"caf7421e-93a3-439e-ab0a-fbdead93c21c","layerType":"data"}]},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-e80cc05e-c52a-4e5f-ac71-4b37274867f5","type":"index-pattern"}]},"hidePanelTitles":false,"enhancements":{}},"title":"[Flights] Delay Type"},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":58,"w":12,"h":11,"i":"5d53db36-2d5a-4adc-af7b-cec4c1a294e0"},"panelIndex":"5d53db36-2d5a-4adc-af7b-cec4c1a294e0","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsPie","state":{"datasourceStates":{"indexpattern":{"layers":{"0c8e136b-a822-4fb3-836d-e06cbea4eea4":{"columns":{"d1cee8bf-34cf-4141-99d7-ff043ee77b56":{"label":"Top values of FlightDelayType","dataType":"string","operationType":"terms","scale":"ordinal","sourceField":"FlightDelayType","isBucketed":true,"params":{"size":10,"orderBy":{"type":"column","columnId":"aa152ace-ee2d-447b-b86d-459bef4d7880"},"orderDirection":"desc","otherBucket":true,"missingBucket":false}},"aa152ace-ee2d-447b-b86d-459bef4d7880":{"label":"Count of records","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___"}},"columnOrder":["d1cee8bf-34cf-4141-99d7-ff043ee77b56","aa152ace-ee2d-447b-b86d-459bef4d7880"],"incompleteColumns":{}}}}},"visualization":{"shape":"pie","palette":{"type":"palette","name":"cool"},"layers":[{"layerId":"0c8e136b-a822-4fb3-836d-e06cbea4eea4","metric":"aa152ace-ee2d-447b-b86d-459bef4d7880","numberDisplay":"percent","categoryDisplay":"default","legendDisplay":"default","nestedLegend":false,"layerType":"data","legendSize":"auto","primaryGroups":["d1cee8bf-34cf-4141-99d7-ff043ee77b56"]}]},"query":{"query":"","language":"kuery"},"filters":[{"meta":{"type":"phrase","key":"FlightDelayType","params":{"query":"No Delay"},"disabled":false,"negate":true,"alias":null,"index":"filter-index-pattern-0"},"query":{"match_phrase":{"FlightDelayType":"No Delay"}},"$state":{"store":"appState"}}]},"references":[{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-0c8e136b-a822-4fb3-836d-e06cbea4eea4","type":"index-pattern"},{"id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"filter-index-pattern-0","type":"index-pattern"}]},"enhancements":{},"hidePanelTitles":false},"title":"[Flights] Delay Type"}]',
+ optionsJSON: '{"hidePanelTitles":false,"useMargins":true}',
+ version: 1,
+ timeRestore: true,
+ timeTo: 'now',
+ timeFrom: 'now-7d',
+ refreshInterval: {
+ pause: true,
+ value: 0,
+ },
+ controlGroupInput: {
+ controlStyle: 'oneLine',
+ chainingSystem: 'HIERARCHICAL',
+ panelsJSON:
+ '{"85b632c8-3b7b-408d-8223-b0caccf75bd3":{"order":0,"width":"small","grow":true,"type":"optionsListControl","explicitInput":{"title":"Origin City","fieldName":"OriginCityName","id":"85b632c8-3b7b-408d-8223-b0caccf75bd3","selectedOptions":[],"enhancements":{}}},"d4dc9d2b-5850-402a-921d-8a2cd0107156":{"order":1,"width":"small","grow":true,"type":"optionsListControl","explicitInput":{"title":"Destination City","fieldName":"DestCityName","id":"d4dc9d2b-5850-402a-921d-8a2cd0107156","enhancements":{}}},"bee4a16a-f5c1-40b2-887e-db1b9ad9e15f":{"order":2,"width":"small","grow":true,"type":"rangeSliderControl","explicitInput":{"title":"Average Ticket Price","fieldName":"AvgTicketPrice","id":"bee4a16a-f5c1-40b2-887e-db1b9ad9e15f","enhancements":{}}}}',
+ ignoreParentSettingsJSON:
+ '{"ignoreFilters":false,"ignoreQuery":false,"ignoreTimerange":false,"ignoreValidations":false}',
+ },
+ kibanaSavedObjectMeta: {
+ searchSourceJSON:
+ '{"query":{"language":"kuery","query":""},"highlightAll":true,"version":true,"filter":[]}',
+ },
+ },
references: [
{
- id: '571aaf70-4c88-11e8-b3d7-01146121b73d',
name: '4:panel_4',
type: 'search',
+ id: '571aaf70-4c88-11e8-b3d7-01146121b73d',
},
{
- id: 'bcb63b50-4c89-11e8-b3d7-01146121b73d',
name: '7:panel_7',
type: 'visualization',
+ id: 'bcb63b50-4c89-11e8-b3d7-01146121b73d',
},
{
- id: '9886b410-4c8b-11e8-b3d7-01146121b73d',
name: '10:panel_10',
type: 'visualization',
+ id: '9886b410-4c8b-11e8-b3d7-01146121b73d',
},
{
- id: '293b5a30-4c8f-11e8-b3d7-01146121b73d',
name: '21:panel_21',
type: 'visualization',
+ id: '293b5a30-4c8f-11e8-b3d7-01146121b73d',
},
{
- id: '334084f0-52fd-11e8-a160-89cc2ad9e8e2',
name: '23:panel_23',
type: 'visualization',
+ id: '334084f0-52fd-11e8-a160-89cc2ad9e8e2',
},
{
- id: 'ed78a660-53a0-11e8-acbd-0be0ad9d822b',
name: '31:panel_31',
type: 'visualization',
+ id: 'ed78a660-53a0-11e8-acbd-0be0ad9d822b',
},
{
id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: 'aa810aa2-29c9-4a75-b39e-f4f267de1732:control_aa810aa2-29c9-4a75-b39e-f4f267de1732_0_index_pattern',
- type: 'index-pattern',
- },
- {
- id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: 'aa810aa2-29c9-4a75-b39e-f4f267de1732:control_aa810aa2-29c9-4a75-b39e-f4f267de1732_1_index_pattern',
- type: 'index-pattern',
- },
- {
- id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: 'aa810aa2-29c9-4a75-b39e-f4f267de1732:control_aa810aa2-29c9-4a75-b39e-f4f267de1732_2_index_pattern',
- type: 'index-pattern',
- },
- {
- id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: '086ac2e9-dd16-4b45-92b8-1e43ff7e3f65:indexpattern-datasource-current-indexpattern',
+ name: '392b4936-f753-47bc-a98d-a4e41a0a4cd4:indexpattern-datasource-current-indexpattern',
type: 'index-pattern',
},
{
id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: '086ac2e9-dd16-4b45-92b8-1e43ff7e3f65:indexpattern-datasource-layer-03c34665-471c-49c7-acf1-5a11f517421c',
+ name: '392b4936-f753-47bc-a98d-a4e41a0a4cd4:indexpattern-datasource-layer-8fa993db-c147-4954-adf7-4ff264d42576',
type: 'index-pattern',
},
{
@@ -328,6 +347,16 @@ export const getSavedObjects = (): SavedObject[] => [
name: '2e33ade5-96e5-40b4-b460-493e5d4fa834:filter-index-pattern-0',
type: 'index-pattern',
},
+ {
+ id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
+ name: '086ac2e9-dd16-4b45-92b8-1e43ff7e3f65:indexpattern-datasource-current-indexpattern',
+ type: 'index-pattern',
+ },
+ {
+ id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
+ name: '086ac2e9-dd16-4b45-92b8-1e43ff7e3f65:indexpattern-datasource-layer-03c34665-471c-49c7-acf1-5a11f517421c',
+ type: 'index-pattern',
+ },
{
id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
name: 'fb86b32f-fb7a-45cf-9511-f366fef51bbd:indexpattern-datasource-current-indexpattern',
@@ -340,67 +369,48 @@ export const getSavedObjects = (): SavedObject[] => [
},
{
id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: '5d53db36-2d5a-4adc-af7b-cec4c1a294e0:indexpattern-datasource-current-indexpattern',
+ name: '0cc42484-16f7-42ec-b38c-9bf8be69cde7:indexpattern-datasource-current-indexpattern',
type: 'index-pattern',
},
{
id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: '5d53db36-2d5a-4adc-af7b-cec4c1a294e0:indexpattern-datasource-layer-0c8e136b-a822-4fb3-836d-e06cbea4eea4',
+ name: '0cc42484-16f7-42ec-b38c-9bf8be69cde7:indexpattern-datasource-layer-e80cc05e-c52a-4e5f-ac71-4b37274867f5',
type: 'index-pattern',
},
{
id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: '5d53db36-2d5a-4adc-af7b-cec4c1a294e0:filter-index-pattern-0',
+ name: '5d53db36-2d5a-4adc-af7b-cec4c1a294e0:indexpattern-datasource-current-indexpattern',
type: 'index-pattern',
},
{
id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: '0cc42484-16f7-42ec-b38c-9bf8be69cde7:indexpattern-datasource-current-indexpattern',
+ name: '5d53db36-2d5a-4adc-af7b-cec4c1a294e0:indexpattern-datasource-layer-0c8e136b-a822-4fb3-836d-e06cbea4eea4',
type: 'index-pattern',
},
{
id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: '0cc42484-16f7-42ec-b38c-9bf8be69cde7:indexpattern-datasource-layer-e80cc05e-c52a-4e5f-ac71-4b37274867f5',
+ name: '5d53db36-2d5a-4adc-af7b-cec4c1a294e0:filter-index-pattern-0',
type: 'index-pattern',
},
{
- id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: '392b4936-f753-47bc-a98d-a4e41a0a4cd4:indexpattern-datasource-current-indexpattern',
+ name: 'controlGroup_85b632c8-3b7b-408d-8223-b0caccf75bd3:optionsListDataView',
type: 'index-pattern',
+ id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
},
{
+ name: 'controlGroup_d4dc9d2b-5850-402a-921d-8a2cd0107156:optionsListDataView',
+ type: 'index-pattern',
id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
- name: '392b4936-f753-47bc-a98d-a4e41a0a4cd4:indexpattern-datasource-layer-8fa993db-c147-4954-adf7-4ff264d42576',
+ },
+ {
+ name: 'controlGroup_bee4a16a-f5c1-40b2-887e-db1b9ad9e15f:rangeSliderDataView',
type: 'index-pattern',
+ id: 'd3d7af60-4c81-11e8-b3d7-01146121b73d',
},
],
migrationVersion: {
- dashboard: '7.14.0',
- },
- attributes: {
- title: i18n.translate('home.sampleData.flightsSpec.globalFlightDashboardTitle', {
- defaultMessage: '[Flights] Global Flight Dashboard',
- }),
- hits: 0,
- description: i18n.translate('home.sampleData.flightsSpec.globalFlightDashboardDescription', {
- defaultMessage:
- 'Analyze mock flight data for ES-Air, Logstash Airways, Kibana Airlines and JetBeats',
- }),
- panelsJSON:
- '[{"version":"7.14.0","type":"search","gridData":{"x":0,"y":68,"w":48,"h":15,"i":"4"},"panelIndex":"4","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_4"},{"version":"7.14.0","type":"visualization","gridData":{"x":0,"y":15,"w":24,"h":9,"i":"7"},"panelIndex":"7","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_7"},{"version":"7.14.0","type":"visualization","gridData":{"x":0,"y":57,"w":24,"h":11,"i":"10"},"panelIndex":"10","embeddableConfig":{"vis":{"colors":{"Count":"#1F78C1"},"legendOpen":false},"enhancements":{}},"panelRefName":"panel_10"},{"version":"7.14.0","type":"visualization","gridData":{"x":36,"y":57,"w":12,"h":11,"i":"21"},"panelIndex":"21","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_21"},{"version":"7.14.0","type":"map","gridData":{"x":0,"y":35,"w":24,"h":22,"i":"23"},"panelIndex":"23","embeddableConfig":{"isLayerTOCOpen":true,"enhancements":{},"mapCenter":{"lat":34.65823,"lon":-112.44472,"zoom":4.28},"mapBuffer":{"minLon":-135,"minLat":21.94305,"maxLon":-90,"maxLat":48.9225},"openTOCDetails":[],"hiddenLayers":[]},"panelRefName":"panel_23"},{"version":"7.14.0","type":"visualization","gridData":{"x":24,"y":35,"w":24,"h":22,"i":"31"},"panelIndex":"31","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_31"},{"version":"7.14.0","type":"visualization","gridData":{"x":0,"y":0,"w":32,"h":7,"i":"aa810aa2-29c9-4a75-b39e-f4f267de1732"},"panelIndex":"aa810aa2-29c9-4a75-b39e-f4f267de1732","embeddableConfig":{"savedVis":{"title":"[Flights] Controls","description":"","type":"input_control_vis","params":{"controls":[{"id":"1525098134264","fieldName":"OriginCityName","parent":"","label":"Origin City","type":"list","options":{"type":"terms","multiselect":true,"size":100,"order":"desc"},"indexPatternRefName":"control_aa810aa2-29c9-4a75-b39e-f4f267de1732_0_index_pattern"},{"id":"1525099277699","fieldName":"DestCityName","parent":"1525098134264","label":"Destination City","type":"list","options":{"type":"terms","multiselect":true,"size":100,"order":"desc"},"indexPatternRefName":"control_aa810aa2-29c9-4a75-b39e-f4f267de1732_1_index_pattern"},{"id":"1525099307278","fieldName":"AvgTicketPrice","parent":"","label":"Average Ticket Price","type":"range","options":{"decimalPlaces":0,"step":10},"indexPatternRefName":"control_aa810aa2-29c9-4a75-b39e-f4f267de1732_2_index_pattern"}],"updateFiltersOnChange":false,"useTimeFilter":true,"pinFilters":false},"uiState":{},"data":{"aggs":[],"searchSource":{}}},"hidePanelTitles":true,"enhancements":{}}},{"version":"7.14.0","type":"visualization","gridData":{"x":32,"y":0,"w":16,"h":7,"i":"6afc61f7-e2d5-45a3-9e7a-281160ad3eb9"},"panelIndex":"6afc61f7-e2d5-45a3-9e7a-281160ad3eb9","embeddableConfig":{"savedVis":{"title":"[Flights] Markdown Instructions","description":"","type":"markdown","params":{"fontSize":10,"openLinksInNewTab":true,"markdown":"## Sample Flight data\\nThis dashboard contains sample data for you to play with. You can view it, search it, and interact with the visualizations. For more information about Kibana, check our [docs](https://www.elastic.co/guide/en/kibana/current/index.html)."},"uiState":{},"data":{"aggs":[],"searchSource":{}}},"hidePanelTitles":true,"enhancements":{}}},{"version":"7.14.0","type":"lens","gridData":{"x":0,"y":7,"w":24,"h":8,"i":"086ac2e9-dd16-4b45-92b8-1e43ff7e3f65"},"panelIndex":"086ac2e9-dd16-4b45-92b8-1e43ff7e3f65","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsXY","state":{"datasourceStates":{"indexpattern":{"layers":{"03c34665-471c-49c7-acf1-5a11f517421c":{"columns":{"a5b94e30-4e77-4b0a-9187-1d8b13de1456":{"label":"timestamp","dataType":"date","operationType":"date_histogram","sourceField":"timestamp","isBucketed":true,"scale":"interval","params":{"interval":"auto"}},"3e267327-7317-4310-aee3-320e0f7c1e70":{"label":"Count of records","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records"}},"columnOrder":["a5b94e30-4e77-4b0a-9187-1d8b13de1456","3e267327-7317-4310-aee3-320e0f7c1e70"],"incompleteColumns":{}}}}},"visualization":{"legend":{"isVisible":true,"position":"right"},"valueLabels":"hide","fittingFunction":"None","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"custom","lowerBound":0,"upperBound":1},"axisTitlesVisibilitySettings":{"x":false,"yLeft":false,"yRight":true},"tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"preferredSeriesType":"bar_stacked","layers":[{"layerId":"03c34665-471c-49c7-acf1-5a11f517421c","accessors":["3e267327-7317-4310-aee3-320e0f7c1e70"],"position":"top","seriesType":"bar_stacked","showGridlines":false,"xAccessor":"a5b94e30-4e77-4b0a-9187-1d8b13de1456"}]},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-03c34665-471c-49c7-acf1-5a11f517421c"}]},"hidePanelTitles":false,"enhancements":{}},"title":"[Flights] Flight count"},{"version":"7.14.0","type":"lens","gridData":{"x":24,"y":7,"w":8,"h":8,"i":"392b4936-f753-47bc-a98d-a4e41a0a4cd4"},"panelIndex":"392b4936-f753-47bc-a98d-a4e41a0a4cd4","embeddableConfig":{"enhancements":{},"attributes":{"title":"[Flights] Total Flights","description":"","visualizationType":"lnsMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"8fa993db-c147-4954-adf7-4ff264d42576":{"columns":{"81124c45-6ab6-42f4-8859-495d55eb8065":{"label":"Total flights","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true}},"columnOrder":["81124c45-6ab6-42f4-8859-495d55eb8065"],"incompleteColumns":{}}}}},"visualization":{"layerId":"8fa993db-c147-4954-adf7-4ff264d42576","accessor":"81124c45-6ab6-42f4-8859-495d55eb8065"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-8fa993db-c147-4954-adf7-4ff264d42576"}]},"hidePanelTitles":true}},{"version":"7.14.0","type":"lens","gridData":{"x":32,"y":7,"w":8,"h":4,"i":"9271deff-5a61-4665-83fc-f9fdc6bf0c0b"},"panelIndex":"9271deff-5a61-4665-83fc-f9fdc6bf0c0b","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"b4712d43-1e84-4f5b-878d-8e38ba748317":{"columns":{"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0":{"label":"Part of count(kql=\'FlightDelay : true\') / count()","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","filter":{"query":"FlightDelay : true","language":"kuery"},"customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1":{"label":"Part of count(kql=\'FlightDelay : true\') / count()","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2":{"label":"Part of count(kql=\'FlightDelay : true\') / count()","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1"],"location":{"min":0,"max":41},"text":"count(kql=\'FlightDelay : true\') / count()"}},"references":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1"],"customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ec":{"label":"Delayed","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'FlightDelay : true\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2"],"customLabel":true}},"columnOrder":["7e8fe9b1-f45c-4f3d-9561-30febcd357ec","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2"],"incompleteColumns":{}}}}},"visualization":{"layerId":"b4712d43-1e84-4f5b-878d-8e38ba748317","accessor":"7e8fe9b1-f45c-4f3d-9561-30febcd357ec"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-b4712d43-1e84-4f5b-878d-8e38ba748317"}]},"enhancements":{}}},{"version":"7.14.0","type":"lens","gridData":{"x":40,"y":7,"w":8,"h":4,"i":"aa591c29-1a31-4ee1-a71d-b829c06fd162"},"panelIndex":"aa591c29-1a31-4ee1-a71d-b829c06fd162","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"b4712d43-1e84-4f5b-878d-8e38ba748317":{"columns":{"c7851241-5526-499a-960b-357af8c2ce5bX0":{"label":"Part of Delayed","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5bX1":{"label":"Part of Delayed","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","timeShift":"1w","customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5bX2":{"label":"Part of Delayed","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"subtract","args":[{"type":"function","name":"divide","args":["c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"location":{"min":0,"max":28},"text":"count() / count(shift=\'1w\') "},1],"location":{"min":0,"max":31},"text":"count() / count(shift=\'1w\') - 1"}},"references":["c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5b":{"label":"Delayed vs 1 week earlier","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count() / count(shift=\'1w\') - 1","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["c7851241-5526-499a-960b-357af8c2ce5bX2"],"customLabel":true}},"columnOrder":["c7851241-5526-499a-960b-357af8c2ce5b","c7851241-5526-499a-960b-357af8c2ce5bX2","c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"incompleteColumns":{}}}}},"visualization":{"layerId":"b4712d43-1e84-4f5b-878d-8e38ba748317","accessor":"c7851241-5526-499a-960b-357af8c2ce5b"},"query":{"query":"","language":"kuery"},"filters":[{"meta":{"alias":null,"negate":false,"disabled":false,"type":"phrase","key":"FlightDelay","params":{"query":true},"indexRefName":"filter-index-pattern-0"},"query":{"match_phrase":{"FlightDelay":true}},"$state":{"store":"appState"}}]},"references":[{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-b4712d43-1e84-4f5b-878d-8e38ba748317"},{"name":"filter-index-pattern-0","type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d"}]},"enhancements":{}}},{"version":"7.14.0","type":"lens","gridData":{"x":32,"y":11,"w":8,"h":4,"i":"b766e3b8-4544-46ed-99e6-9ecc4847e2a2"},"panelIndex":"b766e3b8-4544-46ed-99e6-9ecc4847e2a2","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"b4712d43-1e84-4f5b-878d-8e38ba748317":{"columns":{"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0":{"label":"Part of Cancelled","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","filter":{"query":"Cancelled : true","language":"kuery"},"customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1":{"label":"Part of Cancelled","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2":{"label":"Part of Cancelled","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1"],"location":{"min":0,"max":39},"text":"count(kql=\'Cancelled : true\') / count()"}},"references":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1"],"customLabel":true},"7e8fe9b1-f45c-4f3d-9561-30febcd357ec":{"label":"Cancelled","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'Cancelled : true\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2"],"customLabel":true}},"columnOrder":["7e8fe9b1-f45c-4f3d-9561-30febcd357ec","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX0","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX1","7e8fe9b1-f45c-4f3d-9561-30febcd357ecX2"],"incompleteColumns":{}}}}},"visualization":{"layerId":"b4712d43-1e84-4f5b-878d-8e38ba748317","accessor":"7e8fe9b1-f45c-4f3d-9561-30febcd357ec"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-b4712d43-1e84-4f5b-878d-8e38ba748317"}]},"enhancements":{}}},{"version":"7.14.0","type":"lens","gridData":{"x":40,"y":11,"w":8,"h":4,"i":"2e33ade5-96e5-40b4-b460-493e5d4fa834"},"panelIndex":"2e33ade5-96e5-40b4-b460-493e5d4fa834","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"b4712d43-1e84-4f5b-878d-8e38ba748317":{"columns":{"c7851241-5526-499a-960b-357af8c2ce5bX0":{"label":"Part of Delayed vs 1 week earlier","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5bX1":{"label":"Part of Delayed vs 1 week earlier","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","timeShift":"1w","customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5bX2":{"label":"Part of Delayed vs 1 week earlier","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"subtract","args":[{"type":"function","name":"divide","args":["c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"location":{"min":0,"max":28},"text":"count() / count(shift=\'1w\') "},1],"location":{"min":0,"max":31},"text":"count() / count(shift=\'1w\') - 1"}},"references":["c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"customLabel":true},"c7851241-5526-499a-960b-357af8c2ce5b":{"label":"Cancelled vs 1 week earlier","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count() / count(shift=\'1w\') - 1","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["c7851241-5526-499a-960b-357af8c2ce5bX2"],"customLabel":true}},"columnOrder":["c7851241-5526-499a-960b-357af8c2ce5b","c7851241-5526-499a-960b-357af8c2ce5bX2","c7851241-5526-499a-960b-357af8c2ce5bX0","c7851241-5526-499a-960b-357af8c2ce5bX1"],"incompleteColumns":{}}}}},"visualization":{"layerId":"b4712d43-1e84-4f5b-878d-8e38ba748317","accessor":"c7851241-5526-499a-960b-357af8c2ce5b"},"query":{"query":"","language":"kuery"},"filters":[{"meta":{"alias":null,"negate":false,"disabled":false,"type":"phrase","key":"Cancelled","params":{"query":true},"indexRefName":"filter-index-pattern-0"},"query":{"match_phrase":{"Cancelled":true}},"$state":{"store":"appState"}}]},"references":[{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-b4712d43-1e84-4f5b-878d-8e38ba748317"},{"name":"filter-index-pattern-0","type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d"}]},"enhancements":{}}},{"version":"7.14.0","type":"lens","gridData":{"x":24,"y":15,"w":24,"h":20,"i":"fb86b32f-fb7a-45cf-9511-f366fef51bbd"},"panelIndex":"fb86b32f-fb7a-45cf-9511-f366fef51bbd","embeddableConfig":{"attributes":{"title":"Cities by delay, cancellation","type":"lens","visualizationType":"lnsDatatable","state":{"datasourceStates":{"indexpattern":{"layers":{"f26e8f7a-4118-4227-bea0-5c02d8b270f7":{"columns":{"3dd24cb4-45ef-4dd8-b22a-d7b802cb6da0":{"label":"Top values of OriginCityName","dataType":"string","operationType":"terms","scale":"ordinal","sourceField":"OriginCityName","isBucketed":true,"params":{"size":1000,"orderBy":{"type":"alphabetical","fallback":true},"orderDirection":"asc","otherBucket":true,"missingBucket":false}},"52f6f2e9-6242-4c44-be63-b799150e7e60X0":{"label":"Part of Delay %","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","filter":{"query":"FlightDelay : true ","language":"kuery"},"customLabel":true},"52f6f2e9-6242-4c44-be63-b799150e7e60X1":{"label":"Part of Delay %","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"52f6f2e9-6242-4c44-be63-b799150e7e60X2":{"label":"Part of Delay %","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["52f6f2e9-6242-4c44-be63-b799150e7e60X0","52f6f2e9-6242-4c44-be63-b799150e7e60X1"],"location":{"min":0,"max":42},"text":"count(kql=\'FlightDelay : true \') / count()"}},"references":["52f6f2e9-6242-4c44-be63-b799150e7e60X0","52f6f2e9-6242-4c44-be63-b799150e7e60X1"],"customLabel":true},"52f6f2e9-6242-4c44-be63-b799150e7e60":{"label":"Delay %","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'FlightDelay : true \') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":0}}},"references":["52f6f2e9-6242-4c44-be63-b799150e7e60X2"],"customLabel":true},"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X0":{"label":"Part of Cancel %","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","filter":{"query":"Cancelled: true","language":"kuery"},"customLabel":true},"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X1":{"label":"Part of Cancel %","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X2":{"label":"Part of Cancel %","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X0","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X1"],"location":{"min":0,"max":38},"text":"count(kql=\'Cancelled: true\') / count()"}},"references":["7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X0","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X1"],"customLabel":true},"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6":{"label":"Cancel %","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'Cancelled: true\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":0}}},"references":["7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X2"],"customLabel":true}},"columnOrder":["3dd24cb4-45ef-4dd8-b22a-d7b802cb6da0","52f6f2e9-6242-4c44-be63-b799150e7e60","52f6f2e9-6242-4c44-be63-b799150e7e60X0","52f6f2e9-6242-4c44-be63-b799150e7e60X1","52f6f2e9-6242-4c44-be63-b799150e7e60X2","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X0","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X1","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6X2","7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6"],"incompleteColumns":{}}}}},"visualization":{"columns":[{"isTransposed":false,"columnId":"3dd24cb4-45ef-4dd8-b22a-d7b802cb6da0","width":262.75},{"columnId":"52f6f2e9-6242-4c44-be63-b799150e7e60","isTransposed":false,"width":302.5,"colorMode":"cell","palette":{"name":"custom","type":"palette","params":{"steps":5,"stops":[{"color":"#f7e0b8","stop":0.6},{"color":"#e7664c","stop":1}],"name":"custom","colorStops":[{"color":"#f7e0b8","stop":0.2},{"color":"#e7664c","stop":0.6}],"rangeType":"number","rangeMin":0.2,"rangeMax":0.6}},"alignment":"center"},{"columnId":"7b9f3ece-9da3-4c27-b582-d3f8e8cc31d6","isTransposed":false,"alignment":"center","colorMode":"cell","palette":{"name":"custom","type":"palette","params":{"steps":5,"stops":[{"color":"#f7e0b8","stop":0.6},{"color":"#e7664c","stop":0.6666666666666666}],"rangeType":"number","name":"custom","colorStops":[{"color":"#f7e0b8","stop":0.2},{"color":"#e7664c","stop":0.6}],"rangeMin":0.2,"rangeMax":0.6}}}],"layerId":"f26e8f7a-4118-4227-bea0-5c02d8b270f7","sorting":{"columnId":"52f6f2e9-6242-4c44-be63-b799150e7e60","direction":"desc"}},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-f26e8f7a-4118-4227-bea0-5c02d8b270f7"}]},"enhancements":{},"hidePanelTitles":false},"title":"[Flights] Most delayed cities"},{"version":"7.14.0","type":"lens","gridData":{"x":0,"y":24,"w":24,"h":11,"i":"0cc42484-16f7-42ec-b38c-9bf8be69cde7"},"panelIndex":"0cc42484-16f7-42ec-b38c-9bf8be69cde7","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsXY","state":{"datasourceStates":{"indexpattern":{"layers":{"e80cc05e-c52a-4e5f-ac71-4b37274867f5":{"columns":{"caf7421e-93a3-439e-ab0a-fbdead93c21c":{"label":"Top values of FlightDelayType","dataType":"string","operationType":"terms","scale":"ordinal","sourceField":"FlightDelayType","isBucketed":true,"params":{"size":10,"orderBy":{"type":"column","columnId":"0233d302-ec81-4fbe-96cb-7fac84cf035c"},"orderDirection":"desc","otherBucket":true,"missingBucket":false}},"13ec79e3-9d73-4536-9056-3d92802bb30a":{"label":"timestamp","dataType":"date","operationType":"date_histogram","sourceField":"timestamp","isBucketed":true,"scale":"interval","params":{"interval":"auto"}},"0233d302-ec81-4fbe-96cb-7fac84cf035c":{"label":"Count of records","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records"}},"columnOrder":["caf7421e-93a3-439e-ab0a-fbdead93c21c","13ec79e3-9d73-4536-9056-3d92802bb30a","0233d302-ec81-4fbe-96cb-7fac84cf035c"],"incompleteColumns":{}}}}},"visualization":{"legend":{"isVisible":true,"position":"bottom"},"valueLabels":"hide","fittingFunction":"None","yLeftExtent":{"mode":"full"},"yRightExtent":{"mode":"full"},"axisTitlesVisibilitySettings":{"x":true,"yLeft":false,"yRight":true},"tickLabelsVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"gridlinesVisibilitySettings":{"x":true,"yLeft":true,"yRight":true},"preferredSeriesType":"bar_percentage_stacked","layers":[{"layerId":"e80cc05e-c52a-4e5f-ac71-4b37274867f5","accessors":["0233d302-ec81-4fbe-96cb-7fac84cf035c"],"position":"top","seriesType":"bar_percentage_stacked","showGridlines":false,"palette":{"type":"palette","name":"cool"},"xAccessor":"13ec79e3-9d73-4536-9056-3d92802bb30a","splitAccessor":"caf7421e-93a3-439e-ab0a-fbdead93c21c"}]},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-e80cc05e-c52a-4e5f-ac71-4b37274867f5"}]},"hidePanelTitles":false,"enhancements":{}},"title":"[Flights] Delay Type"},{"version":"7.14.0","type":"lens","gridData":{"x":24,"y":57,"w":12,"h":11,"i":"5d53db36-2d5a-4adc-af7b-cec4c1a294e0"},"panelIndex":"5d53db36-2d5a-4adc-af7b-cec4c1a294e0","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsPie","state":{"datasourceStates":{"indexpattern":{"layers":{"0c8e136b-a822-4fb3-836d-e06cbea4eea4":{"columns":{"d1cee8bf-34cf-4141-99d7-ff043ee77b56":{"label":"Top values of FlightDelayType","dataType":"string","operationType":"terms","scale":"ordinal","sourceField":"FlightDelayType","isBucketed":true,"params":{"size":10,"orderBy":{"type":"column","columnId":"aa152ace-ee2d-447b-b86d-459bef4d7880"},"orderDirection":"desc","otherBucket":true,"missingBucket":false}},"aa152ace-ee2d-447b-b86d-459bef4d7880":{"label":"Count of records","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records"}},"columnOrder":["d1cee8bf-34cf-4141-99d7-ff043ee77b56","aa152ace-ee2d-447b-b86d-459bef4d7880"],"incompleteColumns":{}}}}},"visualization":{"shape":"pie","palette":{"type":"palette","name":"cool"},"layers":[{"layerId":"0c8e136b-a822-4fb3-836d-e06cbea4eea4","groups":["d1cee8bf-34cf-4141-99d7-ff043ee77b56"],"metric":"aa152ace-ee2d-447b-b86d-459bef4d7880","numberDisplay":"percent","categoryDisplay":"default","legendDisplay":"default","nestedLegend":false}]},"query":{"query":"","language":"kuery"},"filters":[{"meta":{"type":"phrase","key":"FlightDelayType","params":{"query":"No Delay"},"disabled":false,"negate":true,"alias":null,"indexRefName":"filter-index-pattern-0"},"query":{"match_phrase":{"FlightDelayType":"No Delay"}},"$state":{"store":"appState"}}]},"references":[{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d","name":"indexpattern-datasource-layer-0c8e136b-a822-4fb3-836d-e06cbea4eea4"},{"name":"filter-index-pattern-0","type":"index-pattern","id":"d3d7af60-4c81-11e8-b3d7-01146121b73d"}]},"enhancements":{},"hidePanelTitles":false},"title":"[Flights] Delay Type"}]',
- optionsJSON: '{"hidePanelTitles":false,"useMargins":true}',
- version: 1,
- timeRestore: true,
- timeTo: 'now',
- timeFrom: 'now-7d',
- refreshInterval: {
- pause: true,
- value: 0,
- },
- kibanaSavedObjectMeta: {
- searchSourceJSON:
- '{"query":{"language":"kuery","query":""},"filter":[],"highlightAll":true,"version":true}',
- },
+ dashboard: '8.5.0',
},
+ coreMigrationVersion: '8.6.0',
},
];
diff --git a/src/plugins/home/server/services/sample_data/data_sets/logs/saved_objects.ts b/src/plugins/home/server/services/sample_data/data_sets/logs/saved_objects.ts
index b5f57e0edb2e6..5de45e08d0fec 100644
--- a/src/plugins/home/server/services/sample_data/data_sets/logs/saved_objects.ts
+++ b/src/plugins/home/server/services/sample_data/data_sets/logs/saved_objects.ts
@@ -381,48 +381,66 @@ export const getSavedObjects = (): SavedObject[] => [
{
id: 'edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b',
type: 'dashboard',
- updated_at: '2021-10-28T15:07:36.622Z',
- version: '3',
+ namespaces: ['default'],
+ updated_at: '2022-09-26T16:24:51.698Z',
+ version: 'WzE1NTIsMV0=',
+ attributes: {
+ title: i18n.translate('home.sampleData.logsSpec.webTrafficTitle', {
+ defaultMessage: '[Logs] Web Traffic',
+ }),
+ hits: 0,
+ description: i18n.translate('home.sampleData.logsSpec.webTrafficDescription', {
+ defaultMessage: "Analyze mock web traffic log data for Elastic's website",
+ }),
+ panelsJSON:
+ '[{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":14,"w":24,"h":18,"i":"4"},"panelIndex":"4","embeddableConfig":{"isLayerTOCOpen":false,"enhancements":{},"mapCenter":{"lat":42.16337,"lon":-88.92107,"zoom":3.64},"mapBuffer":{"minLon":-112.5,"minLat":21.94305,"maxLon":-45,"maxLat":55.77657},"openTOCDetails":[],"hiddenLayers":[]},"panelRefName":"panel_4"},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":47,"w":24,"h":13,"i":"9"},"panelIndex":"9","embeddableConfig":{"mapCenter":[36.8092847020594,-96.94335937500001],"vis":{"params":{"sort":{"columnIndex":null,"direction":null}}},"enhancements":{}},"panelRefName":"panel_9"},{"version":"8.6.0","type":"visualization","gridData":{"x":36,"y":0,"w":12,"h":7,"i":"11"},"panelIndex":"11","embeddableConfig":{"vis":{"colors":{"0 - 500":"#BF1B00","1000 - 1500":"#7EB26D","500 - 1000":"#F2C96D"},"defaultColors":{"0 - 500":"rgb(165,0,38)","1000 - 1500":"rgb(0,104,55)","500 - 1000":"rgb(255,255,190)"},"legendOpen":false},"enhancements":{},"hidePanelTitles":true},"title":"","panelRefName":"panel_11"},{"version":"8.6.0","type":"visualization","gridData":{"x":24,"y":14,"w":24,"h":33,"i":"14"},"panelIndex":"14","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_14"},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":7,"w":24,"h":7,"i":"15"},"panelIndex":"15","embeddableConfig":{"enhancements":{"dynamicActions":{"events":[]}}},"panelRefName":"panel_15"},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":0,"w":24,"h":7,"i":"343f0bef-0b19-452e-b1c8-59beb18b6f0c"},"panelIndex":"343f0bef-0b19-452e-b1c8-59beb18b6f0c","embeddableConfig":{"savedVis":{"title":"[Logs] Markdown Instructions","description":"","type":"markdown","params":{"fontSize":12,"openLinksInNewTab":true,"markdown":"## Sample Logs Data\\nThis dashboard contains sample data for you to play with. You can view it, search it, and interact with the visualizations. For more information about Kibana, check our [docs](https://www.elastic.co/guide/en/kibana/current/index.html)."},"uiState":{},"data":{"aggs":[],"searchSource":{"query":{"query":"","language":"kuery"},"filter":[]}}},"enhancements":{},"hidePanelTitles":true}},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":0,"w":12,"h":7,"i":"bb94016e-f4a6-49ca-87a9-296a2869d570"},"panelIndex":"bb94016e-f4a6-49ca-87a9-296a2869d570","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsLegacyMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"483defd2-775b-4a62-bdef-496c819bb8ed":{"columns":{"37430d12-7452-4cc9-b035-5cfd4061edf0":{"label":"Visits","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true}},"columnOrder":["37430d12-7452-4cc9-b035-5cfd4061edf0"],"incompleteColumns":{}}}}},"visualization":{"layerId":"483defd2-775b-4a62-bdef-496c819bb8ed","accessor":"37430d12-7452-4cc9-b035-5cfd4061edf0","layerType":"data","textAlign":"center","titlePosition":"bottom","size":"xl"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-483defd2-775b-4a62-bdef-496c819bb8ed","type":"index-pattern"}]},"enhancements":{}}},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":7,"w":12,"h":7,"i":"01d8e435-91c0-484f-a11e-856747050b0a"},"panelIndex":"01d8e435-91c0-484f-a11e-856747050b0a","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsLegacyMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"f3793bb7-3971-4753-866d-4008e77a9f9a":{"columns":{"71c076a6-e782-4866-b8df-5fd85a41f08bX0":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","filter":{"query":"response.keyword >= 400 and response.keyword < 500","language":"kuery"},"customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08bX1":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08bX2":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1"],"location":{"min":0,"max":73},"text":"count(kql=\'response.keyword >= 400 and response.keyword < 500\') / count()"}},"references":["71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1"],"customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08b":{"label":"HTTP 4xx","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'response.keyword >= 400 and response.keyword < 500\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["71c076a6-e782-4866-b8df-5fd85a41f08bX2"],"customLabel":true}},"columnOrder":["71c076a6-e782-4866-b8df-5fd85a41f08b","71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1","71c076a6-e782-4866-b8df-5fd85a41f08bX2"],"incompleteColumns":{}}}}},"visualization":{"layerId":"f3793bb7-3971-4753-866d-4008e77a9f9a","accessor":"71c076a6-e782-4866-b8df-5fd85a41f08b","layerType":"data","textAlign":"center","titlePosition":"bottom","size":"xl"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-f3793bb7-3971-4753-866d-4008e77a9f9a","type":"index-pattern"}]},"enhancements":{}}},{"version":"8.6.0","type":"lens","gridData":{"x":36,"y":7,"w":12,"h":7,"i":"8c1456d4-1993-4ba2-b701-04aca02c9fef"},"panelIndex":"8c1456d4-1993-4ba2-b701-04aca02c9fef","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsLegacyMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"f3793bb7-3971-4753-866d-4008e77a9f9a":{"columns":{"71c076a6-e782-4866-b8df-5fd85a41f08bX0":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","filter":{"query":"response.keyword >= 500","language":"kuery"},"customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08bX1":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08bX2":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1"],"location":{"min":0,"max":46},"text":"count(kql=\'response.keyword >= 500\') / count()"}},"references":["71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1"],"customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08b":{"label":"HTTP 5xx","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'response.keyword >= 500\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["71c076a6-e782-4866-b8df-5fd85a41f08bX2"],"customLabel":true}},"columnOrder":["71c076a6-e782-4866-b8df-5fd85a41f08b","71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1","71c076a6-e782-4866-b8df-5fd85a41f08bX2"],"incompleteColumns":{}}}}},"visualization":{"layerId":"f3793bb7-3971-4753-866d-4008e77a9f9a","accessor":"71c076a6-e782-4866-b8df-5fd85a41f08b","layerType":"data","textAlign":"center","titlePosition":"bottom","size":"xl"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-f3793bb7-3971-4753-866d-4008e77a9f9a","type":"index-pattern"}]},"enhancements":{}}},{"version":"8.6.0","type":"visualization","gridData":{"x":0,"y":32,"w":24,"h":15,"i":"8e59c7cf-6e42-4343-a113-c4a255fcf2ce"},"panelIndex":"8e59c7cf-6e42-4343-a113-c4a255fcf2ce","embeddableConfig":{"savedVis":{"title":"","description":"","type":"vega","params":{"spec":"{\\n $schema: https://vega.github.io/schema/vega-lite/v5.json\\n data: {\\n url: {\\n %context%: true\\n %timefield%: @timestamp\\n index: kibana_sample_data_logs\\n body: {\\n aggs: {\\n countries: {\\n terms: {\\n field: geo.src\\n size: 25\\n }\\n aggs: {\\n hours: {\\n histogram: {\\n field: hour_of_day\\n interval: 1\\n }\\n aggs: {\\n unique: {\\n cardinality: {\\n field: clientip\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n size: 0\\n }\\n }\\n format: {property: \\"aggregations.countries.buckets\\"}\\n }\\n \\n transform: [\\n {\\n flatten: [\\"hours.buckets\\"],\\n as: [\\"buckets\\"]\\n }\\n ]\\n\\n mark: {\\n type: rect\\n tooltip: true\\n }\\n\\n encoding: {\\n x: {\\n field: buckets.key\\n type: ordinal\\n axis: {\\n title: false\\n labelAngle: 0\\n }\\n }\\n y: {\\n field: key\\n type: nominal\\n sort: {\\n field: -buckets.unique.value\\n }\\n axis: {title: false}\\n }\\n color: {\\n field: buckets.unique.value\\n type: quantitative\\n axis: {title: false}\\n scale: {\\n scheme: reds\\n }\\n }\\n }\\n}\\n"},"uiState":{},"data":{"aggs":[],"searchSource":{"query":{"query":"","language":"kuery"},"filter":[]}}},"enhancements":{}},"panelRefName":"panel_8e59c7cf-6e42-4343-a113-c4a255fcf2ce"},{"version":"8.6.0","type":"lens","gridData":{"x":24,"y":47,"w":24,"h":13,"i":"cbca842c-b9fa-4523-9ce0-14e350866e33"},"panelIndex":"cbca842c-b9fa-4523-9ce0-14e350866e33","embeddableConfig":{"hidePanelTitles":false,"enhancements":{}},"title":"[Logs] Bytes distribution","panelRefName":"panel_cbca842c-b9fa-4523-9ce0-14e350866e33"},{"version":"8.6.0","type":"lens","gridData":{"x":0,"y":60,"w":48,"h":19,"i":"1d5f0b3f-d9d2-4b26-997b-83bc5ca3090b"},"panelIndex":"1d5f0b3f-d9d2-4b26-997b-83bc5ca3090b","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsDatatable","state":{"datasourceStates":{"indexpattern":{"layers":{"c35dc8ee-50d1-4ef7-8b4b-9c21a7e7d3b0":{"columns":{"42783ad7-dbcf-4310-bc06-f21f4eaaac96":{"label":"URL","dataType":"string","operationType":"terms","scale":"ordinal","sourceField":"url.keyword","isBucketed":true,"params":{"size":1000,"orderBy":{"type":"column","columnId":"f7835375-4d5b-4839-95ea-41928192a319"},"orderDirection":"desc","otherBucket":true,"missingBucket":false},"customLabel":true},"f7835375-4d5b-4839-95ea-41928192a319":{"label":"Visits","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"07fc84ca-4147-4ba9-879e-d1b4e086e1daX0":{"label":"Part of HTTP 4xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","filter":{"query":"response.keyword >= 400 and response.keyword < 500","language":"kuery"},"customLabel":true},"07fc84ca-4147-4ba9-879e-d1b4e086e1daX1":{"label":"Part of HTTP 4xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"07fc84ca-4147-4ba9-879e-d1b4e086e1daX2":{"label":"Part of HTTP 4xx","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["07fc84ca-4147-4ba9-879e-d1b4e086e1daX0","07fc84ca-4147-4ba9-879e-d1b4e086e1daX1"],"location":{"min":0,"max":73},"text":"count(kql=\'response.keyword >= 400 and response.keyword < 500\') / count()"}},"references":["07fc84ca-4147-4ba9-879e-d1b4e086e1daX0","07fc84ca-4147-4ba9-879e-d1b4e086e1daX1"],"customLabel":true},"07fc84ca-4147-4ba9-879e-d1b4e086e1da":{"label":"HTTP 4xx","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'response.keyword >= 400 and response.keyword < 500\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["07fc84ca-4147-4ba9-879e-d1b4e086e1daX2"],"customLabel":true},"791d5a5b-a7ba-4e9e-b533-51b33c7d7747":{"label":"Unique","dataType":"number","operationType":"unique_count","scale":"ratio","sourceField":"clientip","isBucketed":false,"customLabel":true},"611e3509-e834-4fdd-b573-44e959e95d27":{"label":"95th percentile of bytes","dataType":"number","operationType":"percentile","sourceField":"bytes","isBucketed":false,"scale":"ratio","params":{"percentile":95,"format":{"id":"bytes","params":{"decimals":0}}}},"9f79ecca-123f-4098-a658-6b0e998da003":{"label":"Median of bytes","dataType":"number","operationType":"median","sourceField":"bytes","isBucketed":false,"scale":"ratio","params":{"format":{"id":"bytes","params":{"decimals":0}}}},"491285fd-0196-402c-9b7f-4660fdc1c22aX0":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","filter":{"query":"response.keyword >= 500","language":"kuery"},"customLabel":true},"491285fd-0196-402c-9b7f-4660fdc1c22aX1":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"___records___","customLabel":true},"491285fd-0196-402c-9b7f-4660fdc1c22aX2":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["491285fd-0196-402c-9b7f-4660fdc1c22aX0","491285fd-0196-402c-9b7f-4660fdc1c22aX1"],"location":{"min":0,"max":46},"text":"count(kql=\'response.keyword >= 500\') / count()"}},"references":["491285fd-0196-402c-9b7f-4660fdc1c22aX0","491285fd-0196-402c-9b7f-4660fdc1c22aX1"],"customLabel":true},"491285fd-0196-402c-9b7f-4660fdc1c22a":{"label":"HTTP 5xx","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'response.keyword >= 500\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["491285fd-0196-402c-9b7f-4660fdc1c22aX2"],"customLabel":true}},"columnOrder":["42783ad7-dbcf-4310-bc06-f21f4eaaac96","f7835375-4d5b-4839-95ea-41928192a319","791d5a5b-a7ba-4e9e-b533-51b33c7d7747","07fc84ca-4147-4ba9-879e-d1b4e086e1da","491285fd-0196-402c-9b7f-4660fdc1c22a","491285fd-0196-402c-9b7f-4660fdc1c22aX0","491285fd-0196-402c-9b7f-4660fdc1c22aX1","491285fd-0196-402c-9b7f-4660fdc1c22aX2","07fc84ca-4147-4ba9-879e-d1b4e086e1daX0","07fc84ca-4147-4ba9-879e-d1b4e086e1daX1","07fc84ca-4147-4ba9-879e-d1b4e086e1daX2","611e3509-e834-4fdd-b573-44e959e95d27","9f79ecca-123f-4098-a658-6b0e998da003"],"incompleteColumns":{}}}}},"visualization":{"layerId":"c35dc8ee-50d1-4ef7-8b4b-9c21a7e7d3b0","columns":[{"columnId":"42783ad7-dbcf-4310-bc06-f21f4eaaac96","width":650.6666666666666},{"columnId":"f7835375-4d5b-4839-95ea-41928192a319"},{"columnId":"491285fd-0196-402c-9b7f-4660fdc1c22a","isTransposed":false,"width":81.66666666666669,"colorMode":"cell","palette":{"name":"custom","type":"palette","params":{"steps":5,"stops":[{"color":"#fbddd6","stop":0.1},{"color":"#CC5642","stop":1}],"rangeType":"number","name":"custom","colorStops":[{"color":"#fbddd6","stop":0.05},{"color":"#CC5642","stop":0.1}],"rangeMin":0.05,"rangeMax":0.1}}},{"columnId":"07fc84ca-4147-4ba9-879e-d1b4e086e1da","isTransposed":false,"colorMode":"cell","palette":{"name":"custom","type":"palette","params":{"steps":5,"stops":[{"color":"#fbddd6","stop":0.1},{"color":"#cc5642","stop":1.1}],"name":"custom","colorStops":[{"color":"#fbddd6","stop":0.05},{"color":"#cc5642","stop":0.1}],"rangeType":"number","rangeMin":0.05,"rangeMax":0.1}}},{"columnId":"791d5a5b-a7ba-4e9e-b533-51b33c7d7747","isTransposed":false},{"columnId":"611e3509-e834-4fdd-b573-44e959e95d27","isTransposed":false},{"columnId":"9f79ecca-123f-4098-a658-6b0e998da003","isTransposed":false}],"sorting":{"columnId":"491285fd-0196-402c-9b7f-4660fdc1c22a","direction":"desc"},"layerType":"data","rowHeight":"single","rowHeightLines":1},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern","type":"index-pattern"},{"id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-c35dc8ee-50d1-4ef7-8b4b-9c21a7e7d3b0","type":"index-pattern"}]},"enhancements":{"dynamicActions":{"events":[]}},"hidePanelTitles":false},"title":"[Logs] Errors by host"}]',
+ optionsJSON: '{"hidePanelTitles":false,"useMargins":true}',
+ version: 2,
+ timeRestore: true,
+ timeTo: 'now',
+ timeFrom: 'now-7d',
+ refreshInterval: {
+ pause: false,
+ value: 900000,
+ },
+ controlGroupInput: {
+ controlStyle: 'oneLine',
+ chainingSystem: 'HIERARCHICAL',
+ panelsJSON:
+ '{"612f8db8-9ba9-41cf-a809-d133fe9b83a8":{"order":0,"width":"small","grow":true,"type":"optionsListControl","explicitInput":{"fieldName":"geo.src","title":"Source Country","id":"612f8db8-9ba9-41cf-a809-d133fe9b83a8","enhancements":{}}},"9807212f-5078-4c42-879c-6f28b3033fc9":{"order":1,"width":"small","grow":true,"type":"optionsListControl","explicitInput":{"fieldName":"machine.os.keyword","parentFieldName":"machine.os","title":"OS","id":"9807212f-5078-4c42-879c-6f28b3033fc9","enhancements":{}}},"6bf7a1b4-282e-43ac-aa46-81b97fa3acae":{"order":2,"width":"small","grow":true,"type":"rangeSliderControl","explicitInput":{"fieldName":"bytes","title":"Bytes","id":"6bf7a1b4-282e-43ac-aa46-81b97fa3acae","enhancements":{}}}}',
+ ignoreParentSettingsJSON:
+ '{"ignoreFilters":false,"ignoreQuery":false,"ignoreTimerange":false,"ignoreValidations":false}',
+ },
+ kibanaSavedObjectMeta: {
+ searchSourceJSON:
+ '{"query":{"language":"kuery","query":""},"highlightAll":true,"version":true,"filter":[]}',
+ },
+ },
references: [
{
- id: '06cf9c40-9ee8-11e7-8711-e7a007dcef99',
name: '4:panel_4',
type: 'visualization',
+ id: '06cf9c40-9ee8-11e7-8711-e7a007dcef99',
},
{
- id: '4eb6e500-e1c7-11e7-b6d5-4dc382ef7f5b',
name: '9:panel_9',
type: 'visualization',
+ id: '4eb6e500-e1c7-11e7-b6d5-4dc382ef7f5b',
},
{
- id: '69a34b00-9ee8-11e7-8711-e7a007dcef99',
name: '11:panel_11',
type: 'visualization',
+ id: '69a34b00-9ee8-11e7-8711-e7a007dcef99',
},
{
- id: '7cbd2350-2223-11e8-b802-5bcf64c2cfb4',
name: '14:panel_14',
type: 'visualization',
+ id: '7cbd2350-2223-11e8-b802-5bcf64c2cfb4',
},
{
- id: '314c6f60-2224-11e8-b802-5bcf64c2cfb4',
name: '15:panel_15',
type: 'visualization',
- },
- {
- id: '90943e30-9a47-11e8-b64d-95841ca0b247',
- name: '30326cdb-4ddd-49eb-a4f1-b555caa21d7c:control_30326cdb-4ddd-49eb-a4f1-b555caa21d7c_0_index_pattern',
- type: 'index-pattern',
- },
- {
- id: '90943e30-9a47-11e8-b64d-95841ca0b247',
- name: '30326cdb-4ddd-49eb-a4f1-b555caa21d7c:control_30326cdb-4ddd-49eb-a4f1-b555caa21d7c_1_index_pattern',
- type: 'index-pattern',
- },
- {
- id: '90943e30-9a47-11e8-b64d-95841ca0b247',
- name: '30326cdb-4ddd-49eb-a4f1-b555caa21d7c:control_30326cdb-4ddd-49eb-a4f1-b555caa21d7c_2_index_pattern',
- type: 'index-pattern',
+ id: '314c6f60-2224-11e8-b802-5bcf64c2cfb4',
},
{
id: '90943e30-9a47-11e8-b64d-95841ca0b247',
@@ -455,9 +473,14 @@ export const getSavedObjects = (): SavedObject[] => [
type: 'index-pattern',
},
{
- id: 'cb099a20-ea66-11eb-9425-113343a037e3',
name: '8e59c7cf-6e42-4343-a113-c4a255fcf2ce:panel_8e59c7cf-6e42-4343-a113-c4a255fcf2ce',
type: 'visualization',
+ id: 'cb099a20-ea66-11eb-9425-113343a037e3',
+ },
+ {
+ name: 'cbca842c-b9fa-4523-9ce0-14e350866e33:panel_cbca842c-b9fa-4523-9ce0-14e350866e33',
+ type: 'lens',
+ id: '16b1d7d0-ea71-11eb-8b4b-f7b600de0f7d',
},
{
id: '90943e30-9a47-11e8-b64d-95841ca0b247',
@@ -470,38 +493,25 @@ export const getSavedObjects = (): SavedObject[] => [
type: 'index-pattern',
},
{
- id: '16b1d7d0-ea71-11eb-8b4b-f7b600de0f7d',
- name: 'cbca842c-b9fa-4523-9ce0-14e350866e33:panel_cbca842c-b9fa-4523-9ce0-14e350866e33',
- type: 'lens',
+ name: 'controlGroup_612f8db8-9ba9-41cf-a809-d133fe9b83a8:optionsListDataView',
+ type: 'index-pattern',
+ id: '90943e30-9a47-11e8-b64d-95841ca0b247',
},
- ],
- migrationVersion: {
- dashboard: '7.14.0',
- },
- attributes: {
- title: i18n.translate('home.sampleData.logsSpec.webTrafficTitle', {
- defaultMessage: '[Logs] Web Traffic',
- }),
- hits: 0,
- description: i18n.translate('home.sampleData.logsSpec.webTrafficDescription', {
- defaultMessage: "Analyze mock web traffic log data for Elastic's website",
- }),
- panelsJSON:
- '[{"version":"8.0.0","type":"map","gridData":{"x":0,"y":19,"w":24,"h":18,"i":"4"},"panelIndex":"4","embeddableConfig":{"isLayerTOCOpen":false,"enhancements":{},"mapCenter":{"lat":42.16337,"lon":-88.92107,"zoom":3.64},"mapBuffer":{"minLon":-112.5,"minLat":21.94305,"maxLon":-45,"maxLat":55.77657},"openTOCDetails":[],"hiddenLayers":[]},"panelRefName":"panel_4"},{"version":"8.0.0","type":"visualization","gridData":{"x":0,"y":52,"w":24,"h":13,"i":"9"},"panelIndex":"9","embeddableConfig":{"mapCenter":[36.8092847020594,-96.94335937500001],"vis":{"params":{"sort":{"columnIndex":null,"direction":null}}},"enhancements":{}},"panelRefName":"panel_9"},{"version":"8.0.0","type":"visualization","gridData":{"x":12,"y":6,"w":12,"h":8,"i":"11"},"panelIndex":"11","embeddableConfig":{"vis":{"colors":{"0 - 500":"#BF1B00","1000 - 1500":"#7EB26D","500 - 1000":"#F2C96D"},"defaultColors":{"0 - 500":"rgb(165,0,38)","1000 - 1500":"rgb(0,104,55)","500 - 1000":"rgb(255,255,190)"},"legendOpen":false},"enhancements":{}},"title":"","panelRefName":"panel_11"},{"version":"8.0.0","type":"visualization","gridData":{"x":24,"y":19,"w":24,"h":33,"i":"14"},"panelIndex":"14","embeddableConfig":{"enhancements":{}},"panelRefName":"panel_14"},{"version":"8.0.0","type":"visualization","gridData":{"x":24,"y":6,"w":24,"h":13,"i":"15"},"panelIndex":"15","embeddableConfig":{"enhancements":{"dynamicActions":{"events":[]}}},"panelRefName":"panel_15"},{"version":"8.0.0","type":"visualization","gridData":{"x":0,"y":0,"w":17,"h":6,"i":"343f0bef-0b19-452e-b1c8-59beb18b6f0c"},"panelIndex":"343f0bef-0b19-452e-b1c8-59beb18b6f0c","embeddableConfig":{"savedVis":{"title":"[Logs] Markdown Instructions","description":"","type":"markdown","params":{"fontSize":12,"openLinksInNewTab":true,"markdown":"## Sample Logs Data\\nThis dashboard contains sample data for you to play with. You can view it, search it, and interact with the visualizations. For more information about Kibana, check our [docs](https://www.elastic.co/guide/en/kibana/current/index.html)."},"uiState":{},"data":{"aggs":[],"searchSource":{"query":{"query":"","language":"kuery"},"filter":[]}}},"enhancements":{},"hidePanelTitles":true}},{"version":"8.0.0","type":"visualization","gridData":{"x":17,"y":0,"w":31,"h":6,"i":"30326cdb-4ddd-49eb-a4f1-b555caa21d7c"},"panelIndex":"30326cdb-4ddd-49eb-a4f1-b555caa21d7c","embeddableConfig":{"savedVis":{"title":"[Logs] Input Controls","description":"","type":"input_control_vis","params":{"controls":[{"id":"1523980210832","fieldName":"geo.src","label":"Source Country","type":"list","options":{"type":"terms","multiselect":true,"size":100,"order":"desc"},"parent":"","indexPatternRefName":"control_30326cdb-4ddd-49eb-a4f1-b555caa21d7c_0_index_pattern"},{"id":"1523980191978","fieldName":"machine.os.keyword","label":"OS","type":"list","options":{"type":"terms","multiselect":true,"size":100,"order":"desc"},"parent":"1523980210832","indexPatternRefName":"control_30326cdb-4ddd-49eb-a4f1-b555caa21d7c_1_index_pattern"},{"id":"1523980232790","fieldName":"bytes","label":"Bytes","type":"range","options":{"decimalPlaces":0,"step":1024},"indexPatternRefName":"control_30326cdb-4ddd-49eb-a4f1-b555caa21d7c_2_index_pattern"}],"updateFiltersOnChange":true,"useTimeFilter":true,"pinFilters":false},"uiState":{},"data":{"aggs":[],"searchSource":{"query":{"query":"","language":"kuery"},"filter":[]}}},"enhancements":{},"hidePanelTitles":true}},{"version":"8.0.0","type":"lens","gridData":{"x":0,"y":6,"w":12,"h":8,"i":"bb94016e-f4a6-49ca-87a9-296a2869d570"},"panelIndex":"bb94016e-f4a6-49ca-87a9-296a2869d570","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"483defd2-775b-4a62-bdef-496c819bb8ed":{"columns":{"37430d12-7452-4cc9-b035-5cfd4061edf0":{"label":"Visits","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true}},"columnOrder":["37430d12-7452-4cc9-b035-5cfd4061edf0"],"incompleteColumns":{}}}}},"visualization":{"layerId":"483defd2-775b-4a62-bdef-496c819bb8ed","accessor":"37430d12-7452-4cc9-b035-5cfd4061edf0"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-483defd2-775b-4a62-bdef-496c819bb8ed"}]},"enhancements":{}}},{"version":"8.0.0","type":"lens","gridData":{"x":0,"y":14,"w":12,"h":5,"i":"01d8e435-91c0-484f-a11e-856747050b0a"},"panelIndex":"01d8e435-91c0-484f-a11e-856747050b0a","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"f3793bb7-3971-4753-866d-4008e77a9f9a":{"columns":{"71c076a6-e782-4866-b8df-5fd85a41f08bX0":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","filter":{"query":"response.keyword >= 400 and response.keyword < 500","language":"kuery"},"customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08bX1":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08bX2":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1"],"location":{"min":0,"max":73},"text":"count(kql=\'response.keyword >= 400 and response.keyword < 500\') / count()"}},"references":["71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1"],"customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08b":{"label":"HTTP 4xx","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'response.keyword >= 400 and response.keyword < 500\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["71c076a6-e782-4866-b8df-5fd85a41f08bX2"],"customLabel":true}},"columnOrder":["71c076a6-e782-4866-b8df-5fd85a41f08b","71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1","71c076a6-e782-4866-b8df-5fd85a41f08bX2"],"incompleteColumns":{}}}}},"visualization":{"layerId":"f3793bb7-3971-4753-866d-4008e77a9f9a","accessor":"71c076a6-e782-4866-b8df-5fd85a41f08b"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-f3793bb7-3971-4753-866d-4008e77a9f9a"}]},"enhancements":{}}},{"version":"8.0.0","type":"lens","gridData":{"x":12,"y":14,"w":12,"h":5,"i":"8c1456d4-1993-4ba2-b701-04aca02c9fef"},"panelIndex":"8c1456d4-1993-4ba2-b701-04aca02c9fef","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsMetric","state":{"datasourceStates":{"indexpattern":{"layers":{"f3793bb7-3971-4753-866d-4008e77a9f9a":{"columns":{"71c076a6-e782-4866-b8df-5fd85a41f08bX0":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","filter":{"query":"response.keyword >= 500","language":"kuery"},"customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08bX1":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08bX2":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1"],"location":{"min":0,"max":46},"text":"count(kql=\'response.keyword >= 500\') / count()"}},"references":["71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1"],"customLabel":true},"71c076a6-e782-4866-b8df-5fd85a41f08b":{"label":"HTTP 5xx","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'response.keyword >= 500\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["71c076a6-e782-4866-b8df-5fd85a41f08bX2"],"customLabel":true}},"columnOrder":["71c076a6-e782-4866-b8df-5fd85a41f08b","71c076a6-e782-4866-b8df-5fd85a41f08bX0","71c076a6-e782-4866-b8df-5fd85a41f08bX1","71c076a6-e782-4866-b8df-5fd85a41f08bX2"],"incompleteColumns":{}}}}},"visualization":{"layerId":"f3793bb7-3971-4753-866d-4008e77a9f9a","accessor":"71c076a6-e782-4866-b8df-5fd85a41f08b"},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-f3793bb7-3971-4753-866d-4008e77a9f9a"}]},"enhancements":{}}},{"version":"8.0.0","type":"visualization","gridData":{"x":0,"y":37,"w":24,"h":15,"i":"8e59c7cf-6e42-4343-a113-c4a255fcf2ce"},"panelIndex":"8e59c7cf-6e42-4343-a113-c4a255fcf2ce","embeddableConfig":{"savedVis":{"title":"","description":"","type":"vega","params":{"spec":"{\\n $schema: https://vega.github.io/schema/vega-lite/v5.json\\n data: {\\n url: {\\n %context%: true\\n %timefield%: @timestamp\\n index: kibana_sample_data_logs\\n body: {\\n aggs: {\\n countries: {\\n terms: {\\n field: geo.src\\n size: 25\\n }\\n aggs: {\\n hours: {\\n histogram: {\\n field: hour_of_day\\n interval: 1\\n }\\n aggs: {\\n unique: {\\n cardinality: {\\n field: clientip\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n size: 0\\n }\\n }\\n format: {property: \\"aggregations.countries.buckets\\"}\\n }\\n \\n transform: [\\n {\\n flatten: [\\"hours.buckets\\"],\\n as: [\\"buckets\\"]\\n }\\n ]\\n\\n mark: {\\n type: rect\\n tooltip: true\\n }\\n\\n encoding: {\\n x: {\\n field: buckets.key\\n type: ordinal\\n axis: {\\n title: false\\n labelAngle: 0\\n }\\n }\\n y: {\\n field: key\\n type: nominal\\n sort: {\\n field: -buckets.unique.value\\n }\\n axis: {title: false}\\n }\\n color: {\\n field: buckets.unique.value\\n type: quantitative\\n axis: {title: false}\\n scale: {\\n scheme: reds\\n }\\n }\\n }\\n}\\n"},"uiState":{},"data":{"aggs":[],"searchSource":{"query":{"query":"","language":"kuery"},"filter":[]}}},"enhancements":{}},"panelRefName":"panel_8e59c7cf-6e42-4343-a113-c4a255fcf2ce"},{"version":"8.0.0","type":"lens","gridData":{"x":0,"y":65,"w":48,"h":19,"i":"1d5f0b3f-d9d2-4b26-997b-83bc5ca3090b"},"panelIndex":"1d5f0b3f-d9d2-4b26-997b-83bc5ca3090b","embeddableConfig":{"attributes":{"title":"","type":"lens","visualizationType":"lnsDatatable","state":{"datasourceStates":{"indexpattern":{"layers":{"c35dc8ee-50d1-4ef7-8b4b-9c21a7e7d3b0":{"columns":{"42783ad7-dbcf-4310-bc06-f21f4eaaac96":{"label":"URL","dataType":"string","operationType":"terms","scale":"ordinal","sourceField":"url.keyword","isBucketed":true,"params":{"size":1000,"orderBy":{"type":"column","columnId":"f7835375-4d5b-4839-95ea-41928192a319"},"orderDirection":"desc","otherBucket":true,"missingBucket":false},"customLabel":true},"f7835375-4d5b-4839-95ea-41928192a319":{"label":"Visits","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"07fc84ca-4147-4ba9-879e-d1b4e086e1daX0":{"label":"Part of HTTP 4xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","filter":{"query":"response.keyword >= 400 and response.keyword < 500","language":"kuery"},"customLabel":true},"07fc84ca-4147-4ba9-879e-d1b4e086e1daX1":{"label":"Part of HTTP 4xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"07fc84ca-4147-4ba9-879e-d1b4e086e1daX2":{"label":"Part of HTTP 4xx","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["07fc84ca-4147-4ba9-879e-d1b4e086e1daX0","07fc84ca-4147-4ba9-879e-d1b4e086e1daX1"],"location":{"min":0,"max":73},"text":"count(kql=\'response.keyword >= 400 and response.keyword < 500\') / count()"}},"references":["07fc84ca-4147-4ba9-879e-d1b4e086e1daX0","07fc84ca-4147-4ba9-879e-d1b4e086e1daX1"],"customLabel":true},"07fc84ca-4147-4ba9-879e-d1b4e086e1da":{"label":"HTTP 4xx","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'response.keyword >= 400 and response.keyword < 500\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["07fc84ca-4147-4ba9-879e-d1b4e086e1daX2"],"customLabel":true},"791d5a5b-a7ba-4e9e-b533-51b33c7d7747":{"label":"Unique","dataType":"number","operationType":"unique_count","scale":"ratio","sourceField":"clientip","isBucketed":false,"customLabel":true},"611e3509-e834-4fdd-b573-44e959e95d27":{"label":"95th percentile of bytes","dataType":"number","operationType":"percentile","sourceField":"bytes","isBucketed":false,"scale":"ratio","params":{"percentile":95,"format":{"id":"bytes","params":{"decimals":0}}}},"9f79ecca-123f-4098-a658-6b0e998da003":{"label":"Median of bytes","dataType":"number","operationType":"median","sourceField":"bytes","isBucketed":false,"scale":"ratio","params":{"format":{"id":"bytes","params":{"decimals":0}}}},"491285fd-0196-402c-9b7f-4660fdc1c22aX0":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","filter":{"query":"response.keyword >= 500","language":"kuery"},"customLabel":true},"491285fd-0196-402c-9b7f-4660fdc1c22aX1":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"count","isBucketed":false,"scale":"ratio","sourceField":"Records","customLabel":true},"491285fd-0196-402c-9b7f-4660fdc1c22aX2":{"label":"Part of HTTP 5xx","dataType":"number","operationType":"math","isBucketed":false,"scale":"ratio","params":{"tinymathAst":{"type":"function","name":"divide","args":["491285fd-0196-402c-9b7f-4660fdc1c22aX0","491285fd-0196-402c-9b7f-4660fdc1c22aX1"],"location":{"min":0,"max":46},"text":"count(kql=\'response.keyword >= 500\') / count()"}},"references":["491285fd-0196-402c-9b7f-4660fdc1c22aX0","491285fd-0196-402c-9b7f-4660fdc1c22aX1"],"customLabel":true},"491285fd-0196-402c-9b7f-4660fdc1c22a":{"label":"HTTP 5xx","dataType":"number","operationType":"formula","isBucketed":false,"scale":"ratio","params":{"formula":"count(kql=\'response.keyword >= 500\') / count()","isFormulaBroken":false,"format":{"id":"percent","params":{"decimals":1}}},"references":["491285fd-0196-402c-9b7f-4660fdc1c22aX2"],"customLabel":true}},"columnOrder":["42783ad7-dbcf-4310-bc06-f21f4eaaac96","f7835375-4d5b-4839-95ea-41928192a319","791d5a5b-a7ba-4e9e-b533-51b33c7d7747","07fc84ca-4147-4ba9-879e-d1b4e086e1da","491285fd-0196-402c-9b7f-4660fdc1c22a","491285fd-0196-402c-9b7f-4660fdc1c22aX0","491285fd-0196-402c-9b7f-4660fdc1c22aX1","491285fd-0196-402c-9b7f-4660fdc1c22aX2","07fc84ca-4147-4ba9-879e-d1b4e086e1daX0","07fc84ca-4147-4ba9-879e-d1b4e086e1daX1","07fc84ca-4147-4ba9-879e-d1b4e086e1daX2","611e3509-e834-4fdd-b573-44e959e95d27","9f79ecca-123f-4098-a658-6b0e998da003"],"incompleteColumns":{}}}}},"visualization":{"layerId":"c35dc8ee-50d1-4ef7-8b4b-9c21a7e7d3b0","columns":[{"columnId":"42783ad7-dbcf-4310-bc06-f21f4eaaac96","width":650.6666666666666},{"columnId":"f7835375-4d5b-4839-95ea-41928192a319"},{"columnId":"491285fd-0196-402c-9b7f-4660fdc1c22a","isTransposed":false,"width":81.66666666666669,"colorMode":"cell","palette":{"name":"custom","type":"palette","params":{"steps":5,"stops":[{"color":"#fbddd6","stop":0.1},{"color":"#CC5642","stop":1}],"rangeType":"number","name":"custom","colorStops":[{"color":"#fbddd6","stop":0.05},{"color":"#CC5642","stop":0.1}],"rangeMin":0.05,"rangeMax":0.1}}},{"columnId":"07fc84ca-4147-4ba9-879e-d1b4e086e1da","isTransposed":false,"colorMode":"cell","palette":{"name":"custom","type":"palette","params":{"steps":5,"stops":[{"color":"#fbddd6","stop":0.1},{"color":"#cc5642","stop":1.1}],"name":"custom","colorStops":[{"color":"#fbddd6","stop":0.05},{"color":"#cc5642","stop":0.1}],"rangeType":"number","rangeMin":0.05,"rangeMax":0.1}}},{"columnId":"791d5a5b-a7ba-4e9e-b533-51b33c7d7747","isTransposed":false},{"columnId":"611e3509-e834-4fdd-b573-44e959e95d27","isTransposed":false},{"columnId":"9f79ecca-123f-4098-a658-6b0e998da003","isTransposed":false}],"sorting":{"columnId":"491285fd-0196-402c-9b7f-4660fdc1c22a","direction":"desc"}},"query":{"query":"","language":"kuery"},"filters":[]},"references":[{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-current-indexpattern"},{"type":"index-pattern","id":"90943e30-9a47-11e8-b64d-95841ca0b247","name":"indexpattern-datasource-layer-c35dc8ee-50d1-4ef7-8b4b-9c21a7e7d3b0"}]},"enhancements":{"dynamicActions":{"events":[]}},"hidePanelTitles":false},"title":"[Logs] Errors by host"},{"version":"8.0.0","type":"lens","gridData":{"x":24,"y":52,"w":24,"h":13,"i":"cbca842c-b9fa-4523-9ce0-14e350866e33"},"panelIndex":"cbca842c-b9fa-4523-9ce0-14e350866e33","embeddableConfig":{"hidePanelTitles":false,"enhancements":{}},"title":"[Logs] Bytes distribution","panelRefName":"panel_cbca842c-b9fa-4523-9ce0-14e350866e33"}]',
- optionsJSON: '{"hidePanelTitles":false,"useMargins":true}',
- version: 2,
- timeRestore: true,
- timeTo: 'now',
- timeFrom: 'now-7d',
- refreshInterval: {
- pause: false,
- value: 900000,
+ {
+ name: 'controlGroup_9807212f-5078-4c42-879c-6f28b3033fc9:optionsListDataView',
+ type: 'index-pattern',
+ id: '90943e30-9a47-11e8-b64d-95841ca0b247',
},
- kibanaSavedObjectMeta: {
- searchSourceJSON:
- '{"query":{"language":"kuery","query":""},"filter":[],"highlightAll":true,"version":true}',
+ {
+ name: 'controlGroup_6bf7a1b4-282e-43ac-aa46-81b97fa3acae:rangeSliderDataView',
+ type: 'index-pattern',
+ id: '90943e30-9a47-11e8-b64d-95841ca0b247',
},
+ ],
+ migrationVersion: {
+ dashboard: '8.5.0',
},
+ coreMigrationVersion: '8.6.0',
},
{
id: '2f360f30-ea74-11eb-b4c6-3d2afc1cb389',
diff --git a/src/plugins/home/tsconfig.json b/src/plugins/home/tsconfig.json
index 8e617896e3f96..af121720eee0e 100644
--- a/src/plugins/home/tsconfig.json
+++ b/src/plugins/home/tsconfig.json
@@ -15,6 +15,7 @@
{ "path": "../kibana_react/tsconfig.json" },
{ "path": "../share/tsconfig.json" },
{ "path": "../url_forwarding/tsconfig.json" },
- { "path": "../usage_collection/tsconfig.json" }
+ { "path": "../usage_collection/tsconfig.json" },
+ { "path": "../../../x-pack/plugins/cloud/tsconfig.json" }
]
}
diff --git a/src/plugins/ui_actions/public/types.ts b/src/plugins/ui_actions/public/types.ts
index a76a8aa760ed7..fb2d9869e21c7 100644
--- a/src/plugins/ui_actions/public/types.ts
+++ b/src/plugins/ui_actions/public/types.ts
@@ -6,6 +6,7 @@
* Side Public License, v 1.
*/
+import type { AggregateQuery } from '@kbn/es-query';
import type { DataViewSpec } from '@kbn/data-views-plugin/public';
import { ActionInternal } from './actions/action_internal';
import { TriggerInternal } from './triggers/trigger_internal';
@@ -19,6 +20,7 @@ export interface VisualizeFieldContext {
dataViewSpec: DataViewSpec;
contextualFields?: string[];
originatingApp?: string;
+ query?: AggregateQuery;
}
export const ACTION_VISUALIZE_FIELD = 'ACTION_VISUALIZE_FIELD';
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 376cbf267a738..8497b599650b2 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
@@ -105,7 +105,7 @@ describe('DataView component', () => {
expect(addFieldSpy).toHaveBeenCalled();
});
- it('should not render the add datavuew menu if onDataViewCreated is not given', async () => {
+ it('should not render the add dataview menu if onDataViewCreated is not given', async () => {
await act(async () => {
const component = mount(wrapDataViewComponentInContext(props, true));
findTestSubject(component, 'dataview-trigger').simulate('click');
@@ -113,7 +113,7 @@ describe('DataView component', () => {
});
});
- it('should render the add datavuew menu if onDataViewCreated is given', async () => {
+ it('should render the add dataview menu if onDataViewCreated is given', async () => {
const addDataViewSpy = jest.fn();
const component = mount(
wrapDataViewComponentInContext({ ...props, onDataViewCreated: addDataViewSpy }, false)
@@ -141,4 +141,21 @@ describe('DataView component', () => {
const text = component.find('[data-test-subj="select-text-based-language-panel"]');
expect(text.length).not.toBe(0);
});
+
+ it('should cleanup the query is on text based mode and add new dataview', async () => {
+ const component = mount(
+ wrapDataViewComponentInContext(
+ {
+ ...props,
+ onDataViewCreated: jest.fn(),
+ textBasedLanguages: [TextBasedLanguages.ESQL, TextBasedLanguages.SQL],
+ textBasedLanguage: TextBasedLanguages.SQL,
+ },
+ false
+ )
+ );
+ findTestSubject(component, 'dataview-trigger').simulate('click');
+ component.find('[data-test-subj="dataview-create-new"]').first().simulate('click');
+ expect(props.onTextLangQuerySubmit).toHaveBeenCalled();
+ });
});
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 94c869bb54a1c..72a2d8fea290f 100644
--- a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx
+++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx
@@ -7,7 +7,7 @@
*/
import { i18n } from '@kbn/i18n';
-import React, { useState, useEffect, useCallback } from 'react';
+import React, { useState, useEffect, useCallback, useRef } from 'react';
import { css } from '@emotion/react';
import {
EuiPopover,
@@ -24,6 +24,7 @@ import {
EuiFlexItem,
EuiButtonEmpty,
EuiToolTip,
+ EuiSpacer,
} from '@elastic/eui';
import type { DataViewListItem } from '@kbn/data-views-plugin/public';
import { useKibana } from '@kbn/kibana-react-plugin/public';
@@ -71,9 +72,13 @@ export function ChangeDataView({
onTextLangQuerySubmit,
textBasedLanguage,
isDisabled,
+ onCreateDefaultAdHocDataView,
}: DataViewPickerPropsExtended) {
const { euiTheme } = useEuiTheme();
const [isPopoverOpen, setPopoverIsOpen] = useState(false);
+ const [noDataViewMatches, setNoDataViewMatches] = useState(false);
+ const [dataViewSearchString, setDataViewSearchString] = useState('');
+ const [indexMatches, setIndexMatches] = useState(0);
const [dataViewsList, setDataViewsList] = useState([]);
const [triggerLabel, setTriggerLabel] = useState('');
const [isTextBasedLangSelected, setIsTextBasedLangSelected] = useState(
@@ -111,6 +116,24 @@ export function ChangeDataView({
fetchDataViews();
}, [data, currentDataViewId, adHocDataViews]);
+ const pendingIndexMatch = useRef();
+ useEffect(() => {
+ async function checkIndices() {
+ if (dataViewSearchString !== '' && noDataViewMatches) {
+ const matches = await kibana.services.dataViews.getIndices({
+ pattern: dataViewSearchString,
+ isRollupIndex: () => false,
+ showAllIndices: false,
+ });
+ setIndexMatches(matches.length);
+ }
+ }
+ if (pendingIndexMatch.current) {
+ clearTimeout(pendingIndexMatch.current);
+ }
+ pendingIndexMatch.current = setTimeout(checkIndices, 250);
+ }, [dataViewSearchString, kibana.services.dataViews, noDataViewMatches]);
+
useEffect(() => {
if (trigger.label) {
if (textBasedLanguage) {
@@ -235,6 +258,16 @@ export function ChangeDataView({
onClick={() => {
setPopoverIsOpen(false);
onDataViewCreated();
+ // go to dataview mode
+ if (isTextBasedLangSelected) {
+ setIsTextBasedLangSelected(false);
+ // clean up the Text based language query
+ onTextLangQuerySubmit?.({
+ language: 'kuery',
+ query: '',
+ });
+ setTriggerLabel(trigger.label);
+ }
}}
size="xs"
iconType="plusInCircleFilled"
@@ -262,7 +295,7 @@ export function ChangeDataView({
setIsTextBasedLangSelected(false);
// clean up the Text based language query
onTextLangQuerySubmit?.({
- language: 'kql',
+ language: 'kuery',
query: '',
});
onChangeDataView(newId);
@@ -272,10 +305,57 @@ export function ChangeDataView({
}
}}
currentDataViewId={currentDataViewId}
- selectableProps={selectableProps}
+ selectableProps={{
+ ...(selectableProps || {}),
+ // @ts-expect-error Some EUI weirdness
+ searchProps: {
+ ...(selectableProps?.searchProps || {}),
+ onChange: (value, matches) => {
+ selectableProps?.searchProps?.onChange?.(value, matches);
+ setNoDataViewMatches(matches.length === 0 && dataViewsList.length > 0);
+ setDataViewSearchString(value);
+ },
+ },
+ }}
searchListInputId={searchListInputId}
isTextBasedLangSelected={isTextBasedLangSelected}
/>
+ {onCreateDefaultAdHocDataView && noDataViewMatches && indexMatches > 0 && (
+
+
+ {
+ setPopoverIsOpen(false);
+ onCreateDefaultAdHocDataView(dataViewSearchString);
+ }}
+ >
+ {i18n.translate(
+ 'unifiedSearch.query.queryBar.indexPattern.createForMatchingIndices',
+ {
+ defaultMessage: `Explore {indicesLength, plural,
+ one {# matching index}
+ other {# matching indices}}`,
+ values: {
+ indicesLength: indexMatches,
+ },
+ }
+ )}
+
+
+
+
+ )}
>
);
@@ -335,7 +415,7 @@ export function ChangeDataView({
setIsTextBasedLangSelected(false);
// clean up the Text based language query
onTextLangQuerySubmit?.({
- language: 'kql',
+ language: 'kuery',
query: '',
});
if (selectedDataViewId) {
diff --git a/src/plugins/unified_search/public/dataview_picker/index.tsx b/src/plugins/unified_search/public/dataview_picker/index.tsx
index 1cc0a8219af96..9fb794d58e642 100644
--- a/src/plugins/unified_search/public/dataview_picker/index.tsx
+++ b/src/plugins/unified_search/public/dataview_picker/index.tsx
@@ -63,6 +63,8 @@ export interface DataViewPickerProps {
* Also works as a flag to show the create dataview button.
*/
onDataViewCreated?: () => void;
+
+ onCreateDefaultAdHocDataView?: (pattern: string) => void;
/**
* List of the supported text based languages (SQL, ESQL) etc.
* Defined per application, if not provided, no text based languages
@@ -104,6 +106,7 @@ export const DataViewPicker = ({
onSaveTextLanguageQuery,
onTextLangQuerySubmit,
textBasedLanguage,
+ onCreateDefaultAdHocDataView,
isDisabled,
}: DataViewPickerPropsExtended) => {
return (
@@ -113,6 +116,7 @@ export const DataViewPicker = ({
onChangeDataView={onChangeDataView}
onAddField={onAddField}
onDataViewCreated={onDataViewCreated}
+ onCreateDefaultAdHocDataView={onCreateDefaultAdHocDataView}
trigger={trigger}
adHocDataViews={adHocDataViews}
selectableProps={selectableProps}
diff --git a/src/plugins/unified_search/public/dataview_picker/text_languages_transition_modal.tsx b/src/plugins/unified_search/public/dataview_picker/text_languages_transition_modal.tsx
index 12f5414b92b9e..f7e8b11671556 100644
--- a/src/plugins/unified_search/public/dataview_picker/text_languages_transition_modal.tsx
+++ b/src/plugins/unified_search/public/dataview_picker/text_languages_transition_modal.tsx
@@ -86,6 +86,7 @@ export default function TextBasedLanguagesTransitionModal({
onClick={() => closeModal(dismissModalChecked)}
color="warning"
iconType="merge"
+ data-test-subj="unifiedSearch_switch_noSave"
>
{i18n.translate(
'unifiedSearch.query.queryBar.indexPattern.textBasedLanguagesTransitionModalCloseButton',
@@ -101,6 +102,7 @@ export default function TextBasedLanguagesTransitionModal({
fill
color="success"
iconType="save"
+ data-test-subj="unifiedSearch_switch_andSave"
>
{i18n.translate(
'unifiedSearch.query.queryBar.indexPattern.textBasedLanguagesTransitionModalSaveButton',
diff --git a/src/plugins/unified_search/public/filter_bar/filter_editor/filter_editor.tsx b/src/plugins/unified_search/public/filter_bar/filter_editor/filter_editor.tsx
index cdf4af1746e5c..1b336acd024ae 100644
--- a/src/plugins/unified_search/public/filter_bar/filter_editor/filter_editor.tsx
+++ b/src/plugins/unified_search/public/filter_bar/filter_editor/filter_editor.tsx
@@ -169,7 +169,13 @@ class FilterEditorUI extends Component {
-
+ {/* Adding isolation here fixes this bug https://github.com/elastic/kibana/issues/142211 */}
+
extends C
() => {
if (this.props.onQuerySubmit) {
this.props.onQuerySubmit({
- query: this.state.query,
+ query: query as QT,
dateRange: {
from: this.state.dateRangeFrom,
to: this.state.dateRangeTo,
diff --git a/src/plugins/unified_search/public/types.ts b/src/plugins/unified_search/public/types.ts
index d079cd72edf81..85f32a9d4b7e3 100755
--- a/src/plugins/unified_search/public/types.ts
+++ b/src/plugins/unified_search/public/types.ts
@@ -86,5 +86,6 @@ export interface IUnifiedSearchPluginServices extends Partial {
storage: IStorageWrapper;
docLinks: DocLinksStart;
data: DataPublicPluginStart;
+ dataViews: DataViewsPublicPluginStart;
usageCollection?: UsageCollectionStart;
}
diff --git a/src/plugins/unified_search/tsconfig.json b/src/plugins/unified_search/tsconfig.json
index 61b1f83058821..2f09d27c84b08 100644
--- a/src/plugins/unified_search/tsconfig.json
+++ b/src/plugins/unified_search/tsconfig.json
@@ -17,6 +17,7 @@
{ "path": "../../core/tsconfig.json" },
{ "path": "../data/tsconfig.json" },
{ "path": "../data_views/tsconfig.json" },
+ { "path": "../data_view_editor/tsconfig.json" },
{ "path": "../embeddable/tsconfig.json" },
{ "path": "../usage_collection/tsconfig.json" },
{ "path": "../kibana_utils/tsconfig.json" },
diff --git a/src/plugins/vis_types/pie/kibana.json b/src/plugins/vis_types/pie/kibana.json
index abed576cc6732..4c5ee6b50579e 100644
--- a/src/plugins/vis_types/pie/kibana.json
+++ b/src/plugins/vis_types/pie/kibana.json
@@ -3,8 +3,8 @@
"version": "kibana",
"ui": true,
"server": true,
- "requiredPlugins": ["charts", "data", "expressions", "visualizations", "usageCollection", "expressionPartitionVis"],
- "requiredBundles": ["visDefaultEditor"],
+ "requiredPlugins": ["charts", "data", "expressions", "visualizations", "usageCollection", "expressionPartitionVis", "dataViews"],
+ "requiredBundles": ["visDefaultEditor", "kibanaUtils"],
"extraPublicDirs": ["common/index"],
"owner": {
"name": "Vis Editors",
diff --git a/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.test.ts b/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.test.ts
new file mode 100644
index 0000000000000..0a10a5bd7c0c0
--- /dev/null
+++ b/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.test.ts
@@ -0,0 +1,104 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { getConfiguration } from '.';
+import { samplePieVis } from '../../sample_vis.test.mocks';
+
+describe('getConfiguration', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ test('should return correct configuration', () => {
+ samplePieVis.uiState.get.mockReturnValueOnce(undefined);
+ expect(
+ getConfiguration('test1', samplePieVis as any, {
+ metrics: ['metric-1'],
+ buckets: ['bucket-1'],
+ })
+ ).toEqual({
+ layers: [
+ {
+ categoryDisplay: undefined,
+ emptySizeRatio: undefined,
+ layerId: 'test1',
+ layerType: 'data',
+ legendDisplay: 'show',
+ legendMaxLines: 1,
+ legendPosition: 'right',
+ legendSize: 'large',
+ metric: 'metric-1',
+ nestedLegend: true,
+ numberDisplay: 'percent',
+ percentDecimals: 2,
+ primaryGroups: ['bucket-1'],
+ secondaryGroups: [],
+ showValuesInLegend: true,
+ truncateLegend: true,
+ },
+ ],
+ shape: 'donut',
+ palette: undefined,
+ });
+ });
+
+ test('should return legendDisplay = show if uiState contains truthy value', () => {
+ samplePieVis.uiState.get.mockReturnValueOnce(true);
+ expect(
+ getConfiguration(
+ 'test1',
+ { ...samplePieVis, params: { ...samplePieVis.params, legendDisplay: 'hide' } } as any,
+ {
+ metrics: ['metric-1'],
+ buckets: ['bucket-1'],
+ }
+ )
+ ).toEqual({
+ layers: [expect.objectContaining({ legendDisplay: 'show' })],
+ shape: 'donut',
+ palette: undefined,
+ });
+ });
+
+ test('should return legendDisplay = hide if uiState contains falsy value', () => {
+ samplePieVis.uiState.get.mockReturnValueOnce(false);
+ expect(
+ getConfiguration(
+ 'test1',
+ { ...samplePieVis, params: { ...samplePieVis.params, legendDisplay: 'show' } } as any,
+ {
+ metrics: ['metric-1'],
+ buckets: ['bucket-1'],
+ }
+ )
+ ).toEqual({
+ layers: [expect.objectContaining({ legendDisplay: 'hide' })],
+ shape: 'donut',
+ palette: undefined,
+ });
+ });
+
+ test('should return value of legendDisplay if uiState contains undefined value', () => {
+ samplePieVis.uiState.get.mockReturnValueOnce(undefined);
+ const legendDisplay = 'show';
+ expect(
+ getConfiguration(
+ 'test1',
+ { ...samplePieVis, params: { ...samplePieVis.params, legendDisplay } } as any,
+ {
+ metrics: ['metric-1'],
+ buckets: ['bucket-1'],
+ }
+ )
+ ).toEqual({
+ layers: [expect.objectContaining({ legendDisplay })],
+ shape: 'donut',
+ palette: undefined,
+ });
+ });
+});
diff --git a/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.ts b/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.ts
new file mode 100644
index 0000000000000..9a3420581c1fd
--- /dev/null
+++ b/src/plugins/vis_types/pie/public/convert_to_lens/configurations/index.ts
@@ -0,0 +1,79 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { LegendDisplay, PartitionVisParams } from '@kbn/expression-partition-vis-plugin/common';
+import {
+ CategoryDisplayTypes,
+ NumberDisplayTypes,
+ PartitionVisConfiguration,
+} from '@kbn/visualizations-plugin/common/convert_to_lens';
+import { Vis } from '@kbn/visualizations-plugin/public';
+
+const getLayers = (
+ layerId: string,
+ vis: Vis,
+ metrics: string[],
+ buckets: string[]
+): PartitionVisConfiguration['layers'] => {
+ const legendOpen = vis.uiState.get('vis.legendOpen');
+ const legendDisplayFromUiState =
+ legendOpen !== undefined ? (legendOpen ? LegendDisplay.SHOW : LegendDisplay.HIDE) : undefined;
+
+ const showValuesInLegend =
+ vis.params.labels.values ??
+ vis.params.showValuesInLegend ??
+ vis.type.visConfig.defaults.showValuesInLegend;
+
+ return [
+ {
+ layerId,
+ layerType: 'data' as const,
+ primaryGroups: buckets,
+ secondaryGroups: [],
+ metric: metrics[0],
+ numberDisplay:
+ showValuesInLegend === false
+ ? NumberDisplayTypes.HIDDEN
+ : vis.params.labels.valuesFormat ?? vis.type.visConfig.defaults.labels.valuesFormat,
+ categoryDisplay: vis.params.labels.show
+ ? vis.params.labels.position ?? vis.type.visConfig.defaults.labels.position
+ : CategoryDisplayTypes.HIDE,
+ legendDisplay:
+ legendDisplayFromUiState ??
+ vis.params.legendDisplay ??
+ vis.type.visConfig.defaults.legendDisplay,
+ legendPosition: vis.params.legendPosition ?? vis.type.visConfig.defaults.legendPosition,
+ showValuesInLegend,
+ nestedLegend: vis.params.nestedLegend ?? vis.type.visConfig.defaults.nestedLegend,
+ percentDecimals:
+ vis.params.labels.percentDecimals ?? vis.type.visConfig.defaults.labels.percentDecimals,
+ emptySizeRatio: vis.params.emptySizeRatio ?? vis.type.visConfig.defaults.emptySizeRatio,
+ legendMaxLines: vis.params.maxLegendLines ?? vis.type.visConfig.defaults.maxLegendLines,
+ legendSize: vis.params.legendSize ?? vis.type.visConfig.defaults.legendSize,
+ truncateLegend: vis.params.truncateLegend ?? vis.type.visConfig.defaults.truncateLegend,
+ },
+ ];
+};
+
+export const getConfiguration = (
+ layerId: string,
+ vis: Vis,
+ {
+ metrics,
+ buckets,
+ }: {
+ metrics: string[];
+ buckets: string[];
+ }
+): PartitionVisConfiguration => {
+ return {
+ shape: vis.params.isDonut ? 'donut' : 'pie',
+ layers: getLayers(layerId, vis, metrics, buckets),
+ palette: vis.params.palette,
+ };
+};
diff --git a/src/plugins/vis_types/pie/public/convert_to_lens/index.test.ts b/src/plugins/vis_types/pie/public/convert_to_lens/index.test.ts
new file mode 100644
index 0000000000000..c1e39d741f84d
--- /dev/null
+++ b/src/plugins/vis_types/pie/public/convert_to_lens/index.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 and the Server Side Public License, v 1; you may 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 { convertToLens } from '.';
+import { samplePieVis } from '../sample_vis.test.mocks';
+
+const mockGetColumnsFromVis = jest.fn();
+const mockGetConfiguration = jest.fn().mockReturnValue({});
+
+jest.mock('../services', () => ({
+ getDataViewsStart: jest.fn(() => ({ get: () => ({}), getDefault: () => ({}) })),
+}));
+
+jest.mock('@kbn/visualizations-plugin/public', () => ({
+ convertToLensModule: Promise.resolve({
+ getColumnsFromVis: jest.fn(() => mockGetColumnsFromVis()),
+ }),
+ getDataViewByIndexPatternId: jest.fn(() => ({ id: 'index-pattern' })),
+}));
+
+jest.mock('./configurations', () => ({
+ getConfiguration: jest.fn(() => mockGetConfiguration()),
+}));
+
+describe('convertToLens', () => {
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+
+ test('should return null if getColumnsFromVis returns null', async () => {
+ mockGetColumnsFromVis.mockReturnValue(null);
+ const result = await convertToLens(samplePieVis as any, {} as any);
+ expect(mockGetColumnsFromVis).toBeCalledTimes(1);
+ expect(result).toBeNull();
+ });
+
+ test('should return null if more than three split slice levels', async () => {
+ mockGetColumnsFromVis.mockReturnValue({
+ buckets: ['1', '2', '3', '4'],
+ });
+ const result = await convertToLens(samplePieVis as any, {} as any);
+ expect(mockGetColumnsFromVis).toBeCalledTimes(1);
+ expect(result).toBeNull();
+ });
+
+ test('should return null if no one split slices', async () => {
+ mockGetColumnsFromVis.mockReturnValue({
+ buckets: [],
+ });
+ const result = await convertToLens(samplePieVis as any, {} as any);
+ expect(mockGetColumnsFromVis).toBeCalledTimes(1);
+ expect(result).toBeNull();
+ });
+
+ test('should state for valid vis', async () => {
+ mockGetColumnsFromVis.mockReturnValue({
+ buckets: ['2'],
+ columns: [{ columnId: '2' }, { columnId: '1' }],
+ });
+ const result = await convertToLens(samplePieVis as any, {} as any);
+ expect(mockGetColumnsFromVis).toBeCalledTimes(1);
+ expect(mockGetConfiguration).toBeCalledTimes(1);
+ expect(result?.type).toEqual('lnsPie');
+ expect(result?.layers.length).toEqual(1);
+ expect(result?.layers[0]).toEqual(
+ expect.objectContaining({
+ columnOrder: [],
+ columns: [{ columnId: '2' }, { columnId: '1' }],
+ })
+ );
+ });
+});
diff --git a/src/plugins/vis_types/pie/public/convert_to_lens/index.ts b/src/plugins/vis_types/pie/public/convert_to_lens/index.ts
new file mode 100644
index 0000000000000..5b1973507c7df
--- /dev/null
+++ b/src/plugins/vis_types/pie/public/convert_to_lens/index.ts
@@ -0,0 +1,79 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { Column, ColumnWithMeta } from '@kbn/visualizations-plugin/common';
+import {
+ convertToLensModule,
+ getDataViewByIndexPatternId,
+} from '@kbn/visualizations-plugin/public';
+import uuid from 'uuid';
+import { getDataViewsStart } from '../services';
+import { getConfiguration } from './configurations';
+import { ConvertPieToLensVisualization } from './types';
+
+export const isColumnWithMeta = (column: Column): column is ColumnWithMeta => {
+ if ((column as ColumnWithMeta).meta) {
+ return true;
+ }
+ return false;
+};
+
+export const excludeMetaFromColumn = (column: Column) => {
+ if (isColumnWithMeta(column)) {
+ const { meta, ...rest } = column;
+ return rest;
+ }
+ return column;
+};
+
+export const convertToLens: ConvertPieToLensVisualization = async (vis, timefilter) => {
+ if (!timefilter) {
+ return null;
+ }
+
+ const dataViews = getDataViewsStart();
+ const dataView = await getDataViewByIndexPatternId(vis.data.indexPattern?.id, dataViews);
+
+ if (!dataView) {
+ return null;
+ }
+
+ const { getColumnsFromVis } = await convertToLensModule;
+ const result = getColumnsFromVis(vis, timefilter, dataView, {
+ buckets: [],
+ splits: ['segment'],
+ unsupported: ['split_row', 'split_column'],
+ });
+
+ if (result === null) {
+ return null;
+ }
+
+ // doesn't support more than three split slice levels
+ // doesn't support pie without at least one split slice
+ if (result.buckets.length > 3 || !result.buckets.length) {
+ return null;
+ }
+
+ const layerId = uuid();
+
+ const indexPatternId = dataView.id!;
+ return {
+ type: 'lnsPie',
+ layers: [
+ {
+ indexPatternId,
+ layerId,
+ columns: result.columns.map(excludeMetaFromColumn),
+ columnOrder: [],
+ },
+ ],
+ configuration: getConfiguration(layerId, vis, result),
+ indexPatternIds: [indexPatternId],
+ };
+};
diff --git a/src/plugins/vis_types/pie/public/convert_to_lens/types.ts b/src/plugins/vis_types/pie/public/convert_to_lens/types.ts
new file mode 100644
index 0000000000000..b190a4c891304
--- /dev/null
+++ b/src/plugins/vis_types/pie/public/convert_to_lens/types.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 { TimefilterContract } from '@kbn/data-plugin/public';
+import { PartitionVisParams } from '@kbn/expression-partition-vis-plugin/common';
+import {
+ NavigateToLensContext,
+ PartitionVisConfiguration,
+} from '@kbn/visualizations-plugin/common';
+import { Vis } from '@kbn/visualizations-plugin/public';
+
+export type ConvertPieToLensVisualization = (
+ vis: Vis,
+ timefilter?: TimefilterContract
+) => Promise | null>;
diff --git a/src/plugins/vis_types/pie/public/plugin.ts b/src/plugins/vis_types/pie/public/plugin.ts
index 480cf0c49db63..b4a8c0e3a2a69 100644
--- a/src/plugins/vis_types/pie/public/plugin.ts
+++ b/src/plugins/vis_types/pie/public/plugin.ts
@@ -6,13 +6,15 @@
* Side Public License, v 1.
*/
-import { CoreSetup, DocLinksStart, ThemeServiceStart } from '@kbn/core/public';
+import { CoreSetup, CoreStart, DocLinksStart, ThemeServiceStart } from '@kbn/core/public';
import { VisualizationsSetup } from '@kbn/visualizations-plugin/public';
import { ChartsPluginSetup } from '@kbn/charts-plugin/public';
import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public';
+import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import { DataPublicPluginStart } from '@kbn/data-plugin/public';
import { LEGACY_PIE_CHARTS_LIBRARY } from '../common';
import { pieVisType } from './vis_type';
+import { setDataViewsStart } from './services';
/** @internal */
export interface VisTypePieSetupDependencies {
@@ -21,6 +23,11 @@ export interface VisTypePieSetupDependencies {
usageCollection: UsageCollectionSetup;
}
+/** @internal */
+export interface VisTypePieStartDependencies {
+ dataViews: DataViewsPublicPluginStart;
+}
+
/** @internal */
export interface VisTypePiePluginStartDependencies {
data: DataPublicPluginStart;
@@ -53,5 +60,7 @@ export class VisTypePiePlugin {
return {};
}
- start() {}
+ start(core: CoreStart, { dataViews }: VisTypePieStartDependencies) {
+ setDataViewsStart(dataViews);
+ }
}
diff --git a/src/plugins/vis_types/pie/public/sample_vis.test.mocks.ts b/src/plugins/vis_types/pie/public/sample_vis.test.mocks.ts
index 3525b7b6fbc05..035432de9ad23 100644
--- a/src/plugins/vis_types/pie/public/sample_vis.test.mocks.ts
+++ b/src/plugins/vis_types/pie/public/sample_vis.test.mocks.ts
@@ -9,6 +9,8 @@
import { LegendDisplay } from '@kbn/expression-partition-vis-plugin/common';
import { LegendSize } from '@kbn/visualizations-plugin/common';
+const mockUiStateGet = jest.fn().mockReturnValue(() => false);
+
export const samplePieVis = {
type: {
name: 'pie',
@@ -1353,5 +1355,6 @@ export const samplePieVis = {
vis: {
legendOpen: false,
},
+ get: mockUiStateGet,
},
};
diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_constants.ts b/src/plugins/vis_types/pie/public/services.ts
similarity index 57%
rename from src/plugins/dashboard/public/application/embeddable/dashboard_constants.ts
rename to src/plugins/vis_types/pie/public/services.ts
index 2f7854e81ad95..736ad70d49419 100644
--- a/src/plugins/dashboard/public/application/embeddable/dashboard_constants.ts
+++ b/src/plugins/vis_types/pie/public/services.ts
@@ -6,8 +6,8 @@
* Side Public License, v 1.
*/
-export const DASHBOARD_GRID_COLUMN_COUNT = 48;
-export const DASHBOARD_GRID_HEIGHT = 20;
-export const DEFAULT_PANEL_WIDTH = DASHBOARD_GRID_COLUMN_COUNT / 2;
-export const DEFAULT_PANEL_HEIGHT = 15;
-export const DASHBOARD_CONTAINER_TYPE = 'dashboard';
+import { createGetterSetter } from '@kbn/kibana-utils-plugin/public';
+import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
+
+export const [getDataViewsStart, setDataViewsStart] =
+ createGetterSetter('dataViews');
diff --git a/src/plugins/vis_types/pie/public/vis_type/pie.ts b/src/plugins/vis_types/pie/public/vis_type/pie.ts
index 6d48507cf47a3..8d4b7b6828e39 100644
--- a/src/plugins/vis_types/pie/public/vis_type/pie.ts
+++ b/src/plugins/vis_types/pie/public/vis_type/pie.ts
@@ -21,6 +21,7 @@ import { DEFAULT_PERCENT_DECIMALS } from '../../common';
import { PieTypeProps } from '../types';
import { toExpressionAst } from '../to_ast';
import { getPieOptions } from '../editor/components';
+import { convertToLens } from '../convert_to_lens';
export const getPieVisTypeDefinition = ({
showElasticChartsOptions = false,
@@ -123,4 +124,10 @@ export const getPieVisTypeDefinition = ({
},
hierarchicalData: true,
requiresSearch: true,
+ navigateToLens: async (vis, timefilter) => (vis ? convertToLens(vis, timefilter) : null),
+ getExpressionVariables: async (vis, timeFilter) => {
+ return {
+ canNavigateToLens: Boolean(vis?.params ? await convertToLens(vis, timeFilter) : null),
+ };
+ },
});
diff --git a/src/plugins/vis_types/timeseries/public/application/components/aggs/field_select/field_select.tsx b/src/plugins/vis_types/timeseries/public/application/components/aggs/field_select/field_select.tsx
index 27f4d96381fda..df4d683d11ea9 100644
--- a/src/plugins/vis_types/timeseries/public/application/components/aggs/field_select/field_select.tsx
+++ b/src/plugins/vis_types/timeseries/public/application/components/aggs/field_select/field_select.tsx
@@ -47,10 +47,15 @@ interface FieldSelectProps {
fullWidth?: boolean;
}
-const getPreselectedFields = (
+const getPlaceholderValue = (
placeholder?: string,
options?: Array>
-) => placeholder && findInGroupedOptions(options, placeholder)?.label;
+) => {
+ if (!placeholder) {
+ return;
+ }
+ return findInGroupedOptions(options, placeholder)?.label || placeholder;
+};
export function FieldSelect({
label,
@@ -138,7 +143,7 @@ export function FieldSelect({
onNewItemAdd={onNewItemAdd.bind(undefined, props.index)}
onDeleteItem={onDeleteItem.bind(undefined, props.index)}
onChange={onFieldSelectItemChange.bind(undefined, props.index)}
- placeholder={getPreselectedFields(placeholder, groupedOptions)}
+ placeholder={getPlaceholderValue(placeholder, groupedOptions)}
disableAdd={!allowMultiSelect || selectedIds?.length >= MAX_MULTI_FIELDS_ITEMS}
disableDelete={!allowMultiSelect || selectedIds?.length <= 1}
/>
diff --git a/src/plugins/vis_types/timeseries/public/application/components/annotation_row.tsx b/src/plugins/vis_types/timeseries/public/application/components/annotation_row.tsx
index 49ae7ea348f5a..9d44ba5f95745 100644
--- a/src/plugins/vis_types/timeseries/public/application/components/annotation_row.tsx
+++ b/src/plugins/vis_types/timeseries/public/application/components/annotation_row.tsx
@@ -154,7 +154,7 @@ export const AnnotationRow = ({
label={
}
restrict={RESTRICT_FIELDS}
@@ -165,6 +165,10 @@ export const AnnotationRow = ({
})
}
indexPattern={model.index_pattern}
+ placeholder={
+ fetchedIndex?.indexPattern?.timeFieldName ??
+ fetchedIndex?.defaultIndex?.timeFieldName
+ }
fields={fields}
/>
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/index.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/index.test.ts
index 435335fe9dd25..309f066b18f29 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/index.test.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/index.test.ts
@@ -40,7 +40,7 @@ describe('convertTSVBtoLensConfiguration', () => {
test('should return null for a not supported chart', async () => {
const metricModel = {
...model,
- type: 'metric',
+ type: 'markdown',
} as Panel;
const triggerOptions = await convertTSVBtoLensConfiguration(metricModel);
expect(triggerOptions).toBeNull();
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
index 5b92c0ab21668..a64118a1cb507 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/index.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/index.ts
@@ -21,6 +21,10 @@ const getConvertFnByType = (type: PANEL_TYPES) => {
const { convertToLens } = await import('./top_n');
return convertToLens;
},
+ [PANEL_TYPES.METRIC]: async () => {
+ const { convertToLens } = await import('./metric');
+ return convertToLens;
+ },
};
return convertionFns[type]?.();
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/metric/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/metric/index.ts
new file mode 100644
index 0000000000000..d1f24485d7646
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/metric/index.ts
@@ -0,0 +1,67 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { MetricVisConfiguration } from '@kbn/visualizations-plugin/common';
+import { Metric, Panel, Series } from '../../../../../common/types';
+import { Column, Layer } from '../../convert';
+import { getSeriesAgg } from '../../series';
+import { getPalette } from './palette';
+
+const getMetricWithCollapseFn = (series: Series | undefined) => {
+ if (!series) {
+ return;
+ }
+ const { metrics, seriesAgg } = getSeriesAgg(series.metrics);
+ const visibleMetric = metrics[metrics.length - 1];
+ return { metric: visibleMetric, collapseFn: seriesAgg };
+};
+
+const findMetricColumn = (metric: Metric | undefined, columns: Column[]) => {
+ if (!metric) {
+ return;
+ }
+
+ return columns.find((column) => 'meta' in column && column.meta.metricId === metric.id);
+};
+
+export const getConfigurationForMetric = (
+ model: Panel,
+ layer: Layer,
+ bucket?: Column
+): MetricVisConfiguration | null => {
+ const [primarySeries, secondarySeries] = model.series.filter(({ hidden }) => !hidden);
+
+ const primaryMetricWithCollapseFn = getMetricWithCollapseFn(primarySeries);
+
+ if (!primaryMetricWithCollapseFn || !primaryMetricWithCollapseFn.metric) {
+ return null;
+ }
+
+ const secondaryMetricWithCollapseFn = getMetricWithCollapseFn(secondarySeries);
+ const primaryColumn = findMetricColumn(primaryMetricWithCollapseFn.metric, layer.columns);
+ const secondaryColumn = findMetricColumn(secondaryMetricWithCollapseFn?.metric, layer.columns);
+
+ if (primaryMetricWithCollapseFn.collapseFn && secondaryMetricWithCollapseFn?.collapseFn) {
+ return null;
+ }
+
+ const palette = getPalette(model.background_color_rules ?? []);
+ if (palette === null) {
+ return null;
+ }
+
+ return {
+ layerId: layer.layerId,
+ layerType: 'data',
+ metricAccessor: primaryColumn?.columnId,
+ secondaryMetricAccessor: secondaryColumn?.columnId,
+ breakdownByAccessor: bucket?.columnId,
+ palette,
+ collapseFn: primaryMetricWithCollapseFn.collapseFn ?? secondaryMetricWithCollapseFn?.collapseFn,
+ };
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/metric/palette.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/metric/palette.test.ts
new file mode 100644
index 0000000000000..827dc15ff171b
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/metric/palette.test.ts
@@ -0,0 +1,177 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { getPalette } from './palette';
+
+describe('getPalette', () => {
+ const invalidRules = [
+ { id: 'some-id-0' },
+ { id: 'some-id-1', value: 10 },
+ { id: 'some-id-2', operator: 'gte' },
+ { id: 'some-id-3', color: '#000' },
+ { id: 'some-id-4', background_color: '#000' },
+ ];
+ test('should return undefined if no filled rules was provided', () => {
+ expect(getPalette([])).toBeUndefined();
+ expect(getPalette(invalidRules)).toBeUndefined();
+ });
+
+ test('should return undefined if only one valid rule is provided and it is not lte', () => {
+ expect(getPalette([])).toBeUndefined();
+ expect(
+ getPalette([
+ ...invalidRules,
+ { id: 'some-id-5', operator: 'gt', value: 100, background_color: '#000' },
+ ])
+ ).toBeUndefined();
+ });
+
+ test('should return custom palette if only one valid rule is provided and it is lte', () => {
+ expect(getPalette([])).toBeUndefined();
+ expect(
+ getPalette([
+ ...invalidRules,
+ { id: 'some-id-5', operator: 'lte', value: 100, background_color: '#000' },
+ ])
+ ).toEqual({
+ name: 'custom',
+ params: {
+ colorStops: [{ color: '#000000', stop: 100 }],
+ continuity: 'below',
+ maxSteps: 5,
+ name: 'custom',
+ progression: 'fixed',
+ rangeMax: 100,
+ rangeMin: -Infinity,
+ rangeType: 'number',
+ reverse: false,
+ steps: 1,
+ stops: [{ color: '#000000', stop: 100 }],
+ },
+ type: 'palette',
+ });
+ });
+
+ test('should return undefined if more than two types of rules', () => {
+ expect(getPalette([])).toBeUndefined();
+ expect(
+ getPalette([
+ ...invalidRules,
+ { id: 'some-id-5', operator: 'lte', value: 100, background_color: '#000' },
+ { id: 'some-id-6', operator: 'gte', value: 150, background_color: '#000' },
+ { id: 'some-id-7', operator: 'lt', value: 200, background_color: '#000' },
+ ])
+ ).toBeUndefined();
+ });
+
+ test('should return undefined if two types of rules and last rule is not lte', () => {
+ expect(getPalette([])).toBeUndefined();
+ expect(
+ getPalette([
+ ...invalidRules,
+ { id: 'some-id-5', operator: 'gte', value: 100, background_color: '#000' },
+ { id: 'some-id-7', operator: 'lt', value: 200, background_color: '#000' },
+ { id: 'some-id-6', operator: 'gte', value: 150, background_color: '#000' },
+ ])
+ ).toBeUndefined();
+ });
+
+ test('should return undefined if all rules are lte', () => {
+ expect(getPalette([])).toBeUndefined();
+ expect(
+ getPalette([
+ ...invalidRules,
+ { id: 'some-id-5', operator: 'lte', value: 100, background_color: '#000' },
+ { id: 'some-id-7', operator: 'lte', value: 200, background_color: '#000' },
+ { id: 'some-id-6', operator: 'lte', value: 150, background_color: '#000' },
+ ])
+ ).toBeUndefined();
+ });
+
+ test('should return undefined if two types of rules and all except last one are lt and last one is not lte', () => {
+ expect(getPalette([])).toBeUndefined();
+ expect(
+ getPalette([
+ ...invalidRules,
+ { id: 'some-id-5', operator: 'lt', value: 100, background_color: '#000' },
+ { id: 'some-id-7', operator: 'gte', value: 200, background_color: '#000' },
+ { id: 'some-id-6', operator: 'lt', value: 150, background_color: '#000' },
+ ])
+ ).toBeUndefined();
+ });
+
+ test('should return custom palette if two types of rules and all except last one is lt and last one is lte', () => {
+ expect(getPalette([])).toBeUndefined();
+ expect(
+ getPalette([
+ ...invalidRules,
+ { id: 'some-id-5', operator: 'lt', value: 100, background_color: '#000' },
+ { id: 'some-id-7', operator: 'lte', value: 200, background_color: '#000' },
+ { id: 'some-id-6', operator: 'lt', value: 150, background_color: '#000' },
+ ])
+ ).toEqual({
+ name: 'custom',
+ params: {
+ colorStops: [
+ { color: '#000000', stop: -Infinity },
+ { color: '#000000', stop: 100 },
+ { color: '#000000', stop: 150 },
+ ],
+ continuity: 'below',
+ maxSteps: 5,
+ name: 'custom',
+ progression: 'fixed',
+ rangeMax: 200,
+ rangeMin: -Infinity,
+ rangeType: 'number',
+ reverse: false,
+ steps: 4,
+ stops: [
+ { color: '#000000', stop: 100 },
+ { color: '#000000', stop: 150 },
+ { color: '#000000', stop: 200 },
+ ],
+ },
+ type: 'palette',
+ });
+ });
+
+ test('should return custom palette if last one is lte and all previous are gte', () => {
+ expect(getPalette([])).toBeUndefined();
+ expect(
+ getPalette([
+ ...invalidRules,
+ { id: 'some-id-5', operator: 'gte', value: 100, background_color: '#000' },
+ { id: 'some-id-7', operator: 'lte', value: 200, background_color: '#000' },
+ { id: 'some-id-6', operator: 'gte', value: 150, background_color: '#000' },
+ ])
+ ).toEqual({
+ name: 'custom',
+ params: {
+ colorStops: [
+ { color: '#000000', stop: 100 },
+ { color: '#000000', stop: 150 },
+ ],
+ continuity: 'none',
+ maxSteps: 5,
+ name: 'custom',
+ progression: 'fixed',
+ rangeMax: 200,
+ rangeMin: 100,
+ rangeType: 'number',
+ reverse: false,
+ steps: 2,
+ stops: [
+ { color: '#000000', stop: 150 },
+ { color: '#000000', stop: 200 },
+ ],
+ },
+ type: 'palette',
+ });
+ });
+});
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/metric/palette.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/metric/palette.ts
new file mode 100644
index 0000000000000..55741c57595e7
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/metric/palette.ts
@@ -0,0 +1,214 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 color from 'color';
+import { ColorStop, CustomPaletteParams, PaletteOutput } from '@kbn/coloring';
+import { uniqBy } from 'lodash';
+import { Panel } from '../../../../../common/types';
+
+const Operators = {
+ GTE: 'gte',
+ GT: 'gt',
+ LTE: 'lte',
+ LT: 'lt',
+} as const;
+
+type ColorStopsWithMinMax = Pick<
+ CustomPaletteParams,
+ 'colorStops' | 'stops' | 'steps' | 'rangeMax' | 'rangeMin' | 'continuity'
+>;
+
+const getColorStopsWithMinMaxForAllGteOrWithLte = (
+ rules: Exclude,
+ tailOperator: string
+): ColorStopsWithMinMax => {
+ const lastRule = rules[rules.length - 1];
+ const lastRuleColor = (lastRule.background_color ?? lastRule.color)!;
+
+ const colorStops = rules.reduce((colors, rule, index, rulesArr) => {
+ const rgbColor = (rule.background_color ?? rule.color)!;
+ if (index === rulesArr.length - 1 && tailOperator === Operators.LTE) {
+ return colors;
+ }
+ // if last operation is LTE, color of gte should be replaced by lte
+ if (index === rulesArr.length - 2 && tailOperator === Operators.LTE) {
+ return [
+ ...colors,
+ {
+ color: color(lastRuleColor).hex(),
+ stop: rule.value!,
+ },
+ ];
+ }
+ return [
+ ...colors,
+ {
+ color: color(rgbColor).hex(),
+ stop: rule.value!,
+ },
+ ];
+ }, []);
+
+ const stops = colorStops.reduce((prevStops, colorStop, index, colorStopsArr) => {
+ if (index === colorStopsArr.length - 1) {
+ return [
+ ...prevStops,
+ {
+ color: colorStop.color,
+ stop: tailOperator === Operators.LTE ? lastRule.value! : colorStop.stop + 1,
+ },
+ ];
+ }
+ return [...prevStops, { color: colorStop.color, stop: colorStopsArr[index + 1].stop }];
+ }, []);
+
+ const [rule] = rules;
+ return {
+ rangeMin: rule.value,
+ rangeMax: tailOperator === Operators.LTE ? lastRule.value : Infinity,
+ colorStops,
+ stops,
+ steps: colorStops.length,
+ continuity: tailOperator === Operators.LTE ? 'none' : 'above',
+ };
+};
+
+const getColorStopsWithMinMaxForLtWithLte = (
+ rules: Exclude
+): ColorStopsWithMinMax => {
+ const lastRule = rules[rules.length - 1];
+ const colorStops = rules.reduce((colors, rule, index, rulesArr) => {
+ if (index === 0) {
+ return [{ color: color((rule.background_color ?? rule.color)!).hex(), stop: -Infinity }];
+ }
+ const rgbColor = (rule.background_color ?? rule.color)!;
+ return [
+ ...colors,
+ {
+ color: color(rgbColor).hex(),
+ stop: rulesArr[index - 1].value!,
+ },
+ ];
+ }, []);
+
+ const stops = colorStops.reduce((prevStops, colorStop, index, colorStopsArr) => {
+ if (index === colorStopsArr.length - 1) {
+ return [
+ ...prevStops,
+ {
+ color: colorStop.color,
+ stop: lastRule.value!,
+ },
+ ];
+ }
+ return [...prevStops, { color: colorStop.color, stop: colorStopsArr[index + 1].stop }];
+ }, []);
+
+ return {
+ rangeMin: -Infinity,
+ rangeMax: lastRule.value,
+ colorStops,
+ stops,
+ steps: colorStops.length + 1,
+ continuity: 'below',
+ };
+};
+
+const getColorStopWithMinMaxForLte = (
+ rule: Exclude[number]
+): ColorStopsWithMinMax => {
+ const colorStop = {
+ color: color((rule.background_color ?? rule.color)!).hex(),
+ stop: rule.value!,
+ };
+ return {
+ rangeMin: -Infinity,
+ rangeMax: rule.value!,
+ colorStops: [colorStop],
+ stops: [colorStop],
+ steps: 1,
+ continuity: 'below',
+ };
+};
+
+const getCustomPalette = (
+ colorStopsWithMinMax: ColorStopsWithMinMax
+): PaletteOutput => {
+ return {
+ name: 'custom',
+ params: {
+ continuity: 'all',
+ maxSteps: 5,
+ name: 'custom',
+ progression: 'fixed',
+ rangeMax: Infinity,
+ rangeMin: -Infinity,
+ rangeType: 'number',
+ reverse: false,
+ ...colorStopsWithMinMax,
+ },
+ type: 'palette',
+ };
+};
+
+export const getPalette = (
+ rules: Exclude
+): PaletteOutput | null | undefined => {
+ const validRules =
+ rules.filter(
+ ({ operator, color: textColor, value, background_color: bColor }) =>
+ operator && (bColor ?? textColor) && value !== undefined
+ ) ?? [];
+
+ validRules.sort((rule1, rule2) => {
+ return rule1.value! - rule2.value!;
+ });
+
+ const kindOfRules = uniqBy(validRules, 'operator');
+
+ if (!kindOfRules.length) {
+ return;
+ }
+
+ // lnsMetric is supporting lte only, if one rule is defined
+ if (validRules.length === 1) {
+ if (validRules[0].operator !== Operators.LTE) {
+ return;
+ }
+ return getCustomPalette(getColorStopWithMinMaxForLte(validRules[0]));
+ }
+
+ const headRules = validRules.slice(0, -1);
+ const tailRule = validRules[validRules.length - 1];
+ const kindOfHeadRules = uniqBy(headRules, 'operator');
+
+ if (
+ kindOfHeadRules.length > 1 ||
+ (kindOfHeadRules[0].operator !== tailRule.operator && tailRule.operator !== Operators.LTE)
+ ) {
+ return;
+ }
+
+ const [rule] = kindOfHeadRules;
+
+ if (rule.operator === Operators.LTE) {
+ return;
+ }
+
+ if (rule.operator === Operators.LT) {
+ if (tailRule.operator !== Operators.LTE) {
+ return;
+ }
+ return getCustomPalette(getColorStopsWithMinMaxForLtWithLte(validRules));
+ }
+
+ if (rule.operator === Operators.GTE) {
+ return getCustomPalette(
+ getColorStopsWithMinMaxForAllGteOrWithLte(validRules, tailRule.operator!)
+ );
+ }
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/xy/layers.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/xy/layers.test.ts
index f869ac64380c6..6c94971397d3e 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/xy/layers.test.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/xy/layers.test.ts
@@ -229,6 +229,31 @@ describe('getLayers', () => {
],
series: [createSeries({ metrics: staticValueMetric })],
});
+
+ const panelWithSingleAnnotationWithoutQueryStringAndTimefield = createPanel({
+ annotations: [
+ {
+ fields: 'geo.src,host',
+ template: 'Security Error from {{geo.src}} on {{host}}',
+ id: 'ann1',
+ color: 'rgba(211,49,21,0.7)',
+ icon: 'fa-asterisk',
+ ignore_global_filters: 1,
+ ignore_panel_filters: 1,
+ time_field: '',
+ query_string: {
+ query: '',
+ language: 'lucene',
+ },
+ hidden: true,
+ index_pattern: {
+ id: 'test',
+ },
+ },
+ ],
+ series: [createSeries({ metrics: staticValueMetric })],
+ });
+
const panelWithMultiAnnotations = createPanel({
annotations: [
{
@@ -284,6 +309,27 @@ describe('getLayers', () => {
],
series: [createSeries({ metrics: staticValueMetric })],
});
+ const panelWithSingleAnnotationDefaultDataView = createPanel({
+ annotations: [
+ {
+ fields: 'geo.src,host',
+ template: 'Security Error from {{geo.src}} on {{host}}',
+ query_string: {
+ query: 'tags:error AND tags:security',
+ language: 'lucene',
+ },
+ id: 'ann1',
+ color: 'rgba(211,49,21,0.7)',
+ time_field: 'timestamp',
+ icon: 'fa-asterisk',
+ ignore_global_filters: 1,
+ ignore_panel_filters: 1,
+ hidden: true,
+ index_pattern: '',
+ },
+ ],
+ series: [createSeries({ metrics: staticValueMetric })],
+ });
test.each<[string, [Record, Panel], Array>]>([
[
@@ -411,6 +457,51 @@ describe('getLayers', () => {
},
],
],
+ [
+ 'annotation layer should gets correct default params',
+ [dataSourceLayersWithStatic, panelWithSingleAnnotationWithoutQueryStringAndTimefield],
+ [
+ {
+ layerType: 'referenceLine',
+ accessors: ['column-id-1'],
+ layerId: 'test-layer-1',
+ yConfig: [
+ {
+ forAccessor: 'column-id-1',
+ axisMode: 'right',
+ color: '#68BC00',
+ fill: 'below',
+ },
+ ],
+ },
+ {
+ layerId: 'test-id',
+ layerType: 'annotations',
+ ignoreGlobalFilters: true,
+ annotations: [
+ {
+ color: '#D33115',
+ extraFields: ['geo.src'],
+ filter: {
+ language: 'lucene',
+ query: '*',
+ type: 'kibana_query',
+ },
+ icon: 'asterisk',
+ id: 'ann1',
+ isHidden: true,
+ key: {
+ type: 'point_in_time',
+ },
+ label: 'Event',
+ timeField: 'test_field',
+ type: 'query',
+ },
+ ],
+ indexPatternId: 'test',
+ },
+ ],
+ ],
[
'multiple annotations with different data views create separate layers',
[dataSourceLayersWithStatic, panelWithMultiAnnotations],
@@ -451,6 +542,14 @@ describe('getLayers', () => {
timeField: 'timestamp',
type: 'query',
},
+ ],
+ indexPatternId: 'test',
+ },
+ {
+ layerId: 'test-id',
+ layerType: 'annotations',
+ ignoreGlobalFilters: false,
+ annotations: [
{
color: '#0000FF',
filter: {
@@ -497,6 +596,51 @@ describe('getLayers', () => {
},
],
],
+ [
+ 'annotation layer gets correct dataView when none is defined',
+ [dataSourceLayersWithStatic, panelWithSingleAnnotationDefaultDataView],
+ [
+ {
+ layerType: 'referenceLine',
+ accessors: ['column-id-1'],
+ layerId: 'test-layer-1',
+ yConfig: [
+ {
+ forAccessor: 'column-id-1',
+ axisMode: 'right',
+ color: '#68BC00',
+ fill: 'below',
+ },
+ ],
+ },
+ {
+ layerId: 'test-id',
+ layerType: 'annotations',
+ ignoreGlobalFilters: true,
+ annotations: [
+ {
+ color: '#D33115',
+ extraFields: ['geo.src'],
+ filter: {
+ language: 'lucene',
+ query: 'tags:error AND tags:security',
+ type: 'kibana_query',
+ },
+ icon: 'asterisk',
+ id: 'ann1',
+ isHidden: true,
+ key: {
+ type: 'point_in_time',
+ },
+ label: 'Event',
+ timeField: 'timestamp',
+ type: 'query',
+ },
+ ],
+ indexPatternId: 'default',
+ },
+ ],
+ ],
])('should return %s', async (_, input, expected) => {
const layers = await getLayers(...input, indexPatternsService as DataViewsPublicPluginStart);
expect(layers).toEqual(expected.map(expect.objectContaining));
@@ -507,13 +651,20 @@ const mockedIndices = [
{
id: 'test',
title: 'test',
+ timeFieldName: 'test_field',
getFieldByName: (name: string) => ({ aggregatable: name !== 'host' }),
},
] as unknown as DataView[];
const indexPatternsService = {
- getDefault: jest.fn(() => Promise.resolve({ id: 'default', title: 'index' })),
- get: jest.fn(() => Promise.resolve(mockedIndices[0])),
+ getDefault: jest.fn(() =>
+ Promise.resolve({
+ id: 'default',
+ title: 'index',
+ getFieldByName: (name: string) => ({ aggregatable: name !== 'host' }),
+ })
+ ),
+ get: jest.fn((id) => Promise.resolve({ ...mockedIndices[0], id })),
find: jest.fn((search: string, size: number) => {
if (size !== 1) {
// shouldn't request more than one data view since there is a significant performance penalty
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/xy/layers.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/xy/layers.ts
index 6815e278e0f30..ec0e24e2db873 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/xy/layers.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/configurations/xy/layers.ts
@@ -20,6 +20,7 @@ import Color from 'color';
import { euiLightVars } from '@kbn/ui-theme';
import { groupBy } from 'lodash';
import { DataViewsPublicPluginStart, DataView } from '@kbn/data-plugin/public/data_views';
+import { getDefaultQueryLanguage } from '../../../../application/components/lib/get_default_query_language';
import { fetchIndexPattern } from '../../../../../common/index_patterns_utils';
import { ICON_TYPES_MAP } from '../../../../application/visualizations/constants';
import { SUPPORTED_METRICS } from '../../metrics';
@@ -62,7 +63,7 @@ function getColor(
}
function nonNullable(value: T): value is NonNullable {
- return value !== null && value !== undefined;
+ return value != null;
}
export const getLayers = async (
@@ -131,16 +132,22 @@ export const getLayers = async (
return nonAnnotationsLayers;
}
- const annotationsByIndexPattern = groupBy(
- model.annotations,
- (a) => typeof a.index_pattern === 'object' && 'id' in a.index_pattern && a.index_pattern.id
- );
+ const annotationsByIndexPatternAndIgnoreFlag = groupBy(model.annotations, (a) => {
+ const id = typeof a.index_pattern === 'object' && 'id' in a.index_pattern && a.index_pattern.id;
+ return `${id}-${Boolean(a.ignore_global_filters)}`;
+ });
try {
const annotationsLayers: Array = await Promise.all(
- Object.entries(annotationsByIndexPattern).map(async ([indexPatternId, annotations]) => {
+ Object.values(annotationsByIndexPatternAndIgnoreFlag).map(async (annotations) => {
+ const [firstAnnotation] = annotations;
+ const indexPatternId =
+ typeof firstAnnotation.index_pattern === 'string'
+ ? firstAnnotation.index_pattern
+ : firstAnnotation.index_pattern?.id;
const convertedAnnotations: EventAnnotationConfig[] = [];
- const { indexPattern } = (await fetchIndexPattern({ id: indexPatternId }, dataViews)) || {};
+ const { indexPattern } =
+ (await fetchIndexPattern(indexPatternId && { id: indexPatternId }, dataViews)) || {};
if (indexPattern) {
annotations.forEach((a: Annotation) => {
@@ -152,9 +159,9 @@ export const getLayers = async (
return {
layerId: v4(),
layerType: 'annotations',
- ignoreGlobalFilters: true,
+ ignoreGlobalFilters: Boolean(firstAnnotation.ignore_global_filters),
annotations: convertedAnnotations,
- indexPatternId,
+ indexPatternId: indexPattern.id!,
};
}
})
@@ -170,38 +177,36 @@ const convertAnnotation = (
annotation: Annotation,
dataView: DataView
): EventAnnotationConfig | undefined => {
- if (annotation.query_string) {
- const extraFields = annotation.fields
- ? annotation.fields
- ?.replace(/\s/g, '')
- ?.split(',')
- .map((field) => {
- const dataViewField = dataView.getFieldByName(field);
- return dataViewField && dataViewField.aggregatable ? field : undefined;
- })
- .filter(nonNullable)
- : undefined;
- return {
- type: 'query',
- id: annotation.id,
- label: 'Event',
- key: {
- type: 'point_in_time',
- },
- color: new Color(transparentize(annotation.color || euiLightVars.euiColorAccent, 1)).hex(),
- timeField: annotation.time_field,
- icon:
- annotation.icon &&
- ICON_TYPES_MAP[annotation.icon] &&
- typeof ICON_TYPES_MAP[annotation.icon] === 'string'
- ? ICON_TYPES_MAP[annotation.icon]
- : 'triangle',
- filter: {
- type: 'kibana_query',
- ...annotation.query_string,
- },
- extraFields,
- isHidden: annotation.hidden,
- };
- }
+ const extraFields = annotation.fields
+ ?.replace(/\s/g, '')
+ .split(',')
+ .map((field) => {
+ const dataViewField = dataView.getFieldByName(field);
+ return dataViewField && dataViewField.aggregatable ? field : undefined;
+ })
+ .filter(nonNullable);
+
+ return {
+ type: 'query',
+ id: annotation.id,
+ label: 'Event',
+ key: {
+ type: 'point_in_time',
+ },
+ color: new Color(transparentize(annotation.color || euiLightVars.euiColorAccent, 1)).hex(),
+ timeField: annotation.time_field || dataView.timeFieldName,
+ icon:
+ annotation.icon &&
+ ICON_TYPES_MAP[annotation.icon] &&
+ typeof ICON_TYPES_MAP[annotation.icon] === 'string'
+ ? ICON_TYPES_MAP[annotation.icon]
+ : 'triangle',
+ filter: {
+ type: 'kibana_query',
+ query: annotation.query_string?.query || '*',
+ language: annotation.query_string?.language || getDefaultQueryLanguage(),
+ },
+ extraFields,
+ isHidden: annotation.hidden,
+ };
};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/index.ts
index 36f05c440bdc2..e03701e6ea153 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/index.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/index.ts
@@ -17,7 +17,7 @@ export {
export { convertToCumulativeSumColumns } from './cumulative_sum';
export { convertFilterRatioToFormulaColumn } from './filter_ratio';
export { convertToLastValueColumn } from './last_value';
-export { convertToStaticValueColumn } from './static_value';
+export { convertToStaticValueColumn, convertStaticValueToFormulaColumn } from './static_value';
export { convertToFiltersColumn } from './filters';
export { convertToDateHistogramColumn } from './date_histogram';
export { convertToTermsColumn } from './terms';
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/static_value.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/static_value.ts
index c4400f72b289b..e03a9d7821364 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/static_value.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/static_value.ts
@@ -7,9 +7,10 @@
*/
import { StaticValueParams } from '@kbn/visualizations-plugin/common/convert_to_lens';
-import { CommonColumnsConverterArgs, StaticValueColumn } from './types';
+import { CommonColumnsConverterArgs, FormulaColumn, StaticValueColumn } from './types';
import type { Metric } from '../../../../common/types';
import { createColumn, getFormat } from './column';
+import { createFormulaColumn } from './formula';
export const convertToStaticValueParams = ({ value }: Metric): StaticValueParams => ({
value,
@@ -37,3 +38,22 @@ export const convertToStaticValueColumn = (
},
};
};
+
+export const convertStaticValueToFormulaColumn = (
+ { series, metrics, dataView }: CommonColumnsConverterArgs,
+ {
+ visibleSeriesCount = 0,
+ reducedTimeRange,
+ }: { visibleSeriesCount?: number; reducedTimeRange?: string } = {}
+): FormulaColumn | null => {
+ // Lens support reference lines only when at least one layer data exists
+ if (visibleSeriesCount === 1) {
+ return null;
+ }
+ const currentMetric = metrics[metrics.length - 1];
+ return createFormulaColumn(currentMetric.value ?? '', {
+ series,
+ metric: currentMetric,
+ dataView,
+ });
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/types.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/types.ts
index d21291dc2622a..e5b862a0fe70f 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/types.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/convert/types.ts
@@ -85,7 +85,7 @@ export type MovingAverageColumn = GenericColumnWithMeta;
export type StaticValueColumn = GenericColumnWithMeta;
-type ColumnsWithoutMeta = FiltersColumn | TermsColumn | DateHistogramColumn;
+export type ColumnsWithoutMeta = FiltersColumn | TermsColumn | DateHistogramColumn;
export type AnyColumnWithReferences = GenericColumnWithMeta;
type CommonColumns = Exclude;
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/supported_metrics.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/supported_metrics.ts
index 933e7e344b7fd..76d15793f4516 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/supported_metrics.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/metrics/supported_metrics.ts
@@ -62,7 +62,12 @@ export type SupportedMetrics = LocalSupportedMetrics & {
[Key in UnsupportedSupportedMetrics]?: null;
};
-const supportedPanelTypes: readonly PANEL_TYPES[] = [PANEL_TYPES.TIMESERIES, PANEL_TYPES.TOP_N];
+const supportedPanelTypes: readonly PANEL_TYPES[] = [
+ PANEL_TYPES.TIMESERIES,
+ PANEL_TYPES.TOP_N,
+ PANEL_TYPES.METRIC,
+];
+
const supportedTimeRangeModes: readonly TIME_RANGE_DATA_MODES[] = [
TIME_RANGE_DATA_MODES.ENTIRE_TIME_RANGE,
TIME_RANGE_DATA_MODES.LAST_VALUE,
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/metrics_columns.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/metrics_columns.test.ts
index 5ca1fe71a0ada..4461072c8df62 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/metrics_columns.test.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/metrics_columns.test.ts
@@ -20,6 +20,7 @@ const mockConvertToCounterRateColumn = jest.fn();
const mockConvertOtherAggsToFormulaColumn = jest.fn();
const mockConvertToLastValueColumn = jest.fn();
const mockConvertToStaticValueColumn = jest.fn();
+const mockConvertStaticValueToFormulaColumn = jest.fn();
const mockConvertToStandartDeviationColumn = jest.fn();
const mockConvertMetricAggregationColumnWithoutSpecialParams = jest.fn();
@@ -32,6 +33,7 @@ jest.mock('../convert', () => ({
convertOtherAggsToFormulaColumn: jest.fn(() => mockConvertOtherAggsToFormulaColumn()),
convertToLastValueColumn: jest.fn(() => mockConvertToLastValueColumn()),
convertToStaticValueColumn: jest.fn(() => mockConvertToStaticValueColumn()),
+ convertStaticValueToFormulaColumn: jest.fn(() => mockConvertStaticValueToFormulaColumn()),
convertToStandartDeviationColumn: jest.fn(() => mockConvertToStandartDeviationColumn()),
convertMetricAggregationColumnWithoutSpecialParams: jest.fn(() =>
mockConvertMetricAggregationColumnWithoutSpecialParams()
@@ -138,8 +140,18 @@ describe('getMetricsColumns', () => {
mockConvertToLastValueColumn,
],
[
- 'call convertToStaticValueColumn if metric type is static',
+ 'call convertStaticValueToFormulaColumn if metric type is static',
[createSeries({ metrics: [{ type: TSVB_METRIC_TYPES.STATIC, id: '1' }] }), dataView, 1],
+ mockConvertStaticValueToFormulaColumn,
+ ],
+ [
+ 'call convertToStaticValueColumn if metric type is static and isStaticValueColumnSupported is true',
+ [
+ createSeries({ metrics: [{ type: TSVB_METRIC_TYPES.STATIC, id: '1' }] }),
+ dataView,
+ 1,
+ { isStaticValueColumnSupported: true },
+ ],
mockConvertToStaticValueColumn,
],
[
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/metrics_columns.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/metrics_columns.ts
index 07294a3a61aaa..8f7d4ded0d076 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/metrics_columns.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/lib/series/metrics_columns.ts
@@ -21,6 +21,7 @@ import {
convertFilterRatioToFormulaColumn,
convertToLastValueColumn,
convertToStaticValueColumn,
+ convertStaticValueToFormulaColumn,
convertMetricAggregationColumnWithoutSpecialParams,
convertToCounterRateColumn,
convertToStandartDeviationColumn,
@@ -31,7 +32,10 @@ export const getMetricsColumns = (
series: Series,
dataView: DataView,
visibleSeriesCount: number,
- reducedTimeRange?: string
+ {
+ isStaticValueColumnSupported = false,
+ reducedTimeRange,
+ }: { reducedTimeRange?: string; isStaticValueColumnSupported?: boolean } = {}
): Column[] | null => {
const { metrics: validMetrics, seriesAgg } = getSeriesAgg(
series.metrics as [Metric, ...Metric[]]
@@ -117,10 +121,12 @@ export const getMetricsColumns = (
return getValidColumns(column);
}
case 'static': {
- const column = convertToStaticValueColumn(columnsConverterArgs, {
- visibleSeriesCount,
- reducedTimeRange,
- });
+ const column = isStaticValueColumnSupported
+ ? convertToStaticValueColumn(columnsConverterArgs, {
+ visibleSeriesCount,
+ reducedTimeRange,
+ })
+ : convertStaticValueToFormulaColumn(columnsConverterArgs);
return getValidColumns(column);
}
case 'std_deviation': {
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.test.ts
new file mode 100644
index 0000000000000..9407599573d9d
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.test.ts
@@ -0,0 +1,272 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { convertToLens } from '.';
+import { createPanel, createSeries } from '../lib/__mocks__';
+
+const mockGetMetricsColumns = jest.fn();
+const mockGetBucketsColumns = jest.fn();
+const mockGetConfigurationForMetric = jest.fn();
+const mockIsValidMetrics = jest.fn();
+const mockGetDatasourceValue = jest
+ .fn()
+ .mockImplementation(() => Promise.resolve(stubLogstashDataView));
+const mockGetDataSourceInfo = jest.fn();
+
+jest.mock('../../services', () => ({
+ getDataViewsStart: jest.fn(() => mockGetDatasourceValue),
+}));
+
+jest.mock('../lib/series', () => ({
+ getMetricsColumns: jest.fn(() => mockGetMetricsColumns()),
+ getBucketsColumns: jest.fn(() => mockGetBucketsColumns()),
+}));
+
+jest.mock('../lib/configurations/metric', () => ({
+ getConfigurationForMetric: jest.fn(() => mockGetConfigurationForMetric()),
+}));
+
+jest.mock('../lib/metrics', () => ({
+ isValidMetrics: jest.fn(() => mockIsValidMetrics()),
+ getReducedTimeRange: jest.fn().mockReturnValue('10'),
+}));
+
+jest.mock('../lib/datasource', () => ({
+ getDataSourceInfo: jest.fn(() => mockGetDataSourceInfo()),
+}));
+
+describe('convertToLens', () => {
+ const model = createPanel({
+ series: [
+ createSeries({
+ metrics: [
+ { id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' },
+ { id: 'some-id-1', type: METRIC_TYPES.COUNT },
+ ],
+ }),
+ ],
+ });
+
+ const bucket = {
+ isBucketed: true,
+ isSplit: true,
+ operationType: 'terms',
+ params: {
+ exclude: [],
+ excludeIsRegex: true,
+ include: [],
+ includeIsRegex: true,
+ orderAgg: {
+ columnId: 'some-id-0',
+ dataType: 'number',
+ isBucketed: true,
+ isSplit: false,
+ operationType: 'average',
+ params: {},
+ sourceField: 'bytes',
+ },
+ orderBy: { columnId: 'some-id-0', type: 'column' },
+ orderDirection: 'asc',
+ otherBucket: false,
+ parentFormat: { id: 'terms' },
+ secondaryFields: [],
+ size: 3,
+ },
+ sourceField: 'bytes',
+ };
+
+ const bucket2 = {
+ isBucketed: true,
+ isSplit: true,
+ operationType: 'terms',
+ params: {
+ exclude: [],
+ excludeIsRegex: true,
+ include: [],
+ includeIsRegex: true,
+ orderAgg: {
+ columnId: 'some-id-1',
+ dataType: 'number',
+ isBucketed: true,
+ isSplit: false,
+ operationType: 'average',
+ params: {},
+ sourceField: 'bytes',
+ },
+ orderBy: { columnId: 'some-id-1', type: 'column' },
+ orderDirection: 'desc',
+ otherBucket: false,
+ parentFormat: { id: 'terms' },
+ secondaryFields: [],
+ size: 10,
+ },
+ sourceField: 'bytes',
+ };
+
+ const metric = {
+ meta: { metricId: 'some-id-0' },
+ operationType: 'last_value',
+ params: { showArrayValues: false, sortField: '@timestamp' },
+ reducedTimeRange: '10m',
+ };
+
+ beforeEach(() => {
+ mockIsValidMetrics.mockReturnValue(true);
+ mockGetDataSourceInfo.mockReturnValue({
+ indexPatternId: 'test-index-pattern',
+ timeField: 'timeField',
+ indexPattern: { id: 'test-index-pattern' },
+ });
+ mockGetMetricsColumns.mockReturnValue([{}]);
+ mockGetBucketsColumns.mockReturnValue([{}]);
+ mockGetConfigurationForMetric.mockReturnValue({});
+ });
+
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+
+ test('should return null for invalid metrics', async () => {
+ mockIsValidMetrics.mockReturnValue(null);
+ const result = await convertToLens(model);
+ expect(result).toBeNull();
+ expect(mockIsValidMetrics).toBeCalledTimes(1);
+ });
+
+ test('should return null for invalid or unsupported metrics', async () => {
+ mockGetMetricsColumns.mockReturnValue(null);
+ const result = await convertToLens(model);
+ expect(result).toBeNull();
+ expect(mockGetMetricsColumns).toBeCalledTimes(1);
+ });
+
+ test('should return null for invalid or unsupported buckets', async () => {
+ mockGetBucketsColumns.mockReturnValue(null);
+ const result = await convertToLens(model);
+ expect(result).toBeNull();
+ expect(mockGetBucketsColumns).toBeCalledTimes(1);
+ });
+
+ test('should return state for valid model', async () => {
+ const result = await convertToLens(model);
+ expect(result).toBeDefined();
+ expect(result?.type).toBe('lnsMetric');
+ expect(mockGetBucketsColumns).toBeCalledTimes(model.series.length);
+ expect(mockGetConfigurationForMetric).toBeCalledTimes(1);
+ });
+
+ test('should skip hidden series', async () => {
+ const result = await convertToLens(
+ createPanel({
+ series: [
+ createSeries({
+ metrics: [{ id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' }],
+ hidden: true,
+ }),
+ ],
+ })
+ );
+ expect(result).toBeDefined();
+ expect(result?.type).toBe('lnsMetric');
+ expect(mockIsValidMetrics).toBeCalledTimes(0);
+ });
+
+ test('should return null if multiple indexPatterns are provided', async () => {
+ mockGetDataSourceInfo.mockReturnValueOnce({
+ indexPatternId: 'test-index-pattern-1',
+ timeField: 'timeField',
+ indexPattern: { id: 'test-index-pattern-1' },
+ });
+
+ const result = await convertToLens(
+ createPanel({
+ series: [
+ createSeries({
+ metrics: [{ id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' }],
+ hidden: false,
+ }),
+ createSeries({
+ metrics: [{ id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' }],
+ hidden: false,
+ }),
+ ],
+ })
+ );
+ expect(result).toBeNull();
+ });
+
+ test('should return null if visible series is 2 and bucket is 1', async () => {
+ mockGetBucketsColumns.mockReturnValueOnce([bucket]);
+ mockGetBucketsColumns.mockReturnValueOnce([]);
+ mockGetMetricsColumns.mockReturnValueOnce([metric]);
+
+ const result = await convertToLens(
+ createPanel({
+ series: [
+ createSeries({
+ metrics: [{ id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' }],
+ hidden: false,
+ }),
+ createSeries({
+ metrics: [{ id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' }],
+ hidden: false,
+ }),
+ ],
+ })
+ );
+ expect(result).toBeNull();
+ });
+
+ test('should return null if visible series is 2 and two not unique buckets', async () => {
+ mockGetBucketsColumns.mockReturnValueOnce([bucket]);
+ mockGetBucketsColumns.mockReturnValueOnce([bucket2]);
+ mockGetMetricsColumns.mockReturnValueOnce([metric]);
+
+ const result = await convertToLens(
+ createPanel({
+ series: [
+ createSeries({
+ metrics: [{ id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' }],
+ hidden: false,
+ }),
+ createSeries({
+ metrics: [{ id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' }],
+ hidden: false,
+ }),
+ ],
+ })
+ );
+ expect(result).toBeNull();
+ });
+
+ test('should return state if visible series is 2 and two unique buckets', async () => {
+ mockGetBucketsColumns.mockReturnValueOnce([bucket]);
+ mockGetBucketsColumns.mockReturnValueOnce([bucket]);
+ mockGetMetricsColumns.mockReturnValueOnce([metric]);
+
+ const result = await convertToLens(
+ createPanel({
+ series: [
+ createSeries({
+ metrics: [{ id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' }],
+ hidden: false,
+ }),
+ createSeries({
+ metrics: [{ id: 'some-id', type: METRIC_TYPES.AVG, field: 'test-field' }],
+ hidden: false,
+ }),
+ ],
+ })
+ );
+ expect(result).toBeDefined();
+ expect(result?.type).toBe('lnsMetric');
+ expect(mockGetConfigurationForMetric).toBeCalledTimes(1);
+ });
+});
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.ts
new file mode 100644
index 0000000000000..25f55b5a1c44c
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/index.ts
@@ -0,0 +1,130 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 uuid from 'uuid';
+import { DataView, parseTimeShift } from '@kbn/data-plugin/common';
+import { getIndexPatternIds } from '@kbn/visualizations-plugin/common/convert_to_lens';
+import { PANEL_TYPES } from '../../../common/enums';
+import { getDataViewsStart } from '../../services';
+import { getDataSourceInfo } from '../lib/datasource';
+import { getMetricsColumns, getBucketsColumns } from '../lib/series';
+import { getConfigurationForMetric as getConfiguration } from '../lib/configurations/metric';
+import { getReducedTimeRange, isValidMetrics } from '../lib/metrics';
+import { ConvertTsvbToLensVisualization } from '../types';
+import { ColumnsWithoutMeta, Layer as ExtendedLayer } from '../lib/convert';
+import { excludeMetaFromLayers, getUniqueBuckets } from './utils';
+
+const MAX_SERIES = 2;
+const MAX_BUCKETS = 2;
+
+export const convertToLens: ConvertTsvbToLensVisualization = async (model, timeRange) => {
+ const dataViews = getDataViewsStart();
+ const seriesNum = model.series.filter((series) => !series.hidden).length;
+
+ const indexPatternIds = new Set();
+ const visibleSeries = model.series.filter(({ hidden }) => !hidden);
+ let currentIndexPattern: DataView | null = null;
+ for (const series of visibleSeries) {
+ const datasourceInfo = await getDataSourceInfo(
+ model.index_pattern,
+ model.time_field,
+ Boolean(series.override_index_pattern),
+ series.series_index_pattern,
+ series.series_time_field,
+ dataViews
+ );
+
+ if (!datasourceInfo) {
+ return null;
+ }
+
+ const { indexPatternId, indexPattern } = datasourceInfo;
+ indexPatternIds.add(indexPatternId);
+ currentIndexPattern = indexPattern;
+ }
+
+ if (indexPatternIds.size > 1) {
+ return null;
+ }
+
+ const [indexPatternId] = indexPatternIds.values();
+
+ const buckets = [];
+ const metrics = [];
+
+ // handle multiple layers/series
+ for (const series of visibleSeries) {
+ // not valid time shift
+ if (series.offset_time && parseTimeShift(series.offset_time) === 'invalid') {
+ return null;
+ }
+
+ if (!isValidMetrics(series.metrics, PANEL_TYPES.METRIC, series.time_range_mode)) {
+ return null;
+ }
+
+ const reducedTimeRange = getReducedTimeRange(model, series, timeRange);
+
+ // handle multiple metrics
+ const metricsColumns = getMetricsColumns(series, currentIndexPattern!, seriesNum, {
+ reducedTimeRange,
+ });
+ if (metricsColumns === null) {
+ return null;
+ }
+
+ const bucketsColumns = getBucketsColumns(
+ model,
+ series,
+ metricsColumns,
+ currentIndexPattern!,
+ false
+ );
+
+ if (bucketsColumns === null) {
+ return null;
+ }
+
+ buckets.push(...bucketsColumns);
+ metrics.push(...metricsColumns);
+ }
+
+ let uniqueBuckets = buckets;
+ if (visibleSeries.length === MAX_SERIES && buckets.length) {
+ if (buckets.length !== MAX_BUCKETS) {
+ return null;
+ }
+
+ uniqueBuckets = getUniqueBuckets(buckets as ColumnsWithoutMeta[]);
+ if (uniqueBuckets.length !== 1) {
+ return null;
+ }
+ }
+
+ const [bucket] = uniqueBuckets;
+
+ const extendedLayer: ExtendedLayer = {
+ indexPatternId: indexPatternId as string,
+ layerId: uuid(),
+ columns: [...metrics, ...(bucket ? [bucket] : [])],
+ columnOrder: [],
+ };
+
+ const configuration = getConfiguration(model, extendedLayer, bucket);
+ if (!configuration) {
+ return null;
+ }
+
+ const layers = Object.values(excludeMetaFromLayers({ 0: extendedLayer }));
+ return {
+ type: 'lnsMetric',
+ layers,
+ configuration,
+ indexPatternIds: getIndexPatternIds(layers),
+ };
+};
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/utils.test.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/utils.test.ts
new file mode 100644
index 0000000000000..8f880dfe95c5e
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/utils.test.ts
@@ -0,0 +1,104 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { Column, DateHistogramColumn, TermsColumn } from '../lib/convert';
+import { getUniqueBuckets } from './utils';
+
+describe('getUniqueBuckets', () => {
+ const bucket2: TermsColumn = {
+ columnId: '12',
+ dataType: 'string',
+ isBucketed: true,
+ isSplit: true,
+ operationType: 'terms',
+ params: {
+ exclude: [],
+ excludeIsRegex: true,
+ include: [],
+ includeIsRegex: true,
+ orderAgg: {
+ columnId: 'some-id-1',
+ dataType: 'number',
+ isBucketed: true,
+ isSplit: false,
+ operationType: 'average',
+ params: {},
+ sourceField: 'bytes',
+ },
+ orderBy: { columnId: 'some-id-1', type: 'column' },
+ orderDirection: 'desc',
+ otherBucket: false,
+ parentFormat: { id: 'terms' },
+ secondaryFields: [],
+ size: 10,
+ },
+ sourceField: 'bytes',
+ };
+
+ it('should return unique buckets', () => {
+ expect(getUniqueBuckets([bucket2, bucket2])).toEqual([bucket2]);
+ });
+
+ it('should ignore columnIds', () => {
+ const bucketWithOtherColumnIds = {
+ ...bucket2,
+ columnId: '22',
+ params: {
+ ...bucket2.params,
+ orderAgg: { ...bucket2.params.orderAgg, columnId: '---1' } as Column,
+ orderBy: { ...bucket2.params.orderBy, columnId: '---2' } as {
+ type: 'column';
+ columnId: string;
+ },
+ },
+ };
+ expect(getUniqueBuckets([bucket2, bucketWithOtherColumnIds])).toEqual([bucket2]);
+ });
+
+ it('should respect differences of terms', () => {
+ const bucketWithOtherColumnIds = {
+ ...bucket2,
+ columnId: '22',
+ params: {
+ ...bucket2.params,
+ orderAgg: { ...bucket2.params.orderAgg, columnId: '---1' } as Column,
+ orderBy: { ...bucket2.params.orderBy, columnId: '---2' } as {
+ type: 'column';
+ columnId: string;
+ },
+ },
+ sourceField: 'name',
+ };
+ expect(getUniqueBuckets([bucket2, bucketWithOtherColumnIds])).toEqual([
+ bucket2,
+ bucketWithOtherColumnIds,
+ ]);
+ });
+
+ it('should respect differences of other buckets', () => {
+ const bucket: DateHistogramColumn = {
+ dataType: 'number',
+ isBucketed: true,
+ isSplit: false,
+ operationType: 'date_histogram',
+ params: { dropPartials: false, includeEmptyRows: true, interval: 'auto' },
+ sourceField: 'field1',
+ columnId: '1',
+ };
+ const bucket1 = {
+ ...bucket,
+ columnId: '22',
+ };
+ expect(getUniqueBuckets([bucket, bucket1])).toEqual([bucket]);
+ const bucket3 = {
+ ...bucket,
+ field: 'some-other-field',
+ };
+ expect(getUniqueBuckets([bucket, bucket3])).toEqual([bucket, bucket3]);
+ });
+});
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/utils.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/utils.ts
new file mode 100644
index 0000000000000..8df1b0f40f8be
--- /dev/null
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/metric/utils.ts
@@ -0,0 +1,65 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { uniqWith } from 'lodash';
+import deepEqual from 'react-fast-compare';
+import { Layer, Operations, TermsColumn } from '@kbn/visualizations-plugin/common/convert_to_lens';
+import { Layer as ExtendedLayer, excludeMetaFromColumn, ColumnsWithoutMeta } from '../lib/convert';
+
+export const excludeMetaFromLayers = (
+ layers: Record
+): Record => {
+ const newLayers: Record = {};
+ Object.entries(layers).forEach(([layerId, layer]) => {
+ const columns = layer.columns.map(excludeMetaFromColumn);
+ newLayers[layerId] = { ...layer, columns };
+ });
+
+ return newLayers;
+};
+
+const excludeColumnIdsFromBucket = (bucket: ColumnsWithoutMeta) => {
+ const { columnId, ...restBucket } = bucket;
+ if (bucket.operationType === Operations.TERMS) {
+ const { orderBy, orderAgg, ...restParams } = bucket.params;
+ let orderByWithoutColumn: Omit = orderBy;
+ if ('columnId' in orderBy) {
+ const { columnId: orderByColumnId, ...restOrderBy } = orderBy;
+ orderByWithoutColumn = restOrderBy;
+ }
+
+ let orderAggWithoutColumn: Omit | undefined =
+ orderAgg;
+ if (orderAgg) {
+ const { columnId: cId, ...restOrderAgg } = orderAgg;
+ orderAggWithoutColumn = restOrderAgg;
+ }
+
+ return {
+ ...restBucket,
+ params: {
+ ...restParams,
+ orderBy: orderByWithoutColumn,
+ orderAgg: orderAggWithoutColumn,
+ },
+ };
+ }
+ return restBucket;
+};
+
+export const getUniqueBuckets = (buckets: ColumnsWithoutMeta[]) =>
+ uniqWith(buckets, (bucket1, bucket2) => {
+ if (bucket1.operationType !== bucket2.operationType) {
+ return false;
+ }
+
+ const bucketWithoutColumnIds1 = excludeColumnIdsFromBucket(bucket1);
+ const bucketWithoutColumnIds2 = excludeColumnIdsFromBucket(bucket2);
+
+ return deepEqual(bucketWithoutColumnIds1, bucketWithoutColumnIds2);
+ });
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
index 4610310c1b378..8cbbbf0f9e739 100644
--- 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
@@ -86,7 +86,9 @@ export const convertToLens: ConvertTsvbToLensVisualization = async (model: Panel
return null;
}
// handle multiple metrics
- const metricsColumns = getMetricsColumns(series, indexPattern!, seriesNum);
+ const metricsColumns = getMetricsColumns(series, indexPattern!, seriesNum, {
+ isStaticValueColumnSupported: true,
+ });
if (metricsColumns === null) {
return null;
}
diff --git a/src/plugins/vis_types/timeseries/public/convert_to_lens/top_n/index.ts b/src/plugins/vis_types/timeseries/public/convert_to_lens/top_n/index.ts
index 630a9e5cf4c97..020aaec28f573 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/top_n/index.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/top_n/index.ts
@@ -65,7 +65,9 @@ export const convertToLens: ConvertTsvbToLensVisualization = async (model, timeR
const reducedTimeRange = getReducedTimeRange(model, series, timeRange);
// handle multiple metrics
- const metricsColumns = getMetricsColumns(series, indexPattern!, seriesNum, reducedTimeRange);
+ const metricsColumns = getMetricsColumns(series, indexPattern!, seriesNum, {
+ reducedTimeRange,
+ });
if (!metricsColumns) {
return null;
}
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
index acee3c2a1e83a..69a90c7864eb3 100644
--- a/src/plugins/vis_types/timeseries/public/convert_to_lens/types.ts
+++ b/src/plugins/vis_types/timeseries/public/convert_to_lens/types.ts
@@ -6,14 +6,18 @@
* Side Public License, v 1.
*/
-import { NavigateToLensContext, XYConfiguration } from '@kbn/visualizations-plugin/common';
+import {
+ MetricVisConfiguration,
+ NavigateToLensContext,
+ XYConfiguration,
+} from '@kbn/visualizations-plugin/common';
import { TimeRange } from '@kbn/data-plugin/common';
import type { Panel } from '../../common/types';
export type ConvertTsvbToLensVisualization = (
model: Panel,
timeRange?: TimeRange
-) => Promise | null>;
+) => Promise | null>;
export interface Filter {
kql?: string | { [key: string]: any } | undefined;
diff --git a/src/plugins/visualizations/common/convert_to_lens/constants.ts b/src/plugins/visualizations/common/convert_to_lens/constants.ts
index fa92b881033c7..12ed815bc7247 100644
--- a/src/plugins/visualizations/common/convert_to_lens/constants.ts
+++ b/src/plugins/visualizations/common/convert_to_lens/constants.ts
@@ -36,6 +36,70 @@ export const OperationsWithReferences = {
export const Operations = { ...OperationsWithSourceField, ...OperationsWithReferences } as const;
+export const PartitionChartTypes = {
+ PIE: 'pie',
+ DONUT: 'donut',
+ TREEMAP: 'treemap',
+ MOSAIC: 'mosaic',
+ WAFFLE: 'waffle',
+} as const;
+
+export const CategoryDisplayTypes = {
+ DEFAULT: 'default',
+ INSIDE: 'inside',
+ HIDE: 'hide',
+} as const;
+
+export const NumberDisplayTypes = {
+ HIDDEN: 'hidden',
+ PERCENT: 'percent',
+ VALUE: 'value',
+} as const;
+
+export const LegendDisplayTypes = {
+ DEFAULT: 'default',
+ SHOW: 'show',
+ HIDE: 'hide',
+} as const;
+
+export const LayerTypes = {
+ DATA: 'data',
+ REFERENCELINE: 'referenceLine',
+ ANNOTATIONS: 'annotations',
+} as const;
+
+export const XYCurveTypes = {
+ LINEAR: 'LINEAR',
+ CURVE_MONOTONE_X: 'CURVE_MONOTONE_X',
+ CURVE_STEP_AFTER: 'CURVE_STEP_AFTER',
+} as const;
+
+export const YAxisModes = {
+ AUTO: 'auto',
+ LEFT: 'left',
+ RIGHT: 'right',
+ BOTTOM: 'bottom',
+} as const;
+
+export const SeriesTypes = {
+ BAR: 'bar',
+ LINE: 'line',
+ AREA: 'area',
+ BAR_STACKED: 'bar_stacked',
+ AREA_STACKED: 'area_stacked',
+ BAR_HORIZONTAL: 'bar_horizontal',
+ BAR_PERCENTAGE_STACKED: 'bar_percentage_stacked',
+ BAR_HORIZONTAL_STACKED: 'bar_horizontal_stacked',
+ AREA_PERCENTAGE_STACKED: 'area_percentage_stacked',
+ BAR_HORIZONTAL_PERCENTAGE_STACKED: 'bar_horizontal_percentage_stacked',
+} as const;
+
+export const FillTypes = {
+ NONE: 'none',
+ ABOVE: 'above',
+ BELOW: 'below',
+} as const;
+
export const RANGE_MODES = {
Range: 'range',
Histogram: 'histogram',
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/buckets/index.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/buckets/index.test.ts
new file mode 100644
index 0000000000000..f0a8e4d32f7c3
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/buckets/index.test.ts
@@ -0,0 +1,267 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { BUCKET_TYPES, METRIC_TYPES } from '@kbn/data-plugin/common';
+import { convertBucketToColumns } from '.';
+import { DateHistogramColumn, FiltersColumn, RangeColumn, TermsColumn } from '../../types';
+import { AggBasedColumn, SchemaConfig } from '../../..';
+
+const mockConvertToDateHistogramColumn = jest.fn();
+const mockConvertToFiltersColumn = jest.fn();
+const mockConvertToTermsColumn = jest.fn();
+const mockConvertToRangeColumn = jest.fn();
+
+jest.mock('../convert', () => ({
+ convertToDateHistogramColumn: jest.fn(() => mockConvertToDateHistogramColumn()),
+ convertToFiltersColumn: jest.fn(() => mockConvertToFiltersColumn()),
+ convertToTermsColumn: jest.fn(() => mockConvertToTermsColumn()),
+ convertToRangeColumn: jest.fn(() => mockConvertToRangeColumn()),
+}));
+
+describe('convertBucketToColumns', () => {
+ const field = stubLogstashDataView.fields[0].name;
+ const dateField = stubLogstashDataView.fields.find((f) => f.type === 'date')!.name;
+ const bucketAggs: SchemaConfig[] = [
+ {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: BUCKET_TYPES.FILTERS,
+ aggParams: {
+ filters: [],
+ },
+ },
+ {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: BUCKET_TYPES.DATE_HISTOGRAM,
+ aggParams: {
+ field,
+ },
+ },
+ {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: BUCKET_TYPES.TERMS,
+ aggParams: {
+ field,
+ orderBy: '_key',
+ },
+ },
+ {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: BUCKET_TYPES.TERMS,
+ aggParams: {
+ field: dateField,
+ orderBy: '_key',
+ },
+ },
+ {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: BUCKET_TYPES.HISTOGRAM,
+ aggParams: {
+ field,
+ interval: '1h',
+ },
+ },
+ {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: BUCKET_TYPES.RANGE,
+ aggParams: {
+ field,
+ },
+ },
+ {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: BUCKET_TYPES.DATE_RANGE,
+ aggParams: {
+ field,
+ },
+ },
+ ];
+ const aggs: Array> = [
+ {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field,
+ },
+ },
+ ];
+ const metricColumns: AggBasedColumn[] = [
+ {
+ columnId: 'column-1',
+ operationType: 'average',
+ isBucketed: false,
+ isSplit: false,
+ sourceField: field,
+ dataType: 'number',
+ params: {},
+ meta: {
+ aggId: '1',
+ },
+ },
+ ];
+
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+
+ test.each<
+ [
+ string,
+ Parameters,
+ () => void,
+ Partial | null
+ ]
+ >([
+ [
+ 'null if bucket agg type is not supported',
+ [{ dataView: stubLogstashDataView, agg: bucketAggs[6], aggs, metricColumns }],
+ () => {},
+ null,
+ ],
+ [
+ 'null if bucket agg does not have aggParams',
+ [
+ {
+ dataView: stubLogstashDataView,
+ agg: { ...bucketAggs[0], aggParams: undefined },
+ aggs,
+ metricColumns,
+ },
+ ],
+ () => {},
+ null,
+ ],
+ [
+ 'filters column if bucket agg is valid filters agg',
+ [{ dataView: stubLogstashDataView, agg: bucketAggs[0], aggs, metricColumns }],
+ () => {
+ mockConvertToFiltersColumn.mockReturnValue({
+ operationType: 'filters',
+ });
+ },
+ {
+ operationType: 'filters',
+ },
+ ],
+ [
+ 'date histogram column if bucket agg is valid date histogram agg',
+ [{ dataView: stubLogstashDataView, agg: bucketAggs[1], aggs, metricColumns }],
+ () => {
+ mockConvertToDateHistogramColumn.mockReturnValue({
+ operationType: 'date_histogram',
+ });
+ },
+ {
+ operationType: 'date_histogram',
+ },
+ ],
+ [
+ 'date histogram column if bucket agg is valid terms agg with date field',
+ [{ dataView: stubLogstashDataView, agg: bucketAggs[3], aggs, metricColumns }],
+ () => {
+ mockConvertToDateHistogramColumn.mockReturnValue({
+ operationType: 'date_histogram',
+ });
+ },
+ {
+ operationType: 'date_histogram',
+ },
+ ],
+ [
+ 'terms column if bucket agg is valid terms agg with no date field',
+ [{ dataView: stubLogstashDataView, agg: bucketAggs[2], aggs, metricColumns }],
+ () => {
+ mockConvertToTermsColumn.mockReturnValue({
+ operationType: 'terms',
+ });
+ },
+ {
+ operationType: 'terms',
+ },
+ ],
+ [
+ 'range column if bucket agg is valid histogram agg',
+ [{ dataView: stubLogstashDataView, agg: bucketAggs[4], aggs, metricColumns }],
+ () => {
+ mockConvertToRangeColumn.mockReturnValue({
+ operationType: 'range',
+ });
+ },
+ {
+ operationType: 'range',
+ },
+ ],
+ [
+ 'range column if bucket agg is valid range agg',
+ [{ dataView: stubLogstashDataView, agg: bucketAggs[5], aggs, metricColumns }],
+ () => {
+ mockConvertToRangeColumn.mockReturnValue({
+ operationType: 'range',
+ });
+ },
+ {
+ operationType: 'range',
+ },
+ ],
+ ])('should return %s', (_, input, actions, expected) => {
+ actions();
+ if (expected === null) {
+ expect(convertBucketToColumns(...input)).toBeNull();
+ } else {
+ expect(convertBucketToColumns(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/column.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/column.test.ts
new file mode 100644
index 0000000000000..74e9f2a57a9fe
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/column.test.ts
@@ -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 { METRIC_TYPES } from '@kbn/data-plugin/public';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { SchemaConfig } from '../../..';
+import { createColumn } from './column';
+import { GeneralColumnWithMeta } from './types';
+
+describe('createColumn', () => {
+ const field = stubLogstashDataView.fields[0];
+ const aggId = `some-id`;
+ const customLabel = 'some-custom-label';
+ const label = 'some label';
+ const timeShift = '1h';
+
+ const agg: SchemaConfig = {
+ accessor: 0,
+ label,
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.AVG,
+ aggId,
+ aggParams: {
+ field: field.name,
+ },
+ };
+
+ const aggWithCustomLabel: SchemaConfig = {
+ ...agg,
+ aggParams: {
+ field: field.name,
+ customLabel,
+ },
+ };
+
+ const aggWithTimeShift: SchemaConfig = {
+ ...agg,
+ aggParams: {
+ field: field.name,
+ timeShift,
+ },
+ };
+
+ const extraColumnFields = { isBucketed: true, isSplit: true, reducedTimeRange: '1m' };
+
+ test.each<[string, Parameters, Partial]>([
+ [
+ 'with default params',
+ [agg, field],
+ {
+ dataType: 'number',
+ isBucketed: false,
+ isSplit: false,
+ label,
+ meta: { aggId },
+ },
+ ],
+ [
+ 'with custom label',
+ [aggWithCustomLabel, field],
+ {
+ dataType: 'number',
+ isBucketed: false,
+ isSplit: false,
+ label: customLabel,
+ meta: { aggId },
+ },
+ ],
+ [
+ 'with timeShift',
+ [aggWithTimeShift, field],
+ {
+ dataType: 'number',
+ isBucketed: false,
+ isSplit: false,
+ label,
+ meta: { aggId },
+ timeShift,
+ },
+ ],
+ [
+ 'with extra column fields',
+ [agg, field, extraColumnFields],
+ {
+ dataType: 'number',
+ isBucketed: extraColumnFields.isBucketed,
+ isSplit: extraColumnFields.isSplit,
+ reducedTimeRange: extraColumnFields.reducedTimeRange,
+ label,
+ meta: { aggId },
+ },
+ ],
+ ])('should create column by agg %s', (_, input, expected) => {
+ expect(createColumn(...input)).toEqual(expect.objectContaining(expected));
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/date_histogram.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/date_histogram.test.ts
new file mode 100644
index 0000000000000..897e5f876542b
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/date_histogram.test.ts
@@ -0,0 +1,90 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { AggParamsDateHistogram } from '@kbn/data-plugin/common';
+import { convertToDateHistogramColumn } from './date_histogram';
+import { DateHistogramColumn } from './types';
+import { DataType } from '../../types';
+
+describe('convertToDateHistogramColumn', () => {
+ const aggId = `some-id`;
+ const timeShift = '1h';
+ const aggParams: AggParamsDateHistogram = {
+ interval: '1d',
+ drop_partials: true,
+ field: stubLogstashDataView.fields[0].name,
+ };
+
+ test.each<
+ [string, Parameters, Partial | null]
+ >([
+ [
+ 'date histogram column if field is provided',
+ [aggId, aggParams, stubLogstashDataView, false, false],
+ {
+ dataType: stubLogstashDataView.fields[0].type as DataType,
+ isBucketed: true,
+ isSplit: false,
+ timeShift: undefined,
+ sourceField: stubLogstashDataView.fields[0].name,
+ meta: { aggId },
+ params: {
+ interval: '1d',
+ includeEmptyRows: true,
+ dropPartials: true,
+ },
+ },
+ ],
+ [
+ 'null if field is not provided',
+ [aggId, { interval: '1d', field: undefined }, stubLogstashDataView, false, false],
+ null,
+ ],
+ [
+ 'date histogram column with isSplit and timeShift if specified',
+ [aggId, { ...aggParams, timeShift }, stubLogstashDataView, true, false],
+ {
+ dataType: stubLogstashDataView.fields[0].type as DataType,
+ isBucketed: true,
+ isSplit: true,
+ sourceField: stubLogstashDataView.fields[0].name,
+ timeShift,
+ meta: { aggId },
+ params: {
+ interval: '1d',
+ includeEmptyRows: true,
+ dropPartials: true,
+ },
+ },
+ ],
+ [
+ 'date histogram column with dropEmptyRowsInDateHistogram if specified',
+ [aggId, aggParams, stubLogstashDataView, true, true],
+ {
+ dataType: stubLogstashDataView.fields[0].type as DataType,
+ isBucketed: true,
+ isSplit: true,
+ sourceField: stubLogstashDataView.fields[0].name,
+ timeShift: undefined,
+ meta: { aggId },
+ params: {
+ interval: '1d',
+ includeEmptyRows: false,
+ dropPartials: true,
+ },
+ },
+ ],
+ ])('should return %s', (_, input, expected) => {
+ if (expected === null) {
+ expect(convertToDateHistogramColumn(...input)).toBeNull();
+ } else {
+ expect(convertToDateHistogramColumn(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/filters.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/filters.test.ts
new file mode 100644
index 0000000000000..1de1dbc9b312d
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/filters.test.ts
@@ -0,0 +1,54 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { AggParamsFilters } from '@kbn/data-plugin/common';
+import { convertToFiltersColumn } from './filters';
+import { FiltersColumn } from './types';
+
+describe('convertToFiltersColumn', () => {
+ const aggId = `some-id`;
+ const timeShift = '1h';
+ const filters = [{ input: { language: 'lucene', query: 'some other query' }, label: 'split' }];
+ const aggParams: AggParamsFilters = {
+ filters,
+ };
+
+ test.each<[string, Parameters, Partial | null]>([
+ [
+ 'filters column if filters are provided',
+ [aggId, aggParams],
+ {
+ dataType: 'string',
+ isBucketed: true,
+ isSplit: false,
+ timeShift: undefined,
+ meta: { aggId },
+ params: { filters: aggParams.filters! },
+ },
+ ],
+ ['null if filters are not provided', [aggId, {}], null],
+ [
+ 'filters column with isSplit and timeShift if specified',
+ [aggId, { ...aggParams, timeShift }, true],
+ {
+ dataType: 'string',
+ isBucketed: true,
+ isSplit: true,
+ timeShift,
+ meta: { aggId },
+ params: { filters: aggParams.filters! },
+ },
+ ],
+ ])('should return %s', (_, input, expected) => {
+ if (expected === null) {
+ expect(convertToFiltersColumn(...input)).toBeNull();
+ } else {
+ expect(convertToFiltersColumn(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/formula.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/formula.test.ts
new file mode 100644
index 0000000000000..bbde6a04f1a2f
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/formula.test.ts
@@ -0,0 +1,54 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { IAggConfig, METRIC_TYPES } from '@kbn/data-plugin/common';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { SchemaConfig } from '../../..';
+import { createFormulaColumn } from './formula';
+
+describe('createFormulaColumn', () => {
+ const aggId = `some-id`;
+ const label = 'some label';
+ const agg: SchemaConfig = {
+ accessor: 0,
+ label,
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.CUMULATIVE_SUM,
+ aggId,
+ aggParams: {
+ customMetric: {
+ id: 'some-id-metric',
+ enabled: true,
+ type: { name: METRIC_TYPES.AVG },
+ params: {
+ field: stubLogstashDataView.fields[0],
+ },
+ } as IAggConfig,
+ },
+ };
+ test('should return formula column', () => {
+ expect(createFormulaColumn('test-formula', agg)).toEqual(
+ expect.objectContaining({
+ isBucketed: false,
+ isSplit: false,
+ meta: {
+ aggId,
+ },
+ operationType: 'formula',
+ params: {
+ formula: 'test-formula',
+ },
+ references: [],
+ })
+ );
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/last_value.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/last_value.test.ts
new file mode 100644
index 0000000000000..55ba1e8b5e09d
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/last_value.test.ts
@@ -0,0 +1,120 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { AggParamsTopHit, METRIC_TYPES } from '@kbn/data-plugin/common';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { SchemaConfig } from '../../..';
+import { convertToLastValueColumn } from './last_value';
+import { FiltersColumn } from './types';
+
+const mockGetFieldNameFromField = jest.fn();
+const mockGetFieldByName = jest.fn();
+const mockGetLabel = jest.fn();
+
+jest.mock('../utils', () => ({
+ getFieldNameFromField: jest.fn(() => mockGetFieldNameFromField()),
+ getLabel: jest.fn(() => mockGetLabel()),
+}));
+
+describe('convertToLastValueColumn', () => {
+ const dataView = stubLogstashDataView;
+ const sortField = dataView.fields[0];
+
+ const topHitAggParams: AggParamsTopHit = {
+ sortOrder: {
+ value: 'desc',
+ text: 'some text',
+ },
+ sortField,
+ field: '',
+ aggregate: 'min',
+ size: 1,
+ };
+
+ const topHitAgg: SchemaConfig = {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.TOP_HITS,
+ aggParams: topHitAggParams,
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ mockGetFieldNameFromField.mockReturnValue(dataView.fields[0]);
+ mockGetFieldByName.mockReturnValue(dataView.fields[0]);
+ mockGetLabel.mockReturnValue('someLabel');
+ dataView.getFieldByName = mockGetFieldByName;
+ });
+
+ test.each<[string, Parameters, Partial | null]>([
+ [
+ 'null if top hits size is more than 1',
+ [{ agg: { ...topHitAgg, aggParams: { ...topHitAgg.aggParams!, size: 2 } }, dataView }],
+ null,
+ ],
+ [
+ 'null if top hits sord order is not desc',
+ [
+ {
+ agg: {
+ ...topHitAgg,
+ aggParams: {
+ ...topHitAgg.aggParams!,
+ sortOrder: { ...topHitAgg.aggParams!.sortOrder!, value: 'asc' },
+ },
+ },
+ dataView,
+ },
+ ],
+ null,
+ ],
+ ])('should return %s', (_, input, expected) => {
+ if (expected === null) {
+ expect(convertToLastValueColumn(...input)).toBeNull();
+ } else {
+ expect(convertToLastValueColumn(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+
+ test('should skip if top hit field is not specified', () => {
+ mockGetFieldNameFromField.mockReturnValue(null);
+ expect(convertToLastValueColumn({ agg: topHitAgg, dataView })).toBeNull();
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(0);
+ });
+
+ test('should skip if top hit field is not present in index pattern', () => {
+ mockGetFieldByName.mockReturnValue(null);
+ dataView.getFieldByName = mockGetFieldByName;
+
+ expect(convertToLastValueColumn({ agg: topHitAgg, dataView })).toBeNull();
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ expect(mockGetLabel).toBeCalledTimes(0);
+ });
+
+ test('should return top hit column if top hit field is not present in index pattern', () => {
+ expect(convertToLastValueColumn({ agg: topHitAgg, dataView })).toEqual(
+ expect.objectContaining({
+ dataType: 'number',
+ label: 'someLabel',
+ operationType: 'last_value',
+ params: { showArrayValues: true, sortField: 'bytes' },
+ sourceField: 'bytes',
+ })
+ );
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ expect(mockGetLabel).toBeCalledTimes(1);
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/metric.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/metric.test.ts
new file mode 100644
index 0000000000000..3be17abc46ac1
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/metric.test.ts
@@ -0,0 +1,92 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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/common';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { SchemaConfig } from '../../..';
+import { convertMetricAggregationColumnWithoutSpecialParams } from './metric';
+import { SUPPORTED_METRICS } from './supported_metrics';
+
+const mockGetFieldByName = jest.fn();
+
+describe('convertToLastValueColumn', () => {
+ const dataView = stubLogstashDataView;
+
+ const agg: SchemaConfig = {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field: dataView.fields[0].displayName,
+ },
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ mockGetFieldByName.mockReturnValue(dataView.fields[0]);
+ dataView.getFieldByName = mockGetFieldByName;
+ });
+
+ test('should return null metric is not supported', () => {
+ expect(
+ convertMetricAggregationColumnWithoutSpecialParams(SUPPORTED_METRICS[METRIC_TYPES.TOP_HITS], {
+ agg,
+ dataView,
+ })
+ ).toBeNull();
+ });
+
+ test('should skip if field is not present and is required for the aggregation', () => {
+ mockGetFieldByName.mockReturnValue(null);
+ dataView.getFieldByName = mockGetFieldByName;
+
+ expect(
+ convertMetricAggregationColumnWithoutSpecialParams(SUPPORTED_METRICS[METRIC_TYPES.AVG], {
+ agg,
+ dataView,
+ })
+ ).toBeNull();
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+
+ test('should return column if field is not present and is not required for the aggregation', () => {
+ mockGetFieldByName.mockReturnValue(null);
+ dataView.getFieldByName = mockGetFieldByName;
+
+ expect(
+ convertMetricAggregationColumnWithoutSpecialParams(SUPPORTED_METRICS[METRIC_TYPES.COUNT], {
+ agg,
+ dataView,
+ })
+ ).toEqual(expect.objectContaining({ operationType: 'count' }));
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+
+ test('should return column if field is present and is required for the aggregation', () => {
+ mockGetFieldByName.mockReturnValue(dataView.fields[0]);
+ dataView.getFieldByName = mockGetFieldByName;
+
+ expect(
+ convertMetricAggregationColumnWithoutSpecialParams(SUPPORTED_METRICS[METRIC_TYPES.AVG], {
+ agg,
+ dataView,
+ })
+ ).toEqual(
+ expect.objectContaining({
+ dataType: 'number',
+ operationType: 'average',
+ })
+ );
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/parent_pipeline.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/parent_pipeline.test.ts
new file mode 100644
index 0000000000000..c28324533c837
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/parent_pipeline.test.ts
@@ -0,0 +1,438 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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/common';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { FormulaColumn, AggBasedColumn } from './types';
+import { SchemaConfig } from '../../..';
+import {
+ convertToOtherParentPipelineAggColumns,
+ ParentPipelineAggColumn,
+ convertToCumulativeSumAggColumn,
+} from './parent_pipeline';
+
+const mockGetMetricFromParentPipelineAgg = jest.fn();
+const mockGetFormulaForPipelineAgg = jest.fn();
+const mockConvertMetricToColumns = jest.fn();
+const mockGetFieldByName = jest.fn();
+const mockConvertMetricAggregationColumnWithoutSpecialParams = jest.fn();
+
+jest.mock('../utils', () => ({
+ getMetricFromParentPipelineAgg: jest.fn(() => mockGetMetricFromParentPipelineAgg()),
+ getLabel: jest.fn(() => 'label'),
+ getFieldNameFromField: jest.fn(() => 'document'),
+}));
+
+jest.mock('./metric', () => ({
+ convertMetricAggregationColumnWithoutSpecialParams: jest.fn(() =>
+ mockConvertMetricAggregationColumnWithoutSpecialParams()
+ ),
+}));
+
+jest.mock('../metrics', () => ({
+ getFormulaForPipelineAgg: jest.fn(() => mockGetFormulaForPipelineAgg()),
+ convertMetricToColumns: jest.fn(() => mockConvertMetricToColumns()),
+}));
+
+describe('convertToOtherParentPipelineAggColumns', () => {
+ const field = stubLogstashDataView.fields[0].name;
+ const aggs: Array> = [
+ {
+ aggId: '1',
+ aggType: METRIC_TYPES.AVG,
+ aggParams: { field },
+ accessor: 0,
+ params: {},
+ label: 'average',
+ format: {},
+ },
+ {
+ aggId: '1',
+ aggType: METRIC_TYPES.MOVING_FN,
+ aggParams: { metricAgg: '2' },
+ accessor: 0,
+ params: {},
+ label: 'Moving Average of Average',
+ format: {},
+ },
+ ];
+
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+
+ test.each<
+ [
+ string,
+ Parameters,
+ () => void,
+ Partial | [Partial, Partial] | null
+ ]
+ >([
+ [
+ 'null if getMetricFromParentPipelineAgg returns null',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'null if cutom metric of parent pipeline agg is not supported',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.GEO_BOUNDS,
+ });
+ },
+ null,
+ ],
+ [
+ 'null if cutom metric of parent pipeline agg is sibling pipeline agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.AVG_BUCKET,
+ });
+ },
+ null,
+ ],
+ [
+ 'null if cannot build formula if cutom metric of parent pipeline agg is parent pipeline agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.MOVING_FN,
+ });
+ mockGetFormulaForPipelineAgg.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'formula column if cutom metric of parent pipeline agg is valid parent pipeline agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.MOVING_FN,
+ });
+ mockGetFormulaForPipelineAgg.mockReturnValue('test-formula');
+ },
+ {
+ operationType: 'formula',
+ params: {
+ formula: 'test-formula',
+ },
+ },
+ ],
+ [
+ 'null if cutom metric of parent pipeline agg is invalid not pipeline agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.AVG,
+ });
+ mockConvertMetricToColumns.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'parent pipeline and metric columns if cutom metric of parent pipeline agg is valid not pipeline agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.AVG,
+ });
+ mockConvertMetricToColumns.mockReturnValue([
+ {
+ columnId: 'test-id-1',
+ operationType: 'average',
+ sourceField: field,
+ },
+ ]);
+ },
+ [
+ { operationType: 'moving_average', references: ['test-id-1'] },
+ {
+ columnId: 'test-id-1',
+ operationType: 'average',
+ sourceField: field,
+ },
+ ],
+ ],
+ ])('should return %s', (_, input, actions, expected) => {
+ actions();
+ if (expected === null) {
+ expect(convertToOtherParentPipelineAggColumns(...input)).toBeNull();
+ } else if (Array.isArray(expected)) {
+ expect(convertToOtherParentPipelineAggColumns(...input)).toEqual(
+ expected.map(expect.objectContaining)
+ );
+ } else {
+ expect(convertToOtherParentPipelineAggColumns(...input)).toEqual(
+ expect.objectContaining(expected)
+ );
+ }
+ });
+});
+
+describe('convertToCumulativeSumAggColumn', () => {
+ const field = stubLogstashDataView.fields[0].name;
+ const aggs: Array> = [
+ {
+ aggId: '1',
+ aggType: METRIC_TYPES.AVG,
+ aggParams: { field },
+ accessor: 0,
+ params: {},
+ label: 'average',
+ format: {},
+ },
+ {
+ aggId: '1',
+ aggType: METRIC_TYPES.CUMULATIVE_SUM,
+ aggParams: { metricAgg: '2' },
+ accessor: 0,
+ params: {},
+ label: 'Moving Average of Average',
+ format: {},
+ },
+ ];
+
+ beforeEach(() => {
+ mockGetFieldByName.mockReturnValue({
+ aggregatable: true,
+ type: 'number',
+ sourceField: 'bytes',
+ });
+
+ stubLogstashDataView.getFieldByName = mockGetFieldByName;
+ });
+
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+
+ test.each<
+ [
+ string,
+ Parameters,
+ () => void,
+ Partial | [Partial, Partial] | null
+ ]
+ >([
+ [
+ 'null if cumulative sum does not have aggParams',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: { ...aggs[1], aggParams: undefined } as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'null if getMetricFromParentPipelineAgg returns null',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'null if cutom metric of parent pipeline agg is not supported',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.GEO_BOUNDS,
+ });
+ },
+ null,
+ ],
+ [
+ 'null if cutom metric of parent pipeline agg is sibling pipeline agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.AVG_BUCKET,
+ });
+ },
+ null,
+ ],
+ [
+ 'null if cannot build formula if cutom metric of parent pipeline agg is parent pipeline agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.MOVING_FN,
+ });
+ mockGetFormulaForPipelineAgg.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'formula column if cutom metric of parent pipeline agg is valid parent pipeline agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.MOVING_FN,
+ });
+ mockGetFormulaForPipelineAgg.mockReturnValue('test-formula');
+ },
+ {
+ operationType: 'formula',
+ params: {
+ formula: 'test-formula',
+ },
+ },
+ ],
+ [
+ 'null if cutom metric of parent pipeline agg is invalid sum or count agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.SUM,
+ });
+ mockConvertMetricAggregationColumnWithoutSpecialParams.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'cumulative sum and metric columns if cutom metric of parent pipeline agg is valid sum or count agg',
+ [
+ {
+ dataView: stubLogstashDataView,
+ aggs,
+ agg: aggs[1] as SchemaConfig,
+ },
+ ],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggId: '2-metric',
+ aggType: METRIC_TYPES.SUM,
+ });
+ mockConvertMetricAggregationColumnWithoutSpecialParams.mockReturnValue({
+ columnId: 'test-id-1',
+ operationType: 'sum',
+ sourceField: field,
+ });
+ },
+ [
+ { operationType: 'cumulative_sum', references: ['test-id-1'] },
+ {
+ columnId: 'test-id-1',
+ operationType: 'sum',
+ sourceField: field,
+ },
+ ],
+ ],
+ ])('should return %s', (_, input, actions, expected) => {
+ actions();
+ if (expected === null) {
+ expect(convertToCumulativeSumAggColumn(...input)).toBeNull();
+ } else if (Array.isArray(expected)) {
+ expect(convertToCumulativeSumAggColumn(...input)).toEqual(
+ expected.map(expect.objectContaining)
+ );
+ } else {
+ expect(convertToCumulativeSumAggColumn(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/parent_pipeline.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/parent_pipeline.ts
index c1fd75ae19265..ab41ceb259adb 100644
--- a/src/plugins/visualizations/common/convert_to_lens/lib/convert/parent_pipeline.ts
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/parent_pipeline.ts
@@ -122,6 +122,7 @@ export const convertToCumulativeSumAggColumn = (
{ agg: metric as SchemaConfig, dataView },
reducedTimeRange
);
+
if (subMetric === null) {
return null;
}
@@ -134,8 +135,8 @@ export const convertToCumulativeSumAggColumn = (
return [
{
operationType: op.name,
- references: [subMetric?.columnId],
...createColumn(agg),
+ references: [subMetric?.columnId],
params: {},
timeShift: agg.aggParams?.timeShift,
} as ParentPipelineAggColumn,
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/percentile.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/percentile.test.ts
new file mode 100644
index 0000000000000..b4cf7f141e928
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/percentile.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 { METRIC_TYPES } from '@kbn/data-plugin/common';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { SchemaConfig } from '../../..';
+import { convertToPercentileColumn } from './percentile';
+import { PercentileColumn } from './types';
+
+const mockGetFieldNameFromField = jest.fn();
+const mockGetFieldByName = jest.fn();
+const mockGetLabel = jest.fn();
+const mockGetLabelForPercentile = jest.fn();
+
+jest.mock('../utils', () => ({
+ getFieldNameFromField: jest.fn(() => mockGetFieldNameFromField()),
+ getLabel: jest.fn(() => mockGetLabel()),
+ getLabelForPercentile: jest.fn(() => mockGetLabelForPercentile()),
+}));
+
+describe('convertToPercentileColumn', () => {
+ const dataView = stubLogstashDataView;
+ const field = dataView.fields[0].displayName;
+ const aggId = 'pr.10';
+ const percentile = 10;
+ const percents = [percentile];
+
+ const agg: SchemaConfig = {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.PERCENTILES,
+ aggParams: { field, percents },
+ aggId,
+ };
+ const singlePercentileRankAgg: SchemaConfig = {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.SINGLE_PERCENTILE,
+ aggParams: { field, percentile },
+ aggId,
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ mockGetFieldNameFromField.mockReturnValue(dataView.fields[0]);
+ mockGetFieldByName.mockReturnValue(dataView.fields[0]);
+ mockGetLabel.mockReturnValue('someLabel');
+ mockGetLabelForPercentile.mockReturnValue('someOtherLabel');
+ dataView.getFieldByName = mockGetFieldByName;
+ });
+
+ test.each<
+ [string, Parameters, Partial | null]
+ >([
+ ['null if no percents', [{ agg: { ...agg, aggId: 'pr' }, dataView }], null],
+ [
+ 'null if no value',
+ [{ agg: { ...singlePercentileRankAgg, aggParams: undefined }, dataView }],
+ null,
+ ],
+ ['null if no aggId', [{ agg: { ...agg, aggId: undefined }, dataView }], null],
+ ['null if no aggParams', [{ agg: { ...agg, aggParams: undefined }, dataView }], null],
+ ['null if aggId is invalid', [{ agg: { ...agg, aggId: 'pr.invalid' }, dataView }], null],
+ [
+ 'null if values are undefined',
+ [{ agg: { ...agg, aggParams: { percents: undefined, field } }, dataView }],
+ null,
+ ],
+ [
+ 'null if values are empty',
+ [{ agg: { ...agg, aggParams: { percents: [], field } }, dataView }],
+ null,
+ ],
+ ])('should return %s', (_, input, expected) => {
+ if (expected === null) {
+ expect(convertToPercentileColumn(...input)).toBeNull();
+ } else {
+ expect(convertToPercentileColumn(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+
+ test('should return null if field is not specified', () => {
+ mockGetFieldNameFromField.mockReturnValue(null);
+ expect(convertToPercentileColumn({ agg, dataView })).toBeNull();
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(0);
+ });
+
+ test('should return null if field absent at the index pattern', () => {
+ mockGetFieldByName.mockReturnValueOnce(null);
+ dataView.getFieldByName = mockGetFieldByName;
+
+ expect(convertToPercentileColumn({ agg, dataView })).toBeNull();
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+
+ test('should return percentile rank column for percentiles', () => {
+ expect(convertToPercentileColumn({ agg, dataView })).toEqual(
+ expect.objectContaining({
+ dataType: 'number',
+ label: 'someOtherLabel',
+ meta: { aggId: 'pr.10' },
+ operationType: 'percentile',
+ params: { percentile: 10 },
+ sourceField: 'bytes',
+ })
+ );
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+
+ test('should return percentile rank column for single percentile', () => {
+ expect(convertToPercentileColumn({ agg: singlePercentileRankAgg, dataView })).toEqual(
+ expect.objectContaining({
+ dataType: 'number',
+ label: 'someOtherLabel',
+ meta: { aggId: 'pr.10' },
+ operationType: 'percentile',
+ params: { percentile: 10 },
+ sourceField: 'bytes',
+ })
+ );
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/percentile_rank.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/percentile_rank.test.ts
new file mode 100644
index 0000000000000..8a696d51d871b
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/percentile_rank.test.ts
@@ -0,0 +1,146 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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/common';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { SchemaConfig } from '../../..';
+import { convertToPercentileRankColumn } from './percentile_rank';
+import { PercentileRanksColumn } from './types';
+
+const mockGetFieldNameFromField = jest.fn();
+const mockGetFieldByName = jest.fn();
+const mockGetLabel = jest.fn();
+const mockGetLabelForPercentile = jest.fn();
+
+jest.mock('../utils', () => ({
+ getFieldNameFromField: jest.fn(() => mockGetFieldNameFromField()),
+ getLabel: jest.fn(() => mockGetLabel()),
+ getLabelForPercentile: jest.fn(() => mockGetLabelForPercentile()),
+}));
+
+describe('convertToPercentileRankColumn', () => {
+ const dataView = stubLogstashDataView;
+ const field = dataView.fields[0].displayName;
+ const aggId = 'pr.10';
+ const value = 10;
+ const values = [value];
+
+ const agg: SchemaConfig = {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.PERCENTILE_RANKS,
+ aggParams: { field, values },
+ aggId,
+ };
+ const singlePercentileRankAgg: SchemaConfig = {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.SINGLE_PERCENTILE_RANK,
+ aggParams: { field, value },
+ aggId,
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ mockGetFieldNameFromField.mockReturnValue(dataView.fields[0]);
+ mockGetFieldByName.mockReturnValue(dataView.fields[0]);
+ mockGetLabel.mockReturnValue('someLabel');
+ mockGetLabelForPercentile.mockReturnValue('someOtherLabel');
+ dataView.getFieldByName = mockGetFieldByName;
+ });
+
+ test.each<
+ [
+ string,
+ Parameters,
+ Partial | null
+ ]
+ >([
+ ['null if no percents', [{ agg: { ...agg, aggId: 'pr' }, dataView }], null],
+ [
+ 'null if no value',
+ [{ agg: { ...singlePercentileRankAgg, aggParams: undefined }, dataView }],
+ null,
+ ],
+ ['null if no aggId', [{ agg: { ...agg, aggId: undefined }, dataView }], null],
+ ['null if no aggParams', [{ agg: { ...agg, aggParams: undefined }, dataView }], null],
+ ['null if aggId is invalid', [{ agg: { ...agg, aggId: 'pr.invalid' }, dataView }], null],
+ [
+ 'null if values are undefined',
+ [{ agg: { ...agg, aggParams: { values: undefined, field } }, dataView }],
+ null,
+ ],
+ [
+ 'null if values are empty',
+ [{ agg: { ...agg, aggParams: { values: [], field } }, dataView }],
+ null,
+ ],
+ ])('should return %s', (_, input, expected) => {
+ if (expected === null) {
+ expect(convertToPercentileRankColumn(...input)).toBeNull();
+ } else {
+ expect(convertToPercentileRankColumn(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+
+ test('should return null if field is not specified', () => {
+ mockGetFieldNameFromField.mockReturnValue(null);
+ expect(convertToPercentileRankColumn({ agg, dataView })).toBeNull();
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(0);
+ });
+
+ test('should return null if field absent at the index pattern', () => {
+ mockGetFieldByName.mockReturnValueOnce(null);
+ dataView.getFieldByName = mockGetFieldByName;
+
+ expect(convertToPercentileRankColumn({ agg, dataView })).toBeNull();
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+
+ test('should return percentile rank column for percentile ranks', () => {
+ expect(convertToPercentileRankColumn({ agg, dataView })).toEqual(
+ expect.objectContaining({
+ dataType: 'number',
+ label: 'someOtherLabel',
+ meta: { aggId: 'pr.10' },
+ operationType: 'percentile_rank',
+ params: { value: 10 },
+ sourceField: 'bytes',
+ })
+ );
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+
+ test('should return percentile rank column for single percentile rank', () => {
+ expect(convertToPercentileRankColumn({ agg: singlePercentileRankAgg, dataView })).toEqual(
+ expect.objectContaining({
+ dataType: 'number',
+ label: 'someOtherLabel',
+ meta: { aggId: 'pr.10' },
+ operationType: 'percentile_rank',
+ params: { value: 10 },
+ sourceField: 'bytes',
+ })
+ );
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/range.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/range.test.ts
new file mode 100644
index 0000000000000..8f535c28c8264
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/range.test.ts
@@ -0,0 +1,74 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { AggParamsRange, AggParamsHistogram } from '@kbn/data-plugin/common';
+import { convertToRangeColumn } from './range';
+import { RangeColumn } from './types';
+import { DataType } from '../../types';
+import { RANGE_MODES } from '../../constants';
+
+describe('convertToRangeColumn', () => {
+ const aggId = `some-id`;
+ const ranges = [
+ {
+ from: 1,
+ to: 1000,
+ label: '1',
+ },
+ ];
+ const aggParamsRange: AggParamsRange = {
+ field: stubLogstashDataView.fields[0].name,
+ ranges,
+ };
+ const aggParamsHistogram: AggParamsHistogram = {
+ interval: '1d',
+ field: stubLogstashDataView.fields[0].name,
+ };
+
+ test.each<[string, Parameters, Partial | null]>([
+ [
+ 'range column if provide valid range agg',
+ [aggId, aggParamsRange, '', stubLogstashDataView],
+ {
+ dataType: stubLogstashDataView.fields[0].type as DataType,
+ isBucketed: true,
+ isSplit: false,
+ sourceField: stubLogstashDataView.fields[0].name,
+ meta: { aggId },
+ params: {
+ type: RANGE_MODES.Range,
+ maxBars: 'auto',
+ ranges,
+ },
+ },
+ ],
+ [
+ 'range column if provide valid histogram agg',
+ [aggId, aggParamsHistogram, '', stubLogstashDataView, true],
+ {
+ dataType: stubLogstashDataView.fields[0].type as DataType,
+ isBucketed: true,
+ isSplit: true,
+ sourceField: stubLogstashDataView.fields[0].name,
+ meta: { aggId },
+ params: {
+ type: RANGE_MODES.Histogram,
+ maxBars: 'auto',
+ ranges: [],
+ },
+ },
+ ],
+ ])('should return %s', (_, input, expected) => {
+ if (expected === null) {
+ expect(convertToRangeColumn(...input)).toBeNull();
+ } else {
+ expect(convertToRangeColumn(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/sibling_pipeline.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/sibling_pipeline.test.ts
new file mode 100644
index 0000000000000..759620650b8a6
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/sibling_pipeline.test.ts
@@ -0,0 +1,79 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { IAggConfig, METRIC_TYPES } from '@kbn/data-plugin/common';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { SchemaConfig } from '../../..';
+import { convertToSiblingPipelineColumns } from './sibling_pipeline';
+
+const mockConvertMetricToColumns = jest.fn();
+const mockConvertToSchemaConfig = jest.fn();
+
+jest.mock('../metrics', () => ({
+ convertMetricToColumns: jest.fn(() => mockConvertMetricToColumns()),
+}));
+
+jest.mock('../../../vis_schemas', () => ({
+ convertToSchemaConfig: jest.fn(() => mockConvertToSchemaConfig()),
+}));
+
+describe('convertToSiblingPipelineColumns', () => {
+ const dataView = stubLogstashDataView;
+ const aggId = 'agg-id-1';
+ const agg: SchemaConfig = {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.AVG_BUCKET,
+ aggParams: { customMetric: {} as IAggConfig },
+ aggId,
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ mockConvertMetricToColumns.mockReturnValue([{}]);
+ mockConvertToSchemaConfig.mockReturnValue({});
+ });
+
+ test('should return null if aggParams are not defined', () => {
+ expect(
+ convertToSiblingPipelineColumns({ agg: { ...agg, aggParams: undefined }, aggs: [], dataView })
+ ).toBeNull();
+ expect(mockConvertMetricToColumns).toBeCalledTimes(0);
+ });
+
+ test('should return null if customMetric is not defined', () => {
+ expect(
+ convertToSiblingPipelineColumns({
+ agg: { ...agg, aggParams: { customMetric: undefined } },
+ aggs: [],
+ dataView,
+ })
+ ).toBeNull();
+ expect(mockConvertMetricToColumns).toBeCalledTimes(0);
+ });
+
+ test('should return null if sibling agg is not supported', () => {
+ mockConvertMetricToColumns.mockReturnValue(null);
+ expect(convertToSiblingPipelineColumns({ agg, aggs: [], dataView })).toBeNull();
+ expect(mockConvertToSchemaConfig).toBeCalledTimes(1);
+ expect(mockConvertMetricToColumns).toBeCalledTimes(1);
+ });
+
+ test('should return column', () => {
+ const column = { operationType: 'formula' };
+ mockConvertMetricToColumns.mockReturnValue([column]);
+ expect(convertToSiblingPipelineColumns({ agg, aggs: [], dataView })).toEqual(column);
+ expect(mockConvertToSchemaConfig).toBeCalledTimes(1);
+ expect(mockConvertMetricToColumns).toBeCalledTimes(1);
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/std_deviation.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/std_deviation.test.ts
new file mode 100644
index 0000000000000..cbb1f03a6dc2e
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/std_deviation.test.ts
@@ -0,0 +1,115 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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/common';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { SchemaConfig } from '../../..';
+import { convertToStdDeviationFormulaColumns } from './std_deviation';
+import { FormulaColumn } from './types';
+
+const mockGetFieldNameFromField = jest.fn();
+const mockGetFieldByName = jest.fn();
+const mockGetLabel = jest.fn();
+
+jest.mock('../utils', () => ({
+ getFieldNameFromField: jest.fn(() => mockGetFieldNameFromField()),
+ getLabel: jest.fn(() => mockGetLabel()),
+}));
+
+describe('convertToStdDeviationFormulaColumns', () => {
+ const dataView = stubLogstashDataView;
+ const stdLowerAggId = 'agg-id.std_lower';
+ const stdUpperAggId = 'agg-id.std_upper';
+ const label = 'std label';
+ const agg: SchemaConfig = {
+ accessor: 0,
+ label,
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.STD_DEV,
+ aggId: stdLowerAggId,
+ aggParams: {
+ field: dataView.fields[0].displayName,
+ },
+ };
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ mockGetFieldNameFromField.mockReturnValue(dataView.fields[0].displayName);
+ mockGetFieldByName.mockReturnValue(dataView.fields[0]);
+ mockGetLabel.mockReturnValue('some label');
+ dataView.getFieldByName = mockGetFieldByName;
+ });
+
+ test.each<
+ [string, Parameters, Partial | null]
+ >([['null if no aggId is passed', [{ agg: { ...agg, aggId: undefined }, dataView }], null]])(
+ 'should return %s',
+ (_, input, expected) => {
+ if (expected === null) {
+ expect(convertToStdDeviationFormulaColumns(...input)).toBeNull();
+ } else {
+ expect(convertToStdDeviationFormulaColumns(...input)).toEqual(
+ expect.objectContaining(expected)
+ );
+ }
+ }
+ );
+
+ test('should return null if field is not present', () => {
+ mockGetFieldNameFromField.mockReturnValue(null);
+ expect(convertToStdDeviationFormulaColumns({ agg, dataView })).toBeNull();
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(0);
+ });
+
+ test("should return null if field doesn't exist in dataView", () => {
+ mockGetFieldByName.mockReturnValue(null);
+ dataView.getFieldByName = mockGetFieldByName;
+ expect(convertToStdDeviationFormulaColumns({ agg, dataView })).toBeNull();
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+
+ test('should return null if agg id is invalid', () => {
+ expect(
+ convertToStdDeviationFormulaColumns({ agg: { ...agg, aggId: 'some-id' }, dataView })
+ ).toBeNull();
+ expect(mockGetFieldNameFromField).toBeCalledTimes(1);
+ expect(dataView.getFieldByName).toBeCalledTimes(1);
+ });
+
+ test('should return formula column for lower std deviation', () => {
+ expect(
+ convertToStdDeviationFormulaColumns({ agg: { ...agg, aggId: stdLowerAggId }, dataView })
+ ).toEqual(
+ expect.objectContaining({
+ label,
+ meta: { aggId: 'agg-id.std_lower' },
+ operationType: 'formula',
+ params: { formula: 'average(bytes) - 2 * standard_deviation(bytes)' },
+ })
+ );
+ });
+
+ test('should return formula column for upper std deviation', () => {
+ expect(
+ convertToStdDeviationFormulaColumns({ agg: { ...agg, aggId: stdUpperAggId }, dataView })
+ ).toEqual(
+ expect.objectContaining({
+ label,
+ meta: { aggId: 'agg-id.std_upper' },
+ operationType: 'formula',
+ params: { formula: 'average(bytes) + 2 * standard_deviation(bytes)' },
+ })
+ );
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/convert/terms.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/convert/terms.test.ts
new file mode 100644
index 0000000000000..d214ec74b09b1
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/convert/terms.test.ts
@@ -0,0 +1,241 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { AggParamsTerms, IAggConfig, METRIC_TYPES, BUCKET_TYPES } from '@kbn/data-plugin/common';
+import { convertToTermsColumn } from './terms';
+import { AggBasedColumn, TermsColumn } from './types';
+import { SchemaConfig } from '../../..';
+
+const mockConvertMetricToColumns = jest.fn();
+
+jest.mock('../metrics', () => ({
+ convertMetricToColumns: jest.fn(() => mockConvertMetricToColumns()),
+}));
+
+jest.mock('../../../vis_schemas', () => ({
+ convertToSchemaConfig: jest.fn(() => ({})),
+}));
+
+describe('convertToDateHistogramColumn', () => {
+ const aggId = `some-id`;
+ const aggParams: AggParamsTerms = {
+ field: stubLogstashDataView.fields[0].name,
+ orderBy: '_key',
+ order: {
+ value: 'asc',
+ text: '',
+ },
+ size: 5,
+ };
+ const aggs: Array> = [
+ {
+ accessor: 0,
+ label: '',
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field: stubLogstashDataView.fields[0].name,
+ },
+ },
+ ];
+ const metricColumns: AggBasedColumn[] = [
+ {
+ columnId: 'column-1',
+ operationType: 'average',
+ isBucketed: false,
+ isSplit: false,
+ sourceField: stubLogstashDataView.fields[0].name,
+ dataType: 'number',
+ params: {},
+ meta: {
+ aggId: '1',
+ },
+ },
+ ];
+
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+
+ test.each<
+ [string, Parameters, Partial | null, () => void]
+ >([
+ [
+ 'null if dataview does not include field from terms params',
+ [
+ aggId,
+ {
+ agg: { aggParams: { ...aggParams, field: '' } } as SchemaConfig,
+ dataView: stubLogstashDataView,
+ aggs,
+ metricColumns,
+ },
+ '',
+ false,
+ ],
+ null,
+ () => {},
+ ],
+ [
+ 'terms column with alphabetical orderBy',
+ [
+ aggId,
+ {
+ agg: { aggParams } as SchemaConfig,
+ dataView: stubLogstashDataView,
+ aggs,
+ metricColumns,
+ },
+ '',
+ false,
+ ],
+ {
+ operationType: 'terms',
+ sourceField: stubLogstashDataView.fields[0].name,
+ isBucketed: true,
+ params: {
+ size: 5,
+ include: [],
+ exclude: [],
+ parentFormat: { id: 'terms' },
+ orderBy: { type: 'alphabetical' },
+ orderDirection: 'asc',
+ },
+ },
+ () => {},
+ ],
+ [
+ 'terms column with column orderBy if provided column for orderBy is exist',
+ [
+ aggId,
+ {
+ agg: { aggParams: { ...aggParams, orderBy: '1' } } as SchemaConfig,
+ dataView: stubLogstashDataView,
+ aggs,
+ metricColumns,
+ },
+ '',
+ false,
+ ],
+ {
+ operationType: 'terms',
+ sourceField: stubLogstashDataView.fields[0].name,
+ isBucketed: true,
+ params: {
+ size: 5,
+ include: [],
+ exclude: [],
+ parentFormat: { id: 'terms' },
+ orderBy: { type: 'column', columnId: metricColumns[0].columnId },
+ orderAgg: metricColumns[0],
+ orderDirection: 'asc',
+ },
+ },
+ () => {},
+ ],
+ [
+ 'null if provided column for orderBy is not exist',
+ [
+ aggId,
+ {
+ agg: { aggParams: { ...aggParams, orderBy: '2' } } as SchemaConfig,
+ dataView: stubLogstashDataView,
+ aggs,
+ metricColumns,
+ },
+ '',
+ false,
+ ],
+ null,
+ () => {},
+ ],
+ [
+ 'null if provided custom orderBy without orderAgg',
+ [
+ aggId,
+ {
+ agg: {
+ aggParams: { ...aggParams, orderBy: 'custom', orderAgg: undefined },
+ } as SchemaConfig,
+ dataView: stubLogstashDataView,
+ aggs,
+ metricColumns,
+ },
+ '',
+ false,
+ ],
+ null,
+ () => {},
+ ],
+ [
+ 'null if provided custom orderBy and not valid orderAgg',
+ [
+ aggId,
+ {
+ agg: {
+ aggParams: { ...aggParams, orderBy: 'custom', orderAgg: {} as IAggConfig },
+ } as SchemaConfig,
+ dataView: stubLogstashDataView,
+ aggs,
+ metricColumns,
+ },
+ '',
+ false,
+ ],
+ null,
+ () => {
+ mockConvertMetricToColumns.mockReturnValue(null);
+ },
+ ],
+ [
+ 'terms column with custom orderBy and prepared orderAgg',
+ [
+ aggId,
+ {
+ agg: {
+ aggParams: { ...aggParams, orderBy: 'custom', orderAgg: {} as IAggConfig },
+ } as SchemaConfig,
+ dataView: stubLogstashDataView,
+ aggs,
+ metricColumns,
+ },
+ '',
+ false,
+ ],
+ {
+ operationType: 'terms',
+ sourceField: stubLogstashDataView.fields[0].name,
+ isBucketed: true,
+ params: {
+ size: 5,
+ include: [],
+ exclude: [],
+ parentFormat: { id: 'terms' },
+ orderBy: { type: 'custom' },
+ orderAgg: metricColumns[0],
+ orderDirection: 'asc',
+ },
+ },
+ () => {
+ mockConvertMetricToColumns.mockReturnValue(metricColumns);
+ },
+ ],
+ ])('should return %s', (_, input, expected, actions) => {
+ actions();
+ if (expected === null) {
+ expect(convertToTermsColumn(...input)).toBeNull();
+ } else {
+ expect(convertToTermsColumn(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/metrics/formula.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/metrics/formula.test.ts
new file mode 100644
index 0000000000000..95e128e22b092
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/metrics/formula.test.ts
@@ -0,0 +1,474 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { DataViewField, IAggConfig, METRIC_TYPES } from '@kbn/data-plugin/common';
+import { SchemaConfig } from '../../..';
+import { getFormulaForPipelineAgg, getFormulaForAgg } from './formula';
+
+const mockGetMetricFromParentPipelineAgg = jest.fn();
+const mockIsPercentileAgg = jest.fn();
+const mockIsPercentileRankAgg = jest.fn();
+const mockIsPipeline = jest.fn();
+const mockIsStdDevAgg = jest.fn();
+const mockGetFieldByName = jest.fn();
+const originalGetFieldByName = stubLogstashDataView.getFieldByName;
+
+jest.mock('../utils', () => ({
+ getFieldNameFromField: jest.fn((field) => field),
+ getMetricFromParentPipelineAgg: jest.fn(() => mockGetMetricFromParentPipelineAgg()),
+ isPercentileAgg: jest.fn(() => mockIsPercentileAgg()),
+ isPercentileRankAgg: jest.fn(() => mockIsPercentileRankAgg()),
+ isPipeline: jest.fn(() => mockIsPipeline()),
+ isStdDevAgg: jest.fn(() => mockIsStdDevAgg()),
+}));
+
+const dataView = stubLogstashDataView;
+
+const field = stubLogstashDataView.fields[0].name;
+const aggs: Array> = [
+ {
+ aggId: '1',
+ aggType: METRIC_TYPES.CUMULATIVE_SUM,
+ aggParams: { customMetric: {} as IAggConfig },
+ accessor: 0,
+ params: {},
+ label: 'cumulative sum',
+ format: {},
+ },
+ {
+ aggId: '2',
+ aggType: METRIC_TYPES.AVG_BUCKET,
+ aggParams: { customMetric: {} as IAggConfig },
+ accessor: 0,
+ params: {},
+ label: 'overall average',
+ format: {},
+ },
+ {
+ aggId: '3.10',
+ aggType: METRIC_TYPES.PERCENTILES,
+ aggParams: { percents: [0, 10], field },
+ accessor: 0,
+ params: {},
+ label: 'percentile',
+ format: {},
+ },
+ {
+ aggId: '4.5',
+ aggType: METRIC_TYPES.PERCENTILE_RANKS,
+ aggParams: { values: [0, 5], field },
+ accessor: 0,
+ params: {},
+ label: 'percintile rank',
+ format: {},
+ },
+ {
+ aggId: '5.std_upper',
+ aggType: METRIC_TYPES.STD_DEV,
+ aggParams: { field },
+ accessor: 0,
+ params: {},
+ label: 'std dev',
+ format: {},
+ },
+ {
+ aggId: '6',
+ aggType: METRIC_TYPES.AVG,
+ aggParams: { field },
+ accessor: 0,
+ params: {},
+ label: 'average',
+ format: {},
+ },
+];
+
+describe('getFormulaForPipelineAgg', () => {
+ afterEach(() => {
+ jest.clearAllMocks();
+ dataView.getFieldByName = originalGetFieldByName;
+ });
+
+ test.each<[string, Parameters, () => void, string | null]>([
+ [
+ 'null if custom metric is invalid',
+ [{ agg: aggs[0] as SchemaConfig, aggs, dataView }],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'null if custom metric type is not supported',
+ [{ agg: aggs[0] as SchemaConfig, aggs, dataView }],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValue({
+ aggType: METRIC_TYPES.GEO_BOUNDS,
+ });
+ },
+ null,
+ ],
+ [
+ 'correct formula if agg is parent pipeline agg and custom metric is valid and supported pipeline agg',
+ [{ agg: aggs[0] as SchemaConfig, aggs, dataView }],
+ () => {
+ mockGetMetricFromParentPipelineAgg
+ .mockReturnValueOnce({
+ aggType: METRIC_TYPES.MOVING_FN,
+ aggParams: {},
+ aggId: '2',
+ })
+ .mockReturnValueOnce({
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field,
+ },
+ aggId: '3',
+ });
+ },
+ 'cumulative_sum(moving_average(average(bytes)))',
+ ],
+ [
+ 'correct formula if agg is parent pipeline agg and custom metric is valid and supported not pipeline agg',
+ [{ agg: aggs[0] as SchemaConfig, aggs, dataView }],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValueOnce({
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field,
+ },
+ aggId: '2',
+ });
+ },
+ 'cumulative_sum(average(bytes))',
+ ],
+ [
+ 'correct formula if agg is parent pipeline agg and custom metric is valid and supported percentile rank agg',
+ [{ agg: aggs[0] as SchemaConfig, aggs, dataView }],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValueOnce({
+ aggType: METRIC_TYPES.PERCENTILE_RANKS,
+ aggParams: {
+ field,
+ },
+ aggId: '3.10',
+ });
+ },
+ 'cumulative_sum(percentile_rank(bytes, value=10))',
+ ],
+ [
+ 'correct formula if agg is sibling pipeline agg and custom metric is valid and supported agg',
+ [{ agg: aggs[1] as SchemaConfig, aggs, dataView }],
+ () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValueOnce({
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field,
+ },
+ aggId: '3',
+ });
+ },
+ 'average(bytes)',
+ ],
+ ])('should return %s', (_, input, actions, expected) => {
+ actions();
+ if (expected === null) {
+ expect(getFormulaForPipelineAgg(...input)).toBeNull();
+ } else {
+ expect(getFormulaForPipelineAgg(...input)).toEqual(expected);
+ }
+ });
+
+ test('null if agg is sibling pipeline agg, custom metric is valid, agg is supported and field type is not supported', () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValueOnce({
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field,
+ },
+ aggId: '3',
+ });
+
+ const field1: DataViewField = {
+ name: 'bytes',
+ type: 'geo',
+ esTypes: ['long'],
+ aggregatable: true,
+ searchable: true,
+ count: 10,
+ readFromDocValues: true,
+ scripted: false,
+ isMapped: true,
+ } as DataViewField;
+
+ mockGetFieldByName.mockReturnValueOnce(field1);
+
+ dataView.getFieldByName = mockGetFieldByName;
+ const agg = getFormulaForPipelineAgg({
+ agg: aggs[1] as SchemaConfig,
+ aggs,
+ dataView,
+ });
+ expect(agg).toBeNull();
+ });
+
+ test('null if agg is sibling pipeline agg, custom metric is valid, agg is supported, field type is supported and field is not aggregatable', () => {
+ mockGetMetricFromParentPipelineAgg.mockReturnValueOnce({
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field,
+ },
+ aggId: '3',
+ });
+
+ const field1: DataViewField = {
+ name: 'str',
+ type: 'string',
+ esTypes: ['text'],
+ aggregatable: false,
+ searchable: true,
+ count: 10,
+ readFromDocValues: true,
+ scripted: false,
+ isMapped: true,
+ } as DataViewField;
+
+ mockGetFieldByName.mockReturnValueOnce(field1);
+
+ dataView.getFieldByName = mockGetFieldByName;
+ const agg = getFormulaForPipelineAgg({
+ agg: aggs[1] as SchemaConfig,
+ aggs,
+ dataView,
+ });
+ expect(agg).toBeNull();
+ });
+});
+
+describe('getFormulaForAgg', () => {
+ beforeEach(() => {
+ mockIsPercentileAgg.mockReturnValue(false);
+ mockIsPipeline.mockReturnValue(false);
+ mockIsStdDevAgg.mockReturnValue(false);
+ mockIsPercentileRankAgg.mockReturnValue(false);
+ });
+
+ afterEach(() => {
+ jest.clearAllMocks();
+ dataView.getFieldByName = originalGetFieldByName;
+ });
+
+ test.each<[string, Parameters, () => void, string | null]>([
+ [
+ 'null if agg type is not supported',
+ [
+ {
+ agg: { ...aggs[0], aggType: METRIC_TYPES.GEO_BOUNDS, aggParams: { field } },
+ aggs,
+ dataView,
+ },
+ ],
+ () => {},
+ null,
+ ],
+ [
+ 'correct pipeline formula if agg is valid pipeline agg',
+ [{ agg: aggs[0], aggs, dataView }],
+ () => {
+ mockIsPipeline.mockReturnValue(true);
+ mockGetMetricFromParentPipelineAgg.mockReturnValueOnce({
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field,
+ },
+ aggId: '2',
+ });
+ },
+ 'cumulative_sum(average(bytes))',
+ ],
+ [
+ 'correct percentile formula if agg is valid percentile agg',
+ [{ agg: aggs[2], aggs, dataView }],
+ () => {
+ mockIsPercentileAgg.mockReturnValue(true);
+ },
+ 'percentile(bytes, percentile=10)',
+ ],
+ [
+ 'correct percentile rank formula if agg is valid percentile rank agg',
+ [{ agg: aggs[3], aggs, dataView }],
+ () => {
+ mockIsPercentileRankAgg.mockReturnValue(true);
+ },
+ 'percentile_rank(bytes, value=5)',
+ ],
+ [
+ 'correct standart deviation formula if agg is valid standart deviation agg',
+ [{ agg: aggs[4], aggs, dataView }],
+ () => {
+ mockIsStdDevAgg.mockReturnValue(true);
+ },
+ 'average(bytes) + 2 * standard_deviation(bytes)',
+ ],
+ [
+ 'correct metric formula if agg is valid other metric agg',
+ [{ agg: aggs[5], aggs, dataView }],
+ () => {},
+ 'average(bytes)',
+ ],
+ ])('should return %s', (_, input, actions, expected) => {
+ actions();
+ if (expected === null) {
+ expect(getFormulaForAgg(...input)).toBeNull();
+ } else {
+ expect(getFormulaForAgg(...input)).toEqual(expected);
+ }
+ });
+
+ test.each([
+ [
+ 'null if agg is valid pipeline agg',
+ aggs[0],
+ () => {
+ mockIsPipeline.mockReturnValue(true);
+ mockGetMetricFromParentPipelineAgg.mockReturnValueOnce({
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field,
+ },
+ aggId: '2',
+ });
+ },
+ ],
+ [
+ 'null if percentile rank agg is valid percentile agg',
+ aggs[2],
+ () => {
+ mockIsPercentileAgg.mockReturnValue(true);
+ },
+ ],
+ [
+ 'null if agg is valid percentile rank agg',
+ aggs[3],
+ () => {
+ mockIsPercentileRankAgg.mockReturnValue(true);
+ },
+ ],
+ [
+ 'null if agg is valid standart deviation agg',
+ aggs[4],
+ () => {
+ mockIsStdDevAgg.mockReturnValue(true);
+ },
+ ],
+ ['null if agg is valid other metric agg', aggs[5], () => {}],
+ ])('should return %s and field type is not supported', (_, agg, actions) => {
+ actions();
+ const field1: DataViewField = {
+ name: 'bytes',
+ type: 'geo',
+ esTypes: ['long'],
+ aggregatable: true,
+ searchable: true,
+ count: 10,
+ readFromDocValues: true,
+ scripted: false,
+ isMapped: true,
+ } as DataViewField;
+
+ mockGetFieldByName.mockReturnValueOnce(field1);
+
+ dataView.getFieldByName = mockGetFieldByName;
+ const result = getFormulaForPipelineAgg({
+ agg: agg as SchemaConfig<
+ | METRIC_TYPES.CUMULATIVE_SUM
+ | METRIC_TYPES.DERIVATIVE
+ | METRIC_TYPES.MOVING_FN
+ | METRIC_TYPES.AVG_BUCKET
+ | METRIC_TYPES.MAX_BUCKET
+ | METRIC_TYPES.MIN_BUCKET
+ | METRIC_TYPES.SUM_BUCKET
+ >,
+ aggs,
+ dataView,
+ });
+ expect(result).toBeNull();
+ });
+
+ test.each([
+ [
+ 'null if agg is valid pipeline agg',
+ aggs[0],
+ () => {
+ mockIsPipeline.mockReturnValue(true);
+ mockGetMetricFromParentPipelineAgg.mockReturnValueOnce({
+ aggType: METRIC_TYPES.AVG,
+ aggParams: {
+ field,
+ },
+ aggId: '2',
+ });
+ },
+ ],
+ [
+ 'null if percentile rank agg is valid percentile agg',
+ aggs[2],
+ () => {
+ mockIsPercentileAgg.mockReturnValue(true);
+ },
+ ],
+ [
+ 'null if agg is valid percentile rank agg',
+ aggs[3],
+ () => {
+ mockIsPercentileRankAgg.mockReturnValue(true);
+ },
+ ],
+ [
+ 'null if agg is valid standart deviation agg',
+ aggs[4],
+ () => {
+ mockIsStdDevAgg.mockReturnValue(true);
+ },
+ ],
+ ['null if agg is valid other metric agg', aggs[5], () => {}],
+ ])(
+ 'should return %s, field type is supported and field is not aggregatable',
+ (_, agg, actions) => {
+ actions();
+ const field1: DataViewField = {
+ name: 'str',
+ type: 'string',
+ esTypes: ['text'],
+ aggregatable: false,
+ searchable: true,
+ count: 10,
+ readFromDocValues: true,
+ scripted: false,
+ isMapped: true,
+ } as DataViewField;
+
+ mockGetFieldByName.mockReturnValueOnce(field1);
+
+ dataView.getFieldByName = mockGetFieldByName;
+ const result = getFormulaForPipelineAgg({
+ agg: agg as SchemaConfig<
+ | METRIC_TYPES.CUMULATIVE_SUM
+ | METRIC_TYPES.DERIVATIVE
+ | METRIC_TYPES.MOVING_FN
+ | METRIC_TYPES.AVG_BUCKET
+ | METRIC_TYPES.MAX_BUCKET
+ | METRIC_TYPES.MIN_BUCKET
+ | METRIC_TYPES.SUM_BUCKET
+ >,
+ aggs,
+ dataView,
+ });
+ expect(result).toBeNull();
+ }
+ );
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/metrics/metrics.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/metrics/metrics.test.ts
new file mode 100644
index 0000000000000..659ab80ea03d5
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/metrics/metrics.test.ts
@@ -0,0 +1,368 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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/common';
+import { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { SchemaConfig } from '../../..';
+import { convertMetricToColumns } from './metrics';
+
+const mockConvertMetricAggregationColumnWithoutSpecialParams = jest.fn();
+const mockConvertToOtherParentPipelineAggColumns = jest.fn();
+const mockConvertToPercentileColumn = jest.fn();
+const mockConvertToPercentileRankColumn = jest.fn();
+const mockConvertToSiblingPipelineColumns = jest.fn();
+const mockConvertToStdDeviationFormulaColumns = jest.fn();
+const mockConvertToLastValueColumn = jest.fn();
+const mockConvertToCumulativeSumAggColumn = jest.fn();
+
+jest.mock('../convert', () => ({
+ convertMetricAggregationColumnWithoutSpecialParams: jest.fn(() =>
+ mockConvertMetricAggregationColumnWithoutSpecialParams()
+ ),
+ convertToOtherParentPipelineAggColumns: jest.fn(() =>
+ mockConvertToOtherParentPipelineAggColumns()
+ ),
+ convertToPercentileColumn: jest.fn(() => mockConvertToPercentileColumn()),
+ convertToPercentileRankColumn: jest.fn(() => mockConvertToPercentileRankColumn()),
+ convertToSiblingPipelineColumns: jest.fn(() => mockConvertToSiblingPipelineColumns()),
+ convertToStdDeviationFormulaColumns: jest.fn(() => mockConvertToStdDeviationFormulaColumns()),
+ convertToLastValueColumn: jest.fn(() => mockConvertToLastValueColumn()),
+ convertToCumulativeSumAggColumn: jest.fn(() => mockConvertToCumulativeSumAggColumn()),
+}));
+
+describe('convertMetricToColumns invalid cases', () => {
+ const dataView = stubLogstashDataView;
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ beforeAll(() => {
+ mockConvertMetricAggregationColumnWithoutSpecialParams.mockReturnValue(null);
+ mockConvertToOtherParentPipelineAggColumns.mockReturnValue(null);
+ mockConvertToPercentileColumn.mockReturnValue(null);
+ mockConvertToPercentileRankColumn.mockReturnValue(null);
+ mockConvertToSiblingPipelineColumns.mockReturnValue(null);
+ mockConvertToStdDeviationFormulaColumns.mockReturnValue(null);
+ mockConvertToLastValueColumn.mockReturnValue(null);
+ mockConvertToCumulativeSumAggColumn.mockReturnValue(null);
+ });
+
+ test.each<[string, Parameters, null, jest.Mock | undefined]>([
+ [
+ 'null if agg is not supported',
+ [{ aggType: METRIC_TYPES.GEO_BOUNDS } as unknown as SchemaConfig, dataView, []],
+ null,
+ undefined,
+ ],
+ [
+ 'null if supported agg AVG is not valid',
+ [{ aggType: METRIC_TYPES.AVG } as SchemaConfig, dataView, []],
+ null,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'null if supported agg MIN is not valid',
+ [{ aggType: METRIC_TYPES.MIN } as SchemaConfig, dataView, []],
+ null,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'null if supported agg MAX is not valid',
+ [{ aggType: METRIC_TYPES.MAX } as SchemaConfig, dataView, []],
+ null,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'null if supported agg SUM is not valid',
+ [{ aggType: METRIC_TYPES.SUM } as SchemaConfig, dataView, []],
+ null,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'null if supported agg COUNT is not valid',
+ [{ aggType: METRIC_TYPES.COUNT } as SchemaConfig, dataView, []],
+ null,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'null if supported agg CARDINALITY is not valid',
+ [{ aggType: METRIC_TYPES.CARDINALITY } as SchemaConfig, dataView, []],
+ null,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'null if supported agg VALUE_COUNT is not valid',
+ [{ aggType: METRIC_TYPES.VALUE_COUNT } as SchemaConfig, dataView, []],
+ null,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'null if supported agg MEDIAN is not valid',
+ [{ aggType: METRIC_TYPES.MEDIAN } as SchemaConfig, dataView, []],
+ null,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'null if supported agg STD_DEV is not valid',
+ [{ aggType: METRIC_TYPES.STD_DEV } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToStdDeviationFormulaColumns,
+ ],
+ [
+ 'null if supported agg PERCENTILES is not valid',
+ [{ aggType: METRIC_TYPES.PERCENTILES } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToPercentileColumn,
+ ],
+ [
+ 'null if supported agg SINGLE_PERCENTILE is not valid',
+ [{ aggType: METRIC_TYPES.SINGLE_PERCENTILE } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToPercentileColumn,
+ ],
+ [
+ 'null if supported agg PERCENTILE_RANKS is not valid',
+ [{ aggType: METRIC_TYPES.PERCENTILE_RANKS } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToPercentileRankColumn,
+ ],
+ [
+ 'null if supported agg SINGLE_PERCENTILE_RANK is not valid',
+ [{ aggType: METRIC_TYPES.SINGLE_PERCENTILE_RANK } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToPercentileRankColumn,
+ ],
+ [
+ 'null if supported agg TOP_HITS is not valid',
+ [{ aggType: METRIC_TYPES.TOP_HITS } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToLastValueColumn,
+ ],
+ [
+ 'null if supported agg TOP_METRICS is not valid',
+ [{ aggType: METRIC_TYPES.TOP_METRICS } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToLastValueColumn,
+ ],
+ [
+ 'null if supported agg CUMULATIVE_SUM is not valid',
+ [{ aggType: METRIC_TYPES.CUMULATIVE_SUM } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToCumulativeSumAggColumn,
+ ],
+ [
+ 'null if supported agg DERIVATIVE is not valid',
+ [{ aggType: METRIC_TYPES.DERIVATIVE } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToOtherParentPipelineAggColumns,
+ ],
+ [
+ 'null if supported agg MOVING_FN is not valid',
+ [{ aggType: METRIC_TYPES.MOVING_FN } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToOtherParentPipelineAggColumns,
+ ],
+ [
+ 'null if supported agg SUM_BUCKET is not valid',
+ [{ aggType: METRIC_TYPES.SUM_BUCKET } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToSiblingPipelineColumns,
+ ],
+ [
+ 'null if supported agg MIN_BUCKET is not valid',
+ [{ aggType: METRIC_TYPES.MIN_BUCKET } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToSiblingPipelineColumns,
+ ],
+ [
+ 'null if supported agg MAX_BUCKET is not valid',
+ [{ aggType: METRIC_TYPES.MAX_BUCKET } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToSiblingPipelineColumns,
+ ],
+ [
+ 'null if supported agg AVG_BUCKET is not valid',
+ [{ aggType: METRIC_TYPES.AVG_BUCKET } as SchemaConfig, dataView, []],
+ null,
+ mockConvertToSiblingPipelineColumns,
+ ],
+ [
+ 'null if supported agg SERIAL_DIFF is not valid',
+ [{ aggType: METRIC_TYPES.SERIAL_DIFF } as SchemaConfig, dataView, []],
+ null,
+ undefined,
+ ],
+ ])('should return %s', (_, input, expected, mock) => {
+ expect(convertMetricToColumns(...input)).toBeNull();
+
+ if (mock) {
+ expect(mock).toBeCalledTimes(1);
+ }
+ });
+});
+describe('convertMetricToColumns valid cases', () => {
+ const dataView = stubLogstashDataView;
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ });
+
+ const result = [{}];
+
+ beforeAll(() => {
+ mockConvertMetricAggregationColumnWithoutSpecialParams.mockReturnValue(result);
+ mockConvertToOtherParentPipelineAggColumns.mockReturnValue(result);
+ mockConvertToPercentileColumn.mockReturnValue(result);
+ mockConvertToPercentileRankColumn.mockReturnValue(result);
+ mockConvertToSiblingPipelineColumns.mockReturnValue(result);
+ mockConvertToStdDeviationFormulaColumns.mockReturnValue(result);
+ mockConvertToLastValueColumn.mockReturnValue(result);
+ mockConvertToCumulativeSumAggColumn.mockReturnValue(result);
+ });
+
+ test.each<[string, Parameters, Array<{}>, jest.Mock]>([
+ [
+ 'array of columns if supported agg AVG is valid',
+ [{ aggType: METRIC_TYPES.AVG } as SchemaConfig, dataView, []],
+ result,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'array of columns if supported agg MIN is valid',
+ [{ aggType: METRIC_TYPES.MIN } as SchemaConfig, dataView, []],
+ result,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'array of columns if supported agg MAX is valid',
+ [{ aggType: METRIC_TYPES.MAX } as SchemaConfig, dataView, []],
+ result,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'array of columns if supported agg SUM is valid',
+ [{ aggType: METRIC_TYPES.SUM } as SchemaConfig, dataView, []],
+ result,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'array of columns if supported agg COUNT is valid',
+ [{ aggType: METRIC_TYPES.COUNT } as SchemaConfig, dataView, []],
+ result,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'array of columns if supported agg CARDINALITY is valid',
+ [{ aggType: METRIC_TYPES.CARDINALITY } as SchemaConfig, dataView, []],
+ result,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'array of columns if supported agg VALUE_COUNT is valid',
+ [{ aggType: METRIC_TYPES.VALUE_COUNT } as SchemaConfig, dataView, []],
+ result,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'array of columns if supported agg MEDIAN is valid',
+ [{ aggType: METRIC_TYPES.MEDIAN } as SchemaConfig, dataView, []],
+ result,
+ mockConvertMetricAggregationColumnWithoutSpecialParams,
+ ],
+ [
+ 'array of columns if supported agg STD_DEV is valid',
+ [{ aggType: METRIC_TYPES.STD_DEV } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToStdDeviationFormulaColumns,
+ ],
+ [
+ 'array of columns if supported agg PERCENTILES is valid',
+ [{ aggType: METRIC_TYPES.PERCENTILES } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToPercentileColumn,
+ ],
+ [
+ 'array of columns if supported agg SINGLE_PERCENTILE is valid',
+ [{ aggType: METRIC_TYPES.SINGLE_PERCENTILE } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToPercentileColumn,
+ ],
+ [
+ 'array of columns if supported agg PERCENTILE_RANKS is valid',
+ [{ aggType: METRIC_TYPES.PERCENTILE_RANKS } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToPercentileRankColumn,
+ ],
+ [
+ 'array of columns if supported agg SINGLE_PERCENTILE_RANK is valid',
+ [{ aggType: METRIC_TYPES.SINGLE_PERCENTILE_RANK } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToPercentileRankColumn,
+ ],
+ [
+ 'array of columns if supported agg TOP_HITS is valid',
+ [{ aggType: METRIC_TYPES.TOP_HITS } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToLastValueColumn,
+ ],
+ [
+ 'array of columns if supported agg TOP_METRICS is valid',
+ [{ aggType: METRIC_TYPES.TOP_METRICS } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToLastValueColumn,
+ ],
+ [
+ 'array of columns if supported agg CUMULATIVE_SUM is valid',
+ [{ aggType: METRIC_TYPES.CUMULATIVE_SUM } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToCumulativeSumAggColumn,
+ ],
+ [
+ 'array of columns if supported agg DERIVATIVE is valid',
+ [{ aggType: METRIC_TYPES.DERIVATIVE } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToOtherParentPipelineAggColumns,
+ ],
+ [
+ 'array of columns if supported agg MOVING_FN is valid',
+ [{ aggType: METRIC_TYPES.MOVING_FN } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToOtherParentPipelineAggColumns,
+ ],
+ [
+ 'array of columns if supported agg SUM_BUCKET is valid',
+ [{ aggType: METRIC_TYPES.SUM_BUCKET } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToSiblingPipelineColumns,
+ ],
+ [
+ 'array of columns if supported agg MIN_BUCKET is valid',
+ [{ aggType: METRIC_TYPES.MIN_BUCKET } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToSiblingPipelineColumns,
+ ],
+ [
+ 'array of columns if supported agg MAX_BUCKET is valid',
+ [{ aggType: METRIC_TYPES.MAX_BUCKET } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToSiblingPipelineColumns,
+ ],
+ [
+ 'array of columns if supported agg AVG_BUCKET is valid',
+ [{ aggType: METRIC_TYPES.AVG_BUCKET } as SchemaConfig, dataView, []],
+ result,
+ mockConvertToSiblingPipelineColumns,
+ ],
+ ])('should return %s', (_, input, expected, mock) => {
+ expect(convertMetricToColumns(...input)).toEqual(expected.map(expect.objectContaining));
+ if (mock) {
+ expect(mock).toBeCalledTimes(1);
+ }
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/metrics/percentage_formula.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/metrics/percentage_formula.test.ts
new file mode 100644
index 0000000000000..9855ce44b6602
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/metrics/percentage_formula.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 { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { METRIC_TYPES } from '@kbn/data-plugin/common';
+import { getPercentageColumnFormulaColumn } from './percentage_formula';
+import { FormulaColumn } from '../../types';
+import { SchemaConfig } from '../../..';
+
+const mockGetFormulaForAgg = jest.fn();
+const mockCreateFormulaColumn = jest.fn();
+
+jest.mock('./formula', () => ({
+ getFormulaForAgg: jest.fn(() => mockGetFormulaForAgg()),
+}));
+
+jest.mock('../convert', () => ({
+ createFormulaColumn: jest.fn((formula) => mockCreateFormulaColumn(formula)),
+}));
+
+describe('getPercentageColumnFormulaColumn', () => {
+ const dataView = stubLogstashDataView;
+ const field = stubLogstashDataView.fields[0].name;
+ const aggs: Array> = [
+ {
+ aggId: '1',
+ aggType: METRIC_TYPES.AVG,
+ aggParams: { field },
+ accessor: 0,
+ params: {},
+ label: 'average',
+ format: {},
+ },
+ ];
+
+ afterEach(() => {
+ jest.clearAllMocks();
+ });
+
+ test.each<
+ [
+ string,
+ Parameters,
+ () => void,
+ Partial | null
+ ]
+ >([
+ [
+ 'null if cannot build formula for provided agg',
+ [{ agg: aggs[0], aggs, dataView }],
+ () => {
+ mockGetFormulaForAgg.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'null if cannot create formula column for provided arguments',
+ [{ agg: aggs[0], aggs, dataView }],
+ () => {
+ mockGetFormulaForAgg.mockReturnValue('test-formula');
+ mockCreateFormulaColumn.mockReturnValue(null);
+ },
+ null,
+ ],
+ [
+ 'formula column if provided arguments are valid',
+ [{ agg: aggs[0], aggs, dataView }],
+ () => {
+ mockGetFormulaForAgg.mockReturnValue('test-formula');
+ mockCreateFormulaColumn.mockImplementation((formula) => ({
+ operationType: 'formula',
+ params: { formula },
+ label: 'Average',
+ }));
+ },
+ {
+ operationType: 'formula',
+ params: {
+ formula: `(test-formula) / overall_sum(test-formula)`,
+ format: { id: 'percent' },
+ },
+ label: `Average percentages`,
+ },
+ ],
+ ])('should return %s', (_, input, actions, expected) => {
+ actions();
+ if (expected === null) {
+ expect(getPercentageColumnFormulaColumn(...input)).toBeNull();
+ } else {
+ expect(getPercentageColumnFormulaColumn(...input)).toEqual(expect.objectContaining(expected));
+ }
+ });
+});
diff --git a/src/plugins/visualizations/common/convert_to_lens/lib/utils.test.ts b/src/plugins/visualizations/common/convert_to_lens/lib/utils.test.ts
new file mode 100644
index 0000000000000..73118b6ad4f03
--- /dev/null
+++ b/src/plugins/visualizations/common/convert_to_lens/lib/utils.test.ts
@@ -0,0 +1,521 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may 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 { stubLogstashDataView } from '@kbn/data-views-plugin/common/data_view.stub';
+import { IAggConfig, METRIC_TYPES } from '@kbn/data-plugin/common';
+import { AggBasedColumn, ColumnWithMeta, Operations } from '../..';
+import { SchemaConfig } from '../../types';
+import {
+ getCustomBucketsFromSiblingAggs,
+ getFieldNameFromField,
+ getLabel,
+ getLabelForPercentile,
+ getMetricFromParentPipelineAgg,
+ getValidColumns,
+ isColumnWithMeta,
+ isMetricAggWithoutParams,
+ isPercentileAgg,
+ isPercentileRankAgg,
+ isPipeline,
+ isSchemaConfig,
+ isSiblingPipeline,
+ isStdDevAgg,
+} from './utils';
+
+describe('getLabel', () => {
+ const label = 'some label';
+ const customLabel = 'some custom label';
+
+ const agg: SchemaConfig = {
+ accessor: 0,
+ label,
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.AVG,
+ aggId: 'id',
+ aggParams: { field: 'some-field' },
+ };
+
+ test('should return label', () => {
+ const { aggParams, ...aggWithoutAggParams } = agg;
+ expect(getLabel(aggWithoutAggParams)).toEqual(label);
+ expect(getLabel(agg)).toEqual(label);
+ expect(getLabel({ ...agg, aggParams: { ...aggParams!, customLabel: undefined } })).toEqual(
+ label
+ );
+ });
+
+ test('should return customLabel', () => {
+ const aggParams = { ...agg.aggParams!, customLabel };
+ const aggWithCustomLabel = { ...agg, aggParams };
+ expect(getLabel(aggWithCustomLabel)).toEqual(customLabel);
+ });
+});
+
+describe('getLabelForPercentile', () => {
+ const label = 'some label';
+ const customLabel = 'some custom label';
+
+ const agg: SchemaConfig = {
+ accessor: 0,
+ label,
+ format: {
+ id: undefined,
+ params: undefined,
+ },
+ params: {},
+ aggType: METRIC_TYPES.PERCENTILES,
+ aggId: 'id',
+ aggParams: { field: 'some-field' },
+ };
+
+ test('should return empty string if no custom label is specified', () => {
+ const { aggParams, ...aggWithoutAggParams } = agg;
+ expect(getLabelForPercentile(aggWithoutAggParams)).toEqual('');
+ expect(getLabel({ ...agg, aggParams: { ...aggParams!, customLabel: '' } })).toEqual('');
+ });
+
+ test('should return label if custom label is specified', () => {
+ const aggParams = { ...agg.aggParams!, customLabel };
+ const aggWithCustomLabel = { ...agg, aggParams };
+ expect(getLabelForPercentile(aggWithCustomLabel)).toEqual(label);
+ });
+});
+
+describe('getValidColumns', () => {
+ const dataView = stubLogstashDataView;
+ const columns: AggBasedColumn[] = [
+ {
+ operationType: Operations.AVERAGE,
+ sourceField: dataView.fields[0].name,
+ columnId: 'some-id-0',
+ dataType: 'number',
+ params: {},
+ meta: { aggId: 'aggId-0' },
+ isSplit: false,
+ isBucketed: true,
+ },
+ {
+ operationType: Operations.SUM,
+ sourceField: dataView.fields[0].name,
+ columnId: 'some-id-1',
+ dataType: 'number',
+ params: {},
+ meta: { aggId: 'aggId-1' },
+ isSplit: false,
+ isBucketed: true,
+ },
+ ];
+ test.each<[string, Parameters