diff --git a/.buildkite/pipelines/fleet/packages_daily.yml b/.buildkite/pipelines/fleet/packages_daily.yml
index e64358661d7b9..cecd88a948ddc 100644
--- a/.buildkite/pipelines/fleet/packages_daily.yml
+++ b/.buildkite/pipelines/fleet/packages_daily.yml
@@ -7,21 +7,15 @@ steps:
- wait
- - command: .buildkite/scripts/steps/build_kibana.sh
- label: Build Kibana Distribution and Plugins
- agents:
- queue: c2-16
- key: build
- if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
- timeout_in_minutes: 60
-
- - wait
-
- command: .buildkite/scripts/steps/fleet/install_all_packages.sh
label: Install All Packages
agents:
queue: n2-2
- key: linting
+ env:
+ # ensure that the FTR logs all output for these tests
+ DISABLE_CI_LOG_OUTPUT_CAPTURE: 'true'
+ # disable downloading a kibana build, this step does not use it
+ KIBANA_BUILD_ID: 'false'
timeout_in_minutes: 90
- wait: ~
diff --git a/.buildkite/scripts/download_build_artifacts.sh b/.buildkite/scripts/download_build_artifacts.sh
index 1e793346da33b..1b52e82c2d66b 100755
--- a/.buildkite/scripts/download_build_artifacts.sh
+++ b/.buildkite/scripts/download_build_artifacts.sh
@@ -4,25 +4,27 @@ set -euo pipefail
source "$(dirname "$0")/common/util.sh"
-if [[ ! -d "$KIBANA_BUILD_LOCATION/bin" ]]; then
- echo '--- Downloading Distribution and Plugin artifacts'
+if [[ "${KIBANA_BUILD_ID:-}" != "false" ]]; then
+ if [[ ! -d "$KIBANA_BUILD_LOCATION/bin" ]]; then
+ echo '--- Downloading Distribution and Plugin artifacts'
- cd "$WORKSPACE"
+ cd "$WORKSPACE"
- download_artifact kibana-default.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
- download_artifact kibana-default-plugins.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
+ download_artifact kibana-default.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
+ download_artifact kibana-default-plugins.tar.gz . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
- mkdir -p "$KIBANA_BUILD_LOCATION"
- tar -xzf kibana-default.tar.gz -C "$KIBANA_BUILD_LOCATION" --strip=1
+ 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
+ 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"
+ cd "$KIBANA_DIR"
- tar -xzf ../kibana-default-plugins.tar.gz
+ tar -xzf ../kibana-default-plugins.tar.gz
+ fi
fi
diff --git a/.buildkite/scripts/steps/fleet/install_all_packages.sh b/.buildkite/scripts/steps/fleet/install_all_packages.sh
index b02c930160f12..eb001b4399b86 100755
--- a/.buildkite/scripts/steps/fleet/install_all_packages.sh
+++ b/.buildkite/scripts/steps/fleet/install_all_packages.sh
@@ -7,5 +7,6 @@ source .buildkite/scripts/steps/functional/common.sh
echo '--- Installing all packages'
node scripts/functional_tests \
- --debug --bail \
+ --debug \
+ --bail \
--config x-pack/test/fleet_packages/config.ts
diff --git a/.buildkite/scripts/steps/scalability/benchmarking.sh b/.buildkite/scripts/steps/scalability/benchmarking.sh
index 57f63445cb26a..9ad62d2dbddb8 100755
--- a/.buildkite/scripts/steps/scalability/benchmarking.sh
+++ b/.buildkite/scripts/steps/scalability/benchmarking.sh
@@ -68,15 +68,20 @@ upload_test_results() {
buildkite-agent artifact upload "scalability_traces.tar.gz"
}
-echo "--- Download the latest artifacts from single user performance pipeline"
-download_artifacts
-
echo "--- Clone kibana-load-testing repo and compile project"
checkout_and_compile_load_runner
-echo "--- Run Scalability Tests"
cd "$KIBANA_DIR"
-node scripts/run_scalability --kibana-install-dir "$KIBANA_BUILD_LOCATION" --journey-path "scalability_traces/server"
+echo "--- Download the latest artifacts from single user performance pipeline"
+download_artifacts
+
+if [ "$BUILDKITE_PIPELINE_SLUG" == "kibana-scalability-benchmarking-1" ]; then
+ echo "--- Run journey scalability tests"
+ node scripts/run_scalability --kibana-install-dir "$KIBANA_BUILD_LOCATION" --journey-path "scalability_traces/server"
+else
+ echo "--- Run single apis capacity tests"
+ node scripts/run_scalability --kibana-install-dir "$KIBANA_BUILD_LOCATION" --journey-path "x-pack/test/scalability/apis"
+fi
echo "--- Upload test results"
upload_test_results
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 02c94120cec22..78f3271d028a9 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -13,6 +13,7 @@
/src/plugins/saved_search/ @elastic/kibana-data-discovery
/x-pack/plugins/discover_enhanced/ @elastic/kibana-data-discovery
/x-pack/test/functional/apps/discover/ @elastic/kibana-data-discovery
+/x-pack/test/functional_with_es_ssl/apps/discover/ @elastic/kibana-data-discovery
/test/functional/apps/discover/ @elastic/kibana-data-discovery
/test/functional/apps/context/ @elastic/kibana-data-discovery
/test/api_integration/apis/unified_field_list/ @elastic/kibana-data-discovery
@@ -607,20 +608,19 @@
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions @elastic/security-solution-platform @elastic/security-detections-response-rules
/x-pack/plugins/security_solution/server/routes @elastic/security-detections-response @elastic/security-threat-hunting
-
-## Security Solution sub teams - security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/public/management/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/public/common/lib/endpoint*/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/public/common/components/endpoint/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/common/endpoint/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/server/endpoint/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/server/lists_integration/endpoint/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/server/lib/license/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/server/fleet_integration/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/scripts/endpoint/event_filters/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/test/security_solution_endpoint/apps/endpoint/ @elastic/security-onboarding-and-lifecycle-mgt
-/x-pack/test/security_solution_endpoint_api_int/ @elastic/security-onboarding-and-lifecycle-mgt
+## Security Solution sub teams - security-defend-workflows
+/x-pack/plugins/security_solution/public/management/ @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/public/common/lib/endpoint*/ @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/public/common/components/endpoint/ @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/common/endpoint/ @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/server/endpoint/ @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/server/lists_integration/endpoint/ @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/server/lib/license/ @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/server/fleet_integration/ @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/scripts/endpoint/event_filters/ @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/ @elastic/security-defend-workflows
+/x-pack/test/security_solution_endpoint/apps/endpoint/ @elastic/security-defend-workflows
+/x-pack/test/security_solution_endpoint_api_int/ @elastic/security-defend-workflows
## Security Solution sub teams - security-telemetry (Data Engineering)
x-pack/plugins/security_solution/server/usage/ @elastic/security-data-analytics
@@ -643,11 +643,11 @@ x-pack/plugins/threat_intelligence @elastic/protections-experience
x-pack/plugins/security_solution/public/threat_intelligence @elastic/protections-experience
x-pack/test/threat_intelligence_cypress @elastic/protections-experience
-# Security Asset Management
-/x-pack/plugins/osquery @elastic/security-asset-management
-/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions @elastic/security-asset-management
-/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions @elastic/security-asset-management
-/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions @elastic/security-asset-management
+# Security Defend Workflows - OSQuery Ownership
+/x-pack/plugins/osquery @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions @elastic/security-defend-workflows
+/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions @elastic/security-defend-workflows
# Cloud Security Posture
/x-pack/plugins/cloud_security_posture/ @elastic/kibana-cloud-security-posture
@@ -1072,7 +1072,9 @@ packages/shared-ux/storybook/mock @elastic/kibana-global-experience
x-pack/packages/ml/agg_utils @elastic/ml-ui
x-pack/packages/ml/aiops_components @elastic/ml-ui
x-pack/packages/ml/aiops_utils @elastic/ml-ui
+x-pack/packages/ml/is_defined @elastic/ml-ui
x-pack/packages/ml/is_populated_object @elastic/ml-ui
+x-pack/packages/ml/local_storage @elastic/ml-ui
x-pack/packages/ml/nested_property @elastic/ml-ui
x-pack/packages/ml/string_hash @elastic/ml-ui
x-pack/packages/ml/url_state @elastic/ml-ui
diff --git a/.gitignore b/.gitignore
index 112d2775f01d6..d3abc8607b9c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -113,3 +113,4 @@ fleet-server.yml
/packages/kbn-package-map/package-map.json
/packages/kbn-synthetic-package-map/
**/.synthetics/
+**/.journeys/
diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx
index 24b6403aeeab0..413b9153c5283 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: 2023-01-04
+date: 2023-01-09
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 e04f503c998e0..5326a453f439a 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: 2023-01-04
+date: 2023-01-09
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 95bd61adda0e4..f1c2bdd3907df 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: 2023-01-04
+date: 2023-01-09
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 4302ded1c3294..75f83e3ffe5c6 100644
--- a/api_docs/alerting.devdocs.json
+++ b/api_docs/alerting.devdocs.json
@@ -2224,6 +2224,264 @@
"deprecated": false,
"trackAdoption": false
},
+ {
+ "parentPluginId": "alerting",
+ "id": "def-server.RuleExecutorServices.share",
+ "type": "Object",
+ "tags": [],
+ "label": "share",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "share",
+ "scope": "server",
+ "docId": "kibSharePluginApi",
+ "section": "def-server.SharePluginStart",
+ "text": "SharePluginStart"
+ }
+ ],
+ "path": "x-pack/plugins/alerting/server/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "alerting",
+ "id": "def-server.RuleExecutorServices.dataViews",
+ "type": "Object",
+ "tags": [],
+ "label": "dataViews",
+ "description": [],
+ "signature": [
+ "{ get: (id: string, displayErrors?: boolean, refreshFields?: boolean) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ ">; delete: (indexPatternId: string) => Promise<{}>; create: (spec: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewSpec",
+ "text": "DataViewSpec"
+ },
+ ", skipFetchFields?: boolean, displayErrors?: boolean) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ ">; find: (search: string, size?: number) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ "[]>; getCanSave: () => Promise; getIds: (refresh?: boolean) => Promise; getTitles: (refresh?: boolean) => Promise; getIdsWithTitle: (refresh?: boolean) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewListItem",
+ "text": "DataViewListItem"
+ },
+ "[]>; clearCache: () => void; clearInstanceCache: (id?: string | undefined) => void; getCache: () => Promise<",
+ {
+ "pluginId": "@kbn/core-saved-objects-common",
+ "scope": "common",
+ "docId": "kibKbnCoreSavedObjectsCommonPluginApi",
+ "section": "def-common.SavedObject",
+ "text": "SavedObject"
+ },
+ "<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewSavedObjectAttrs",
+ "text": "DataViewSavedObjectAttrs"
+ },
+ ">[] | null | undefined>; getDefault: (displayErrors?: boolean) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ " | null>; getDefaultId: () => Promise; setDefault: (id: string | null, force?: boolean) => Promise; hasUserDataView: () => Promise; getFieldsForWildcard: (options: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.GetFieldsOptions",
+ "text": "GetFieldsOptions"
+ },
+ ") => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.FieldSpec",
+ "text": "FieldSpec"
+ },
+ "[]>; getFieldsForIndexPattern: (indexPattern: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ " | ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewSpec",
+ "text": "DataViewSpec"
+ },
+ ", options?: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.GetFieldsOptions",
+ "text": "GetFieldsOptions"
+ },
+ " | undefined) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.FieldSpec",
+ "text": "FieldSpec"
+ },
+ "[]>; refreshFields: (dataView: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ ", displayErrors?: boolean) => Promise; fieldArrayToMap: (fields: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.FieldSpec",
+ "text": "FieldSpec"
+ },
+ "[], fieldAttrs?: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.FieldAttrs",
+ "text": "FieldAttrs"
+ },
+ " | undefined) => ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewFieldMap",
+ "text": "DataViewFieldMap"
+ },
+ "; savedObjectToSpec: (savedObject: ",
+ {
+ "pluginId": "@kbn/core-saved-objects-common",
+ "scope": "common",
+ "docId": "kibKbnCoreSavedObjectsCommonPluginApi",
+ "section": "def-common.SavedObject",
+ "text": "SavedObject"
+ },
+ "<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewAttributes",
+ "text": "DataViewAttributes"
+ },
+ ">) => ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewSpec",
+ "text": "DataViewSpec"
+ },
+ "; createAndSave: (spec: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewSpec",
+ "text": "DataViewSpec"
+ },
+ ", override?: boolean, skipFetchFields?: boolean, displayErrors?: boolean) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ ">; createSavedObject: (dataView: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ ", override?: boolean, displayErrors?: boolean) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ ">; updateSavedObject: (indexPattern: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ ", saveAttempts?: number, ignoreErrors?: boolean, displayErrors?: boolean) => Promise; getDefaultDataView: (refreshFields?: boolean | undefined) => Promise<",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataView",
+ "text": "DataView"
+ },
+ " | null>; }"
+ ],
+ "path": "x-pack/plugins/alerting/server/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
{
"parentPluginId": "alerting",
"id": "def-server.RuleExecutorServices.ruleResultService",
@@ -3113,7 +3371,7 @@
"section": "def-server.BulkOperationError",
"text": "BulkOperationError"
},
- "[]; rules: (",
+ "[]; total: number; rules: (",
{
"pluginId": "alerting",
"scope": "common",
@@ -3123,7 +3381,7 @@
},
" | ",
"RuleWithLegacyId",
- ")[]; total: number; taskIdsFailedToBeDeleted: string[]; }>; bulkEdit: )[]; taskIdsFailedToBeDeleted: string[]; }>; bulkEdit: | visTypeTimeseries, graph, dataViewManagement, dataViews | - |
| | visTypeTimeseries, graph, dataViewManagement, dataViews | - |
| | visTypeTimeseries, graph, dataViewManagement | - |
-| | observability, dataVisualizer, fleet, cloudSecurityPosture, discoverEnhanced, osquery, synthetics | - |
+| | observability, dataVisualizer, fleet, cloudSecurityPosture, discoverEnhanced, osquery, synthetics | - |
| | dataViewManagement, dataViews | - |
| | dataViews, dataViewManagement | - |
| | dataViewManagement, dataViews | - |
diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx
index 97cff5b465e0b..ef478e663324f 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -310,7 +310,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
-| | [overview_tab.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx#:~:text=indexPatternId) | - |
+| | [overview_tab.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx#:~:text=indexPatternId) | - |
@@ -433,7 +433,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - |
| | [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title), [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - |
| | [use_data_visualizer_grid_data.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_data_visualizer_grid_data.ts#:~:text=title), [index_data_visualizer_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx#:~:text=title) | - |
-| | [results_links.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx#:~:text=indexPatternId), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=indexPatternId) | - |
+| | [results_links.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx#:~:text=indexPatternId), [actions_panel.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx#:~:text=indexPatternId) | - |
@@ -460,7 +460,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
-| | [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=indexPatternId), [explore_data_chart_action.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts#:~:text=indexPatternId) | - |
+| | [explore_data_context_menu_action.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts#:~:text=indexPatternId), [explore_data_chart_action.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts#:~:text=indexPatternId) | - |
@@ -521,7 +521,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title), [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title) | - |
| | [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title), [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title) | - |
| | [filter_dataset.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_dataset.tsx#:~:text=title), [filter_log_level.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/filter_log_level.tsx#:~:text=title), [query_bar.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#:~:text=title) | - |
-| | [use_get_logs_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/hooks/use_get_logs_discover_link.tsx#:~:text=indexPatternId) | - |
+| | [use_get_logs_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/hooks/use_get_logs_discover_link.tsx#:~:text=indexPatternId) | - |
| | [tutorial_directory_header_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/home_integration/tutorial_directory_header_link.tsx#:~:text=RedirectAppLinks), [tutorial_directory_header_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/home_integration/tutorial_directory_header_link.tsx#:~:text=RedirectAppLinks), [tutorial_directory_header_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/home_integration/tutorial_directory_header_link.tsx#:~:text=RedirectAppLinks), [custom_assets_accordion.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/custom_assets_accordion.tsx#:~:text=RedirectAppLinks), [custom_assets_accordion.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/custom_assets_accordion.tsx#:~:text=RedirectAppLinks), [custom_assets_accordion.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/components/custom_assets_accordion.tsx#:~:text=RedirectAppLinks), [agent_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx#:~:text=RedirectAppLinks), [agent_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx#:~:text=RedirectAppLinks), [agent_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/agent_logs.tsx#:~:text=RedirectAppLinks), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/public/applications/integrations/app.tsx#:~:text=RedirectAppLinks)+ 5 more | - |
| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 |
| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/fleet/server/plugin.ts#:~:text=disabled) | 8.8.0 |
@@ -742,7 +742,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | [observability_data_views.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts#:~:text=title), [report_definition_field.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx#:~:text=title), [use_filter_values.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts#:~:text=title), [filter_value_btn.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx#:~:text=title), [sample_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts#:~:text=title), [sample_attribute_kpi.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts#:~:text=title), [sample_attribute_with_reference_lines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts#:~:text=title), [test_formula_metric_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_formula_metric_attribute.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title)+ 14 more | - |
| | [observability_data_views.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts#:~:text=title), [report_definition_field.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx#:~:text=title), [use_filter_values.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts#:~:text=title), [filter_value_btn.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx#:~:text=title), [sample_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts#:~:text=title), [sample_attribute_kpi.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts#:~:text=title), [sample_attribute_with_reference_lines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts#:~:text=title), [test_formula_metric_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_formula_metric_attribute.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title)+ 14 more | - |
| | [observability_data_views.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/utils/observability_data_views/observability_data_views.ts#:~:text=title), [report_definition_field.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/report_definition_field.tsx#:~:text=title), [use_filter_values.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/use_filter_values.ts#:~:text=title), [filter_value_btn.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/series_editor/columns/filter_value_btn.tsx#:~:text=title), [sample_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute.ts#:~:text=title), [sample_attribute_kpi.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_kpi.ts#:~:text=title), [sample_attribute_with_reference_lines.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/sample_attribute_with_reference_lines.ts#:~:text=title), [test_formula_metric_attribute.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/test_data/test_formula_metric_attribute.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title), [single_metric_attributes.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/lens_attributes/single_metric_attributes.test.ts#:~:text=title)+ 2 more | - |
-| | [use_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx#:~:text=indexPatternId) | - |
+| | [use_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx#:~:text=indexPatternId) | - |
| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/application/index.tsx#:~:text=RedirectAppLinks), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/application/index.tsx#:~:text=RedirectAppLinks), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability/public/application/index.tsx#:~:text=RedirectAppLinks) | - |
@@ -751,7 +751,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| 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), [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) | - |
+| | [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) | - |
@@ -968,7 +968,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/
| | [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title), [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title) | - |
| | [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title), [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title) | - |
| | [filter_group.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/filter_group/filter_group.tsx#:~:text=title), [filters_expression_select.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/overview/alerts/monitor_expressions/filters_expression_select.tsx#:~:text=title) | - |
-| | [stderr_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx#:~:text=indexPatternId) | - |
+| | [stderr_logs.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx#:~:text=indexPatternId) | - |
| | [alert_messages.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/lib/alert_types/alert_messages.tsx#:~:text=RedirectAppLinks), [alert_messages.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/lib/alert_types/alert_messages.tsx#:~:text=RedirectAppLinks), [alert_messages.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/lib/alert_types/alert_messages.tsx#:~:text=RedirectAppLinks), [uptime_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_app.tsx#:~:text=RedirectAppLinks), [uptime_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_app.tsx#:~:text=RedirectAppLinks), [uptime_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/legacy_uptime/app/uptime_app.tsx#:~:text=RedirectAppLinks), [synthetics_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/synthetics_app.tsx#:~:text=RedirectAppLinks), [synthetics_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/synthetics_app.tsx#:~:text=RedirectAppLinks), [synthetics_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/synthetics/public/apps/synthetics/synthetics_app.tsx#:~:text=RedirectAppLinks) | - |
diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx
index 700f4f8045c66..1c38c7be918a7 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx
index 13d80a858faec..c89652e7f5bce 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: 2023-01-04
+date: 2023-01-09
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 12ff50d40da52..af684dd0a989d 100644
--- a/api_docs/discover.devdocs.json
+++ b/api_docs/discover.devdocs.json
@@ -242,465 +242,660 @@
"interfaces": [
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams",
+ "id": "def-public.DiscoverGridSettings",
"type": "Interface",
"tags": [],
- "label": "DiscoverAppLocatorParams",
+ "label": "DiscoverGridSettings",
"description": [],
- "signature": [
- {
- "pluginId": "discover",
- "scope": "public",
- "docId": "kibDiscoverPluginApi",
- "section": "def-public.DiscoverAppLocatorParams",
- "text": "DiscoverAppLocatorParams"
- },
- " extends ",
- {
- "pluginId": "@kbn/utility-types",
- "scope": "common",
- "docId": "kibKbnUtilityTypesPluginApi",
- "section": "def-common.SerializableRecord",
- "text": "SerializableRecord"
- }
- ],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.savedSearchId",
- "type": "string",
+ "id": "def-public.DiscoverGridSettings.columns",
+ "type": "Object",
"tags": [],
- "label": "savedSearchId",
- "description": [
- "\nOptionally set saved search ID."
- ],
+ "label": "columns",
+ "description": [],
"signature": [
- "string | undefined"
+ "Record | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
- },
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.DiscoverGridSettingsColumn",
+ "type": "Interface",
+ "tags": [],
+ "label": "DiscoverGridSettingsColumn",
+ "description": [],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.dataViewId",
- "type": "string",
+ "id": "def-public.DiscoverGridSettingsColumn.width",
+ "type": "number",
"tags": [],
- "label": "dataViewId",
- "description": [
- "\nOptionally set index pattern / data view ID."
- ],
+ "label": "width",
+ "description": [],
"signature": [
- "string | undefined"
+ "number | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.ISearchEmbeddable",
+ "type": "Interface",
+ "tags": [],
+ "label": "ISearchEmbeddable",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "discover",
+ "scope": "public",
+ "docId": "kibDiscoverPluginApi",
+ "section": "def-public.ISearchEmbeddable",
+ "text": "ISearchEmbeddable"
+ },
+ " extends ",
+ {
+ "pluginId": "embeddable",
+ "scope": "public",
+ "docId": "kibEmbeddablePluginApi",
+ "section": "def-public.IEmbeddable",
+ "text": "IEmbeddable"
+ },
+ "<",
+ {
+ "pluginId": "discover",
+ "scope": "public",
+ "docId": "kibDiscoverPluginApi",
+ "section": "def-public.SearchInput",
+ "text": "SearchInput"
},
+ ", ",
+ "SearchOutput",
+ ", any>"
+ ],
+ "path": "src/plugins/discover/public/embeddable/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.indexPatternId",
- "type": "string",
- "tags": [
- "deprecated"
- ],
- "label": "indexPatternId",
- "description": [
- "\nDuplication of dataViewId"
- ],
+ "id": "def-public.ISearchEmbeddable.getSavedSearch",
+ "type": "Function",
+ "tags": [],
+ "label": "getSavedSearch",
+ "description": [],
"signature": [
- "string | undefined"
+ "() => ",
+ {
+ "pluginId": "savedSearch",
+ "scope": "public",
+ "docId": "kibSavedSearchPluginApi",
+ "section": "def-public.SavedSearch",
+ "text": "SavedSearch"
+ }
],
- "path": "src/plugins/discover/public/locator.ts",
- "deprecated": true,
+ "path": "src/plugins/discover/public/embeddable/types.ts",
+ "deprecated": false,
"trackAdoption": false,
- "references": [
+ "children": [],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch",
+ "type": "Interface",
+ "tags": [],
+ "label": "SavedSearch",
+ "description": [],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch.searchSource",
+ "type": "Object",
+ "tags": [],
+ "label": "searchSource",
+ "description": [],
+ "signature": [
+ "{ create: () => ",
{
- "plugin": "observability",
- "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx"
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSource",
+ "text": "SearchSource"
},
+ "; history: ",
+ "SearchRequest",
+ "[]; setOverwriteDataViewType: (overwriteType: string | false | undefined) => void; setField: (field: K, value: ",
{
- "plugin": "dataVisualizer",
- "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx"
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSourceFields",
+ "text": "SearchSourceFields"
},
+ "[K]) => ",
{
- "plugin": "fleet",
- "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/hooks/use_get_logs_discover_link.tsx"
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSource",
+ "text": "SearchSource"
},
+ "; removeField: (field: K) => ",
{
- "plugin": "discoverEnhanced",
- "path": "x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts"
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSource",
+ "text": "SearchSource"
},
+ "; setFields: (newFields: ",
{
- "plugin": "discoverEnhanced",
- "path": "x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts"
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSourceFields",
+ "text": "SearchSourceFields"
},
+ ") => ",
{
- "plugin": "osquery",
- "path": "x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx"
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSource",
+ "text": "SearchSource"
},
+ "; getId: () => string; getFields: () => ",
{
- "plugin": "osquery",
- "path": "x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx"
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSourceFields",
+ "text": "SearchSourceFields"
},
+ "; getField: (field: K, recurse?: boolean) => ",
{
- "plugin": "synthetics",
- "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx"
- }
- ]
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.dataViewSpec",
- "type": "Object",
- "tags": [],
- "label": "dataViewSpec",
- "description": [],
- "signature": [
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSourceFields",
+ "text": "SearchSourceFields"
+ },
+ "[K]; getActiveIndexFilter: () => string[]; getOwnField: (field: K) => ",
{
- "pluginId": "@kbn/es-query",
+ "pluginId": "data",
"scope": "common",
- "docId": "kibKbnEsQueryPluginApi",
- "section": "def-common.TimeRange",
- "text": "TimeRange"
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSourceFields",
+ "text": "SearchSourceFields"
},
- " | undefined"
- ],
- "path": "src/plugins/discover/public/locator.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.refreshInterval",
- "type": "CompoundType",
- "tags": [],
- "label": "refreshInterval",
- "description": [
- "\nOptionally set the refresh interval."
- ],
- "signature": [
- "(",
+ "[K]; createCopy: () => ",
{
"pluginId": "data",
"scope": "common",
- "docId": "kibDataQueryPluginApi",
- "section": "def-common.RefreshInterval",
- "text": "RefreshInterval"
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSource",
+ "text": "SearchSource"
},
- " & ",
+ "; createChild: (options?: {}) => ",
{
- "pluginId": "@kbn/utility-types",
+ "pluginId": "data",
"scope": "common",
- "docId": "kibKbnUtilityTypesPluginApi",
- "section": "def-common.SerializableRecord",
- "text": "SerializableRecord"
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSource",
+ "text": "SearchSource"
},
- ") | undefined"
- ],
- "path": "src/plugins/discover/public/locator.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.filters",
- "type": "Array",
- "tags": [],
- "label": "filters",
- "description": [
- "\nOptionally apply filters."
- ],
- "signature": [
+ "; setParent: (parent?: ",
{
- "pluginId": "@kbn/es-query",
+ "pluginId": "data",
"scope": "common",
- "docId": "kibKbnEsQueryPluginApi",
- "section": "def-common.Filter",
- "text": "Filter"
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.ISearchSource",
+ "text": "ISearchSource"
},
- "[] | undefined"
- ],
- "path": "src/plugins/discover/public/locator.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.query",
- "type": "CompoundType",
- "tags": [],
- "label": "query",
- "description": [
- "\nOptionally set a query."
- ],
- "signature": [
+ " | undefined, options?: ",
{
- "pluginId": "@kbn/es-query",
+ "pluginId": "data",
"scope": "common",
- "docId": "kibKbnEsQueryPluginApi",
- "section": "def-common.Query",
- "text": "Query"
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSourceOptions",
+ "text": "SearchSourceOptions"
},
- " | ",
+ ") => ",
{
- "pluginId": "@kbn/es-query",
+ "pluginId": "data",
"scope": "common",
- "docId": "kibKbnEsQueryPluginApi",
- "section": "def-common.AggregateQuery",
- "text": "AggregateQuery"
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SearchSource",
+ "text": "SearchSource"
},
- " | undefined"
+ "; 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",
+ "<",
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.IKibanaSearchResponse",
+ "text": "IKibanaSearchResponse"
+ },
+ "<",
+ "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, includeFields?: boolean) => ",
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.SerializedSearchSourceFields",
+ "text": "SerializedSearchSourceFields"
+ },
+ "; serialize: () => { searchSourceJSON: string; references: ",
+ {
+ "pluginId": "@kbn/core-saved-objects-common",
+ "scope": "common",
+ "docId": "kibKbnCoreSavedObjectsCommonPluginApi",
+ "section": "def-common.SavedObjectReference",
+ "text": "SavedObjectReference"
+ },
+ "[]; }; toExpressionAst: ({ asDatatable }?: ExpressionAstOptions) => ",
+ {
+ "pluginId": "expressions",
+ "scope": "common",
+ "docId": "kibExpressionsPluginApi",
+ "section": "def-common.ExpressionAstExpression",
+ "text": "ExpressionAstExpression"
+ },
+ "; parseActiveIndexPatternFromQueryString: (queryString: string) => string[]; }"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.useHash",
- "type": "CompoundType",
+ "id": "def-public.SavedSearch.id",
+ "type": "string",
"tags": [],
- "label": "useHash",
- "description": [
- "\nIf not given, will use the uiSettings configuration for `storeInSessionStorage`. useHash determines\nwhether to hash the data in the url to avoid url length issues."
- ],
+ "label": "id",
+ "description": [],
"signature": [
- "boolean | undefined"
+ "string | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.searchSessionId",
+ "id": "def-public.SavedSearch.title",
"type": "string",
"tags": [],
- "label": "searchSessionId",
- "description": [
- "\nBackground search session id"
- ],
+ "label": "title",
+ "description": [],
"signature": [
"string | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.columns",
+ "id": "def-public.SavedSearch.sort",
"type": "Array",
"tags": [],
- "label": "columns",
- "description": [
- "\nColumns displayed in the table"
- ],
+ "label": "sort",
+ "description": [],
"signature": [
- "string[] | undefined"
+ "SortOrder",
+ "[] | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.interval",
- "type": "string",
+ "id": "def-public.SavedSearch.columns",
+ "type": "Array",
"tags": [],
- "label": "interval",
- "description": [
- "\nUsed interval of the histogram"
- ],
+ "label": "columns",
+ "description": [],
"signature": [
- "string | undefined"
+ "string[] | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.sort",
- "type": "Array",
- "tags": [],
- "label": "sort",
- "description": [
- "\nArray of the used sorting [[field,direction],...]"
+ "id": "def-public.SavedSearch.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "signature": [
+ "string | undefined"
],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch.tags",
+ "type": "Array",
+ "tags": [],
+ "label": "tags",
+ "description": [],
"signature": [
- "string[][] | undefined"
+ "string[] | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.savedQuery",
- "type": "string",
+ "id": "def-public.SavedSearch.grid",
+ "type": "Object",
"tags": [],
- "label": "savedQuery",
- "description": [
- "\nid of the used saved query"
+ "label": "grid",
+ "description": [],
+ "signature": [
+ "{ columns?: Record | undefined; } | undefined"
],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch.hideChart",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "hideChart",
+ "description": [],
"signature": [
- "string | undefined"
+ "boolean | undefined"
+ ],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch.sharingSavedObjectProps",
+ "type": "Object",
+ "tags": [],
+ "label": "sharingSavedObjectProps",
+ "description": [],
+ "signature": [
+ "{ outcome?: \"conflict\" | \"exactMatch\" | \"aliasMatch\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.viewMode",
+ "id": "def-public.SavedSearch.viewMode",
"type": "CompoundType",
"tags": [],
"label": "viewMode",
- "description": [
- "\nTable view: Documents vs Field Statistics"
- ],
+ "description": [],
"signature": [
{
- "pluginId": "discover",
+ "pluginId": "savedSearch",
"scope": "public",
- "docId": "kibDiscoverPluginApi",
+ "docId": "kibSavedSearchPluginApi",
"section": "def-public.VIEW_MODE",
"text": "VIEW_MODE"
},
" | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.hideAggregatedPreview",
+ "id": "def-public.SavedSearch.hideAggregatedPreview",
"type": "CompoundType",
"tags": [],
"label": "hideAggregatedPreview",
- "description": [
- "\nHide mini distribution/preview charts when in Field Statistics mode"
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch.rowHeight",
+ "type": "number",
+ "tags": [],
+ "label": "rowHeight",
+ "description": [],
+ "signature": [
+ "number | undefined"
],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch.isTextBasedQuery",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "isTextBasedQuery",
+ "description": [],
"signature": [
"boolean | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocatorParams.breakdownField",
- "type": "string",
+ "id": "def-public.SavedSearch.usesAdHocDataView",
+ "type": "CompoundType",
"tags": [],
- "label": "breakdownField",
- "description": [
- "\nBreakdown field"
+ "label": "usesAdHocDataView",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
+ ],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch.timeRestore",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "timeRestore",
+ "description": [],
+ "signature": [
+ "boolean | undefined"
],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch.timeRange",
+ "type": "Object",
+ "tags": [],
+ "label": "timeRange",
+ "description": [],
"signature": [
- "string | undefined"
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataQueryPluginApi",
+ "section": "def-common.TimeRange",
+ "text": "TimeRange"
+ },
+ " | undefined"
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
- }
- ],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverGridSettings",
- "type": "Interface",
- "tags": [],
- "label": "DiscoverGridSettings",
- "description": [],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
+ },
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverGridSettings.columns",
+ "id": "def-public.SavedSearch.refreshInterval",
"type": "Object",
"tags": [],
- "label": "columns",
+ "label": "refreshInterval",
"description": [],
"signature": [
- "Record | undefined"
+ " | undefined"
],
"path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
- }
- ],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverGridSettingsColumn",
- "type": "Interface",
- "tags": [],
- "label": "DiscoverGridSettingsColumn",
- "description": [],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
+ },
{
"parentPluginId": "discover",
- "id": "def-public.DiscoverGridSettingsColumn.width",
+ "id": "def-public.SavedSearch.rowsPerPage",
"type": "number",
"tags": [],
- "label": "width",
+ "label": "rowsPerPage",
"description": [],
"signature": [
"number | undefined"
@@ -708,44 +903,47 @@
"path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
"deprecated": false,
"trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SavedSearch.breakdownField",
+ "type": "string",
+ "tags": [],
+ "label": "breakdownField",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
}
],
"initialIsOpen": false
},
{
"parentPluginId": "discover",
- "id": "def-public.ISearchEmbeddable",
+ "id": "def-public.SearchInput",
"type": "Interface",
"tags": [],
- "label": "ISearchEmbeddable",
+ "label": "SearchInput",
"description": [],
"signature": [
{
"pluginId": "discover",
"scope": "public",
"docId": "kibDiscoverPluginApi",
- "section": "def-public.ISearchEmbeddable",
- "text": "ISearchEmbeddable"
+ "section": "def-public.SearchInput",
+ "text": "SearchInput"
},
" extends ",
{
"pluginId": "embeddable",
- "scope": "public",
+ "scope": "common",
"docId": "kibEmbeddablePluginApi",
- "section": "def-public.IEmbeddable",
- "text": "IEmbeddable"
- },
- "<",
- {
- "pluginId": "discover",
- "scope": "public",
- "docId": "kibDiscoverPluginApi",
- "section": "def-public.SearchInput",
- "text": "SearchInput"
- },
- ", ",
- "SearchOutput",
- ", any>"
+ "section": "def-common.EmbeddableInput",
+ "text": "EmbeddableInput"
+ }
],
"path": "src/plugins/discover/public/embeddable/types.ts",
"deprecated": false,
@@ -753,748 +951,835 @@
"children": [
{
"parentPluginId": "discover",
- "id": "def-public.ISearchEmbeddable.getSavedSearch",
- "type": "Function",
+ "id": "def-public.SearchInput.timeRange",
+ "type": "Object",
"tags": [],
- "label": "getSavedSearch",
+ "label": "timeRange",
"description": [],
"signature": [
- "() => ",
- {
- "pluginId": "savedSearch",
- "scope": "public",
- "docId": "kibSavedSearchPluginApi",
- "section": "def-public.SavedSearch",
- "text": "SavedSearch"
- }
+ "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }"
],
"path": "src/plugins/discover/public/embeddable/types.ts",
"deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- }
- ],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.SavedSearch",
- "type": "Interface",
- "tags": [],
- "label": "SavedSearch",
- "description": [],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
+ "trackAdoption": false
+ },
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.searchSource",
+ "id": "def-public.SearchInput.timeslice",
"type": "Object",
"tags": [],
- "label": "searchSource",
+ "label": "timeslice",
+ "description": [],
+ "signature": [
+ "[number, number] | undefined"
+ ],
+ "path": "src/plugins/discover/public/embeddable/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SearchInput.query",
+ "type": "Object",
+ "tags": [],
+ "label": "query",
"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",
- "<",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.IKibanaSearchResponse",
- "text": "IKibanaSearchResponse"
- },
- "<",
- "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, includeFields?: boolean) => ",
- {
- "pluginId": "data",
- "scope": "common",
- "docId": "kibDataSearchPluginApi",
- "section": "def-common.SerializedSearchSourceFields",
- "text": "SerializedSearchSourceFields"
- },
- "; serialize: () => { searchSourceJSON: string; references: ",
{
- "pluginId": "@kbn/core-saved-objects-common",
+ "pluginId": "@kbn/es-query",
"scope": "common",
- "docId": "kibKbnCoreSavedObjectsCommonPluginApi",
- "section": "def-common.SavedObjectReference",
- "text": "SavedObjectReference"
+ "docId": "kibKbnEsQueryPluginApi",
+ "section": "def-common.Query",
+ "text": "Query"
},
- "[]; }; toExpressionAst: ({ asDatatable }?: ExpressionAstOptions) => ",
+ " | undefined"
+ ],
+ "path": "src/plugins/discover/public/embeddable/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SearchInput.filters",
+ "type": "Array",
+ "tags": [],
+ "label": "filters",
+ "description": [],
+ "signature": [
{
- "pluginId": "expressions",
+ "pluginId": "@kbn/es-query",
"scope": "common",
- "docId": "kibExpressionsPluginApi",
- "section": "def-common.ExpressionAstExpression",
- "text": "ExpressionAstExpression"
+ "docId": "kibKbnEsQueryPluginApi",
+ "section": "def-common.Filter",
+ "text": "Filter"
},
- "; parseActiveIndexPatternFromQueryString: (queryString: string) => string[]; }"
+ "[] | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/public/embeddable/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.id",
- "type": "string",
+ "id": "def-public.SearchInput.hidePanelTitles",
+ "type": "CompoundType",
"tags": [],
- "label": "id",
+ "label": "hidePanelTitles",
"description": [],
"signature": [
- "string | undefined"
+ "boolean | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/public/embeddable/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SearchInput.columns",
+ "type": "Array",
+ "tags": [],
+ "label": "columns",
+ "description": [],
+ "signature": [
+ "string[] | undefined"
+ ],
+ "path": "src/plugins/discover/public/embeddable/types.ts",
"deprecated": false,
"trackAdoption": false
},
{
- "parentPluginId": "discover",
- "id": "def-public.SavedSearch.title",
- "type": "string",
- "tags": [],
- "label": "title",
- "description": [],
- "signature": [
- "string | undefined"
- ],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false
+ "parentPluginId": "discover",
+ "id": "def-public.SearchInput.sort",
+ "type": "Array",
+ "tags": [],
+ "label": "sort",
+ "description": [],
+ "signature": [
+ "SortOrder",
+ "[] | undefined"
+ ],
+ "path": "src/plugins/discover/public/embeddable/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SearchInput.rowHeight",
+ "type": "number",
+ "tags": [],
+ "label": "rowHeight",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "src/plugins/discover/public/embeddable/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SearchInput.rowsPerPage",
+ "type": "number",
+ "tags": [],
+ "label": "rowsPerPage",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "src/plugins/discover/public/embeddable/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "enums": [
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.VIEW_MODE",
+ "type": "Enum",
+ "tags": [],
+ "label": "VIEW_MODE",
+ "description": [],
+ "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ }
+ ],
+ "misc": [
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.SEARCH_EMBEDDABLE_TYPE",
+ "type": "string",
+ "tags": [],
+ "label": "SEARCH_EMBEDDABLE_TYPE",
+ "description": [],
+ "signature": [
+ "\"search\""
+ ],
+ "path": "src/plugins/discover/common/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": [],
+ "setup": {
+ "parentPluginId": "discover",
+ "id": "def-public.DiscoverSetup",
+ "type": "Interface",
+ "tags": [],
+ "label": "DiscoverSetup",
+ "description": [],
+ "path": "src/plugins/discover/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.DiscoverSetup.docViews",
+ "type": "Object",
+ "tags": [],
+ "label": "docViews",
+ "description": [],
+ "signature": [
+ "{ addDocView(docViewRaw: ",
+ "DocViewInput",
+ " | ",
+ "DocViewInputFn",
+ "): void; }"
+ ],
+ "path": "src/plugins/discover/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.DiscoverSetup.locator",
+ "type": "Object",
+ "tags": [],
+ "label": "locator",
+ "description": [
+ "\n`share` plugin URL locator for Discover app. Use it to generate links into\nDiscover application, for example, navigate:\n\n```ts\nawait plugins.discover.locator.navigate({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```\n\nGenerate a location:\n\n```ts\nconst location = await plugins.discover.locator.getLocation({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```"
+ ],
+ "signature": [
+ {
+ "pluginId": "discover",
+ "scope": "common",
+ "docId": "kibDiscoverPluginApi",
+ "section": "def-common.DiscoverAppLocator",
+ "text": "DiscoverAppLocator"
+ },
+ " | undefined"
+ ],
+ "path": "src/plugins/discover/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "lifecycle": "setup",
+ "initialIsOpen": true
+ },
+ "start": {
+ "parentPluginId": "discover",
+ "id": "def-public.DiscoverStart",
+ "type": "Interface",
+ "tags": [],
+ "label": "DiscoverStart",
+ "description": [],
+ "path": "src/plugins/discover/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "discover",
+ "id": "def-public.DiscoverStart.locator",
+ "type": "Object",
+ "tags": [],
+ "label": "locator",
+ "description": [
+ "\n`share` plugin URL locator for Discover app. Use it to generate links into\nDiscover application, for example, navigate:\n\n```ts\nawait plugins.discover.locator.navigate({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```\n\nGenerate a location:\n\n```ts\nconst location = await plugins.discover.locator.getLocation({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```"
+ ],
+ "signature": [
+ {
+ "pluginId": "discover",
+ "scope": "common",
+ "docId": "kibDiscoverPluginApi",
+ "section": "def-common.DiscoverAppLocator",
+ "text": "DiscoverAppLocator"
+ },
+ " | undefined"
+ ],
+ "path": "src/plugins/discover/public/plugin.tsx",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "lifecycle": "start",
+ "initialIsOpen": true
+ }
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [
+ {
+ "parentPluginId": "discover",
+ "id": "def-common.DiscoverAppLocatorDefinition",
+ "type": "Class",
+ "tags": [],
+ "label": "DiscoverAppLocatorDefinition",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "discover",
+ "scope": "common",
+ "docId": "kibDiscoverPluginApi",
+ "section": "def-common.DiscoverAppLocatorDefinition",
+ "text": "DiscoverAppLocatorDefinition"
},
+ " implements ",
{
- "parentPluginId": "discover",
- "id": "def-public.SavedSearch.sort",
- "type": "Array",
- "tags": [],
- "label": "sort",
- "description": [],
- "signature": [
- "SortOrder",
- "[] | undefined"
- ],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false
+ "pluginId": "share",
+ "scope": "common",
+ "docId": "kibSharePluginApi",
+ "section": "def-common.LocatorDefinition",
+ "text": "LocatorDefinition"
},
+ "<",
{
- "parentPluginId": "discover",
- "id": "def-public.SavedSearch.columns",
- "type": "Array",
- "tags": [],
- "label": "columns",
- "description": [],
- "signature": [
- "string[] | undefined"
- ],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false
+ "pluginId": "discover",
+ "scope": "common",
+ "docId": "kibDiscoverPluginApi",
+ "section": "def-common.DiscoverAppLocatorParams",
+ "text": "DiscoverAppLocatorParams"
},
+ ">"
+ ],
+ "path": "src/plugins/discover/common/locator.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.description",
+ "id": "def-common.DiscoverAppLocatorDefinition.id",
"type": "string",
"tags": [],
- "label": "description",
+ "label": "id",
"description": [],
"signature": [
- "string | undefined"
+ "\"DISCOVER_APP_LOCATOR\""
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.tags",
- "type": "Array",
+ "id": "def-common.DiscoverAppLocatorDefinition.Unnamed",
+ "type": "Function",
"tags": [],
- "label": "tags",
+ "label": "Constructor",
"description": [],
"signature": [
- "string[] | undefined"
+ "any"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "discover",
+ "id": "def-common.DiscoverAppLocatorDefinition.Unnamed.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "deps",
+ "description": [],
+ "signature": [
+ "DiscoverAppLocatorDependencies"
+ ],
+ "path": "src/plugins/discover/common/locator.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.grid",
- "type": "Object",
+ "id": "def-common.DiscoverAppLocatorDefinition.getLocation",
+ "type": "Function",
"tags": [],
- "label": "grid",
+ "label": "getLocation",
"description": [],
"signature": [
- "{ columns?: Record | undefined; } | undefined"
+ ") => Promise<{ app: string; path: string; state: ",
+ "MainHistoryLocationState",
+ "; }>"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
- "trackAdoption": false
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "discover",
+ "id": "def-common.DiscoverAppLocatorDefinition.getLocation.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "params",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "discover",
+ "scope": "common",
+ "docId": "kibDiscoverPluginApi",
+ "section": "def-common.DiscoverAppLocatorParams",
+ "text": "DiscoverAppLocatorParams"
+ }
+ ],
+ "path": "src/plugins/discover/common/locator.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "functions": [],
+ "interfaces": [
+ {
+ "parentPluginId": "discover",
+ "id": "def-common.DiscoverAppLocatorParams",
+ "type": "Interface",
+ "tags": [],
+ "label": "DiscoverAppLocatorParams",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "discover",
+ "scope": "common",
+ "docId": "kibDiscoverPluginApi",
+ "section": "def-common.DiscoverAppLocatorParams",
+ "text": "DiscoverAppLocatorParams"
},
+ " extends ",
+ {
+ "pluginId": "@kbn/utility-types",
+ "scope": "common",
+ "docId": "kibKbnUtilityTypesPluginApi",
+ "section": "def-common.SerializableRecord",
+ "text": "SerializableRecord"
+ }
+ ],
+ "path": "src/plugins/discover/common/locator.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.hideChart",
- "type": "CompoundType",
+ "id": "def-common.DiscoverAppLocatorParams.savedSearchId",
+ "type": "string",
"tags": [],
- "label": "hideChart",
- "description": [],
+ "label": "savedSearchId",
+ "description": [
+ "\nOptionally set saved search ID."
+ ],
"signature": [
- "boolean | undefined"
+ "string | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.sharingSavedObjectProps",
- "type": "Object",
+ "id": "def-common.DiscoverAppLocatorParams.dataViewId",
+ "type": "string",
"tags": [],
- "label": "sharingSavedObjectProps",
- "description": [],
+ "label": "dataViewId",
+ "description": [
+ "\nOptionally set index pattern / data view ID."
+ ],
"signature": [
- "{ outcome?: \"conflict\" | \"exactMatch\" | \"aliasMatch\" | undefined; aliasTargetId?: string | undefined; aliasPurpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; errorJSON?: string | undefined; } | undefined"
+ "string | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.viewMode",
- "type": "CompoundType",
- "tags": [],
- "label": "viewMode",
- "description": [],
+ "id": "def-common.DiscoverAppLocatorParams.indexPatternId",
+ "type": "string",
+ "tags": [
+ "deprecated"
+ ],
+ "label": "indexPatternId",
+ "description": [
+ "\nDuplication of dataViewId"
+ ],
"signature": [
+ "string | undefined"
+ ],
+ "path": "src/plugins/discover/common/locator.ts",
+ "deprecated": true,
+ "trackAdoption": false,
+ "references": [
{
- "pluginId": "savedSearch",
- "scope": "public",
- "docId": "kibSavedSearchPluginApi",
- "section": "def-public.VIEW_MODE",
- "text": "VIEW_MODE"
+ "plugin": "observability",
+ "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/hooks/use_discover_link.tsx"
},
- " | undefined"
- ],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false
+ {
+ "plugin": "dataVisualizer",
+ "path": "x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx"
+ },
+ {
+ "plugin": "dataVisualizer",
+ "path": "x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx"
+ },
+ {
+ "plugin": "fleet",
+ "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/multi_page_layout/hooks/use_get_logs_discover_link.tsx"
+ },
+ {
+ "plugin": "cloudSecurityPosture",
+ "path": "x-pack/plugins/cloud_security_posture/public/pages/findings/findings_flyout/overview_tab.tsx"
+ },
+ {
+ "plugin": "discoverEnhanced",
+ "path": "x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_context_menu_action.ts"
+ },
+ {
+ "plugin": "discoverEnhanced",
+ "path": "x-pack/plugins/discover_enhanced/public/actions/explore_data/explore_data_chart_action.ts"
+ },
+ {
+ "plugin": "osquery",
+ "path": "x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx"
+ },
+ {
+ "plugin": "osquery",
+ "path": "x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx"
+ },
+ {
+ "plugin": "osquery",
+ "path": "x-pack/plugins/osquery/public/common/hooks/use_discover_link.tsx"
+ },
+ {
+ "plugin": "synthetics",
+ "path": "x-pack/plugins/synthetics/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx"
+ }
+ ]
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.hideAggregatedPreview",
- "type": "CompoundType",
+ "id": "def-common.DiscoverAppLocatorParams.dataViewSpec",
+ "type": "Object",
"tags": [],
- "label": "hideAggregatedPreview",
+ "label": "dataViewSpec",
"description": [],
"signature": [
- "boolean | undefined"
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewSpec",
+ "text": "DataViewSpec"
+ },
+ " | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.rowHeight",
- "type": "number",
+ "id": "def-common.DiscoverAppLocatorParams.timeRange",
+ "type": "Object",
"tags": [],
- "label": "rowHeight",
- "description": [],
- "signature": [
- "number | undefined"
+ "label": "timeRange",
+ "description": [
+ "\nOptionally set the time range in the time picker."
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.SavedSearch.isTextBasedQuery",
- "type": "CompoundType",
- "tags": [],
- "label": "isTextBasedQuery",
- "description": [],
"signature": [
- "boolean | undefined"
+ {
+ "pluginId": "@kbn/es-query",
+ "scope": "common",
+ "docId": "kibKbnEsQueryPluginApi",
+ "section": "def-common.TimeRange",
+ "text": "TimeRange"
+ },
+ " | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.usesAdHocDataView",
+ "id": "def-common.DiscoverAppLocatorParams.refreshInterval",
"type": "CompoundType",
"tags": [],
- "label": "usesAdHocDataView",
- "description": [],
- "signature": [
- "boolean | undefined"
+ "label": "refreshInterval",
+ "description": [
+ "\nOptionally set the refresh interval."
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.SavedSearch.timeRestore",
- "type": "CompoundType",
- "tags": [],
- "label": "timeRestore",
- "description": [],
"signature": [
- "boolean | undefined"
+ "(",
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataQueryPluginApi",
+ "section": "def-common.RefreshInterval",
+ "text": "RefreshInterval"
+ },
+ " & ",
+ {
+ "pluginId": "@kbn/utility-types",
+ "scope": "common",
+ "docId": "kibKbnUtilityTypesPluginApi",
+ "section": "def-common.SerializableRecord",
+ "text": "SerializableRecord"
+ },
+ ") | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.timeRange",
- "type": "Object",
+ "id": "def-common.DiscoverAppLocatorParams.filters",
+ "type": "Array",
"tags": [],
- "label": "timeRange",
- "description": [],
+ "label": "filters",
+ "description": [
+ "\nOptionally apply filters."
+ ],
"signature": [
{
- "pluginId": "data",
+ "pluginId": "@kbn/es-query",
"scope": "common",
- "docId": "kibDataQueryPluginApi",
- "section": "def-common.TimeRange",
- "text": "TimeRange"
+ "docId": "kibKbnEsQueryPluginApi",
+ "section": "def-common.Filter",
+ "text": "Filter"
},
- " | undefined"
+ "[] | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.refreshInterval",
- "type": "Object",
+ "id": "def-common.DiscoverAppLocatorParams.query",
+ "type": "CompoundType",
"tags": [],
- "label": "refreshInterval",
- "description": [],
+ "label": "query",
+ "description": [
+ "\nOptionally set a query."
+ ],
"signature": [
{
- "pluginId": "data",
+ "pluginId": "@kbn/es-query",
"scope": "common",
- "docId": "kibDataQueryPluginApi",
- "section": "def-common.RefreshInterval",
- "text": "RefreshInterval"
+ "docId": "kibKbnEsQueryPluginApi",
+ "section": "def-common.Query",
+ "text": "Query"
+ },
+ " | ",
+ {
+ "pluginId": "@kbn/es-query",
+ "scope": "common",
+ "docId": "kibKbnEsQueryPluginApi",
+ "section": "def-common.AggregateQuery",
+ "text": "AggregateQuery"
},
" | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.rowsPerPage",
- "type": "number",
+ "id": "def-common.DiscoverAppLocatorParams.useHash",
+ "type": "CompoundType",
"tags": [],
- "label": "rowsPerPage",
- "description": [],
+ "label": "useHash",
+ "description": [
+ "\nIf not given, will use the uiSettings configuration for `storeInSessionStorage`. useHash determines\nwhether to hash the data in the url to avoid url length issues."
+ ],
"signature": [
- "number | undefined"
+ "boolean | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SavedSearch.breakdownField",
+ "id": "def-common.DiscoverAppLocatorParams.searchSessionId",
"type": "string",
"tags": [],
- "label": "breakdownField",
- "description": [],
+ "label": "searchSessionId",
+ "description": [
+ "\nBackground search session id"
+ ],
"signature": [
"string | undefined"
],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
- }
- ],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.SearchInput",
- "type": "Interface",
- "tags": [],
- "label": "SearchInput",
- "description": [],
- "signature": [
- {
- "pluginId": "discover",
- "scope": "public",
- "docId": "kibDiscoverPluginApi",
- "section": "def-public.SearchInput",
- "text": "SearchInput"
},
- " extends ",
- {
- "pluginId": "embeddable",
- "scope": "common",
- "docId": "kibEmbeddablePluginApi",
- "section": "def-common.EmbeddableInput",
- "text": "EmbeddableInput"
- }
- ],
- "path": "src/plugins/discover/public/embeddable/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
{
"parentPluginId": "discover",
- "id": "def-public.SearchInput.timeRange",
- "type": "Object",
+ "id": "def-common.DiscoverAppLocatorParams.columns",
+ "type": "Array",
"tags": [],
- "label": "timeRange",
- "description": [],
- "signature": [
- "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }"
+ "label": "columns",
+ "description": [
+ "\nColumns displayed in the table"
],
- "path": "src/plugins/discover/public/embeddable/types.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.SearchInput.timeslice",
- "type": "Object",
- "tags": [],
- "label": "timeslice",
- "description": [],
"signature": [
- "[number, number] | undefined"
+ "string[] | undefined"
],
- "path": "src/plugins/discover/public/embeddable/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SearchInput.query",
- "type": "Object",
+ "id": "def-common.DiscoverAppLocatorParams.interval",
+ "type": "string",
"tags": [],
- "label": "query",
- "description": [],
+ "label": "interval",
+ "description": [
+ "\nUsed interval of the histogram"
+ ],
"signature": [
- {
- "pluginId": "@kbn/es-query",
- "scope": "common",
- "docId": "kibKbnEsQueryPluginApi",
- "section": "def-common.Query",
- "text": "Query"
- },
- " | undefined"
+ "string | undefined"
],
- "path": "src/plugins/discover/public/embeddable/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SearchInput.filters",
+ "id": "def-common.DiscoverAppLocatorParams.sort",
"type": "Array",
"tags": [],
- "label": "filters",
- "description": [],
+ "label": "sort",
+ "description": [
+ "\nArray of the used sorting [[field,direction],...]"
+ ],
"signature": [
- {
- "pluginId": "@kbn/es-query",
- "scope": "common",
- "docId": "kibKbnEsQueryPluginApi",
- "section": "def-common.Filter",
- "text": "Filter"
- },
- "[] | undefined"
+ "string[][] | undefined"
],
- "path": "src/plugins/discover/public/embeddable/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SearchInput.hidePanelTitles",
- "type": "CompoundType",
+ "id": "def-common.DiscoverAppLocatorParams.savedQuery",
+ "type": "string",
"tags": [],
- "label": "hidePanelTitles",
- "description": [],
+ "label": "savedQuery",
+ "description": [
+ "\nid of the used saved query"
+ ],
"signature": [
- "boolean | undefined"
+ "string | undefined"
],
- "path": "src/plugins/discover/public/embeddable/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SearchInput.columns",
- "type": "Array",
+ "id": "def-common.DiscoverAppLocatorParams.viewMode",
+ "type": "CompoundType",
"tags": [],
- "label": "columns",
- "description": [],
+ "label": "viewMode",
+ "description": [
+ "\nTable view: Documents vs Field Statistics"
+ ],
"signature": [
- "string[] | undefined"
+ "VIEW_MODE",
+ " | undefined"
],
- "path": "src/plugins/discover/public/embeddable/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SearchInput.sort",
- "type": "Array",
+ "id": "def-common.DiscoverAppLocatorParams.hideAggregatedPreview",
+ "type": "CompoundType",
"tags": [],
- "label": "sort",
- "description": [],
+ "label": "hideAggregatedPreview",
+ "description": [
+ "\nHide mini distribution/preview charts when in Field Statistics mode"
+ ],
"signature": [
- "SortOrder",
- "[] | undefined"
+ "boolean | undefined"
],
- "path": "src/plugins/discover/public/embeddable/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SearchInput.rowHeight",
- "type": "number",
+ "id": "def-common.DiscoverAppLocatorParams.breakdownField",
+ "type": "string",
"tags": [],
- "label": "rowHeight",
- "description": [],
+ "label": "breakdownField",
+ "description": [
+ "\nBreakdown field"
+ ],
"signature": [
- "number | undefined"
+ "string | undefined"
],
- "path": "src/plugins/discover/public/embeddable/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SearchInput.rowsPerPage",
- "type": "number",
+ "id": "def-common.DiscoverAppLocatorParams.isAlertResults",
+ "type": "CompoundType",
"tags": [],
- "label": "rowsPerPage",
- "description": [],
+ "label": "isAlertResults",
+ "description": [
+ "\nUsed when navigating to particular alert results"
+ ],
"signature": [
- "number | undefined"
+ "boolean | undefined"
],
- "path": "src/plugins/discover/public/embeddable/types.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -1502,201 +1787,47 @@
"initialIsOpen": false
}
],
- "enums": [
- {
- "parentPluginId": "discover",
- "id": "def-public.VIEW_MODE",
- "type": "Enum",
- "tags": [],
- "label": "VIEW_MODE",
- "description": [],
- "path": "src/plugins/saved_search/public/services/saved_searches/types.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- }
- ],
+ "enums": [],
"misc": [
{
"parentPluginId": "discover",
- "id": "def-public.DISCOVER_APP_LOCATOR",
+ "id": "def-common.APP_ICON",
"type": "string",
"tags": [],
- "label": "DISCOVER_APP_LOCATOR",
- "description": [],
- "signature": [
- "\"DISCOVER_APP_LOCATOR\""
- ],
- "path": "src/plugins/discover/public/locator.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverAppLocator",
- "type": "Type",
- "tags": [],
- "label": "DiscoverAppLocator",
+ "label": "APP_ICON",
"description": [],
"signature": [
- {
- "pluginId": "share",
- "scope": "common",
- "docId": "kibSharePluginApi",
- "section": "def-common.LocatorPublic",
- "text": "LocatorPublic"
- },
- "<",
- {
- "pluginId": "discover",
- "scope": "public",
- "docId": "kibDiscoverPluginApi",
- "section": "def-public.DiscoverAppLocatorParams",
- "text": "DiscoverAppLocatorParams"
- },
- ">"
+ "\"discoverApp\""
],
- "path": "src/plugins/discover/public/locator.ts",
+ "path": "src/plugins/discover/common/index.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
},
{
"parentPluginId": "discover",
- "id": "def-public.SEARCH_EMBEDDABLE_TYPE",
+ "id": "def-common.CONTEXT_DEFAULT_SIZE_SETTING",
"type": "string",
"tags": [],
- "label": "SEARCH_EMBEDDABLE_TYPE",
+ "label": "CONTEXT_DEFAULT_SIZE_SETTING",
"description": [],
"signature": [
- "\"search\""
+ "\"context:defaultSize\""
],
"path": "src/plugins/discover/common/index.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
- }
- ],
- "objects": [],
- "setup": {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverSetup",
- "type": "Interface",
- "tags": [],
- "label": "DiscoverSetup",
- "description": [],
- "path": "src/plugins/discover/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverSetup.docViews",
- "type": "Object",
- "tags": [],
- "label": "docViews",
- "description": [],
- "signature": [
- "{ addDocView(docViewRaw: ",
- "DocViewInput",
- " | ",
- "DocViewInputFn",
- "): void; }"
- ],
- "path": "src/plugins/discover/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverSetup.locator",
- "type": "Object",
- "tags": [],
- "label": "locator",
- "description": [
- "\n`share` plugin URL locator for Discover app. Use it to generate links into\nDiscover application, for example, navigate:\n\n```ts\nawait plugins.discover.locator.navigate({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```\n\nGenerate a location:\n\n```ts\nconst location = await plugins.discover.locator.getLocation({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```"
- ],
- "signature": [
- {
- "pluginId": "discover",
- "scope": "public",
- "docId": "kibDiscoverPluginApi",
- "section": "def-public.DiscoverAppLocator",
- "text": "DiscoverAppLocator"
- },
- " | undefined"
- ],
- "path": "src/plugins/discover/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false
- }
- ],
- "lifecycle": "setup",
- "initialIsOpen": true
- },
- "start": {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverStart",
- "type": "Interface",
- "tags": [],
- "label": "DiscoverStart",
- "description": [],
- "path": "src/plugins/discover/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "discover",
- "id": "def-public.DiscoverStart.locator",
- "type": "Object",
- "tags": [],
- "label": "locator",
- "description": [
- "\n`share` plugin URL locator for Discover app. Use it to generate links into\nDiscover application, for example, navigate:\n\n```ts\nawait plugins.discover.locator.navigate({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```\n\nGenerate a location:\n\n```ts\nconst location = await plugins.discover.locator.getLocation({\n savedSearchId: '571aaf70-4c88-11e8-b3d7-01146121b73d',\n indexPatternId: 'c367b774-a4c2-11ea-bb37-0242ac130002',\n timeRange: {\n to: 'now',\n from: 'now-15m',\n mode: 'relative',\n },\n});\n```"
- ],
- "signature": [
- {
- "pluginId": "discover",
- "scope": "public",
- "docId": "kibDiscoverPluginApi",
- "section": "def-public.DiscoverAppLocator",
- "text": "DiscoverAppLocator"
- },
- " | undefined"
- ],
- "path": "src/plugins/discover/public/plugin.tsx",
- "deprecated": false,
- "trackAdoption": false
- }
- ],
- "lifecycle": "start",
- "initialIsOpen": true
- }
- },
- "server": {
- "classes": [],
- "functions": [],
- "interfaces": [],
- "enums": [],
- "misc": [],
- "objects": []
- },
- "common": {
- "classes": [],
- "functions": [],
- "interfaces": [],
- "enums": [],
- "misc": [
+ },
{
"parentPluginId": "discover",
- "id": "def-common.APP_ICON",
+ "id": "def-common.CONTEXT_STEP_SETTING",
"type": "string",
"tags": [],
- "label": "APP_ICON",
+ "label": "CONTEXT_STEP_SETTING",
"description": [],
"signature": [
- "\"discoverApp\""
+ "\"context:step\""
],
"path": "src/plugins/discover/common/index.ts",
"deprecated": false,
@@ -1705,13 +1836,13 @@
},
{
"parentPluginId": "discover",
- "id": "def-common.CONTEXT_DEFAULT_SIZE_SETTING",
+ "id": "def-common.CONTEXT_TIE_BREAKER_FIELDS_SETTING",
"type": "string",
"tags": [],
- "label": "CONTEXT_DEFAULT_SIZE_SETTING",
+ "label": "CONTEXT_TIE_BREAKER_FIELDS_SETTING",
"description": [],
"signature": [
- "\"context:defaultSize\""
+ "\"context:tieBreakerFields\""
],
"path": "src/plugins/discover/common/index.ts",
"deprecated": false,
@@ -1720,13 +1851,13 @@
},
{
"parentPluginId": "discover",
- "id": "def-common.CONTEXT_STEP_SETTING",
+ "id": "def-common.DEFAULT_COLUMNS_SETTING",
"type": "string",
"tags": [],
- "label": "CONTEXT_STEP_SETTING",
+ "label": "DEFAULT_COLUMNS_SETTING",
"description": [],
"signature": [
- "\"context:step\""
+ "\"defaultColumns\""
],
"path": "src/plugins/discover/common/index.ts",
"deprecated": false,
@@ -1735,30 +1866,45 @@
},
{
"parentPluginId": "discover",
- "id": "def-common.CONTEXT_TIE_BREAKER_FIELDS_SETTING",
+ "id": "def-common.DISCOVER_APP_LOCATOR",
"type": "string",
"tags": [],
- "label": "CONTEXT_TIE_BREAKER_FIELDS_SETTING",
+ "label": "DISCOVER_APP_LOCATOR",
"description": [],
"signature": [
- "\"context:tieBreakerFields\""
+ "\"DISCOVER_APP_LOCATOR\""
],
- "path": "src/plugins/discover/common/index.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
},
{
"parentPluginId": "discover",
- "id": "def-common.DEFAULT_COLUMNS_SETTING",
- "type": "string",
+ "id": "def-common.DiscoverAppLocator",
+ "type": "Type",
"tags": [],
- "label": "DEFAULT_COLUMNS_SETTING",
+ "label": "DiscoverAppLocator",
"description": [],
"signature": [
- "\"defaultColumns\""
+ {
+ "pluginId": "share",
+ "scope": "common",
+ "docId": "kibSharePluginApi",
+ "section": "def-common.LocatorPublic",
+ "text": "LocatorPublic"
+ },
+ "<",
+ {
+ "pluginId": "discover",
+ "scope": "common",
+ "docId": "kibDiscoverPluginApi",
+ "section": "def-common.DiscoverAppLocatorParams",
+ "text": "DiscoverAppLocatorParams"
+ },
+ ">"
],
- "path": "src/plugins/discover/common/index.ts",
+ "path": "src/plugins/discover/common/locator.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx
index a6249b28e0f46..e2e3331413690 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover']
---
import discoverObj from './discover.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 100 | 0 | 82 | 4 |
+| 107 | 0 | 88 | 7 |
## Client
@@ -45,6 +45,12 @@ Contact [Data Discovery](https://github.com/orgs/elastic/teams/kibana-data-disco
## Common
+### Classes
+
+
+### Interfaces
+
+
### Consts, variables and types
diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx
index b161948747b78..aa71287214f45 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: 2023-01-04
+date: 2023-01-09
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 d4a1e2121e316..7735c63a7a2a8 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: 2023-01-04
+date: 2023-01-09
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 5f9143e325995..97b0e6aea7bbc 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: 2023-01-04
+date: 2023-01-09
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 590ae392d53fb..f510d2d7d5107 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: 2023-01-04
+date: 2023-01-09
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 81e2a3ba99fbc..d83da79fbc0cd 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: 2023-01-04
+date: 2023-01-09
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 49e3de1a4dd6e..1b43420445e00 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared']
---
import esUiSharedObj from './es_ui_shared.devdocs.json';
diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx
index d9818cbfcf965..43b2ca892920d 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation']
---
import eventAnnotationObj from './event_annotation.devdocs.json';
diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx
index 829df1d6d19c7..b985f9e43fed2 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: 2023-01-04
+date: 2023-01-09
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 d702fad53f995..73b827f2d2efa 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: 2023-01-04
+date: 2023-01-09
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 485a61341fecc..015230f284154 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: 2023-01-04
+date: 2023-01-09
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 bd65d05ed0539..4ddc27e049392 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: 2023-01-04
+date: 2023-01-09
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 45afff1e36195..23629c444261e 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: 2023-01-04
+date: 2023-01-09
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 181e5c71a9f37..189ace2228f64 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: 2023-01-04
+date: 2023-01-09
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 a4d369bc4de6b..0c1c4e7f460ab 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: 2023-01-04
+date: 2023-01-09
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 85d53e6aae34c..fe54dd1821b4b 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: 2023-01-04
+date: 2023-01-09
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 0e4e382553be5..cbd71d00c97af 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: 2023-01-04
+date: 2023-01-09
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 b4fd11bd28e4a..1a64c0975ed79 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: 2023-01-04
+date: 2023-01-09
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 84cf748aff889..14d4655fdfc35 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: 2023-01-04
+date: 2023-01-09
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 7ed6b044ab893..37ab16cb19254 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: 2023-01-04
+date: 2023-01-09
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 f31bd56f19d65..d329df494a154 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: 2023-01-04
+date: 2023-01-09
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 d964b82a4cafe..492194ece2a6a 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY']
---
import expressionXYObj from './expression_x_y.devdocs.json';
diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx
index 591b701457142..79d75c9373b7b 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions']
---
import expressionsObj from './expressions.devdocs.json';
diff --git a/api_docs/features.mdx b/api_docs/features.mdx
index 6b2fa54e253f8..abd5cd8b228d7 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: 2023-01-04
+date: 2023-01-09
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 61414295133a5..bb6c943590bd9 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: 2023-01-04
+date: 2023-01-09
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 923a9cc00587b..4a9ef9a8066dc 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload']
---
import fileUploadObj from './file_upload.devdocs.json';
diff --git a/api_docs/files.mdx b/api_docs/files.mdx
index 661176109da1d..aa3d76398bb17 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files']
---
import filesObj from './files.devdocs.json';
diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx
index 364005bb13683..f2f56a329dcb1 100644
--- a/api_docs/files_management.mdx
+++ b/api_docs/files_management.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement
title: "filesManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the filesManagement plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement']
---
import filesManagementObj from './files_management.devdocs.json';
diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json
index 0bb15a818eb6e..520ca8150e7d8 100644
--- a/api_docs/fleet.devdocs.json
+++ b/api_docs/fleet.devdocs.json
@@ -4973,6 +4973,49 @@
],
"returnComment": []
},
+ {
+ "parentPluginId": "fleet",
+ "id": "def-server.ArtifactsClientInterface.bulkCreateArtifacts",
+ "type": "Function",
+ "tags": [],
+ "label": "bulkCreateArtifacts",
+ "description": [],
+ "signature": [
+ "(optionsList: ",
+ "ArtifactsClientCreateOptions",
+ "[]) => Promise<{ artifacts?: ",
+ {
+ "pluginId": "fleet",
+ "scope": "server",
+ "docId": "kibFleetPluginApi",
+ "section": "def-server.Artifact",
+ "text": "Artifact"
+ },
+ "[] | undefined; errors?: Error[] | undefined; }>"
+ ],
+ "path": "x-pack/plugins/fleet/server/services/artifacts/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "fleet",
+ "id": "def-server.ArtifactsClientInterface.bulkCreateArtifacts.$1",
+ "type": "Array",
+ "tags": [],
+ "label": "optionsList",
+ "description": [],
+ "signature": [
+ "ArtifactsClientCreateOptions",
+ "[]"
+ ],
+ "path": "x-pack/plugins/fleet/server/services/artifacts/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
{
"parentPluginId": "fleet",
"id": "def-server.ArtifactsClientInterface.deleteArtifact",
@@ -14988,6 +15031,37 @@
"trackAdoption": false,
"initialIsOpen": false
},
+ {
+ "parentPluginId": "fleet",
+ "id": "def-common.AssetsGroupedByServiceByType",
+ "type": "Type",
+ "tags": [],
+ "label": "AssetsGroupedByServiceByType",
+ "description": [],
+ "signature": [
+ "Record<\"kibana\", ",
+ {
+ "pluginId": "fleet",
+ "scope": "common",
+ "docId": "kibFleetPluginApi",
+ "section": "def-common.KibanaAssetTypeToParts",
+ "text": "KibanaAssetTypeToParts"
+ },
+ "> & Record<\"elasticsearch\", ",
+ {
+ "pluginId": "fleet",
+ "scope": "common",
+ "docId": "kibFleetPluginApi",
+ "section": "def-common.ElasticsearchAssetTypeToParts",
+ "text": "ElasticsearchAssetTypeToParts"
+ },
+ ">"
+ ],
+ "path": "x-pack/plugins/fleet/common/types/models/epm.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
{
"parentPluginId": "fleet",
"id": "def-common.BulkGetAgentPoliciesResponse",
@@ -17721,9 +17795,11 @@
"type": "Object",
"tags": [],
"label": "ENDPOINT_PRIVILEGES",
- "description": [],
+ "description": [
+ "\ndefines endpoint package privileges\nthe key is the name of the packagePrivilege (ie. 'readSecuritySolution')\nthe value object is for mapping kibana privileges and capabilities\nsee x-pack/plugins/fleet/server/services/security/security.ts for example of how object values are used"
+ ],
"signature": [
- "readonly [\"writeEndpointList\", \"readEndpointList\", \"writeTrustedApplications\", \"readTrustedApplications\", \"writeHostIsolationExceptions\", \"readHostIsolationExceptions\", \"writeBlocklist\", \"readBlocklist\", \"writeEventFilters\", \"readEventFilters\", \"writePolicyManagement\", \"readPolicyManagement\", \"writeActionsLogManagement\", \"readActionsLogManagement\", \"writeHostIsolation\", \"writeProcessOperations\", \"writeFileOperations\"]"
+ "{ [x: string]: PrivilegeMapObject; }"
],
"path": "x-pack/plugins/fleet/common/constants/authz.ts",
"deprecated": false,
diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx
index 250176b5962a1..481a804c3b7d0 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: 2023-01-04
+date: 2023-01-09
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 |
|-------------------|-----------|------------------------|-----------------|
-| 1029 | 3 | 924 | 20 |
+| 1032 | 3 | 926 | 20 |
## Client
diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx
index d10d721f94540..c37de49ada21d 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch']
---
import globalSearchObj from './global_search.devdocs.json';
diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx
index 31cbd3b6c6c96..52e4db85947f4 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding']
---
import guidedOnboardingObj from './guided_onboarding.devdocs.json';
diff --git a/api_docs/home.mdx b/api_docs/home.mdx
index 082fb44cf7445..88b7bbf497afc 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: 2023-01-04
+date: 2023-01-09
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 64a0f1da5ebce..029bd3a570f1c 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: 2023-01-04
+date: 2023-01-09
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 52ee9eee291ca..8e8de976f54a4 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: 2023-01-04
+date: 2023-01-09
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 753551629d771..93b8b0dca2ce6 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: 2023-01-04
+date: 2023-01-09
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 58e6381a13ce6..cf51135346e4c 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: 2023-01-04
+date: 2023-01-09
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 1cc222f2c16bd..eb1da51e31c26 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: 2023-01-04
+date: 2023-01-09
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 a2e0a7062d739..45bf64f06fca0 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: 2023-01-04
+date: 2023-01-09
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 ca43a965c930b..b946a46cce234 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: 2023-01-04
+date: 2023-01-09
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 cf947135386c0..5a8f87033b6d2 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: 2023-01-04
+date: 2023-01-09
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 dbae3199284eb..2eea67c84789a 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: 2023-01-04
+date: 2023-01-09
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 69284ba571ff8..045f9e9e533e6 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: 2023-01-04
+date: 2023-01-09
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 0c57a56d2dd06..fa1efb18383b3 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: 2023-01-04
+date: 2023-01-09
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 df7c2ef4644ec..fcc9a3b5cca82 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: 2023-01-04
+date: 2023-01-09
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 4b6ee76340bd2..9e3c5096eb8da 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: 2023-01-04
+date: 2023-01-09
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 875751061dd79..2e0aed7ae0a3c 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: 2023-01-04
+date: 2023-01-09
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 c1daad155d097..0b445da7609b9 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory']
---
import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json';
diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx
index 11f9757f47adb..b82394c789501 100644
--- a/api_docs/kbn_analytics_shippers_gainsight.mdx
+++ b/api_docs/kbn_analytics_shippers_gainsight.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight
title: "@kbn/analytics-shippers-gainsight"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/analytics-shippers-gainsight plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-gainsight']
---
import kbnAnalyticsShippersGainsightObj from './kbn_analytics_shippers_gainsight.devdocs.json';
diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx
index 5bc90dae8c5b4..e31d17fae07d6 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: 2023-01-04
+date: 2023-01-09
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.devdocs.json b/api_docs/kbn_apm_synthtrace.devdocs.json
index e411c1cdd3e47..8ac8e3da77113 100644
--- a/api_docs/kbn_apm_synthtrace.devdocs.json
+++ b/api_docs/kbn_apm_synthtrace.devdocs.json
@@ -25,7 +25,7 @@
"tags": [],
"label": "ApmSynthtraceEsClient",
"description": [],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -39,70 +39,44 @@
"signature": [
"any"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
"id": "def-common.ApmSynthtraceEsClient.Unnamed.$1",
- "type": "Object",
- "tags": [],
- "label": "client",
- "description": [],
- "signature": [
- "default"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.Unnamed.$2",
- "type": "Object",
- "tags": [],
- "label": "logger",
- "description": [],
- "signature": [
- "{ perf: (name: string, cb: () => T) => T; debug: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; }"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.Unnamed.$3",
- "type": "Object",
+ "type": "CompoundType",
"tags": [],
"label": "options",
"description": [],
"signature": [
- "ApmSynthtraceEsClientOptions",
- " | undefined"
+ "{ client: ",
+ "default",
+ "; logger: ",
+ "Logger",
+ "; } & ",
+ "ApmSynthtraceEsClientOptions"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
- "isRequired": false
+ "isRequired": true
}
],
"returnComment": []
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.runningVersion",
+ "id": "def-common.ApmSynthtraceEsClient.clean",
"type": "Function",
"tags": [],
- "label": "runningVersion",
+ "label": "clean",
"description": [],
"signature": [
- "() => Promise"
+ "() => Promise"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [],
@@ -110,61 +84,87 @@
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.clean",
+ "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplate",
"type": "Function",
"tags": [],
- "label": "clean",
+ "label": "updateComponentTemplate",
"description": [],
"signature": [
- "(dataStreams?: string[] | undefined) => Promise"
+ "(name: ",
+ "ComponentTemplateName",
+ ", modify: (template: ",
+ "ClusterComponentTemplateSummary",
+ ") => ",
+ "IndicesIndexState",
+ ") => Promise"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.clean.$1",
- "type": "Array",
+ "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplate.$1",
+ "type": "Enum",
"tags": [],
- "label": "dataStreams",
+ "label": "name",
+ "description": [],
+ "signature": [
+ "ComponentTemplateName"
+ ],
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace",
+ "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplate.$2",
+ "type": "Function",
+ "tags": [],
+ "label": "modify",
"description": [],
"signature": [
- "string[] | undefined"
+ "(template: ",
+ "ClusterComponentTemplateSummary",
+ ") => ",
+ "IndicesIndexState"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
- "isRequired": false
+ "isRequired": true
}
],
"returnComment": []
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplates",
+ "id": "def-common.ApmSynthtraceEsClient.refresh",
"type": "Function",
"tags": [],
- "label": "updateComponentTemplates",
+ "label": "refresh",
"description": [],
"signature": [
- "(numberOfPrimaryShards: number) => Promise"
+ "(dataStreams?: string[]) => Promise<",
+ "ShardsOperationResponseBase",
+ ">"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.updateComponentTemplates.$1",
- "type": "number",
+ "id": "def-common.ApmSynthtraceEsClient.refresh.$1",
+ "type": "Array",
"tags": [],
- "label": "numberOfPrimaryShards",
+ "label": "dataStreams",
"description": [],
"signature": [
- "number"
+ "string[]"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -174,29 +174,31 @@
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.registerGcpRepository",
+ "id": "def-common.ApmSynthtraceEsClient.getDefaultPipeline",
"type": "Function",
"tags": [],
- "label": "registerGcpRepository",
+ "label": "getDefaultPipeline",
"description": [],
"signature": [
- "(connectionString: string) => Promise"
+ "(includeSerialization?: boolean) => (base: ",
+ "Readable",
+ ") => NodeJS.WritableStream"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.registerGcpRepository.$1",
- "type": "string",
+ "id": "def-common.ApmSynthtraceEsClient.getDefaultPipeline.$1",
+ "type": "boolean",
"tags": [],
- "label": "connectionString",
+ "label": "includeSerialization",
"description": [],
"signature": [
- "string"
+ "boolean"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -206,213 +208,117 @@
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.refresh",
+ "id": "def-common.ApmSynthtraceEsClient.pipeline",
"type": "Function",
"tags": [],
- "label": "refresh",
+ "label": "pipeline",
"description": [],
"signature": [
- "(dataStreams?: string[] | undefined) => Promise<",
- "ShardsOperationResponseBase",
- ">"
+ "(cb: (base: ",
+ "Readable",
+ ") => NodeJS.WritableStream) => void"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.refresh.$1",
- "type": "Array",
+ "id": "def-common.ApmSynthtraceEsClient.pipeline.$1",
+ "type": "Function",
"tags": [],
- "label": "dataStreams",
+ "label": "cb",
"description": [],
"signature": [
- "string[] | undefined"
+ "(base: ",
+ "Readable",
+ ") => NodeJS.WritableStream"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
- "isRequired": false
+ "isRequired": true
}
],
"returnComment": []
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.index",
+ "id": "def-common.ApmSynthtraceEsClient.getVersion",
"type": "Function",
"tags": [],
- "label": "index",
+ "label": "getVersion",
"description": [],
"signature": [
- "(events: ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- " | ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- "[], options?: ",
- "StreamToBulkOptions",
- "<",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "> | undefined, streamProcessor?: ",
- "StreamProcessor",
- "<",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "> | undefined) => Promise"
+ "() => string"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.index.$1",
- "type": "CompoundType",
- "tags": [],
- "label": "events",
- "description": [],
- "signature": [
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- " | ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- "[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.index.$2",
- "type": "Object",
- "tags": [],
- "label": "options",
- "description": [],
- "signature": [
- "StreamToBulkOptions",
- "<",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "> | undefined"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.index.$3",
- "type": "Object",
- "tags": [],
- "label": "streamProcessor",
- "description": [],
- "signature": [
- "StreamProcessor",
- "<",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "> | undefined"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- }
- ],
+ "children": [],
"returnComment": []
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.createDataStream",
+ "id": "def-common.ApmSynthtraceEsClient.index",
"type": "Function",
"tags": [],
- "label": "createDataStream",
+ "label": "index",
"description": [],
"signature": [
- "(aggregator: ",
- "StreamAggregator",
+ "(streamOrGenerator: MaybeArray<",
+ "Readable",
+ " | ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.SynthtraceGenerator",
+ "text": "SynthtraceGenerator"
+ },
"<",
{
- "pluginId": "@kbn/apm-synthtrace",
+ "pluginId": "@kbn/apm-synthtrace-client",
"scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
"section": "def-common.ApmFields",
"text": "ApmFields"
},
- ">) => Promise"
+ ">>) => Promise"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmSynthtraceEsClient.createDataStream.$1",
- "type": "Object",
+ "id": "def-common.ApmSynthtraceEsClient.index.$1",
+ "type": "CompoundType",
"tags": [],
- "label": "aggregator",
+ "label": "streamOrGenerator",
"description": [],
"signature": [
- "StreamAggregator",
+ "MaybeArray<",
+ "Readable",
+ " | ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.SynthtraceGenerator",
+ "text": "SynthtraceGenerator"
+ },
"<",
{
- "pluginId": "@kbn/apm-synthtrace",
+ "pluginId": "@kbn/apm-synthtrace-client",
"scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
"section": "def-common.ApmFields",
"text": "ApmFields"
},
- ">"
+ ">>"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -425,36 +331,18 @@
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable",
+ "id": "def-common.ApmSynthtraceKibanaClient",
"type": "Class",
"tags": [],
- "label": "EntityArrayIterable",
+ "label": "ApmSynthtraceKibanaClient",
"description": [],
- "signature": [
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityArrayIterable",
- "text": "EntityArrayIterable"
- },
- " implements ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- ""
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable.Unnamed",
+ "id": "def-common.ApmSynthtraceKibanaClient.Unnamed",
"type": "Function",
"tags": [],
"label": "Constructor",
@@ -462,87 +350,62 @@
"signature": [
"any"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable.Unnamed.$1",
- "type": "Array",
+ "id": "def-common.ApmSynthtraceKibanaClient.Unnamed.$1",
+ "type": "Object",
"tags": [],
- "label": "fields",
+ "label": "options",
"description": [],
- "signature": [
- "TFields[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts",
"deprecated": false,
"trackAdoption": false,
- "isRequired": true
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace",
+ "id": "def-common.ApmSynthtraceKibanaClient.Unnamed.$1.logger",
+ "type": "Object",
+ "tags": [],
+ "label": "logger",
+ "description": [],
+ "signature": [
+ "Logger"
+ ],
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace",
+ "id": "def-common.ApmSynthtraceKibanaClient.Unnamed.$1.target",
+ "type": "string",
+ "tags": [],
+ "label": "target",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
}
],
"returnComment": []
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable.order",
- "type": "Function",
- "tags": [],
- "label": "order",
- "description": [],
- "signature": [
- "() => \"asc\" | \"desc\""
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable.estimatedRatePerMinute",
- "type": "Function",
- "tags": [],
- "label": "estimatedRatePerMinute",
- "description": [],
- "signature": [
- "() => number"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable.Symbol.asyncIterator",
- "type": "Function",
- "tags": [],
- "label": "[Symbol.asyncIterator]",
- "description": [],
- "signature": [
- "() => AsyncIterator"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable.Symbol.iterator",
+ "id": "def-common.ApmSynthtraceKibanaClient.fetchLatestApmPackageVersion",
"type": "Function",
"tags": [],
- "label": "[Symbol.iterator]",
+ "label": "fetchLatestApmPackageVersion",
"description": [],
"signature": [
- "() => Iterator"
+ "() => Promise"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts",
"deprecated": false,
"trackAdoption": false,
"children": [],
@@ -550,68 +413,35 @@
},
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable.merge",
+ "id": "def-common.ApmSynthtraceKibanaClient.installApmPackage",
"type": "Function",
"tags": [],
- "label": "merge",
+ "label": "installApmPackage",
"description": [],
"signature": [
- "(...iterables: ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- "[]) => ",
- "EntityStreams",
- ""
+ "(packageVersion: string) => Promise"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable.merge.$1",
- "type": "Array",
+ "id": "def-common.ApmSynthtraceKibanaClient.installApmPackage.$1",
+ "type": "string",
"tags": [],
- "label": "iterables",
+ "label": "packageVersion",
"description": [],
"signature": [
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- "[]"
+ "string"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": []
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityArrayIterable.toArray",
- "type": "Function",
- "tags": [],
- "label": "toArray",
- "description": [],
- "signature": [
- "() => TFields[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
}
],
"initialIsOpen": false
@@ -620,107 +450,33 @@
"functions": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.cleanWriteTargets",
+ "id": "def-common.createLogger",
"type": "Function",
"tags": [],
- "label": "cleanWriteTargets",
+ "label": "createLogger",
"description": [],
"signature": [
- "({\n targets,\n client,\n logger,\n}: { targets: string[]; client: ",
- "default",
- "; logger: { perf: (name: string, cb: () => T) => T; debug: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; }; }) => Promise"
+ "(logLevel: ",
+ {
+ "pluginId": "@kbn/apm-synthtrace",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtracePluginApi",
+ "section": "def-common.LogLevel",
+ "text": "LogLevel"
+ },
+ ") => ",
+ "Logger"
],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/utils/create_logger.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.cleanWriteTargets.$1",
- "type": "Object",
+ "id": "def-common.createLogger.$1",
+ "type": "Enum",
"tags": [],
- "label": "{\n targets,\n client,\n logger,\n}",
- "description": [],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.cleanWriteTargets.$1.targets",
- "type": "Array",
- "tags": [],
- "label": "targets",
- "description": [],
- "signature": [
- "string[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.cleanWriteTargets.$1.client",
- "type": "Object",
- "tags": [],
- "label": "client",
- "description": [],
- "signature": [
- "default"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.cleanWriteTargets.$1.logger",
- "type": "Object",
- "tags": [],
- "label": "logger",
- "description": [],
- "signature": [
- "{ perf: (name: string, cb: () => T) => T; debug: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; }"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/clean_write_targets.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.createLogger",
- "type": "Function",
- "tags": [],
- "label": "createLogger",
- "description": [],
- "signature": [
- "(logLevel: ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.LogLevel",
- "text": "LogLevel"
- },
- ") => { perf: (name: string, cb: () => T) => T; debug: (...args: any[]) => void; info: (...args: any[]) => void; error: (...args: any[]) => void; }"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/create_logger.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.createLogger.$1",
- "type": "Enum",
- "tags": [],
- "label": "logLevel",
+ "label": "logLevel",
"description": [],
"signature": [
{
@@ -739,774 +495,24 @@
],
"returnComment": [],
"initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.dedot",
- "type": "Function",
- "tags": [],
- "label": "dedot",
- "description": [],
- "signature": [
- "(source: Record, target: Record) => Record"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/dedot.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.dedot.$1",
- "type": "Object",
- "tags": [],
- "label": "source",
- "description": [],
- "signature": [
- "Record"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/dedot.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.dedot.$2",
- "type": "Object",
- "tags": [],
- "label": "target",
- "description": [],
- "signature": [
- "Record"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/dedot.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.observer",
- "type": "Function",
- "tags": [],
- "label": "observer",
- "description": [],
- "signature": [
- "() => ",
- "Observer"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/agent_config/observer.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": [],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.timerange",
- "type": "Function",
- "tags": [],
- "label": "timerange",
- "description": [],
- "signature": [
- "(from: number | Date, to: number | Date) => ",
- "Timerange"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/timerange.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.timerange.$1",
- "type": "CompoundType",
- "tags": [],
- "label": "from",
- "description": [],
- "signature": [
- "number | Date"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/timerange.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.timerange.$2",
- "type": "CompoundType",
- "tags": [],
- "label": "to",
- "description": [],
- "signature": [
- "number | Date"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/timerange.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
}
],
- "interfaces": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmException",
- "type": "Interface",
- "tags": [],
- "label": "ApmException",
- "description": [],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmException.message",
- "type": "string",
- "tags": [],
- "label": "message",
- "description": [],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ],
- "initialIsOpen": false
- },
+ "interfaces": [],
+ "enums": [
{
"parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityIterable",
- "type": "Interface",
+ "id": "def-common.LogLevel",
+ "type": "Enum",
"tags": [],
- "label": "EntityIterable",
+ "label": "LogLevel",
"description": [],
- "signature": [
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- " extends Iterable,AsyncIterable"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityIterable.order",
- "type": "Function",
- "tags": [],
- "label": "order",
- "description": [],
- "signature": [
- "() => \"asc\" | \"desc\""
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityIterable.estimatedRatePerMinute",
- "type": "Function",
- "tags": [],
- "label": "estimatedRatePerMinute",
- "description": [],
- "signature": [
- "() => number"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityIterable.toArray",
- "type": "Function",
- "tags": [],
- "label": "toArray",
- "description": [],
- "signature": [
- "() => ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [],
- "returnComment": []
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityIterable.merge",
- "type": "Function",
- "tags": [],
- "label": "merge",
- "description": [],
- "signature": [
- "(...iterables: ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- "[]) => ",
- "EntityStreams",
- ""
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.EntityIterable.merge.$1",
- "type": "Array",
- "tags": [],
- "label": "iterables",
- "description": [],
- "signature": [
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.EntityIterable",
- "text": "EntityIterable"
- },
- "[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity_iterable.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": []
- }
- ],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.Fields",
- "type": "Interface",
- "tags": [],
- "label": "Fields",
- "description": [],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.Fields.timestamp",
- "type": "number",
- "tags": [],
- "label": "'@timestamp'",
- "description": [],
- "signature": [
- "number | undefined"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/entity.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ],
- "initialIsOpen": false
- }
- ],
- "enums": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.LogLevel",
- "type": "Enum",
- "tags": [],
- "label": "LogLevel",
- "description": [],
- "path": "packages/kbn-apm-synthtrace/src/lib/utils/create_logger.ts",
- "deprecated": false,
- "trackAdoption": false,
- "initialIsOpen": false
- }
- ],
- "misc": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.ApmFields",
- "type": "Type",
- "tags": [],
- "label": "ApmFields",
- "description": [],
- "signature": [
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.Fields",
- "text": "Fields"
- },
- " & Partial<{ 'timestamp.us'?: number | undefined; 'agent.name': string; 'agent.version': string; 'client.geo.city_name': string; 'client.geo.continent_name': string; 'client.geo.country_iso_code': string; 'client.geo.country_name': string; 'client.geo.region_iso_code': string; 'client.geo.region_name': string; 'client.geo.location': ",
- "GeoLocation",
- "; 'client.ip': string; 'cloud.provider': string; 'cloud.project.name': string; 'cloud.service.name': string; 'cloud.availability_zone': string; 'cloud.machine.type': string; 'cloud.region': string; 'container.id': string; 'destination.address': string; 'destination.port': number; 'device.id': string; 'device.model.identifier': string; 'device.model.name': string; 'device.manufacturer': string; 'ecs.version': string; 'event.outcome': string; 'event.name': string; 'event.ingested': number; 'error.id': string; 'error.exception': ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmException",
- "text": "ApmException"
- },
- "[]; 'error.grouping_name': string; 'error.grouping_key': string; 'faas.id': string; 'faas.name': string; 'faas.coldstart': boolean; 'faas.execution': string; 'faas.trigger.type': string; 'faas.trigger.request_id': string; 'host.name': string; 'host.architecture': string; 'host.hostname': string; 'host.os.full': string; 'host.os.name': string; 'host.os.platform': string; 'host.os.type': string; 'host.os.version': string; 'http.request.method': string; 'http.response.status_code': number; 'kubernetes.pod.uid': string; 'kubernetes.pod.name': string; 'metricset.name': string; observer: ",
- "Observer",
- "; 'network.connection.type': string; 'network.connection.subtype': string; 'network.carrier.name': string; 'network.carrier.mcc': string; 'network.carrier.mnc': string; 'network.carrier.icc': string; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'session.id': string; 'trace.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.id': string; 'transaction.duration.us': number; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'transaction.sampled': true; 'service.name': string; 'service.version': string; 'service.environment': string; 'service.language.name': string; 'service.node.name': string; 'service.runtime.name': string; 'service.runtime.version': string; 'service.framework.name': string; 'service.framework.version': string; 'service.target.name': string; 'service.target.type': string; 'span.action': string; 'span.id': string; 'span.name': string; 'span.type': string; 'span.subtype': string; 'span.duration.us': number; 'span.destination.service.resource': string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; 'span.self_time.count': number; 'span.self_time.sum.us': number; 'span.links': { trace: { id: string; }; span: { id: string; }; }[]; 'url.original': string; }> & Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }>"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/apm_fields.ts",
+ "path": "packages/kbn-apm-synthtrace/src/lib/utils/create_logger.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
}
],
- "objects": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm",
- "type": "Object",
- "tags": [],
- "label": "apm",
- "description": [],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.service",
- "type": "Function",
- "tags": [],
- "label": "service",
- "description": [],
- "signature": [
- "{ (name: string, environment: string, agentName: string): ",
- "Service",
- "; (options: { name: string; environment: string; agentName: string; }): ",
- "Service",
- "; }"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.mobileApp",
- "type": "Function",
- "tags": [],
- "label": "mobileApp",
- "description": [],
- "signature": [
- "{ (name: string, environment: string, agentName: MobileAgentName): ",
- "MobileApp",
- "; (options: { name: string; environment: string; agentName: MobileAgentName; }): ",
- "MobileApp",
- "; }"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.browser",
- "type": "Function",
- "tags": [],
- "label": "browser",
- "description": [],
- "signature": [
- "({ serviceName, environment, userAgent, }: { serviceName: string; environment: string; userAgent: Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>; }) => ",
- "Browser"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.browser.$1",
- "type": "Object",
- "tags": [],
- "label": "__0",
- "description": [],
- "signature": [
- "{ serviceName: string; environment: string; userAgent: Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>; }"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/browser.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.getTransactionMetrics",
- "type": "Function",
- "tags": [],
- "label": "getTransactionMetrics",
- "description": [],
- "signature": [
- "(events: ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "[]) => { 'metricset.name': string; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; _doc_count: number; '@timestamp'?: number | undefined; 'timestamp.us'?: number | undefined; 'agent.name'?: string | undefined; 'agent.version'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.location'?: ",
- "GeoLocation",
- " | undefined; 'client.ip'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.region'?: string | undefined; 'container.id'?: string | undefined; 'destination.address'?: string | undefined; 'destination.port'?: number | undefined; 'device.id'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'device.manufacturer'?: string | undefined; 'ecs.version'?: string | undefined; 'event.outcome'?: string | undefined; 'event.name'?: string | undefined; 'event.ingested'?: number | undefined; 'error.id'?: string | undefined; 'error.exception'?: ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmException",
- "text": "ApmException"
- },
- "[] | undefined; 'error.grouping_name'?: string | undefined; 'error.grouping_key'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.trigger.type'?: string | undefined; 'faas.trigger.request_id'?: string | undefined; 'host.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.hostname'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'http.request.method'?: string | undefined; 'http.response.status_code'?: number | undefined; 'kubernetes.pod.uid'?: string | undefined; 'kubernetes.pod.name'?: string | undefined; observer?: ",
- "Observer",
- " | undefined; 'network.connection.type'?: string | undefined; 'network.connection.subtype'?: string | undefined; 'network.carrier.name'?: string | undefined; 'network.carrier.mcc'?: string | undefined; 'network.carrier.mnc'?: string | undefined; 'network.carrier.icc'?: string | undefined; 'parent.id'?: string | undefined; 'processor.event'?: string | undefined; 'processor.name'?: string | undefined; 'session.id'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; 'transaction.id'?: string | undefined; 'transaction.duration.us'?: number | undefined; 'transaction.sampled'?: true | undefined; 'service.name'?: string | undefined; 'service.version'?: string | undefined; 'service.environment'?: string | undefined; 'service.language.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.runtime.name'?: string | undefined; 'service.runtime.version'?: string | undefined; 'service.framework.name'?: string | undefined; 'service.framework.version'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.type'?: string | undefined; 'span.action'?: string | undefined; 'span.id'?: string | undefined; 'span.name'?: string | undefined; 'span.type'?: string | undefined; 'span.subtype'?: string | undefined; 'span.duration.us'?: number | undefined; 'span.destination.service.resource'?: string | undefined; 'span.destination.service.response_time.sum.us'?: number | undefined; 'span.destination.service.response_time.count'?: number | undefined; 'span.self_time.count'?: number | undefined; 'span.self_time.sum.us'?: number | undefined; 'span.links'?: { trace: { id: string; }; span: { id: string; }; }[] | undefined; 'url.original'?: string | undefined; 'system.process.memory.size'?: number | undefined; 'system.memory.actual.free'?: number | undefined; 'system.memory.total'?: number | undefined; 'system.cpu.total.norm.pct'?: number | undefined; 'system.process.memory.rss.bytes'?: number | undefined; 'system.process.cpu.total.norm.pct'?: number | undefined; 'jvm.memory.heap.used'?: number | undefined; 'jvm.memory.non_heap.used'?: number | undefined; 'jvm.thread.count'?: number | undefined; 'faas.billed_duration'?: number | undefined; 'faas.timeout'?: number | undefined; 'faas.coldstart_duration'?: number | undefined; 'faas.duration'?: number | undefined; }[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.getTransactionMetrics.$1",
- "type": "Array",
- "tags": [],
- "label": "events",
- "description": [],
- "signature": [
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/processors/get_transaction_metrics.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.getSpanDestinationMetrics",
- "type": "Function",
- "tags": [],
- "label": "getSpanDestinationMetrics",
- "description": [],
- "signature": [
- "(events: ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "[]) => { \"metricset.name\": string; 'span.destination.service.response_time.sum.us': number; 'span.destination.service.response_time.count': number; '@timestamp'?: number | undefined; 'timestamp.us'?: number | undefined; 'agent.name'?: string | undefined; 'agent.version'?: string | undefined; 'client.geo.city_name'?: string | undefined; 'client.geo.continent_name'?: string | undefined; 'client.geo.country_iso_code'?: string | undefined; 'client.geo.country_name'?: string | undefined; 'client.geo.region_iso_code'?: string | undefined; 'client.geo.region_name'?: string | undefined; 'client.geo.location'?: ",
- "GeoLocation",
- " | undefined; 'client.ip'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.project.name'?: string | undefined; 'cloud.service.name'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.machine.type'?: string | undefined; 'cloud.region'?: string | undefined; 'container.id'?: string | undefined; 'destination.address'?: string | undefined; 'destination.port'?: number | undefined; 'device.id'?: string | undefined; 'device.model.identifier'?: string | undefined; 'device.model.name'?: string | undefined; 'device.manufacturer'?: string | undefined; 'ecs.version'?: string | undefined; 'event.outcome'?: string | undefined; 'event.name'?: string | undefined; 'event.ingested'?: number | undefined; 'error.id'?: string | undefined; 'error.exception'?: ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmException",
- "text": "ApmException"
- },
- "[] | undefined; 'error.grouping_name'?: string | undefined; 'error.grouping_key'?: string | undefined; 'faas.id'?: string | undefined; 'faas.name'?: string | undefined; 'faas.coldstart'?: boolean | undefined; 'faas.execution'?: string | undefined; 'faas.trigger.type'?: string | undefined; 'faas.trigger.request_id'?: string | undefined; 'host.name'?: string | undefined; 'host.architecture'?: string | undefined; 'host.hostname'?: string | undefined; 'host.os.full'?: string | undefined; 'host.os.name'?: string | undefined; 'host.os.platform'?: string | undefined; 'host.os.type'?: string | undefined; 'host.os.version'?: string | undefined; 'http.request.method'?: string | undefined; 'http.response.status_code'?: number | undefined; 'kubernetes.pod.uid'?: string | undefined; 'kubernetes.pod.name'?: string | undefined; observer?: ",
- "Observer",
- " | undefined; 'network.connection.type'?: string | undefined; 'network.connection.subtype'?: string | undefined; 'network.carrier.name'?: string | undefined; 'network.carrier.mcc'?: string | undefined; 'network.carrier.mnc'?: string | undefined; 'network.carrier.icc'?: string | undefined; 'parent.id'?: string | undefined; 'processor.event'?: string | undefined; 'processor.name'?: string | undefined; 'session.id'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.name'?: string | undefined; 'transaction.type'?: string | undefined; 'transaction.id'?: string | undefined; 'transaction.duration.us'?: number | undefined; 'transaction.duration.histogram'?: { values: number[]; counts: number[]; } | undefined; 'transaction.sampled'?: true | undefined; 'service.name'?: string | undefined; 'service.version'?: string | undefined; 'service.environment'?: string | undefined; 'service.language.name'?: string | undefined; 'service.node.name'?: string | undefined; 'service.runtime.name'?: string | undefined; 'service.runtime.version'?: string | undefined; 'service.framework.name'?: string | undefined; 'service.framework.version'?: string | undefined; 'service.target.name'?: string | undefined; 'service.target.type'?: string | undefined; 'span.action'?: string | undefined; 'span.id'?: string | undefined; 'span.name'?: string | undefined; 'span.type'?: string | undefined; 'span.subtype'?: string | undefined; 'span.duration.us'?: number | undefined; 'span.destination.service.resource'?: string | undefined; 'span.self_time.count'?: number | undefined; 'span.self_time.sum.us'?: number | undefined; 'span.links'?: { trace: { id: string; }; span: { id: string; }; }[] | undefined; 'url.original'?: string | undefined; 'system.process.memory.size'?: number | undefined; 'system.memory.actual.free'?: number | undefined; 'system.memory.total'?: number | undefined; 'system.cpu.total.norm.pct'?: number | undefined; 'system.process.memory.rss.bytes'?: number | undefined; 'system.process.cpu.total.norm.pct'?: number | undefined; 'jvm.memory.heap.used'?: number | undefined; 'jvm.memory.non_heap.used'?: number | undefined; 'jvm.thread.count'?: number | undefined; 'faas.billed_duration'?: number | undefined; 'faas.timeout'?: number | undefined; 'faas.coldstart_duration'?: number | undefined; 'faas.duration'?: number | undefined; }[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.getSpanDestinationMetrics.$1",
- "type": "Array",
- "tags": [],
- "label": "events",
- "description": [],
- "signature": [
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/processors/get_span_destination_metrics.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.getChromeUserAgentDefaults",
- "type": "Function",
- "tags": [],
- "label": "getChromeUserAgentDefaults",
- "description": [],
- "signature": [
- "() => Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": []
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.getBreakdownMetrics",
- "type": "Function",
- "tags": [],
- "label": "getBreakdownMetrics",
- "description": [],
- "signature": [
- "(events: ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "[]) => ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.getBreakdownMetrics.$1",
- "type": "Array",
- "tags": [],
- "label": "events",
- "description": [],
- "signature": [
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmFields",
- "text": "ApmFields"
- },
- "[]"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/processors/get_breakdown_metrics.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.getApmWriteTargets",
- "type": "Function",
- "tags": [],
- "label": "getApmWriteTargets",
- "description": [],
- "signature": [
- "({ client, forceLegacyIndices, }: { client: ",
- "default",
- "; forceLegacyIndices?: boolean | undefined; }) => Promise<",
- "ApmElasticsearchOutputWriteTargets",
- ">"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.getApmWriteTargets.$1",
- "type": "Object",
- "tags": [],
- "label": "__0",
- "description": [],
- "signature": [
- "{ client: ",
- "default",
- "; forceLegacyIndices?: boolean | undefined; }"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/utils/get_apm_write_targets.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.ApmSynthtraceEsClient",
- "type": "Object",
- "tags": [],
- "label": "ApmSynthtraceEsClient",
- "description": [],
- "signature": [
- "typeof ",
- {
- "pluginId": "@kbn/apm-synthtrace",
- "scope": "common",
- "docId": "kibKbnApmSynthtracePluginApi",
- "section": "def-common.ApmSynthtraceEsClient",
- "text": "ApmSynthtraceEsClient"
- }
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.ApmSynthtraceKibanaClient",
- "type": "Object",
- "tags": [],
- "label": "ApmSynthtraceKibanaClient",
- "description": [],
- "signature": [
- "typeof ",
- "ApmSynthtraceKibanaClient"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.serverlessFunction",
- "type": "Function",
- "tags": [],
- "label": "serverlessFunction",
- "description": [],
- "signature": [
- "({ functionName, serviceName, environment, agentName, architecture, }: { functionName: string; environment: string; agentName: string; serviceName?: string | undefined; architecture?: string | undefined; }) => ",
- "ServerlessFunction"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.apm.serverlessFunction.$1",
- "type": "Object",
- "tags": [],
- "label": "__0",
- "description": [],
- "signature": [
- "{ functionName: string; environment: string; agentName: string; serviceName?: string | undefined; architecture?: string | undefined; }"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/apm/serverless_function.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
- }
- ],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.stackMonitoring",
- "type": "Object",
- "tags": [],
- "label": "stackMonitoring",
- "description": [],
- "path": "packages/kbn-apm-synthtrace/src/lib/stack_monitoring/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.stackMonitoring.cluster",
- "type": "Function",
- "tags": [],
- "label": "cluster",
- "description": [],
- "signature": [
- "(name: string) => ",
- "Cluster"
- ],
- "path": "packages/kbn-apm-synthtrace/src/lib/stack_monitoring/index.ts",
- "deprecated": false,
- "trackAdoption": false,
- "returnComment": [],
- "children": [
- {
- "parentPluginId": "@kbn/apm-synthtrace",
- "id": "def-common.stackMonitoring.cluster.$1",
- "type": "string",
- "tags": [],
- "label": "name",
- "description": [],
- "path": "packages/kbn-apm-synthtrace/src/lib/stack_monitoring/cluster.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
- }
- ],
- "initialIsOpen": false
- }
- ]
+ "misc": [],
+ "objects": []
}
}
\ No newline at end of file
diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx
index 29ea17352697c..557008a3bc292 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace']
---
import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json';
@@ -21,25 +21,16 @@ Contact [Owner missing] for questions regarding this plugin.
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 77 | 0 | 77 | 15 |
+| 27 | 0 | 27 | 3 |
## Common
-### Objects
-
-
### Functions
### Classes
-### Interfaces
-
-
### Enums
-### Consts, variables and types
-
-
diff --git a/api_docs/kbn_apm_synthtrace_client.devdocs.json b/api_docs/kbn_apm_synthtrace_client.devdocs.json
new file mode 100644
index 0000000000000..3b9c8f26a7be3
--- /dev/null
+++ b/api_docs/kbn_apm_synthtrace_client.devdocs.json
@@ -0,0 +1,2542 @@
+{
+ "id": "@kbn/apm-synthtrace-client",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace",
+ "type": "Class",
+ "tags": [],
+ "label": "DistributedTrace",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.timestamp",
+ "type": "number",
+ "tags": [],
+ "label": "timestamp",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.serviceInstance",
+ "type": "Object",
+ "tags": [],
+ "label": "serviceInstance",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.Instance",
+ "text": "Instance"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.spanEndTimes",
+ "type": "Array",
+ "tags": [],
+ "label": "spanEndTimes",
+ "description": [],
+ "signature": [
+ "number[]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.childSpans",
+ "type": "Array",
+ "tags": [],
+ "label": "childSpans",
+ "description": [],
+ "signature": [
+ "BaseSpan",
+ "[]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.transaction",
+ "type": "Object",
+ "tags": [],
+ "label": "transaction",
+ "description": [],
+ "signature": [
+ "Transaction"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.Unnamed",
+ "type": "Function",
+ "tags": [],
+ "label": "Constructor",
+ "description": [],
+ "signature": [
+ "any"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.Unnamed.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n serviceInstance,\n transactionName,\n timestamp,\n children,\n }",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.Unnamed.$1.serviceInstance",
+ "type": "Object",
+ "tags": [],
+ "label": "serviceInstance",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.Instance",
+ "text": "Instance"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.Unnamed.$1.transactionName",
+ "type": "string",
+ "tags": [],
+ "label": "transactionName",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.Unnamed.$1.timestamp",
+ "type": "number",
+ "tags": [],
+ "label": "timestamp",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.Unnamed.$1.children",
+ "type": "Function",
+ "tags": [],
+ "label": "children",
+ "description": [],
+ "signature": [
+ "((dt: ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.DistributedTrace",
+ "text": "DistributedTrace"
+ },
+ ") => void) | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.Unnamed.$1.children.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "dt",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.DistributedTrace",
+ "text": "DistributedTrace"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ]
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.getTransaction",
+ "type": "Function",
+ "tags": [],
+ "label": "getTransaction",
+ "description": [],
+ "signature": [
+ "() => ",
+ "Transaction"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service",
+ "type": "Function",
+ "tags": [],
+ "label": "service",
+ "description": [],
+ "signature": [
+ "({ serviceInstance, transactionName, latency, repeat, timestamp, duration, children, }: { serviceInstance: ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.Instance",
+ "text": "Instance"
+ },
+ "; transactionName: string; repeat?: number | undefined; timestamp?: number | undefined; latency?: number | undefined; duration?: number | undefined; children?: ((dt: ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.DistributedTrace",
+ "text": "DistributedTrace"
+ },
+ ") => unknown) | undefined; }) => void"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n serviceInstance,\n transactionName,\n latency = 0,\n repeat = 1,\n timestamp = this.timestamp,\n duration,\n children,\n }",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service.$1.serviceInstance",
+ "type": "Object",
+ "tags": [],
+ "label": "serviceInstance",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.Instance",
+ "text": "Instance"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service.$1.transactionName",
+ "type": "string",
+ "tags": [],
+ "label": "transactionName",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service.$1.repeat",
+ "type": "number",
+ "tags": [],
+ "label": "repeat",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service.$1.timestamp",
+ "type": "number",
+ "tags": [],
+ "label": "timestamp",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service.$1.latency",
+ "type": "number",
+ "tags": [],
+ "label": "latency",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service.$1.duration",
+ "type": "number",
+ "tags": [],
+ "label": "duration",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service.$1.children",
+ "type": "Function",
+ "tags": [],
+ "label": "children",
+ "description": [],
+ "signature": [
+ "((dt: ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.DistributedTrace",
+ "text": "DistributedTrace"
+ },
+ ") => unknown) | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.service.$1.children.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "dt",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.DistributedTrace",
+ "text": "DistributedTrace"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ]
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.external",
+ "type": "Function",
+ "tags": [],
+ "label": "external",
+ "description": [],
+ "signature": [
+ "({ name, url, method, statusCode, duration, timestamp, }: { name: string; url: string; method?: ",
+ "HttpMethod",
+ " | undefined; statusCode?: number | undefined; duration: number; timestamp?: number | undefined; }) => void"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.external.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n name,\n url,\n method,\n statusCode,\n duration,\n timestamp = this.timestamp,\n }",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.external.$1.name",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.external.$1.url",
+ "type": "string",
+ "tags": [],
+ "label": "url",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.external.$1.method",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "method",
+ "description": [],
+ "signature": [
+ "HttpMethod",
+ " | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.external.$1.statusCode",
+ "type": "number",
+ "tags": [],
+ "label": "statusCode",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.external.$1.duration",
+ "type": "number",
+ "tags": [],
+ "label": "duration",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.external.$1.timestamp",
+ "type": "number",
+ "tags": [],
+ "label": "timestamp",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.db",
+ "type": "Function",
+ "tags": [],
+ "label": "db",
+ "description": [],
+ "signature": [
+ "({ name, duration, type, statement, timestamp, }: { name: string; duration: number; type: \"elasticsearch\" | \"sqlite\" | \"redis\"; statement?: string | undefined; timestamp?: number | undefined; }) => void"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.db.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n name,\n duration,\n type,\n statement,\n timestamp = this.timestamp,\n }",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.db.$1.name",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.db.$1.duration",
+ "type": "number",
+ "tags": [],
+ "label": "duration",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.db.$1.type",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "signature": [
+ "\"elasticsearch\" | \"sqlite\" | \"redis\""
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.db.$1.statement",
+ "type": "string",
+ "tags": [],
+ "label": "statement",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DistributedTrace.db.$1.timestamp",
+ "type": "number",
+ "tags": [],
+ "label": "timestamp",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/dsl/distributed_trace_client.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ }
+ ],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance",
+ "type": "Class",
+ "tags": [],
+ "label": "Instance",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.Instance",
+ "text": "Instance"
+ },
+ " extends ",
+ "Entity",
+ "<",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.ApmFields",
+ "text": "ApmFields"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.transaction",
+ "type": "Function",
+ "tags": [],
+ "label": "transaction",
+ "description": [],
+ "signature": [
+ "(...options: [string] | [string, string] | [{ transactionName: string; transactionType?: string | undefined; }]) => ",
+ "Transaction"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.transaction.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "options",
+ "description": [],
+ "signature": [
+ "[string] | [string, string] | [{ transactionName: string; transactionType?: string | undefined; }]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.span",
+ "type": "Function",
+ "tags": [],
+ "label": "span",
+ "description": [],
+ "signature": [
+ "(...options: [string, string] | [string, string, string] | [",
+ "SpanParams",
+ "]) => ",
+ "Span"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.span.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "options",
+ "description": [],
+ "signature": [
+ "[string, string] | [string, string, string] | [",
+ "SpanParams",
+ "]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.error",
+ "type": "Function",
+ "tags": [],
+ "label": "error",
+ "description": [],
+ "signature": [
+ "({ message, type, groupingName, }: { message: string; type?: string | undefined; groupingName?: string | undefined; }) => ",
+ "ApmError"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.error.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n message,\n type,\n groupingName,\n }",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.error.$1.message",
+ "type": "string",
+ "tags": [],
+ "label": "message",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.error.$1.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.error.$1.groupingName",
+ "type": "string",
+ "tags": [],
+ "label": "groupingName",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.containerId",
+ "type": "Function",
+ "tags": [],
+ "label": "containerId",
+ "description": [],
+ "signature": [
+ "(containerId: string) => this"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.containerId.$1",
+ "type": "string",
+ "tags": [],
+ "label": "containerId",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.podId",
+ "type": "Function",
+ "tags": [],
+ "label": "podId",
+ "description": [],
+ "signature": [
+ "(podId: string) => this"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.podId.$1",
+ "type": "string",
+ "tags": [],
+ "label": "podId",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.appMetrics",
+ "type": "Function",
+ "tags": [],
+ "label": "appMetrics",
+ "description": [],
+ "signature": [
+ "(metrics: Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }>) => ",
+ "Metricset",
+ "<",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.ApmFields",
+ "text": "ApmFields"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Instance.appMetrics.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "metrics",
+ "description": [],
+ "signature": [
+ "Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }>"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/instance.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice",
+ "type": "Class",
+ "tags": [],
+ "label": "MobileDevice",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.MobileDevice",
+ "text": "MobileDevice"
+ },
+ " extends ",
+ "Entity",
+ "<",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.ApmFields",
+ "text": "ApmFields"
+ },
+ ">"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.networkConnection",
+ "type": "Object",
+ "tags": [],
+ "label": "networkConnection",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.NetworkConnectionInfo",
+ "text": "NetworkConnectionInfo"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.Unnamed",
+ "type": "Function",
+ "tags": [],
+ "label": "Constructor",
+ "description": [],
+ "signature": [
+ "any"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.Unnamed.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "fields",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.ApmFields",
+ "text": "ApmFields"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.deviceInfo",
+ "type": "Function",
+ "tags": [],
+ "label": "deviceInfo",
+ "description": [],
+ "signature": [
+ "(...options: [string, string] | [string, string, string] | [",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.DeviceInfo",
+ "text": "DeviceInfo"
+ },
+ "]) => this"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.deviceInfo.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "options",
+ "description": [],
+ "signature": [
+ "[string, string] | [string, string, string] | [",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.DeviceInfo",
+ "text": "DeviceInfo"
+ },
+ "]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.osInfo",
+ "type": "Function",
+ "tags": [],
+ "label": "osInfo",
+ "description": [],
+ "signature": [
+ "(...options: [string, string] | [string, string, string] | [string, string, string, string] | [",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.OSInfo",
+ "text": "OSInfo"
+ },
+ "]) => this"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.osInfo.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "options",
+ "description": [],
+ "signature": [
+ "[string, string] | [string, string, string] | [string, string, string, string] | [",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.OSInfo",
+ "text": "OSInfo"
+ },
+ "]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.startNewSession",
+ "type": "Function",
+ "tags": [],
+ "label": "startNewSession",
+ "description": [],
+ "signature": [
+ "() => this"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.setNetworkConnection",
+ "type": "Function",
+ "tags": [],
+ "label": "setNetworkConnection",
+ "description": [],
+ "signature": [
+ "(networkInfo: ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.NetworkConnectionInfo",
+ "text": "NetworkConnectionInfo"
+ },
+ ") => this"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.setNetworkConnection.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "networkInfo",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.NetworkConnectionInfo",
+ "text": "NetworkConnectionInfo"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.setGeoInfo",
+ "type": "Function",
+ "tags": [],
+ "label": "setGeoInfo",
+ "description": [],
+ "signature": [
+ "(geoInfo: ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.GeoInfo",
+ "text": "GeoInfo"
+ },
+ ") => this"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.setGeoInfo.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "geoInfo",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.GeoInfo",
+ "text": "GeoInfo"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.transaction",
+ "type": "Function",
+ "tags": [],
+ "label": "transaction",
+ "description": [],
+ "signature": [
+ "(...options: [string] | [string, string] | [string, string, string] | [{ transactionName: string; frameworkName?: string | undefined; frameworkVersion?: string | undefined; }]) => ",
+ "Transaction"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.transaction.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "options",
+ "description": [],
+ "signature": [
+ "[string] | [string, string] | [string, string, string] | [{ transactionName: string; frameworkName?: string | undefined; frameworkVersion?: string | undefined; }]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.span",
+ "type": "Function",
+ "tags": [],
+ "label": "span",
+ "description": [],
+ "signature": [
+ "(...options: [string, string] | [string, string, string] | [",
+ "SpanParams",
+ "]) => ",
+ "Span"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.span.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "options",
+ "description": [],
+ "signature": [
+ "[string, string] | [string, string, string] | [",
+ "SpanParams",
+ "]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.httpSpan",
+ "type": "Function",
+ "tags": [],
+ "label": "httpSpan",
+ "description": [],
+ "signature": [
+ "(...options: [string, string, string] | [{ spanName: string; httpMethod: string; httpUrl: string; }]) => ",
+ "Span"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.MobileDevice.httpSpan.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "options",
+ "description": [],
+ "signature": [
+ "[string, string, string] | [{ spanName: string; httpMethod: string; httpUrl: string; }]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Serializable",
+ "type": "Class",
+ "tags": [],
+ "label": "Serializable",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.Serializable",
+ "text": "Serializable"
+ },
+ " extends ",
+ "Entity",
+ ""
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Serializable.Unnamed",
+ "type": "Function",
+ "tags": [],
+ "label": "Constructor",
+ "description": [],
+ "signature": [
+ "any"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Serializable.Unnamed.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "fields",
+ "description": [],
+ "signature": [
+ "TFields"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Serializable.timestamp",
+ "type": "Function",
+ "tags": [],
+ "label": "timestamp",
+ "description": [],
+ "signature": [
+ "(time: number) => this"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Serializable.timestamp.$1",
+ "type": "number",
+ "tags": [],
+ "label": "time",
+ "description": [],
+ "signature": [
+ "number"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Serializable.serialize",
+ "type": "Function",
+ "tags": [],
+ "label": "serialize",
+ "description": [],
+ "signature": [
+ "() => TFields[]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/serializable.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Timerange",
+ "type": "Class",
+ "tags": [],
+ "label": "Timerange",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Timerange.Unnamed",
+ "type": "Function",
+ "tags": [],
+ "label": "Constructor",
+ "description": [],
+ "signature": [
+ "any"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Timerange.Unnamed.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "from",
+ "description": [],
+ "signature": [
+ "Date"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Timerange.Unnamed.$2",
+ "type": "Object",
+ "tags": [],
+ "label": "to",
+ "description": [],
+ "signature": [
+ "Date"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Timerange.interval",
+ "type": "Function",
+ "tags": [],
+ "label": "interval",
+ "description": [],
+ "signature": [
+ "(interval: string) => ",
+ "Interval",
+ "<{ '@timestamp'?: number | undefined; }>"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Timerange.interval.$1",
+ "type": "string",
+ "tags": [],
+ "label": "interval",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Timerange.ratePerMinute",
+ "type": "Function",
+ "tags": [],
+ "label": "ratePerMinute",
+ "description": [],
+ "signature": [
+ "(rate: number) => ",
+ "Interval",
+ "<{ '@timestamp'?: number | undefined; }>"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Timerange.ratePerMinute.$1",
+ "type": "number",
+ "tags": [],
+ "label": "rate",
+ "description": [],
+ "signature": [
+ "number"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.appendHash",
+ "type": "Function",
+ "tags": [],
+ "label": "appendHash",
+ "description": [],
+ "signature": [
+ "(hash: string, value: string) => string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.appendHash.$1",
+ "type": "string",
+ "tags": [],
+ "label": "hash",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.appendHash.$2",
+ "type": "string",
+ "tags": [],
+ "label": "value",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.dedot",
+ "type": "Function",
+ "tags": [],
+ "label": "dedot",
+ "description": [],
+ "signature": [
+ "(source: Record, target: Record) => Record"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/dedot.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.dedot.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "source",
+ "description": [],
+ "signature": [
+ "Record"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/dedot.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.dedot.$2",
+ "type": "Object",
+ "tags": [],
+ "label": "target",
+ "description": [],
+ "signature": [
+ "Record"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/dedot.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.generateLongId",
+ "type": "Function",
+ "tags": [],
+ "label": "generateLongId",
+ "description": [],
+ "signature": [
+ "(seed: string | undefined) => string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/generate_id.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.generateLongId.$1",
+ "type": "string",
+ "tags": [],
+ "label": "seed",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/generate_id.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": false
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.generateShortId",
+ "type": "Function",
+ "tags": [],
+ "label": "generateShortId",
+ "description": [],
+ "signature": [
+ "(seed: string | undefined) => string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/generate_id.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.generateShortId.$1",
+ "type": "string",
+ "tags": [],
+ "label": "seed",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/generate_id.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": false
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.hashKeysOf",
+ "type": "Function",
+ "tags": [],
+ "label": "hashKeysOf",
+ "description": [],
+ "signature": [
+ "(source: T, keys: (keyof T)[]) => string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.hashKeysOf.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "source",
+ "description": [],
+ "signature": [
+ "T"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.hashKeysOf.$2",
+ "type": "Array",
+ "tags": [],
+ "label": "keys",
+ "description": [],
+ "signature": [
+ "(keyof T)[]"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/utils/hash.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.httpExitSpan",
+ "type": "Function",
+ "tags": [],
+ "label": "httpExitSpan",
+ "description": [],
+ "signature": [
+ "({\n spanName,\n destinationUrl,\n method = 'GET',\n statusCode = 200,\n}: { spanName: string; destinationUrl: string; method?: ",
+ "HttpMethod",
+ " | undefined; statusCode?: number | undefined; }) => ",
+ "SpanParams"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.httpExitSpan.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n spanName,\n destinationUrl,\n method = 'GET',\n statusCode = 200,\n}",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.httpExitSpan.$1.spanName",
+ "type": "string",
+ "tags": [],
+ "label": "spanName",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.httpExitSpan.$1.destinationUrl",
+ "type": "string",
+ "tags": [],
+ "label": "destinationUrl",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.httpExitSpan.$1.method",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "method",
+ "description": [],
+ "signature": [
+ "HttpMethod",
+ " | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.httpExitSpan.$1.statusCode",
+ "type": "number",
+ "tags": [],
+ "label": "statusCode",
+ "description": [],
+ "signature": [
+ "number | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/span.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.observer",
+ "type": "Function",
+ "tags": [],
+ "label": "observer",
+ "description": [],
+ "signature": [
+ "() => ",
+ "Observer"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/agent_config/observer.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.parseInterval",
+ "type": "Function",
+ "tags": [],
+ "label": "parseInterval",
+ "description": [],
+ "signature": [
+ "(interval: string) => { intervalAmount: number; intervalUnit: moment.unitOfTime.DurationConstructor; }"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/interval.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.parseInterval.$1",
+ "type": "string",
+ "tags": [],
+ "label": "interval",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/interval.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.timerange",
+ "type": "Function",
+ "tags": [],
+ "label": "timerange",
+ "description": [],
+ "signature": [
+ "(from: number | Date, to: number | Date) => ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.Timerange",
+ "text": "Timerange"
+ }
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.timerange.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "from",
+ "description": [],
+ "signature": [
+ "number | Date"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.timerange.$2",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "to",
+ "description": [],
+ "signature": [
+ "number | Date"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DeviceInfo",
+ "type": "Interface",
+ "tags": [],
+ "label": "DeviceInfo",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DeviceInfo.manufacturer",
+ "type": "string",
+ "tags": [],
+ "label": "manufacturer",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DeviceInfo.modelIdentifier",
+ "type": "string",
+ "tags": [],
+ "label": "modelIdentifier",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.DeviceInfo.modelName",
+ "type": "string",
+ "tags": [],
+ "label": "modelName",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.GeoInfo",
+ "type": "Interface",
+ "tags": [],
+ "label": "GeoInfo",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.GeoInfo.clientIp",
+ "type": "string",
+ "tags": [],
+ "label": "clientIp",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.GeoInfo.cityName",
+ "type": "string",
+ "tags": [],
+ "label": "cityName",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.GeoInfo.continentName",
+ "type": "string",
+ "tags": [],
+ "label": "continentName",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.GeoInfo.countryIsoCode",
+ "type": "string",
+ "tags": [],
+ "label": "countryIsoCode",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.GeoInfo.countryName",
+ "type": "string",
+ "tags": [],
+ "label": "countryName",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.GeoInfo.regionName",
+ "type": "string",
+ "tags": [],
+ "label": "regionName",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.GeoInfo.regionIsoCode",
+ "type": "string",
+ "tags": [],
+ "label": "regionIsoCode",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.GeoInfo.location",
+ "type": "Object",
+ "tags": [],
+ "label": "location",
+ "description": [],
+ "signature": [
+ "GeoLocation",
+ " | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.NetworkConnectionInfo",
+ "type": "Interface",
+ "tags": [],
+ "label": "NetworkConnectionInfo",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.NetworkConnectionInfo.type",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "signature": [
+ "\"unknown\" | \"cell\" | \"unavailable\" | \"wifi\" | \"wired\""
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.NetworkConnectionInfo.subType",
+ "type": "string",
+ "tags": [],
+ "label": "subType",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.NetworkConnectionInfo.carrierName",
+ "type": "string",
+ "tags": [],
+ "label": "carrierName",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.NetworkConnectionInfo.carrierMCC",
+ "type": "string",
+ "tags": [],
+ "label": "carrierMCC",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.NetworkConnectionInfo.carrierMNC",
+ "type": "string",
+ "tags": [],
+ "label": "carrierMNC",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.NetworkConnectionInfo.carrierICC",
+ "type": "string",
+ "tags": [],
+ "label": "carrierICC",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.OSInfo",
+ "type": "Interface",
+ "tags": [],
+ "label": "OSInfo",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.OSInfo.osType",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "osType",
+ "description": [],
+ "signature": [
+ "\"android\" | \"ios\""
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.OSInfo.osVersion",
+ "type": "string",
+ "tags": [],
+ "label": "osVersion",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.OSInfo.osFull",
+ "type": "string",
+ "tags": [],
+ "label": "osFull",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.OSInfo.runtimeVersion",
+ "type": "string",
+ "tags": [],
+ "label": "runtimeVersion",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/mobile_device.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "enums": [],
+ "misc": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.AgentConfigFields",
+ "type": "Type",
+ "tags": [],
+ "label": "AgentConfigFields",
+ "description": [],
+ "signature": [
+ "Pick<",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.ApmFields",
+ "text": "ApmFields"
+ },
+ ", \"@timestamp\" | \"metricset.name\" | \"ecs.version\" | \"event.ingested\" | \"observer.type\" | \"observer.version\" | \"observer.version_major\" | \"processor.event\" | \"processor.name\"> & Partial<{ 'labels.etag': string; agent_config_applied: number; 'event.agent_id_status': string; }>"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/agent_config/agent_config_fields.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.ApmFields",
+ "type": "Type",
+ "tags": [],
+ "label": "ApmFields",
+ "description": [],
+ "signature": [
+ "{ '@timestamp'?: number | undefined; } & Partial<{ meta: { 'metricset.id': string; }; }> & Partial<{ 'timestamp.us'?: number | undefined; 'agent.name': string; 'agent.version': string; 'client.geo.city_name': string; 'client.geo.continent_name': string; 'client.geo.country_iso_code': string; 'client.geo.country_name': string; 'client.geo.location': ",
+ "GeoLocation",
+ "; 'client.geo.region_iso_code': string; 'client.geo.region_name': string; 'client.ip': string; 'cloud.account.id': string; 'cloud.account.name': string; 'cloud.availability_zone': string; 'cloud.machine.type': string; 'cloud.project.id': string; 'cloud.project.name': string; 'cloud.provider': string; 'cloud.region': string; 'cloud.service.name': string; 'container.id': string; 'destination.address': string; 'destination.port': number; 'device.id': string; 'device.manufacturer': string; 'device.model.identifier': string; 'device.model.name': string; 'ecs.version': string; 'error.exception': ",
+ "ApmException",
+ "[]; 'error.grouping_key': string; 'error.grouping_name': string; 'error.id': string; 'event.ingested': number; 'event.name': string; 'event.outcome': string; 'event.outcome_numeric': number | { sum: number; value_count: number; }; 'faas.coldstart': boolean; 'faas.execution': string; 'faas.id': string; 'faas.name': string; 'faas.trigger.type': string; 'faas.version': string; 'host.architecture': string; 'host.hostname': string; 'host.name': string; 'host.os.full': string; 'host.os.name': string; 'host.os.platform': string; 'host.os.type': string; 'host.os.version': string; 'http.request.method': string; 'http.response.status_code': number; 'kubernetes.pod.name': string; 'kubernetes.pod.uid': string; 'metricset.name': string; 'network.carrier.icc': string; 'network.carrier.mcc': string; 'network.carrier.mnc': string; 'network.carrier.name': string; 'network.connection.subtype': string; 'network.connection.type': string; 'observer.type': string; 'observer.version_major': number; 'observer.version': string; 'parent.id': string; 'processor.event': string; 'processor.name': string; 'session.id': string; 'trace.id': string; 'transaction.duration.us': number; 'transaction.id': string; 'transaction.name': string; 'transaction.type': string; 'transaction.duration.histogram': { values: number[]; counts: number[]; }; 'service.environment': string; 'service.framework.name': string; 'service.framework.version': string; 'service.language.name': string; 'service.language.version': string; 'service.name': string; 'service.node.name': string; 'service.runtime.name': string; 'service.runtime.version': string; 'service.target.name': string; 'service.target.type': string; 'service.version': string; 'span.action': string; 'span.destination.service.resource': string; 'span.destination.service.response_time.count': number; 'span.destination.service.response_time.sum.us': number; 'span.duration.us': number; 'span.id': string; 'span.name': string; 'span.self_time.count': number; 'span.self_time.sum.us': number; 'span.subtype': string; 'span.type': string; 'transaction.result': string; 'transaction.sampled': true; 'span.links': { trace: { id: string; }; span: { id: string; }; }[]; 'url.original': string; }> & Partial<{ 'system.process.memory.size': number; 'system.memory.actual.free': number; 'system.memory.total': number; 'system.cpu.total.norm.pct': number; 'system.process.memory.rss.bytes': number; 'system.process.cpu.total.norm.pct': number; 'jvm.memory.heap.used': number; 'jvm.memory.non_heap.used': number; 'jvm.thread.count': number; 'faas.billed_duration': number; 'faas.timeout': number; 'faas.coldstart_duration': number; 'faas.duration': number; }> & Partial<{ 'metricset.interval': string; 'transaction.duration.summary': string; }>"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/apm_fields.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.ESDocumentWithOperation",
+ "type": "Type",
+ "tags": [],
+ "label": "ESDocumentWithOperation",
+ "description": [],
+ "signature": [
+ "{ _index?: string | undefined; _action?: ",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.SynthtraceESAction",
+ "text": "SynthtraceESAction"
+ },
+ " | undefined; } & TFields"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.Fields",
+ "type": "Type",
+ "tags": [],
+ "label": "Fields",
+ "description": [],
+ "signature": [
+ "{ '@timestamp'?: number | undefined; } & (TMeta extends undefined ? {} : Partial<{ meta: TMeta; }>)"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/entity.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.SynthtraceESAction",
+ "type": "Type",
+ "tags": [],
+ "label": "SynthtraceESAction",
+ "description": [],
+ "signature": [
+ "{ create: ",
+ "BulkCreateOperation",
+ "; } | { index: ",
+ "BulkIndexOperation",
+ "; }"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.SynthtraceGenerator",
+ "type": "Type",
+ "tags": [],
+ "label": "SynthtraceGenerator",
+ "description": [],
+ "signature": [
+ "Generator<",
+ {
+ "pluginId": "@kbn/apm-synthtrace-client",
+ "scope": "common",
+ "docId": "kibKbnApmSynthtraceClientPluginApi",
+ "section": "def-common.Serializable",
+ "text": "Serializable"
+ },
+ ", any, unknown>"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/types/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.apm",
+ "type": "Object",
+ "tags": [],
+ "label": "apm",
+ "description": [],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.apm.service",
+ "type": "Function",
+ "tags": [],
+ "label": "service",
+ "description": [],
+ "signature": [
+ "{ (name: string, environment: string, agentName: string): ",
+ "Service",
+ "; (options: { name: string; environment: string; agentName: string; }): ",
+ "Service",
+ "; }"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.apm.mobileApp",
+ "type": "Function",
+ "tags": [],
+ "label": "mobileApp",
+ "description": [],
+ "signature": [
+ "{ (name: string, environment: string, agentName: MobileAgentName): ",
+ "MobileApp",
+ "; (options: { name: string; environment: string; agentName: MobileAgentName; }): ",
+ "MobileApp",
+ "; }"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.apm.browser",
+ "type": "Function",
+ "tags": [],
+ "label": "browser",
+ "description": [],
+ "signature": [
+ "({ serviceName, environment, userAgent, }: { serviceName: string; environment: string; userAgent: Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>; }) => ",
+ "Browser"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.apm.browser.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "__0",
+ "description": [],
+ "signature": [
+ "{ serviceName: string; environment: string; userAgent: Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>; }"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/browser.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.apm.getChromeUserAgentDefaults",
+ "type": "Function",
+ "tags": [],
+ "label": "getChromeUserAgentDefaults",
+ "description": [],
+ "signature": [
+ "() => Partial<{ 'user_agent.original': string; 'user_agent.os.name': string; 'user_agent.name': string; 'user_agent.device.name': string; 'user_agent.version': number; }>"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": []
+ },
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.apm.serverlessFunction",
+ "type": "Function",
+ "tags": [],
+ "label": "serverlessFunction",
+ "description": [],
+ "signature": [
+ "({ functionName, serviceName, environment, agentName, architecture, }: { functionName: string; environment: string; agentName: string; serviceName?: string | undefined; architecture?: string | undefined; }) => ",
+ "ServerlessFunction"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "@kbn/apm-synthtrace-client",
+ "id": "def-common.apm.serverlessFunction.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "__0",
+ "description": [],
+ "signature": [
+ "{ functionName: string; environment: string; agentName: string; serviceName?: string | undefined; architecture?: string | undefined; }"
+ ],
+ "path": "packages/kbn-apm-synthtrace-client/src/lib/apm/serverless_function.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx
new file mode 100644
index 0000000000000..294123f44cf4e
--- /dev/null
+++ b/api_docs/kbn_apm_synthtrace_client.mdx
@@ -0,0 +1,42 @@
+---
+####
+#### This 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: kibKbnApmSynthtraceClientPluginApi
+slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client
+title: "@kbn/apm-synthtrace-client"
+image: https://source.unsplash.com/400x175/?github
+description: API docs for the @kbn/apm-synthtrace-client plugin
+date: 2023-01-09
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client']
+---
+import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json';
+
+Elastic APM trace data generator
+
+Contact [Owner missing] for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 152 | 0 | 152 | 16 |
+
+## Common
+
+### Objects
+
+
+### Functions
+
+
+### Classes
+
+
+### Interfaces
+
+
+### Consts, variables and types
+
+
diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx
index 069edd882052f..dfee7d81e7a4b 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: 2023-01-04
+date: 2023-01-09
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 d14507a20a9dd..b94af0b0cd2a2 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config']
---
import kbnAxeConfigObj from './kbn_axe_config.devdocs.json';
diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx
index b1b67d3df5a18..0959716abc102 100644
--- a/api_docs/kbn_cases_components.mdx
+++ b/api_docs/kbn_cases_components.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components
title: "@kbn/cases-components"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/cases-components plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components']
---
import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json';
diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx
index b12dcb04ef575..14b2c20683f87 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: 2023-01-04
+date: 2023-01-09
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 d2de7f685f450..e7cdf7a9d2ae0 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: 2023-01-04
+date: 2023-01-09
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 e214b81319794..d644913d7397e 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics']
---
import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json';
diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx
index 96a5f435e921d..b68a74f4541f5 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: 2023-01-04
+date: 2023-01-09
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 7ff5e107ca1fa..6412436fbd71f 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: 2023-01-04
+date: 2023-01-09
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 775e2431130be..2d85899bd6932 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: 2023-01-04
+date: 2023-01-09
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 c2eaff096f0a4..0649c3d10f983 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: 2023-01-04
+date: 2023-01-09
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 a202335ccf32e..3be8481e20f34 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: 2023-01-04
+date: 2023-01-09
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 660d70de32009..2476ff0ad31a9 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema']
---
import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json';
diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx
index d5e32b8c2cf34..51eada1261279 100644
--- a/api_docs/kbn_content_management_content_editor.mdx
+++ b/api_docs/kbn_content_management_content_editor.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor
title: "@kbn/content-management-content-editor"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/content-management-content-editor plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor']
---
import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json';
diff --git a/api_docs/kbn_content_management_table_list.mdx b/api_docs/kbn_content_management_table_list.mdx
index 3982d6db2430f..ff76ee4ec4b0b 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: 2023-01-04
+date: 2023-01-09
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 395bcd721f56d..196ce19af1289 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: 2023-01-04
+date: 2023-01-09
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 338c495988ebe..6053092c118ac 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: 2023-01-04
+date: 2023-01-09
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 fb0c3184969b3..afe663d47e550 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: 2023-01-04
+date: 2023-01-09
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 a9f58451012b6..ff381508579ab 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: 2023-01-04
+date: 2023-01-09
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 401c78d7df4ff..b568a6e5c45d1 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: 2023-01-04
+date: 2023-01-09
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 00296d5ae3948..a1bf555c0b494 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: 2023-01-04
+date: 2023-01-09
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 6260b7eef15d4..72b86e7ddda21 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: 2023-01-04
+date: 2023-01-09
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 4b282e54db22f..171671c34c8fd 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: 2023-01-04
+date: 2023-01-09
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 714739319696a..d5bca32ce3699 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: 2023-01-04
+date: 2023-01-09
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 14aba8aa5a189..f13953c207ba8 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: 2023-01-04
+date: 2023-01-09
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 e39e656283881..980f255541d4a 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: 2023-01-04
+date: 2023-01-09
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 0baaf555d72e0..8e09ad45ebd40 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks']
---
import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx
index a36fb37dfe79b..d038fde8e9ff2 100644
--- a/api_docs/kbn_core_apps_server_internal.mdx
+++ b/api_docs/kbn_core_apps_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal
title: "@kbn/core-apps-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-apps-server-internal plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal']
---
import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx
index 4bc0becba95d3..77f59211f3b5f 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: 2023-01-04
+date: 2023-01-09
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 0588d75d323d7..4ec5bd6584162 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: 2023-01-04
+date: 2023-01-09
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 64ad012bdd92b..4740495bcd1cc 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: 2023-01-04
+date: 2023-01-09
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 789f958e88c56..11f45f1805f90 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: 2023-01-04
+date: 2023-01-09
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 1825c03c51710..c6811c3437df4 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: 2023-01-04
+date: 2023-01-09
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 c07c97dae064d..25b7884be85bb 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: 2023-01-04
+date: 2023-01-09
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 6a72bafb61c47..1b95f924077ee 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: 2023-01-04
+date: 2023-01-09
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 66659b4a37af7..3ea1b2387b554 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: 2023-01-04
+date: 2023-01-09
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 403973d3189ad..e7a0aaf59da41 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: 2023-01-04
+date: 2023-01-09
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 b4dce1907f80b..6487bfff0d154 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: 2023-01-04
+date: 2023-01-09
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 b645f4845cb82..818c42cdab654 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: 2023-01-04
+date: 2023-01-09
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 4eb086bb99788..1f25924c4e84d 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: 2023-01-04
+date: 2023-01-09
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 cbb680ab7847b..9761482626b63 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: 2023-01-04
+date: 2023-01-09
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 a246c14259322..705e8bec588f6 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: 2023-01-04
+date: 2023-01-09
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 ea5155784208f..80b05500a11ab 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: 2023-01-04
+date: 2023-01-09
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 e86a3704aaa08..10c609f98e5fe 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: 2023-01-04
+date: 2023-01-09
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 91260eecf6cc7..54a452b8487a4 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: 2023-01-04
+date: 2023-01-09
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 e9dd33e35f495..5e0bb3568ba33 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: 2023-01-04
+date: 2023-01-09
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 3b825266da93e..312aa38986877 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: 2023-01-04
+date: 2023-01-09
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 8b61a3e7d4c18..64a364a50e6ce 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: 2023-01-04
+date: 2023-01-09
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 58f976c0783ac..38f8ee6a4f9a5 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: 2023-01-04
+date: 2023-01-09
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 47a3d9ef828d0..18a09e85cfb7d 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: 2023-01-04
+date: 2023-01-09
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 25a9e64fa7ebd..5f295b6c5abaf 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: 2023-01-04
+date: 2023-01-09
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 1148a02106e53..516c42677865f 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: 2023-01-04
+date: 2023-01-09
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 cf6dc6d16ecb6..f07f531833905 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: 2023-01-04
+date: 2023-01-09
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 54c6608c359d8..92c3a207e70d4 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: 2023-01-04
+date: 2023-01-09
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 55de80c6329a1..8ca089a7d0808 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: 2023-01-04
+date: 2023-01-09
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 87d1907e5ce6a..c7e003199805f 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: 2023-01-04
+date: 2023-01-09
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 c4d997139c4f1..7db9c5119831f 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: 2023-01-04
+date: 2023-01-09
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 14d8408bcfbeb..87ed31a60b6a9 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: 2023-01-04
+date: 2023-01-09
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 db1cd5ae412ac..edad7bf50e1b6 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: 2023-01-04
+date: 2023-01-09
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 c09a448295ee3..0ba0ff24360cd 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: 2023-01-04
+date: 2023-01-09
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 f22ff43941de2..ab904c27f058f 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: 2023-01-04
+date: 2023-01-09
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 62d0b3447a3ca..347f42295d72b 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: 2023-01-04
+date: 2023-01-09
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 d37b355f64f2c..1e58325459678 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: 2023-01-04
+date: 2023-01-09
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 f5b39e6d8886c..a817a8c416443 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: 2023-01-04
+date: 2023-01-09
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 2913423211a58..400c640a70e77 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: 2023-01-04
+date: 2023-01-09
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 0dd2733135afb..42fdd50209ea7 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: 2023-01-04
+date: 2023-01-09
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 c27a6752b1d3d..2c7b3006e9e5d 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: 2023-01-04
+date: 2023-01-09
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 e503cfda242cf..a0d0e4b9a2b76 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: 2023-01-04
+date: 2023-01-09
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 c33fbd3a2ca07..2894db64af010 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: 2023-01-04
+date: 2023-01-09
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 b39bb90694e05..aa2fe8e617d7a 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: 2023-01-04
+date: 2023-01-09
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 e171bb1ad18da..854c9e1d64796 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks']
---
import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx
index da5abca7ba525..e91d0d56adb04 100644
--- a/api_docs/kbn_core_http_request_handler_context_server.mdx
+++ b/api_docs/kbn_core_http_request_handler_context_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server
title: "@kbn/core-http-request-handler-context-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-request-handler-context-server plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server']
---
import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json';
diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx
index 59608e1a05b66..fa4f5797d3864 100644
--- a/api_docs/kbn_core_http_resources_server.mdx
+++ b/api_docs/kbn_core_http_resources_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server
title: "@kbn/core-http-resources-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-resources-server plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server']
---
import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json';
diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx
index 08ad8524f6385..a20fac2430dab 100644
--- a/api_docs/kbn_core_http_resources_server_internal.mdx
+++ b/api_docs/kbn_core_http_resources_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal
title: "@kbn/core-http-resources-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-resources-server-internal plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal']
---
import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx
index d19f6878aa935..a1a7fc6040a27 100644
--- a/api_docs/kbn_core_http_resources_server_mocks.mdx
+++ b/api_docs/kbn_core_http_resources_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks
title: "@kbn/core-http-resources-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-http-resources-server-mocks plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks']
---
import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx
index ff753108b4d65..906ed5e220bf4 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: 2023-01-04
+date: 2023-01-09
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 2a2a5b9927a35..28db91382e9c8 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: 2023-01-04
+date: 2023-01-09
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 5893ae4f871cd..42c70112b4514 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: 2023-01-04
+date: 2023-01-09
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 82c379523e032..7638a730a54fc 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: 2023-01-04
+date: 2023-01-09
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 3470a2efcf369..40ba8afe3f97e 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: 2023-01-04
+date: 2023-01-09
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 391802fb27859..0b6b032a1fcf1 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: 2023-01-04
+date: 2023-01-09
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 eaf72f487b34d..ce5eca51ba669 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: 2023-01-04
+date: 2023-01-09
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 f4043eafb67c6..a8aeacd9ed55d 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: 2023-01-04
+date: 2023-01-09
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 aca10cccaaa10..231dbfb4927ba 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: 2023-01-04
+date: 2023-01-09
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 cbccdc84c6d46..c091c69cb6237 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: 2023-01-04
+date: 2023-01-09
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_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx
index 7acadaaf0eec4..c3a81829387c7 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: 2023-01-04
+date: 2023-01-09
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 ae58be1aa6ae8..26fa7d5c3e273 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: 2023-01-04
+date: 2023-01-09
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 d07bb18de417f..a8bbe917c73e1 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: 2023-01-04
+date: 2023-01-09
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 6ab1dc7f527e8..90acd88066d12 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: 2023-01-04
+date: 2023-01-09
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 923aa3bf56abe..b9de178600597 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks']
---
import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx
index 196f122dd09a8..5d71436b1643d 100644
--- a/api_docs/kbn_core_lifecycle_server.mdx
+++ b/api_docs/kbn_core_lifecycle_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server
title: "@kbn/core-lifecycle-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-lifecycle-server plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server']
---
import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json';
diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx
index f766ddb0a4ea8..d6bf4eb7a2651 100644
--- a/api_docs/kbn_core_lifecycle_server_mocks.mdx
+++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks
title: "@kbn/core-lifecycle-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-lifecycle-server-mocks plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks']
---
import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx
index 02a00e4dc4088..c28fb6375c809 100644
--- a/api_docs/kbn_core_logging_browser_mocks.mdx
+++ b/api_docs/kbn_core_logging_browser_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks
title: "@kbn/core-logging-browser-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-logging-browser-mocks plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks']
---
import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx
index 4a06ede86ccea..5c26ad0ba0fe1 100644
--- a/api_docs/kbn_core_logging_common_internal.mdx
+++ b/api_docs/kbn_core_logging_common_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal
title: "@kbn/core-logging-common-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-logging-common-internal plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal']
---
import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json';
diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx
index 2e6b26874d1c5..30e2bb6e47d7c 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: 2023-01-04
+date: 2023-01-09
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 fb4e799c364f9..c5c6944d7138a 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: 2023-01-04
+date: 2023-01-09
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 88e5de39aa9c1..e7ff3f94e3656 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: 2023-01-04
+date: 2023-01-09
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 57248a0706a2f..7ef3749c22b52 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: 2023-01-04
+date: 2023-01-09
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 609dcebb15f68..c1afec3aabe33 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: 2023-01-04
+date: 2023-01-09
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 ce4f808deaf53..758d46f5b3d1f 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: 2023-01-04
+date: 2023-01-09
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 f61875ef8f8d5..46093aedc1447 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: 2023-01-04
+date: 2023-01-09
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 d2c0aa0a899c1..be9d4ced2294e 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: 2023-01-04
+date: 2023-01-09
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 a79ce67826626..16bcbb1e62355 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: 2023-01-04
+date: 2023-01-09
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 5f8d836d7f154..6f5c9feec6555 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: 2023-01-04
+date: 2023-01-09
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 93209b14ea112..67e23e9d1bea2 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: 2023-01-04
+date: 2023-01-09
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 a48fafc9b3478..3e3b6e4f48e70 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: 2023-01-04
+date: 2023-01-09
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 aeca4844800e4..b1b5900072209 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: 2023-01-04
+date: 2023-01-09
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 2d0f3e6c39228..fa75f36472d17 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: 2023-01-04
+date: 2023-01-09
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 9bccbd44fbb7a..f523aa00af576 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: 2023-01-04
+date: 2023-01-09
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 ad796e0a9e30f..92046f0acfcac 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: 2023-01-04
+date: 2023-01-09
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 80fd4bba10f98..ef132dc04ed0c 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: 2023-01-04
+date: 2023-01-09
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 889772c87fda6..4570aca17ff66 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: 2023-01-04
+date: 2023-01-09
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 a49443ff504ee..cfeda2fd48f86 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: 2023-01-04
+date: 2023-01-09
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 2f51ac972ed18..980a71cb16a0a 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks']
---
import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx
index b7bddffd86a3d..77721d5f611c8 100644
--- a/api_docs/kbn_core_plugins_server.mdx
+++ b/api_docs/kbn_core_plugins_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server
title: "@kbn/core-plugins-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-plugins-server plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server']
---
import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json';
diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx
index 194594f9f2b44..bbcefb1774f32 100644
--- a/api_docs/kbn_core_plugins_server_mocks.mdx
+++ b/api_docs/kbn_core_plugins_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks
title: "@kbn/core-plugins-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-plugins-server-mocks plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks']
---
import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx
index 76e9b8ffc0878..27dc75742b4d5 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: 2023-01-04
+date: 2023-01-09
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 65e11c1713771..ddf312d544bb6 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: 2023-01-04
+date: 2023-01-09
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 eff8f640e3da8..3eee05562e6d9 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks']
---
import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx
index 9348789dff285..cc6de53fa4c43 100644
--- a/api_docs/kbn_core_rendering_server_internal.mdx
+++ b/api_docs/kbn_core_rendering_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal
title: "@kbn/core-rendering-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-rendering-server-internal plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal']
---
import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx
index fafcf1864b10f..02af08d587553 100644
--- a/api_docs/kbn_core_rendering_server_mocks.mdx
+++ b/api_docs/kbn_core_rendering_server_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks
title: "@kbn/core-rendering-server-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-rendering-server-mocks plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks']
---
import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json';
diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx
index ca5bf3c06036e..e15071779819a 100644
--- a/api_docs/kbn_core_root_server_internal.mdx
+++ b/api_docs/kbn_core_root_server_internal.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal
title: "@kbn/core-root-server-internal"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-root-server-internal plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal']
---
import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx
index 69c1465ed65d3..45908a2a5cd52 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser']
---
import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json';
diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx
index 8b56326ecbb26..b9d79a0cc03d2 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: 2023-01-04
+date: 2023-01-09
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 e93e15a243d70..799739bdaa5b3 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: 2023-01-04
+date: 2023-01-09
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 7485655314908..5f946d51ea067 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: 2023-01-04
+date: 2023-01-09
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 1733508009863..fae8ef0a06b03 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: 2023-01-04
+date: 2023-01-09
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 02467a63a58ad..850804c8bd34f 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: 2023-01-04
+date: 2023-01-09
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 005c55a15284e..b34b4aab14fa0 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: 2023-01-04
+date: 2023-01-09
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 b447ad774b642..44aeda68cc10f 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: 2023-01-04
+date: 2023-01-09
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 6630e5e6801b0..0f01956013c5c 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: 2023-01-04
+date: 2023-01-09
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 9e034416804b1..68434e5fe864c 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: 2023-01-04
+date: 2023-01-09
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 1246eec3a955d..16d9e296bd4c5 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: 2023-01-04
+date: 2023-01-09
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 ba32b1206bb5b..4e86e961ad03c 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: 2023-01-04
+date: 2023-01-09
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 e44edee58c08f..14462bb52fcfd 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: 2023-01-04
+date: 2023-01-09
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 2f42ebc19c767..41d09a0058e3f 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: 2023-01-04
+date: 2023-01-09
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 6fc1288733410..0777dd9ce30b2 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: 2023-01-04
+date: 2023-01-09
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 3035b90316d9f..75bc036df15e5 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: 2023-01-04
+date: 2023-01-09
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 be5d0e5e89169..b5cb2371044ca 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: 2023-01-04
+date: 2023-01-09
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 102fb5a8eee8e..91c13ff169ffb 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: 2023-01-04
+date: 2023-01-09
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 cacf71ed5e01c..2b614fff924fa 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: 2023-01-04
+date: 2023-01-09
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 92999ebe4a029..160917fc887f9 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: 2023-01-04
+date: 2023-01-09
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 b5e1b634bc38f..66cba917f22f7 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: 2023-01-04
+date: 2023-01-09
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 d2a34fc88ff51..14374dcee2f37 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: 2023-01-04
+date: 2023-01-09
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 28b2a00f7f47d..fac3db91bb75c 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: 2023-01-04
+date: 2023-01-09
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 aa6f3b6fe580a..89ae7491137f1 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: 2023-01-04
+date: 2023-01-09
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 5e6cfb7e595c3..c0888a66f91e7 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser']
---
import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json';
diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx
index f160f6c5c9dad..6e22adab5c50d 100644
--- a/api_docs/kbn_core_test_helpers_kbn_server.mdx
+++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server
title: "@kbn/core-test-helpers-kbn-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-test-helpers-kbn-server plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server']
---
import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json';
diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx
index f9cce6ce311f0..87b1c523e2847 100644
--- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx
+++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer
title: "@kbn/core-test-helpers-so-type-serializer"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer']
---
import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json';
diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx
index 28d4e669824c2..198a944b40e47 100644
--- a/api_docs/kbn_core_test_helpers_test_utils.mdx
+++ b/api_docs/kbn_core_test_helpers_test_utils.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils
title: "@kbn/core-test-helpers-test-utils"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/core-test-helpers-test-utils plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils']
---
import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json';
diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx
index f0f93cd7096ef..212c813bc6f37 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: 2023-01-04
+date: 2023-01-09
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 9186945e41854..55125394b9738 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: 2023-01-04
+date: 2023-01-09
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 1e58c7d8a3050..de7aaf64b4a4f 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: 2023-01-04
+date: 2023-01-09
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 f55485ef03f54..fcb053d746dd1 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: 2023-01-04
+date: 2023-01-09
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 127dcc2aa79a7..b56b9d84f1dde 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: 2023-01-04
+date: 2023-01-09
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 4526feeb0ba0a..e311693b3b373 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: 2023-01-04
+date: 2023-01-09
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 311bda6447458..7cdbbe2dd48b9 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: 2023-01-04
+date: 2023-01-09
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 2c5601d67dd21..4b23796518392 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: 2023-01-04
+date: 2023-01-09
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 9a3ada7256eb6..bedbe16385dfa 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: 2023-01-04
+date: 2023-01-09
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 cc210fca79381..4a9638340ef11 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: 2023-01-04
+date: 2023-01-09
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 af5dd8a8e0e6e..88ede01554301 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: 2023-01-04
+date: 2023-01-09
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 5384148197c51..a02883080ea07 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: 2023-01-04
+date: 2023-01-09
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 9c2dbc6636bad..de0435f938413 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: 2023-01-04
+date: 2023-01-09
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 53a38c2ec3c31..8c572ac2421c6 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: 2023-01-04
+date: 2023-01-09
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 cec9498d9efa5..c04a4ee9593b5 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser']
---
import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json';
diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx
index 409245bb85726..7fbe0a02078b9 100644
--- a/api_docs/kbn_cypress_config.mdx
+++ b/api_docs/kbn_cypress_config.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config
title: "@kbn/cypress-config"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/cypress-config plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config']
---
import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json';
diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx
index ea4db8d10e017..9d5ee84b83b04 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: 2023-01-04
+date: 2023-01-09
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 fe69f0b21fb74..118171f9247ea 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: 2023-01-04
+date: 2023-01-09
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 17c5076a81202..d993d360fe18d 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: 2023-01-04
+date: 2023-01-09
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 58dfcc17f27b2..0822ef9fb732a 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: 2023-01-04
+date: 2023-01-09
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 f5a8407bf7395..76c826e4e8d36 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils']
---
import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json';
diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx
index d4b07c58e4a9b..8197168c8d022 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: 2023-01-04
+date: 2023-01-09
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 a50b64ddba0ef..152b75eb742a1 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: 2023-01-04
+date: 2023-01-09
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 2d904ef288625..2bd4faff9ae79 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools']
---
import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json';
diff --git a/api_docs/kbn_ecs.mdx b/api_docs/kbn_ecs.mdx
index 1a61fe1155a86..f00eb0250b117 100644
--- a/api_docs/kbn_ecs.mdx
+++ b/api_docs/kbn_ecs.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs
title: "@kbn/ecs"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ecs plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs']
---
import kbnEcsObj from './kbn_ecs.devdocs.json';
diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx
index 8bcf07fc5ae1c..236a2e21121aa 100644
--- a/api_docs/kbn_es.mdx
+++ b/api_docs/kbn_es.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es
title: "@kbn/es"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/es plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es']
---
import kbnEsObj from './kbn_es.devdocs.json';
diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx
index 302588206616a..c93134b665869 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: 2023-01-04
+date: 2023-01-09
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 92fd053ffdeac..8770929d71aab 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: 2023-01-04
+date: 2023-01-09
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 b9a6472f879e7..671f9f4548bb5 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: 2023-01-04
+date: 2023-01-09
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 1b6e9b1111b24..8dfbefeaf61a5 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: 2023-01-04
+date: 2023-01-09
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 524f914bc234b..1c06fba39566f 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: 2023-01-04
+date: 2023-01-09
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 790940d7204fb..cd0b2ab15b0ec 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: 2023-01-04
+date: 2023-01-09
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 1e9b1e9267b85..e64dfe676e9f7 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: 2023-01-04
+date: 2023-01-09
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 a9c35a0d5e8aa..0ce79145b484d 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: 2023-01-04
+date: 2023-01-09
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 bc971bf4adbd4..9e956b1e8c27f 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: 2023-01-04
+date: 2023-01-09
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 98892a7519efb..f0a79ec00c6de 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/get-repo-files']
---
import kbnGetRepoFilesObj from './kbn_get_repo_files.devdocs.json';
diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx
index b915e44f0d176..b766b20be67ef 100644
--- a/api_docs/kbn_guided_onboarding.mdx
+++ b/api_docs/kbn_guided_onboarding.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding
title: "@kbn/guided-onboarding"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/guided-onboarding plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding']
---
import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json';
diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx
index 594aea5915758..b48f074e30bf1 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: 2023-01-04
+date: 2023-01-09
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 09f6f5a54d27e..9e4eebb3b3182 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks']
---
import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json';
diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx
index 6371c9b60c53b..bd81015febc97 100644
--- a/api_docs/kbn_health_gateway_server.mdx
+++ b/api_docs/kbn_health_gateway_server.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server
title: "@kbn/health-gateway-server"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/health-gateway-server plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server']
---
import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json';
diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx
index 999c978476a54..63ef68aae2f4b 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: 2023-01-04
+date: 2023-01-09
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 30e82cb2ed41e..3b46befb6aeb4 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: 2023-01-04
+date: 2023-01-09
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 a8ef1b3622cc6..90934b8ccc0fc 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n']
---
import kbnI18nObj from './kbn_i18n.devdocs.json';
diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx
index 5a5da7b54f856..83284e1e5bf8c 100644
--- a/api_docs/kbn_i18n_react.mdx
+++ b/api_docs/kbn_i18n_react.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react
title: "@kbn/i18n-react"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/i18n-react plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react']
---
import kbnI18nReactObj from './kbn_i18n_react.devdocs.json';
diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx
index 8b209b7d6dc61..299c15f5e0860 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: 2023-01-04
+date: 2023-01-09
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 2c23d5196ec76..c427848c0d916 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: 2023-01-04
+date: 2023-01-09
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 3218c48df9f42..93fc8e4dfde80 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: 2023-01-04
+date: 2023-01-09
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 c46be2a534aff..e4486c2cd0d40 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: 2023-01-04
+date: 2023-01-09
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 de0951f267835..57fa48fd79086 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: 2023-01-04
+date: 2023-01-09
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 a1fe16d664859..d79b1dff4d2bd 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema']
---
import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json';
diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx
index 74efda40f1c34..bf74f23cc2842 100644
--- a/api_docs/kbn_language_documentation_popover.mdx
+++ b/api_docs/kbn_language_documentation_popover.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover
title: "@kbn/language-documentation-popover"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/language-documentation-popover plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover']
---
import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json';
diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx
index 09034e374b6ed..035f853f2e23b 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: 2023-01-04
+date: 2023-01-09
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 a6d2b35b5dd49..c13871a3a40f5 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: 2023-01-04
+date: 2023-01-09
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 72ea4a2d4a4fb..624775f5ccb5e 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: 2023-01-04
+date: 2023-01-09
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 a0b37686426b6..0b96577b6a352 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: 2023-01-04
+date: 2023-01-09
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 ef16708460e8c..72bf2ec1eb362 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: 2023-01-04
+date: 2023-01-09
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_defined.devdocs.json b/api_docs/kbn_ml_is_defined.devdocs.json
new file mode 100644
index 0000000000000..29ddeefb700e4
--- /dev/null
+++ b/api_docs/kbn_ml_is_defined.devdocs.json
@@ -0,0 +1,65 @@
+{
+ "id": "@kbn/ml-is-defined",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/ml-is-defined",
+ "id": "def-common.isDefined",
+ "type": "Function",
+ "tags": [],
+ "label": "isDefined",
+ "description": [
+ "\nChecks whether the supplied argument is not `undefined` and not `null`.\n"
+ ],
+ "signature": [
+ "(argument: T | null | undefined) => boolean"
+ ],
+ "path": "x-pack/packages/ml/is_defined/src/is_defined.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/ml-is-defined",
+ "id": "def-common.isDefined.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "argument",
+ "description": [],
+ "signature": [
+ "T | null | undefined"
+ ],
+ "path": "x-pack/packages/ml/is_defined/src/is_defined.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": false
+ }
+ ],
+ "returnComment": [
+ "boolean"
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx
new file mode 100644
index 0000000000000..e339a4012610f
--- /dev/null
+++ b/api_docs/kbn_ml_is_defined.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: kibKbnMlIsDefinedPluginApi
+slug: /kibana-dev-docs/api/kbn-ml-is-defined
+title: "@kbn/ml-is-defined"
+image: https://source.unsplash.com/400x175/?github
+description: API docs for the @kbn/ml-is-defined plugin
+date: 2023-01-09
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined']
+---
+import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json';
+
+
+
+Contact [Owner missing] for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 2 | 0 | 1 | 0 |
+
+## Common
+
+### Functions
+
+
diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx
index 7a931a2343f1a..afa6abb0587ff 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: 2023-01-04
+date: 2023-01-09
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_local_storage.devdocs.json b/api_docs/kbn_ml_local_storage.devdocs.json
new file mode 100644
index 0000000000000..6b0abed5166d2
--- /dev/null
+++ b/api_docs/kbn_ml_local_storage.devdocs.json
@@ -0,0 +1,113 @@
+{
+ "id": "@kbn/ml-local-storage",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ },
+ "common": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "@kbn/ml-local-storage",
+ "id": "def-common.StorageContextProvider",
+ "type": "Function",
+ "tags": [],
+ "label": "StorageContextProvider",
+ "description": [
+ "\nProvider to manage context for the `useStorage` hook."
+ ],
+ "signature": [
+ "({\n children,\n storage,\n storageKeys,\n}: React.PropsWithChildren>) => JSX.Element"
+ ],
+ "path": "x-pack/packages/ml/local_storage/src/storage_context.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/ml-local-storage",
+ "id": "def-common.StorageContextProvider.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "{\n children,\n storage,\n storageKeys,\n}",
+ "description": [],
+ "signature": [
+ "React.PropsWithChildren>"
+ ],
+ "path": "x-pack/packages/ml/local_storage/src/storage_context.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/ml-local-storage",
+ "id": "def-common.useStorage",
+ "type": "Function",
+ "tags": [],
+ "label": "useStorage",
+ "description": [
+ "\nHook for consuming a storage value"
+ ],
+ "signature": [
+ "(key: K, initValue: T | undefined) => [T | undefined extends undefined ? T | undefined : Exclude, (value: T) => void]"
+ ],
+ "path": "x-pack/packages/ml/local_storage/src/storage_context.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/ml-local-storage",
+ "id": "def-common.useStorage.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "key",
+ "description": [],
+ "signature": [
+ "K"
+ ],
+ "path": "x-pack/packages/ml/local_storage/src/storage_context.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "@kbn/ml-local-storage",
+ "id": "def-common.useStorage.$2",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "initValue",
+ "description": [],
+ "signature": [
+ "T | undefined"
+ ],
+ "path": "x-pack/packages/ml/local_storage/src/storage_context.tsx",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": false
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx
new file mode 100644
index 0000000000000..663370f26dcbe
--- /dev/null
+++ b/api_docs/kbn_ml_local_storage.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: kibKbnMlLocalStoragePluginApi
+slug: /kibana-dev-docs/api/kbn-ml-local-storage
+title: "@kbn/ml-local-storage"
+image: https://source.unsplash.com/400x175/?github
+description: API docs for the @kbn/ml-local-storage plugin
+date: 2023-01-09
+tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage']
+---
+import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json';
+
+Utilities to combine url state management with local storage.
+
+Contact Machine Learning UI for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 5 | 0 | 3 | 0 |
+
+## Common
+
+### Functions
+
+
diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx
index 5061cb253875e..b13b6c2522dbf 100644
--- a/api_docs/kbn_ml_nested_property.mdx
+++ b/api_docs/kbn_ml_nested_property.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property
title: "@kbn/ml-nested-property"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ml-nested-property plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property']
---
import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json';
diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx
index 33d139d1e8211..b834aa8513279 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash']
---
import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json';
diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx
index adda612e26b71..f5b49b8e89e9a 100644
--- a/api_docs/kbn_ml_url_state.mdx
+++ b/api_docs/kbn_ml_url_state.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state
title: "@kbn/ml-url-state"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ml-url-state plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state']
---
import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json';
diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx
index 18ef9b30d567b..292eae7955475 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: 2023-01-04
+date: 2023-01-09
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 4449151d9fd32..3e3f446765d75 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: 2023-01-04
+date: 2023-01-09
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 4f75f1648c0da..1467c090460ec 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: 2023-01-04
+date: 2023-01-09
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.devdocs.json b/api_docs/kbn_osquery_io_ts_types.devdocs.json
index 0ce61875f6d2f..65501b5031659 100644
--- a/api_docs/kbn_osquery_io_ts_types.devdocs.json
+++ b/api_docs/kbn_osquery_io_ts_types.devdocs.json
@@ -60,7 +60,7 @@
"label": "ArrayQueries",
"description": [],
"signature": [
- "{ id: string; query: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; }[]"
+ "{ id: string; query: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; removed: boolean | undefined; snapshot: boolean | undefined; }[]"
],
"path": "packages/kbn-osquery-io-ts-types/src/live_query/index.ts",
"deprecated": false,
@@ -225,7 +225,7 @@
"label": "ObjectQueries",
"description": [],
"signature": [
- "{ [x: string]: { query: string; id: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; saved_query_id: string | undefined; }; }"
+ "{ [x: string]: { query: string; id: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; saved_query_id: string | undefined; removed: boolean | undefined; snapshot: boolean | undefined; }; }"
],
"path": "packages/kbn-osquery-io-ts-types/src/live_query/index.ts",
"deprecated": false,
@@ -300,7 +300,7 @@
"label": "Queries",
"description": [],
"signature": [
- "{ id: string; query: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; }[] | { [x: string]: { query: string; id: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; saved_query_id: string | undefined; }; }"
+ "{ id: string; query: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; removed: boolean | undefined; snapshot: boolean | undefined; }[] | { [x: string]: { query: string; id: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; saved_query_id: string | undefined; removed: boolean | undefined; snapshot: boolean | undefined; }; }"
],
"path": "packages/kbn-osquery-io-ts-types/src/live_query/index.ts",
"deprecated": false,
@@ -315,7 +315,7 @@
"label": "QueriesOrUndefined",
"description": [],
"signature": [
- "{ id: string; query: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; }[] | { [x: string]: { query: string; id: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; saved_query_id: string | undefined; }; } | undefined"
+ "{ id: string; query: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; removed: boolean | undefined; snapshot: boolean | undefined; }[] | undefined"
],
"path": "packages/kbn-osquery-io-ts-types/src/live_query/index.ts",
"deprecated": false,
@@ -600,6 +600,18 @@
"StringC",
", ",
"UndefinedC",
+ "]>; removed: ",
+ "UnionC",
+ "<[",
+ "BooleanC",
+ ", ",
+ "UndefinedC",
+ "]>; snapshot: ",
+ "UnionC",
+ "<[",
+ "BooleanC",
+ ", ",
+ "UndefinedC",
"]>; }>>"
],
"path": "packages/kbn-osquery-io-ts-types/src/live_query/index.ts",
@@ -891,6 +903,18 @@
"StringC",
", ",
"UndefinedC",
+ "]>; removed: ",
+ "UnionC",
+ "<[",
+ "BooleanC",
+ ", ",
+ "UndefinedC",
+ "]>; snapshot: ",
+ "UnionC",
+ "<[",
+ "BooleanC",
+ ", ",
+ "UndefinedC",
"]>; }>>"
],
"path": "packages/kbn-osquery-io-ts-types/src/live_query/index.ts",
@@ -1017,6 +1041,18 @@
"StringC",
", ",
"UndefinedC",
+ "]>; removed: ",
+ "UnionC",
+ "<[",
+ "BooleanC",
+ ", ",
+ "UndefinedC",
+ "]>; snapshot: ",
+ "UnionC",
+ "<[",
+ "BooleanC",
+ ", ",
+ "UndefinedC",
"]>; }>>, ",
"RecordC",
"<",
@@ -1065,6 +1101,18 @@
"StringC",
", ",
"UndefinedC",
+ "]>; removed: ",
+ "UnionC",
+ "<[",
+ "BooleanC",
+ ", ",
+ "UndefinedC",
+ "]>; snapshot: ",
+ "UnionC",
+ "<[",
+ "BooleanC",
+ ", ",
+ "UndefinedC",
"]>; }>>]>"
],
"path": "packages/kbn-osquery-io-ts-types/src/live_query/index.ts",
@@ -1080,8 +1128,6 @@
"label": "queriesOrUndefined",
"description": [],
"signature": [
- "UnionC",
- "<[",
"UnionC",
"<[",
"ArrayC",
@@ -1123,55 +1169,19 @@
"StringC",
", ",
"UndefinedC",
- "]>; }>>, ",
- "RecordC",
- "<",
- "StringC",
- ", ",
- "TypeC",
- "<{ query: ",
- "StringC",
- "; id: ",
- "StringC",
- "; ecs_mapping: ",
- "UnionC",
- "<[",
- "RecordC",
- "<",
- "StringC",
- ", ",
- "PartialC",
- "<{ field: ",
- "StringC",
- "; value: ",
- "UnionC",
- "<[",
- "StringC",
- ", ",
- "ArrayC",
- "<",
- "StringC",
- ">]>; }>>, ",
- "UndefinedC",
- "]>; version: ",
+ "]>; removed: ",
"UnionC",
"<[",
- "StringC",
- ", ",
- "UndefinedC",
- "]>; platform: ",
- "UnionC",
- "<[",
- "StringC",
+ "BooleanC",
", ",
"UndefinedC",
- "]>; saved_query_id: ",
+ "]>; snapshot: ",
"UnionC",
"<[",
- "StringC",
+ "BooleanC",
", ",
"UndefinedC",
- "]>; }>>]>, ",
+ "]>; }>>, ",
"UndefinedC",
"]>"
],
diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx
index 5b3e79226885c..d208989b34f5d 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: 2023-01-04
+date: 2023-01-09
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 42d246ad9a4ca..58e797da9c556 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: 2023-01-04
+date: 2023-01-09
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 943501e2e85b4..fbd5cdf0196a2 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: 2023-01-04
+date: 2023-01-09
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 16f88f5f88dba..9ded31429aa21 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: 2023-01-04
+date: 2023-01-09
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 4cc7ce92fa36f..7864f995abe38 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field']
---
import kbnReactFieldObj from './kbn_react_field.devdocs.json';
diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx
index fecbed0ef0b60..c9498bce0302e 100644
--- a/api_docs/kbn_repo_path.mdx
+++ b/api_docs/kbn_repo_path.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path
title: "@kbn/repo-path"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/repo-path plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path']
---
import kbnRepoPathObj from './kbn_repo_path.devdocs.json';
diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx
index 7244557e8470c..d2a7b8ec1c3b0 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier']
---
import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json';
diff --git a/api_docs/kbn_rison.devdocs.json b/api_docs/kbn_rison.devdocs.json
index f6c4c481670fd..6d27f7e58ad0e 100644
--- a/api_docs/kbn_rison.devdocs.json
+++ b/api_docs/kbn_rison.devdocs.json
@@ -206,6 +206,48 @@
],
"returnComment": [],
"initialIsOpen": false
+ },
+ {
+ "parentPluginId": "@kbn/rison",
+ "id": "def-common.safeDecode",
+ "type": "Function",
+ "tags": [],
+ "label": "safeDecode",
+ "description": [
+ "\nsafely parse a rison string into a javascript structure, never throws"
+ ],
+ "signature": [
+ "(rison: string) => ",
+ {
+ "pluginId": "@kbn/rison",
+ "scope": "common",
+ "docId": "kibKbnRisonPluginApi",
+ "section": "def-common.RisonValue",
+ "text": "RisonValue"
+ }
+ ],
+ "path": "packages/kbn-rison/kbn_rison.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/rison",
+ "id": "def-common.safeDecode.$1",
+ "type": "string",
+ "tags": [],
+ "label": "rison",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "packages/kbn-rison/kbn_rison.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
}
],
"interfaces": [],
diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx
index 67b306598da61..03bc18f3a3c66 100644
--- a/api_docs/kbn_rison.mdx
+++ b/api_docs/kbn_rison.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison
title: "@kbn/rison"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/rison plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison']
---
import kbnRisonObj from './kbn_rison.devdocs.json';
@@ -21,7 +21,7 @@ Contact [Owner missing] for questions regarding this plugin.
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 11 | 2 | 7 | 0 |
+| 13 | 2 | 8 | 0 |
## Common
diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx
index 86db64e5f6adb..b8ac712c42e1c 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: 2023-01-04
+date: 2023-01-09
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 78c457fe10925..0b729b1f6fddb 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: 2023-01-04
+date: 2023-01-09
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 67b44636f160f..f95919f50a252 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils']
---
import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx
index cc5dd2f38fbca..8311092787864 100644
--- a/api_docs/kbn_securitysolution_exception_list_components.mdx
+++ b/api_docs/kbn_securitysolution_exception_list_components.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components
title: "@kbn/securitysolution-exception-list-components"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/securitysolution-exception-list-components plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components']
---
import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx
index 7a02f64f1b212..ac7de620f2dba 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils']
---
import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx
index fe085680d5ff2..2ef8dd92a6034 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types']
---
import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx
index 56599820cca0f..77badb89b3721 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types']
---
import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx
index ddd0bb78c8452..176ba0cf1c4fe 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types']
---
import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json';
diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx
index e135cb260ea8d..6bfd56e20badc 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: 2023-01-04
+date: 2023-01-09
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 d70c2aaf47ea0..8748c2146b681 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: 2023-01-04
+date: 2023-01-09
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 3e3f1cb3937b4..b3cdcea9c65fc 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: 2023-01-04
+date: 2023-01-09
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 5c95c689d6d5e..ac62dd52d18ab 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: 2023-01-04
+date: 2023-01-09
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 4bff9014fc9f2..7ad64039976b9 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: 2023-01-04
+date: 2023-01-09
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 9131f3b346d70..793fe2f6c6a3e 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: 2023-01-04
+date: 2023-01-09
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 55af30ab23a6c..f9d0c539867af 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: 2023-01-04
+date: 2023-01-09
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 fdf7f7bbab4aa..3904573e2058b 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: 2023-01-04
+date: 2023-01-09
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 e0288c33b77ab..96784a9dd35c9 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: 2023-01-04
+date: 2023-01-09
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 ad1a708d546ca..6ffd814a801e8 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: 2023-01-04
+date: 2023-01-09
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 1fa6690d342d7..2ca9e3a24346a 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg']
---
import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx
index 2834f7d8b4980..a068857319cb3 100644
--- a/api_docs/kbn_shared_ux_avatar_solution.mdx
+++ b/api_docs/kbn_shared_ux_avatar_solution.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution
title: "@kbn/shared-ux-avatar-solution"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-avatar-solution plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution']
---
import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx b/api_docs/kbn_shared_ux_avatar_user_profile_components.mdx
index 080dd384242a2..b819e612b164e 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-user-profile-components']
---
import kbnSharedUxAvatarUserProfileComponentsObj from './kbn_shared_ux_avatar_user_profile_components.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx
index 993c114ace882..63ab62a2cad15 100644
--- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx
+++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen
title: "@kbn/shared-ux-button-exit-full-screen"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen']
---
import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen_mocks.mdx
index 24212b49c97a0..673dd28a872ff 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: 2023-01-04
+date: 2023-01-09
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 814acac876932..8d4cfa8ec3904 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: 2023-01-04
+date: 2023-01-09
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 7f4152a72a83a..e46e123cb9b61 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: 2023-01-04
+date: 2023-01-09
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 f6d24ff81d069..9a1ce76f350d1 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks']
---
import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx
index 78516c74b4a6c..bed8fa55ea820 100644
--- a/api_docs/kbn_shared_ux_file_context.mdx
+++ b/api_docs/kbn_shared_ux_file_context.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context
title: "@kbn/shared-ux-file-context"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-file-context plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context']
---
import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx
index a4e3069519107..0c9a2bbd9333a 100644
--- a/api_docs/kbn_shared_ux_file_image.mdx
+++ b/api_docs/kbn_shared_ux_file_image.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image
title: "@kbn/shared-ux-file-image"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-file-image plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image']
---
import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx
index 39a510747f3e4..b9fd59ba697d5 100644
--- a/api_docs/kbn_shared_ux_file_image_mocks.mdx
+++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks
title: "@kbn/shared-ux-file-image-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-file-image-mocks plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks']
---
import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx
index 26c8811eddcd4..a9cfd399e8f32 100644
--- a/api_docs/kbn_shared_ux_file_mocks.mdx
+++ b/api_docs/kbn_shared_ux_file_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks
title: "@kbn/shared-ux-file-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-file-mocks plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks']
---
import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx
index 5b486f5ab8893..f0d494b0a3112 100644
--- a/api_docs/kbn_shared_ux_file_picker.mdx
+++ b/api_docs/kbn_shared_ux_file_picker.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker
title: "@kbn/shared-ux-file-picker"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-file-picker plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker']
---
import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx
index 3a8c5e6f01493..3915f35e74147 100644
--- a/api_docs/kbn_shared_ux_file_upload.mdx
+++ b/api_docs/kbn_shared_ux_file_upload.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload
title: "@kbn/shared-ux-file-upload"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-file-upload plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload']
---
import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx
index 5a18a62168566..d8d658f687890 100644
--- a/api_docs/kbn_shared_ux_file_util.mdx
+++ b/api_docs/kbn_shared_ux_file_util.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util
title: "@kbn/shared-ux-file-util"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-file-util plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util']
---
import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx
index e94bbb4554227..5713155fbae13 100644
--- a/api_docs/kbn_shared_ux_link_redirect_app.mdx
+++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app
title: "@kbn/shared-ux-link-redirect-app"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-link-redirect-app plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app']
---
import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx
index 058995b1b27a1..99eb870cd46db 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks']
---
import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx
index 5e323f805efb0..be9ca0ecbf780 100644
--- a/api_docs/kbn_shared_ux_markdown.mdx
+++ b/api_docs/kbn_shared_ux_markdown.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown
title: "@kbn/shared-ux-markdown"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-markdown plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown']
---
import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx
index c3ed1a40f6093..222a8ab641754 100644
--- a/api_docs/kbn_shared_ux_markdown_mocks.mdx
+++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks
title: "@kbn/shared-ux-markdown-mocks"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-markdown-mocks plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks']
---
import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx
index af1b05374b0f3..7e11590cc99d9 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: 2023-01-04
+date: 2023-01-09
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 cf7a2cae82251..dd7197f6299b4 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: 2023-01-04
+date: 2023-01-09
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 179f0c3cd0bc8..4f6e7532977fe 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: 2023-01-04
+date: 2023-01-09
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 3fc339955ec20..ca8ab5916b5de 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: 2023-01-04
+date: 2023-01-09
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 85155fdf266c6..19b40a7902df6 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: 2023-01-04
+date: 2023-01-09
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 20c89fe979d66..4fb019e469c4c 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: 2023-01-04
+date: 2023-01-09
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 4d34decfaacba..a2cae7542345c 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: 2023-01-04
+date: 2023-01-09
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 5035f9405291d..644374168c44a 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: 2023-01-04
+date: 2023-01-09
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 00d935d807c97..61e86737d7d70 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: 2023-01-04
+date: 2023-01-09
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 bb04fbc45f687..f8bb2f633137d 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: 2023-01-04
+date: 2023-01-09
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 d5f579d9b321e..136b1c121e58c 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: 2023-01-04
+date: 2023-01-09
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 4bc2698060427..2652798598f01 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: 2023-01-04
+date: 2023-01-09
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 5c0139a802fbc..2c169936ea675 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks']
---
import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx
index 9c5e6b6bd4194..6a53fda3129d5 100644
--- a/api_docs/kbn_shared_ux_prompt_not_found.mdx
+++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found
title: "@kbn/shared-ux-prompt-not-found"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/shared-ux-prompt-not-found plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found']
---
import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json';
diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx
index a3c6bcaaa9b69..bd475c9817650 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: 2023-01-04
+date: 2023-01-09
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 002c61397fb4f..b8d17a36429c0 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: 2023-01-04
+date: 2023-01-09
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 bf463a404c85f..c3904063dab85 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: 2023-01-04
+date: 2023-01-09
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 40413e0b6ec78..d28a25ce9b93b 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: 2023-01-04
+date: 2023-01-09
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 779b345e74955..909e16e398133 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility']
---
import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json';
diff --git a/api_docs/kbn_slo_schema.devdocs.json b/api_docs/kbn_slo_schema.devdocs.json
index f301cd52ad346..dc6a3660a4d79 100644
--- a/api_docs/kbn_slo_schema.devdocs.json
+++ b/api_docs/kbn_slo_schema.devdocs.json
@@ -82,6 +82,59 @@
],
"returnComment": []
},
+ {
+ "parentPluginId": "@kbn/slo-schema",
+ "id": "def-common.Duration.add",
+ "type": "Function",
+ "tags": [],
+ "label": "add",
+ "description": [],
+ "signature": [
+ "(other: ",
+ {
+ "pluginId": "@kbn/slo-schema",
+ "scope": "common",
+ "docId": "kibKbnSloSchemaPluginApi",
+ "section": "def-common.Duration",
+ "text": "Duration"
+ },
+ ") => ",
+ {
+ "pluginId": "@kbn/slo-schema",
+ "scope": "common",
+ "docId": "kibKbnSloSchemaPluginApi",
+ "section": "def-common.Duration",
+ "text": "Duration"
+ }
+ ],
+ "path": "packages/kbn-slo-schema/src/models/duration.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "@kbn/slo-schema",
+ "id": "def-common.Duration.add.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "other",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/slo-schema",
+ "scope": "common",
+ "docId": "kibKbnSloSchemaPluginApi",
+ "section": "def-common.Duration",
+ "text": "Duration"
+ }
+ ],
+ "path": "packages/kbn-slo-schema/src/models/duration.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
{
"parentPluginId": "@kbn/slo-schema",
"id": "def-common.Duration.isShorterThan",
diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx
index 4665cd41141d1..a5986452b0568 100644
--- a/api_docs/kbn_slo_schema.mdx
+++ b/api_docs/kbn_slo_schema.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema
title: "@kbn/slo-schema"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/slo-schema plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema']
---
import kbnSloSchemaObj from './kbn_slo_schema.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 | 63 | 0 |
+| 65 | 0 | 65 | 0 |
## Common
diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx
index 6d7d4aaa75740..9490633dfc481 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: 2023-01-04
+date: 2023-01-09
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 d5031b98be78c..ad618e638afbc 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: 2023-01-04
+date: 2023-01-09
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 efe25cb5c111b..a144f96f96fe5 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: 2023-01-04
+date: 2023-01-09
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 60e2b903b4add..6946804913886 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: 2023-01-04
+date: 2023-01-09
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 7e5a59e5673d9..327a5d05a565d 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: 2023-01-04
+date: 2023-01-09
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 2ada823d80c8f..96d1f02ce6395 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: 2023-01-04
+date: 2023-01-09
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 b9112c665fa49..d303a57b482ae 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: 2023-01-04
+date: 2023-01-09
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 cd9715e484fec..66bdf19cf3e33 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: 2023-01-04
+date: 2023-01-09
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 07bb626be10f8..ca94ecf200122 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: 2023-01-04
+date: 2023-01-09
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 e897460e5ab71..dba7783132c1c 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log']
---
import kbnToolingLogObj from './kbn_tooling_log.devdocs.json';
diff --git a/api_docs/kbn_ts_project_linter.mdx b/api_docs/kbn_ts_project_linter.mdx
index 6ffc78604b9df..3df6d029b18d8 100644
--- a/api_docs/kbn_ts_project_linter.mdx
+++ b/api_docs/kbn_ts_project_linter.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-project-linter
title: "@kbn/ts-project-linter"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ts-project-linter plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-project-linter']
---
import kbnTsProjectLinterObj from './kbn_ts_project_linter.devdocs.json';
diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx
index ae3b6e29a09b3..8da1219800b34 100644
--- a/api_docs/kbn_ts_projects.mdx
+++ b/api_docs/kbn_ts_projects.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects
title: "@kbn/ts-projects"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ts-projects plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects']
---
import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json';
diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx
index b7f710c69a02e..3390e960d7ee9 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config']
---
import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json';
diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx
index 29f9ff3d5632c..c50c0e47d65e6 100644
--- a/api_docs/kbn_ui_shared_deps_src.mdx
+++ b/api_docs/kbn_ui_shared_deps_src.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src
title: "@kbn/ui-shared-deps-src"
image: https://source.unsplash.com/400x175/?github
description: API docs for the @kbn/ui-shared-deps-src plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src']
---
import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json';
diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx
index 5dfafb2f60919..6ecc82f0cc75d 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme']
---
import kbnUiThemeObj from './kbn_ui_theme.devdocs.json';
diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx
index 2b02ca1d5dacb..5b263bacfed52 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components']
---
import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json';
diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx
index 566b9a40548d7..6de6961a25f45 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: 2023-01-04
+date: 2023-01-09
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 62d60744d49ce..1b7d28310ac4e 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: 2023-01-04
+date: 2023-01-09
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 badc0905fb8cb..80adf4bbc18dc 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: 2023-01-04
+date: 2023-01-09
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 8b23f28d9a670..138653d6f1eea 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: 2023-01-04
+date: 2023-01-09
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 61abf9c225c45..44f182b9ed2df 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: 2023-01-04
+date: 2023-01-09
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 d28184f9e5a81..6185ebc07d145 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact']
---
import kibanaReactObj from './kibana_react.devdocs.json';
diff --git a/api_docs/kibana_utils.devdocs.json b/api_docs/kibana_utils.devdocs.json
index 307b8bc437e19..6f0caeb2b3c77 100644
--- a/api_docs/kibana_utils.devdocs.json
+++ b/api_docs/kibana_utils.devdocs.json
@@ -2730,54 +2730,6 @@
"returnComment": [],
"initialIsOpen": false
},
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.createStateHash",
- "type": "Function",
- "tags": [],
- "label": "createStateHash",
- "description": [],
- "signature": [
- "(json: string, existingJsonProvider: ((hash: string) => string | null) | undefined) => string"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.createStateHash.$1",
- "type": "string",
- "tags": [],
- "label": "json",
- "description": [],
- "signature": [
- "string"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.createStateHash.$2",
- "type": "Function",
- "tags": [],
- "label": "existingJsonProvider",
- "description": [],
- "signature": [
- "((hash: string) => string | null) | undefined"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": false
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- },
{
"parentPluginId": "kibanaUtils",
"id": "def-public.createUrlTracker",
@@ -3279,39 +3231,6 @@
],
"initialIsOpen": false
},
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.isStateHash",
- "type": "Function",
- "tags": [],
- "label": "isStateHash",
- "description": [],
- "signature": [
- "(str: string) => boolean"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.isStateHash.$1",
- "type": "string",
- "tags": [],
- "label": "str",
- "description": [],
- "signature": [
- "string"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/state_hash/state_hash.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- },
{
"parentPluginId": "kibanaUtils",
"id": "def-public.of",
@@ -3729,118 +3648,6 @@
"returnComment": [],
"initialIsOpen": false
},
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.replaceUrlHashQuery",
- "type": "Function",
- "tags": [],
- "label": "replaceUrlHashQuery",
- "description": [],
- "signature": [
- "(rawUrl: string, queryReplacer: (query: ",
- "ParsedQuery",
- ") => ",
- "ParsedQuery",
- ") => string"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/url/format.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.replaceUrlHashQuery.$1",
- "type": "string",
- "tags": [],
- "label": "rawUrl",
- "description": [],
- "signature": [
- "string"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/url/format.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.replaceUrlHashQuery.$2",
- "type": "Function",
- "tags": [],
- "label": "queryReplacer",
- "description": [],
- "signature": [
- "(query: ",
- "ParsedQuery",
- ") => ",
- "ParsedQuery",
- ""
- ],
- "path": "src/plugins/kibana_utils/public/state_management/url/format.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- },
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.replaceUrlQuery",
- "type": "Function",
- "tags": [],
- "label": "replaceUrlQuery",
- "description": [],
- "signature": [
- "(rawUrl: string, queryReplacer: (query: ",
- "ParsedQuery",
- ") => ",
- "ParsedQuery",
- ") => string"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/url/format.ts",
- "deprecated": false,
- "trackAdoption": false,
- "children": [
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.replaceUrlQuery.$1",
- "type": "string",
- "tags": [],
- "label": "rawUrl",
- "description": [],
- "signature": [
- "string"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/url/format.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- },
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.replaceUrlQuery.$2",
- "type": "Function",
- "tags": [],
- "label": "queryReplacer",
- "description": [],
- "signature": [
- "(query: ",
- "ParsedQuery",
- ") => ",
- "ParsedQuery",
- ""
- ],
- "path": "src/plugins/kibana_utils/public/state_management/url/format.ts",
- "deprecated": false,
- "trackAdoption": false,
- "isRequired": true
- }
- ],
- "returnComment": [],
- "initialIsOpen": false
- },
{
"parentPluginId": "kibanaUtils",
"id": "def-public.retrieveState",
@@ -3881,10 +3688,12 @@
"tags": [],
"label": "setStateToKbnUrl",
"description": [
- "\nSets state to the url by key and returns a new url string.\nDoesn't actually updates history\n\ne.g.:\ngiven a url: http://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')\nkey: '_a'\nand state: {tab: 'other'}\n\nwill return url:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:other)&_b=(f:test,i:'',l:'')\n\nBy default due to Kibana legacy reasons assumed that state is stored in a query inside a hash part of the URL:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a={STATE}\n\n{ storeInHashQuery: false } option should be used in you want to store you state in a main query (not in a hash):\nhttp://localhost:5601/oxf/app/kibana?_a={STATE}#/yourApp"
+ "\nSets state to the url by key and returns a new url string.\nDoesn't actually updates history\n\ne.g.:\ngiven a url: http://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')\nkey: '_a'\nand state: {tab: 'other'}\n\nwill return url:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:other)&_b=(f:test,i:'',l:'')\n\nBy default due to Kibana legacy reasons assumed that state is stored in a query inside a hash part of the URL:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a={STATE}\n\n{ storeInHashQuery: false } option should be used in you want to store your state in a main query (not in a hash):\nhttp://localhost:5601/oxf/app/kibana?_a={STATE}#/yourApp"
],
"signature": [
- "(key: string, state: State, { useHash = false, storeInHashQuery = true }: { useHash: boolean; storeInHashQuery?: boolean | undefined; }, rawUrl: string) => string"
+ "(key: string, state: State, { useHash = false, storeInHashQuery = true }: ",
+ "SetStateToKbnUrlHashOptions",
+ ", rawUrl: string) => string"
],
"path": "src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts",
"deprecated": false,
@@ -3927,36 +3736,13 @@
"tags": [],
"label": "{ useHash = false, storeInHashQuery = true }",
"description": [],
+ "signature": [
+ "SetStateToKbnUrlHashOptions"
+ ],
"path": "src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts",
"deprecated": false,
"trackAdoption": false,
- "children": [
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.setStateToKbnUrl.$3.useHash",
- "type": "boolean",
- "tags": [],
- "label": "useHash",
- "description": [],
- "path": "src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts",
- "deprecated": false,
- "trackAdoption": false
- },
- {
- "parentPluginId": "kibanaUtils",
- "id": "def-public.setStateToKbnUrl.$3.storeInHashQuery",
- "type": "CompoundType",
- "tags": [],
- "label": "storeInHashQuery",
- "description": [],
- "signature": [
- "boolean | undefined"
- ],
- "path": "src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts",
- "deprecated": false,
- "trackAdoption": false
- }
- ]
+ "isRequired": true
},
{
"parentPluginId": "kibanaUtils",
@@ -9675,6 +9461,144 @@
"returnComment": [],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "kibanaUtils",
+ "id": "def-common.replaceUrlHashQuery",
+ "type": "Function",
+ "tags": [],
+ "label": "replaceUrlHashQuery",
+ "description": [],
+ "signature": [
+ "(rawUrl: string, queryReplacer: (query: ",
+ "ParsedQuery",
+ ") => ",
+ "ParsedQuery",
+ ") => string"
+ ],
+ "path": "src/plugins/kibana_utils/common/state_management/format.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "kibanaUtils",
+ "id": "def-common.replaceUrlHashQuery.$1",
+ "type": "string",
+ "tags": [],
+ "label": "rawUrl",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "src/plugins/kibana_utils/common/state_management/format.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "kibanaUtils",
+ "id": "def-common.replaceUrlHashQuery.$2",
+ "type": "Function",
+ "tags": [],
+ "label": "queryReplacer",
+ "description": [],
+ "signature": [
+ "(query: ",
+ "ParsedQuery",
+ ") => ",
+ "ParsedQuery",
+ ""
+ ],
+ "path": "src/plugins/kibana_utils/common/state_management/format.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "kibanaUtils",
+ "id": "def-common.setStateToKbnUrl",
+ "type": "Function",
+ "tags": [],
+ "label": "setStateToKbnUrl",
+ "description": [
+ "\nCommon version of setStateToKbnUrl which doesn't use session storage.\n\nSets state to the url by key and returns a new url string.\n\ne.g.:\ngiven a url: http://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:indexedFields)&_b=(f:test,i:'',l:'')\nkey: '_a'\nand state: {tab: 'other'}\n\nwill return url:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a=(tab:other)&_b=(f:test,i:'',l:'')\n\nBy default due to Kibana legacy reasons assumed that state is stored in a query inside a hash part of the URL:\nhttp://localhost:5601/oxf/app/kibana#/yourApp?_a={STATE}\n\n{ storeInHashQuery: true } option should be used in you want to store you state in a main query (not in a hash):\nhttp://localhost:5601/oxf/app/kibana?_a={STATE}#/yourApp"
+ ],
+ "signature": [
+ "(key: string, state: State, hashOptions: ",
+ "SetStateToKbnUrlHashOptions",
+ ", rawUrl: string) => string"
+ ],
+ "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "kibanaUtils",
+ "id": "def-common.setStateToKbnUrl.$1",
+ "type": "string",
+ "tags": [],
+ "label": "key",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "kibanaUtils",
+ "id": "def-common.setStateToKbnUrl.$2",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "state",
+ "description": [],
+ "signature": [
+ "State"
+ ],
+ "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "kibanaUtils",
+ "id": "def-common.setStateToKbnUrl.$3",
+ "type": "Object",
+ "tags": [],
+ "label": "hashOptions",
+ "description": [],
+ "signature": [
+ "SetStateToKbnUrlHashOptions"
+ ],
+ "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "kibanaUtils",
+ "id": "def-common.setStateToKbnUrl.$4",
+ "type": "string",
+ "tags": [],
+ "label": "rawUrl",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "src/plugins/kibana_utils/common/state_management/set_state_to_kbn_url.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "kibanaUtils",
"id": "def-common.useContainerSelector",
diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx
index e73d2abf29a90..e9b46e2deb2fd 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils']
---
import kibanaUtilsObj from './kibana_utils.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 |
|-------------------|-----------|------------------------|-----------------|
-| 624 | 3 | 424 | 8 |
+| 619 | 3 | 418 | 9 |
## Client
diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx
index a0465ef158baf..0b02243fb4120 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity']
---
import kubernetesSecurityObj from './kubernetes_security.devdocs.json';
diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx
index 62bb45d75dfc0..aece2377a7e0a 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens']
---
import lensObj from './lens.devdocs.json';
diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx
index c151aa4240fb6..8c1dcfe2ae8f6 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: 2023-01-04
+date: 2023-01-09
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 a20948523a0e1..26bbf896c2636 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: 2023-01-04
+date: 2023-01-09
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 2d81dbbab4bb8..8832fead82b68 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: 2023-01-04
+date: 2023-01-09
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 da5719363b687..5206ee34cd476 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: 2023-01-04
+date: 2023-01-09
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 38a5359462315..73b11afa98558 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: 2023-01-04
+date: 2023-01-09
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 2e510bc176047..1322c192f1e3a 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: 2023-01-04
+date: 2023-01-09
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 eaf2097d6941d..6b2f10d29a123 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: 2023-01-04
+date: 2023-01-09
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 e2aa3598e7767..6e858f7ee3336 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: 2023-01-04
+date: 2023-01-09
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 1aa25df608cc4..e9b2f79cc147c 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: 2023-01-04
+date: 2023-01-09
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 dd2569b69e782..6032c8c8df2f8 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: 2023-01-04
+date: 2023-01-09
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 e9991f9a44448..6b88671558f1f 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: 2023-01-04
+date: 2023-01-09
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 ca99e5769e6d2..54ae76a2e6ec8 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed']
---
import newsfeedObj from './newsfeed.devdocs.json';
diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx
index b571a2c8d938f..d27e8e7836f44 100644
--- a/api_docs/notifications.mdx
+++ b/api_docs/notifications.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications
title: "notifications"
image: https://source.unsplash.com/400x175/?github
description: API docs for the notifications plugin
-date: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications']
---
import notificationsObj from './notifications.devdocs.json';
diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx
index 95abe4f6ba646..148df74b3e762 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: 2023-01-04
+date: 2023-01-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability']
---
import observabilityObj from './observability.devdocs.json';
diff --git a/api_docs/osquery.devdocs.json b/api_docs/osquery.devdocs.json
index 9ec19fc8e2d46..afb316f5ab7a5 100644
--- a/api_docs/osquery.devdocs.json
+++ b/api_docs/osquery.devdocs.json
@@ -43,7 +43,7 @@
"((props: ",
"OsqueryActionProps",
" & { ecsData?: ",
- "AlertEcsData",
+ "Ecs",
" | undefined; }) => JSX.Element) | undefined"
],
"path": "x-pack/plugins/osquery/public/types.ts",
@@ -190,6 +190,46 @@
"trackAdoption": false
}
]
+ },
+ {
+ "parentPluginId": "osquery",
+ "id": "def-public.OsqueryPluginStart.fetchAllLiveQueries",
+ "type": "Function",
+ "tags": [],
+ "label": "fetchAllLiveQueries",
+ "description": [],
+ "signature": [
+ "(config: ",
+ "UseAllLiveQueriesConfig",
+ ") => ",
+ "UseQueryResult",
+ "<{ data: Omit<",
+ "ActionsStrategyResponse",
+ ", \"edges\"> & { items: ",
+ "SearchHit",
+ "
+ }
+ actions={
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ />
+
+ );
+};
const defaultLoadingRenderer = () => (
@@ -172,7 +245,8 @@ export const CloudPosturePage = ({
}: CloudPosturePageProps) => {
const subscriptionStatus = useSubscriptionStatus();
const getSetupStatus = useCspSetupStatusApi();
- const cisIntegrationLink = useCISIntegrationLink();
+ const kspmIntegrationLink = useCspIntegrationLink(KSPM_POLICY_TEMPLATE);
+ const cspmIntegrationLink = useCspIntegrationLink(CSPM_POLICY_TEMPLATE);
const render = () => {
if (subscriptionStatus.isError) {
@@ -196,7 +270,7 @@ export const CloudPosturePage = ({
}
if (getSetupStatus.data.status === 'not-installed') {
- return packageNotInstalledRenderer(cisIntegrationLink);
+ return packageNotInstalledRenderer({ kspmIntegrationLink, cspmIntegrationLink });
}
if (!query) {
diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts
index dde25b7477543..afbd7ffac9bf8 100644
--- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts
+++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts
@@ -19,7 +19,7 @@ import {
SUPPORTED_POLICY_TEMPLATES,
SUPPORTED_CLOUDBEAT_INPUTS,
} from '../../../common/constants';
-import { type PostureInput, type PosturePolicyTemplate } from '../../../common/types';
+import type { PostureInput, PosturePolicyTemplate } from '../../../common/types';
import { assert } from '../../../common/utils/helpers';
import { cloudPostureIntegrations } from '../../common/constants';
diff --git a/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts b/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts
index 4f154805aae05..95f3a83de9708 100644
--- a/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts
+++ b/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts
@@ -17,4 +17,5 @@ export const NO_FINDINGS_STATUS_TEST_SUBJ = {
INDEXING: 'status-api-indexing',
INDEX_TIMEOUT: 'status-api-index-timeout',
UNPRIVILEGED: 'status-api-unprivileged',
+ NO_FINDINGS: 'no-findings-found',
};
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks.test.tsx
index f9172a93457dc..1d8b3d6e55a91 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks.test.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks.test.tsx
@@ -16,12 +16,13 @@ import * as TEST_SUBJ from './test_subjects';
import { useCspBenchmarkIntegrations } from './use_csp_benchmark_integrations';
import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api';
import { useSubscriptionStatus } from '../../common/hooks/use_subscription_status';
-import { useCISIntegrationLink } from '../../common/navigation/use_navigate_to_cis_integration';
+import { useCspIntegrationLink } from '../../common/navigation/use_csp_integration_link';
jest.mock('./use_csp_benchmark_integrations');
jest.mock('../../common/api/use_setup_status_api');
jest.mock('../../common/hooks/use_subscription_status');
-jest.mock('../../common/navigation/use_navigate_to_cis_integration');
+jest.mock('../../common/navigation/use_csp_integration_link');
+
const chance = new Chance();
describe('', () => {
@@ -41,7 +42,7 @@ describe('', () => {
})
);
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
});
const renderBenchmarks = (
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks.tsx b/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks.tsx
index 29bc94dd739ec..b013f6b33dac5 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/benchmarks/benchmarks.tsx
@@ -7,22 +7,23 @@
import React, { useState } from 'react';
import {
+ EuiButton,
EuiFieldSearch,
EuiFieldSearchProps,
- EuiButton,
- EuiSpacer,
EuiFlexGroup,
EuiFlexItem,
- EuiTextColor,
- EuiText,
EuiPageHeader,
+ EuiSpacer,
+ EuiText,
+ EuiTextColor,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import useDebounce from 'react-use/lib/useDebounce';
import { i18n } from '@kbn/i18n';
+import { KSPM_POLICY_TEMPLATE } from '../../../common/constants';
+import { useCspIntegrationLink } from '../../common/navigation/use_csp_integration_link';
import { CloudPosturePageTitle } from '../../components/cloud_posture_page_title';
import { CloudPosturePage } from '../../components/cloud_posture_page';
-import { useCISIntegrationLink } from '../../common/navigation/use_navigate_to_cis_integration';
import { BenchmarksTable } from './benchmarks_table';
import {
useCspBenchmarkIntegrations,
@@ -35,8 +36,9 @@ import { usePageSize } from '../../common/hooks/use_page_size';
const SEARCH_DEBOUNCE_MS = 300;
+// TODO: CIS AWS - add cspm integration button as well
const AddCisIntegrationButton = () => {
- const cisIntegrationLink = useCISIntegrationLink();
+ const cisIntegrationLink = useCspIntegrationLink(KSPM_POLICY_TEMPLATE);
return (
-
+
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.test.tsx
index d7a03e0cb679c..6aace059a5cc4 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.test.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.test.tsx
@@ -13,20 +13,25 @@ import { TestProvider } from '../../test/test_provider';
import { ComplianceDashboard } from '.';
import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api';
import { useSubscriptionStatus } from '../../common/hooks/use_subscription_status';
-import { useComplianceDashboardDataApi } from '../../common/api/use_compliance_dashboard_data_api';
-import { DASHBOARD_CONTAINER } from './test_subjects';
+import { useKspmStatsApi, useCspmStatsApi } from '../../common/api/use_stats_api';
+import {
+ CLOUD_DASHBOARD_CONTAINER,
+ DASHBOARD_CONTAINER,
+ KUBERNETES_DASHBOARD_CONTAINER,
+} from './test_subjects';
import { createReactQueryResponse } from '../../test/fixtures/react_query';
import { NO_FINDINGS_STATUS_TEST_SUBJ } from '../../components/test_subjects';
import { useCISIntegrationPoliciesLink } from '../../common/navigation/use_navigate_to_cis_integration_policies';
-import { useCISIntegrationLink } from '../../common/navigation/use_navigate_to_cis_integration';
+import { useCspIntegrationLink } from '../../common/navigation/use_csp_integration_link';
import { expectIdsInDoc } from '../../test/utils';
import { ComplianceDashboardData } from '../../../common/types';
jest.mock('../../common/api/use_setup_status_api');
-jest.mock('../../common/api/use_compliance_dashboard_data_api');
+jest.mock('../../common/api/use_stats_api');
jest.mock('../../common/hooks/use_subscription_status');
jest.mock('../../common/navigation/use_navigate_to_cis_integration_policies');
-jest.mock('../../common/navigation/use_navigate_to_cis_integration');
+jest.mock('../../common/navigation/use_csp_integration_link');
+
const chance = new Chance();
export const mockDashboardData: ComplianceDashboardData = {
@@ -205,6 +210,17 @@ describe('', () => {
data: true,
})
);
+
+ (useCspmStatsApi as jest.Mock).mockImplementation(() =>
+ createReactQueryResponse({
+ status: 'success',
+ })
+ );
+ (useKspmStatsApi as jest.Mock).mockImplementation(() =>
+ createReactQueryResponse({
+ status: 'success',
+ })
+ );
});
const renderComplianceDashboardPage = () => {
@@ -233,11 +249,11 @@ describe('', () => {
(useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
createReactQueryResponse({
status: 'success',
- data: { status: 'not-deployed' },
+ data: { status: 'not-deployed', installedPolicyTemplates: [] },
})
);
(useCISIntegrationPoliciesLink as jest.Mock).mockImplementation(() => chance.url());
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
renderComplianceDashboardPage();
@@ -256,10 +272,10 @@ describe('', () => {
(useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
createReactQueryResponse({
status: 'success',
- data: { status: 'indexing' },
+ data: { status: 'indexing', installedPolicyTemplates: [] },
})
);
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
renderComplianceDashboardPage();
@@ -278,10 +294,10 @@ describe('', () => {
(useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
createReactQueryResponse({
status: 'success',
- data: { status: 'index-timeout' },
+ data: { status: 'index-timeout', installedPolicyTemplates: [] },
})
);
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
renderComplianceDashboardPage();
@@ -300,10 +316,10 @@ describe('', () => {
(useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
createReactQueryResponse({
status: 'success',
- data: { status: 'unprivileged' },
+ data: { status: 'unprivileged', installedPolicyTemplates: [] },
})
);
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
renderComplianceDashboardPage();
@@ -319,7 +335,18 @@ describe('', () => {
});
it('shows dashboard when there are findings in latest findings index', () => {
- (useComplianceDashboardDataApi as jest.Mock).mockImplementation(() => ({
+ (useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
+ createReactQueryResponse({
+ status: 'success',
+ data: { status: 'indexed', installedPolicyTemplates: ['cspm', 'kspm'] },
+ })
+ );
+ (useKspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: mockDashboardData,
+ }));
+ (useCspmStatsApi as jest.Mock).mockImplementation(() => ({
isSuccess: true,
isLoading: false,
data: mockDashboardData,
@@ -337,4 +364,196 @@ describe('', () => {
],
});
});
+
+ it('Show Kubernetes dashboard if there are KSPM findings', () => {
+ (useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
+ createReactQueryResponse({
+ status: 'success',
+ data: { status: 'indexed', installedPolicyTemplates: ['cspm', 'kspm'] },
+ })
+ );
+ (useKspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: mockDashboardData,
+ }));
+ (useCspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: undefined,
+ }));
+
+ renderComplianceDashboardPage();
+
+ expectIdsInDoc({
+ be: [KUBERNETES_DASHBOARD_CONTAINER],
+ notToBe: [
+ CLOUD_DASHBOARD_CONTAINER,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEX_TIMEOUT,
+ NO_FINDINGS_STATUS_TEST_SUBJ.NO_AGENTS_DEPLOYED,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEXING,
+ NO_FINDINGS_STATUS_TEST_SUBJ.UNPRIVILEGED,
+ ],
+ });
+ });
+
+ it('Show Cloud dashboard if there are CSPM findings', () => {
+ (useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
+ createReactQueryResponse({
+ status: 'success',
+ data: { status: 'indexed', installedPolicyTemplates: ['cspm', 'kspm'] },
+ })
+ );
+ (useKspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: undefined,
+ }));
+ (useCspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: mockDashboardData,
+ }));
+
+ renderComplianceDashboardPage();
+
+ expectIdsInDoc({
+ be: [CLOUD_DASHBOARD_CONTAINER],
+ notToBe: [
+ KUBERNETES_DASHBOARD_CONTAINER,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEX_TIMEOUT,
+ NO_FINDINGS_STATUS_TEST_SUBJ.NO_AGENTS_DEPLOYED,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEXING,
+ NO_FINDINGS_STATUS_TEST_SUBJ.UNPRIVILEGED,
+ ],
+ });
+ });
+
+ it('Show Cloud dashboard "no findings prompt" if the CSPM integration is installed without findings', () => {
+ (useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
+ createReactQueryResponse({
+ status: 'success',
+ data: { status: 'indexed', installedPolicyTemplates: ['cspm'] },
+ })
+ );
+ (useKspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: { stats: { totalFindings: 0 } },
+ }));
+ (useCspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: { stats: { totalFindings: 0 } },
+ }));
+
+ renderComplianceDashboardPage();
+
+ expectIdsInDoc({
+ be: [CLOUD_DASHBOARD_CONTAINER, NO_FINDINGS_STATUS_TEST_SUBJ.NO_FINDINGS],
+ notToBe: [
+ KUBERNETES_DASHBOARD_CONTAINER,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEX_TIMEOUT,
+ NO_FINDINGS_STATUS_TEST_SUBJ.NO_AGENTS_DEPLOYED,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEXING,
+ NO_FINDINGS_STATUS_TEST_SUBJ.UNPRIVILEGED,
+ ],
+ });
+ });
+
+ it('Show Kubernetes dashboard "no findings prompt" if the KSPM integration is installed without findings', () => {
+ (useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
+ createReactQueryResponse({
+ status: 'success',
+ data: { status: 'indexed', installedPolicyTemplates: ['kspm'] },
+ })
+ );
+ (useKspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: { stats: { totalFindings: 0 } },
+ }));
+ (useCspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: { stats: { totalFindings: 0 } },
+ }));
+
+ renderComplianceDashboardPage();
+
+ expectIdsInDoc({
+ be: [KUBERNETES_DASHBOARD_CONTAINER, NO_FINDINGS_STATUS_TEST_SUBJ.NO_FINDINGS],
+ notToBe: [
+ CLOUD_DASHBOARD_CONTAINER,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEX_TIMEOUT,
+ NO_FINDINGS_STATUS_TEST_SUBJ.NO_AGENTS_DEPLOYED,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEXING,
+ NO_FINDINGS_STATUS_TEST_SUBJ.UNPRIVILEGED,
+ ],
+ });
+ });
+
+ it('Prefer Cloud dashboard if both integration are installed', () => {
+ (useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
+ createReactQueryResponse({
+ status: 'success',
+ data: { status: 'indexed', installedPolicyTemplates: ['cspm', 'kspm'] },
+ })
+ );
+ (useKspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: { stats: { totalFindings: 0 } },
+ }));
+ (useCspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: { stats: { totalFindings: 0 } },
+ }));
+
+ renderComplianceDashboardPage();
+
+ expectIdsInDoc({
+ be: [CLOUD_DASHBOARD_CONTAINER, NO_FINDINGS_STATUS_TEST_SUBJ.NO_FINDINGS],
+ notToBe: [
+ KUBERNETES_DASHBOARD_CONTAINER,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEX_TIMEOUT,
+ NO_FINDINGS_STATUS_TEST_SUBJ.NO_AGENTS_DEPLOYED,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEXING,
+ NO_FINDINGS_STATUS_TEST_SUBJ.UNPRIVILEGED,
+ ],
+ });
+ });
+
+ it('Prefer Cloud dashboard if both integration have findings', () => {
+ (useCspSetupStatusApi as jest.Mock).mockImplementation(() =>
+ createReactQueryResponse({
+ status: 'success',
+ data: { status: 'indexed', installedPolicyTemplates: ['cspm', 'kspm'] },
+ })
+ );
+ (useKspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: mockDashboardData,
+ }));
+ (useCspmStatsApi as jest.Mock).mockImplementation(() => ({
+ isSuccess: true,
+ isLoading: false,
+ data: mockDashboardData,
+ }));
+
+ renderComplianceDashboardPage();
+
+ expectIdsInDoc({
+ be: [CLOUD_DASHBOARD_CONTAINER],
+ notToBe: [
+ KUBERNETES_DASHBOARD_CONTAINER,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEX_TIMEOUT,
+ NO_FINDINGS_STATUS_TEST_SUBJ.NO_AGENTS_DEPLOYED,
+ NO_FINDINGS_STATUS_TEST_SUBJ.INDEXING,
+ NO_FINDINGS_STATUS_TEST_SUBJ.UNPRIVILEGED,
+ ],
+ });
+ });
});
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx
index 33fa8756c631d..78ee59684896c 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/compliance_dashboard.tsx
@@ -5,30 +5,284 @@
* 2.0.
*/
-import React from 'react';
-import { EuiSpacer, EuiPageHeader } from '@elastic/eui';
+import React, { useEffect, useMemo, useState } from 'react';
+import { EuiEmptyPrompt, EuiIcon, EuiLink, EuiPageHeader, EuiSpacer } from '@elastic/eui';
import { css } from '@emotion/react';
import { i18n } from '@kbn/i18n';
-import { CloudSummarySection } from './dashboard_sections/cloud_summary_section';
+import { FormattedMessage } from '@kbn/i18n-react';
+import { NO_FINDINGS_STATUS_TEST_SUBJ } from '../../components/test_subjects';
+import { useCspIntegrationLink } from '../../common/navigation/use_csp_integration_link';
+import type { PosturePolicyTemplate, ComplianceDashboardData } from '../../../common/types';
import { CloudPosturePageTitle } from '../../components/cloud_posture_page_title';
-import { CloudPosturePage } from '../../components/cloud_posture_page';
-import { DASHBOARD_CONTAINER } from './test_subjects';
-import { useComplianceDashboardDataApi } from '../../common/api';
+import {
+ CloudPosturePage,
+ CspNoDataPage,
+ CspNoDataPageProps,
+ KSPM_INTEGRATION_NOT_INSTALLED_TEST_SUBJECT,
+ CSPM_INTEGRATION_NOT_INSTALLED_TEST_SUBJECT,
+} from '../../components/cloud_posture_page';
+import {
+ CLOUD_DASHBOARD_CONTAINER,
+ DASHBOARD_CONTAINER,
+ KUBERNETES_DASHBOARD_CONTAINER,
+} from './test_subjects';
+import { useCspmStatsApi, useKspmStatsApi } from '../../common/api';
import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api';
import { NoFindingsStates } from '../../components/no_findings_states';
+import { CloudSummarySection } from './dashboard_sections/cloud_summary_section';
import { CloudBenchmarksSection } from './dashboard_sections/cloud_benchmarks_section';
+import { CSPM_POLICY_TEMPLATE, KSPM_POLICY_TEMPLATE } from '../../../common/constants';
+
+const noDataOptions: Record<
+ PosturePolicyTemplate,
+ Pick & { testId: string }
+> = {
+ kspm: {
+ testId: KSPM_INTEGRATION_NOT_INSTALLED_TEST_SUBJECT,
+ docsLink: 'https://ela.st/kspm',
+ actionTitle: i18n.translate(
+ 'xpack.csp.cloudPosturePage.kspmIntegration.packageNotInstalled.buttonLabel',
+ { defaultMessage: 'Add a KSPM integration' }
+ ),
+ actionDescription: (
+
+
+
+ ),
+ }}
+ />
+ ),
+ },
+ cspm: {
+ testId: CSPM_INTEGRATION_NOT_INSTALLED_TEST_SUBJECT,
+ // TODO: CIS AWS - replace link or create the docs
+ docsLink: 'https://ela.st/cspm',
+ actionTitle: i18n.translate(
+ 'xpack.csp.cloudPosturePage.cspmIntegration.packageNotInstalled.buttonLabel',
+ { defaultMessage: 'Add a CSPM integration' }
+ ),
+ actionDescription: (
+
+
+
+ ),
+ }}
+ />
+ ),
+ },
+};
+
+const getNotInstalledConfig = (
+ policyTemplate: PosturePolicyTemplate,
+ actionHref: CspNoDataPageProps['actionHref']
+) => {
+ const policyTemplateNoDataConfig = noDataOptions[policyTemplate];
+
+ return {
+ pageTitle: i18n.translate('xpack.csp.cloudPosturePage.packageNotInstalled.pageTitle', {
+ defaultMessage: 'Install Integration to get started',
+ }),
+ docsLink: policyTemplateNoDataConfig.docsLink,
+ actionHref,
+ actionTitle: policyTemplateNoDataConfig.actionTitle,
+ actionDescription: policyTemplateNoDataConfig.actionDescription,
+ testId: policyTemplateNoDataConfig.testId,
+ };
+};
+
+const KIBANA_HEADERS_HEIGHT = 265;
+
+const IntegrationPostureDashboard = ({
+ complianceData,
+ notInstalledConfig,
+ isIntegrationInstalled,
+}: {
+ complianceData: ComplianceDashboardData | undefined;
+ notInstalledConfig: CspNoDataPageProps;
+ isIntegrationInstalled?: boolean;
+}) => {
+ const noFindings = !complianceData || complianceData.stats.totalFindings === 0;
+
+ // integration is not installed, and there are no findings for this integration
+ if (noFindings && !isIntegrationInstalled) {
+ return ;
+ }
+
+ // integration is installed, but there are no findings for this integration
+ if (noFindings) {
+ return (
+ // height is calculated for the screen height minus the kibana header, page title, and tabs
+
+
}
+ title={
+
+
+
+ }
+ body={
+
+
+
+ }
+ />
+
+ );
+ }
+
+ // there are findings, displays dashboard even if integration is not installed
+ return (
+ <>
+
+
+
+
+ >
+ );
+};
export const ComplianceDashboard = () => {
+ const [selectedTab, setSelectedTab] = useState(CSPM_POLICY_TEMPLATE);
const getSetupStatus = useCspSetupStatusApi();
const hasFindings = getSetupStatus.data?.status === 'indexed';
- const getDashboardData = useComplianceDashboardDataApi({
+ const cspmIntegrationLink = useCspIntegrationLink(CSPM_POLICY_TEMPLATE);
+ const kspmIntegrationLink = useCspIntegrationLink(KSPM_POLICY_TEMPLATE);
+
+ const getCspmDashboardData = useCspmStatsApi({
enabled: hasFindings,
});
+ const getKspmDashboardData = useKspmStatsApi({
+ enabled: hasFindings,
+ });
+
+ useEffect(() => {
+ const selectInitialTab = () => {
+ const cspmTotalFindings = getCspmDashboardData.data?.stats.totalFindings;
+ const kspmTotalFindings = getKspmDashboardData.data?.stats.totalFindings;
+ const installedPolicyTemplates = getSetupStatus.data?.installedPolicyTemplates;
+
+ let preferredDashboard = CSPM_POLICY_TEMPLATE;
+
+ // cspm has findings
+ if (!!cspmTotalFindings) {
+ preferredDashboard = CSPM_POLICY_TEMPLATE;
+ }
+ // kspm has findings
+ else if (!!kspmTotalFindings) {
+ preferredDashboard = KSPM_POLICY_TEMPLATE;
+ }
+ // cspm is installed
+ else if (installedPolicyTemplates?.includes(CSPM_POLICY_TEMPLATE)) {
+ preferredDashboard = CSPM_POLICY_TEMPLATE;
+ }
+ // kspm is installed
+ else if (installedPolicyTemplates?.includes(KSPM_POLICY_TEMPLATE)) {
+ preferredDashboard = KSPM_POLICY_TEMPLATE;
+ }
+
+ setSelectedTab(preferredDashboard);
+ };
+ selectInitialTab();
+ }, [
+ getCspmDashboardData.data?.stats.totalFindings,
+ getKspmDashboardData.data?.stats.totalFindings,
+ getSetupStatus.data?.installedPolicyTemplates,
+ ]);
+
+ const tabs = useMemo(
+ () => [
+ {
+ label: i18n.translate('xpack.csp.dashboardTabs.cloudTab.tabTitle', {
+ defaultMessage: 'Cloud',
+ }),
+ isSelected: selectedTab === CSPM_POLICY_TEMPLATE,
+ onClick: () => setSelectedTab(CSPM_POLICY_TEMPLATE),
+ content: (
+
+
+
+
+
+ ),
+ },
+ {
+ label: i18n.translate('xpack.csp.dashboardTabs.kubernetesTab.tabTitle', {
+ defaultMessage: 'Kubernetes',
+ }),
+ isSelected: selectedTab === KSPM_POLICY_TEMPLATE,
+ onClick: () => setSelectedTab(KSPM_POLICY_TEMPLATE),
+ content: (
+
+
+
+
+
+ ),
+ },
+ ],
+ [
+ cspmIntegrationLink,
+ getCspmDashboardData,
+ getKspmDashboardData,
+ getSetupStatus.data?.installedPolicyTemplates,
+ kspmIntegrationLink,
+ selectedTab,
+ ]
+ );
if (!hasFindings) return ;
return (
-
+
{
})}
/>
}
+ tabs={tabs.map(({ content, ...rest }) => rest)}
/>
- <>
-
-
-
-
- >
+ {tabs.find((t) => t.isSelected)?.content}
);
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/cloud_benchmarks_section.tsx b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/cloud_benchmarks_section.tsx
index 288a41d0a7a96..5ab9552d5d2da 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/cloud_benchmarks_section.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/cloud_benchmarks_section.tsx
@@ -49,7 +49,6 @@ export const CloudBenchmarksSection = ({
style={{
borderBottom: euiTheme.border.thick,
borderBottomColor: euiTheme.colors.text,
- marginBottom: euiTheme.size.m,
paddingBottom: euiTheme.size.s,
}}
>
@@ -91,51 +90,52 @@ export const CloudBenchmarksSection = ({
{complianceData.clusters.map((cluster) => (
-
-
-
-
-
-
-
- handleEvalCounterClick(cluster.meta.clusterId, evaluation)
- }
- />
-
-
-
-
-
- handleCellClick(cluster.meta.clusterId, resourceTypeName)
- }
- viewAllButtonTitle={i18n.translate(
- 'xpack.csp.dashboard.risksTable.clusterCardViewAllButtonTitle',
- { defaultMessage: 'View all failed findings for this cluster' }
- )}
- onViewAllClick={() => handleViewAllClick(cluster.meta.clusterId)}
- />
-
-
-
+
+
+
+
+
+
+
+
+ handleEvalCounterClick(cluster.meta.clusterId, evaluation)
+ }
+ />
+
+
+
+
+
+ handleCellClick(cluster.meta.clusterId, resourceTypeName)
+ }
+ viewAllButtonTitle={i18n.translate(
+ 'xpack.csp.dashboard.risksTable.clusterCardViewAllButtonTitle',
+ { defaultMessage: 'View all failed findings for this cluster' }
+ )}
+ onViewAllClick={() => handleViewAllClick(cluster.meta.clusterId)}
+ />
+
+
+
+
))}
>
);
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/test_subjects.ts b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/test_subjects.ts
index 50b4e7a2b03d3..264f848dd5886 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/test_subjects.ts
+++ b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/test_subjects.ts
@@ -7,6 +7,8 @@
export const MISSING_FINDINGS_NO_DATA_CONFIG = 'missing-findings-no-data-config';
export const DASHBOARD_CONTAINER = 'dashboard-container';
+export const KUBERNETES_DASHBOARD_CONTAINER = 'kubernetes-dashboard-container';
+export const CLOUD_DASHBOARD_CONTAINER = 'cloud-dashboard-container';
export const DASHBOARD_COUNTER_CARDS = {
CLUSTERS_EVALUATED: 'dashboard-counter-card-clusters-evaluated',
RESOURCES_EVALUATED: 'dashboard-counter-card-resources-evaluated',
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings.test.tsx
index 70420f61d2176..02f2ec8ffee73 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/findings/findings.test.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/findings/findings.test.tsx
@@ -23,7 +23,7 @@ import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api';
import { useSubscriptionStatus } from '../../common/hooks/use_subscription_status';
import { createReactQueryResponse } from '../../test/fixtures/react_query';
import { useCISIntegrationPoliciesLink } from '../../common/navigation/use_navigate_to_cis_integration_policies';
-import { useCISIntegrationLink } from '../../common/navigation/use_navigate_to_cis_integration';
+import { useCspIntegrationLink } from '../../common/navigation/use_csp_integration_link';
import { NO_FINDINGS_STATUS_TEST_SUBJ } from '../../components/test_subjects';
import { render } from '@testing-library/react';
import { expectIdsInDoc } from '../../test/utils';
@@ -34,7 +34,8 @@ jest.mock('../../common/api/use_latest_findings_data_view');
jest.mock('../../common/api/use_setup_status_api');
jest.mock('../../common/hooks/use_subscription_status');
jest.mock('../../common/navigation/use_navigate_to_cis_integration_policies');
-jest.mock('../../common/navigation/use_navigate_to_cis_integration');
+jest.mock('../../common/navigation/use_csp_integration_link');
+
const chance = new Chance();
beforeEach(() => {
@@ -74,7 +75,7 @@ describe('', () => {
})
);
(useCISIntegrationPoliciesLink as jest.Mock).mockImplementation(() => chance.url());
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
renderFindingsPage();
@@ -96,7 +97,7 @@ describe('', () => {
data: { status: 'indexing' },
})
);
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
renderFindingsPage();
@@ -118,7 +119,7 @@ describe('', () => {
data: { status: 'index-timeout' },
})
);
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
renderFindingsPage();
@@ -140,7 +141,7 @@ describe('', () => {
data: { status: 'unprivileged' },
})
);
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
renderFindingsPage();
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules.test.tsx
index 45e19b9fba5bd..762df0380a6d2 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules.test.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules.test.tsx
@@ -19,14 +19,15 @@ import { createReactQueryResponse } from '../../test/fixtures/react_query';
import { coreMock } from '@kbn/core/public/mocks';
import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api';
import { useSubscriptionStatus } from '../../common/hooks/use_subscription_status';
-import { useCISIntegrationLink } from '../../common/navigation/use_navigate_to_cis_integration';
+import { useCspIntegrationLink } from '../../common/navigation/use_csp_integration_link';
jest.mock('./use_csp_integration', () => ({
useCspIntegrationInfo: jest.fn(),
}));
jest.mock('../../common/api/use_setup_status_api');
jest.mock('../../common/hooks/use_subscription_status');
-jest.mock('../../common/navigation/use_navigate_to_cis_integration');
+jest.mock('../../common/navigation/use_csp_integration_link');
+
const chance = new Chance();
const queryClient = new QueryClient({
@@ -78,7 +79,7 @@ describe('', () => {
})
);
- (useCISIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
+ (useCspIntegrationLink as jest.Mock).mockImplementation(() => chance.url());
});
it('calls API with URL params', async () => {
diff --git a/x-pack/plugins/cloud_security_posture/server/fleet_integration/fleet_integration.ts b/x-pack/plugins/cloud_security_posture/server/fleet_integration/fleet_integration.ts
index 22097dbfc69fd..0e9cf02ad0663 100644
--- a/x-pack/plugins/cloud_security_posture/server/fleet_integration/fleet_integration.ts
+++ b/x-pack/plugins/cloud_security_posture/server/fleet_integration/fleet_integration.ts
@@ -9,7 +9,7 @@ import { SavedObjectsClientContract } from '@kbn/core/server';
import { PackagePolicyClient } from '@kbn/fleet-plugin/server';
import { PackagePolicy } from '@kbn/fleet-plugin/common';
import { DataViewSavedObjectAttrs } from '@kbn/data-views-plugin/common';
-import { getCSPKuery } from '../../common/utils/helpers';
+import { CSP_FLEET_PACKAGE_KUERY } from '../../common/utils/helpers';
import { CLOUD_SECURITY_POSTURE_PACKAGE_NAME } from '../../common/constants';
export const onPackagePolicyPostCreateCallback = async (
@@ -41,7 +41,7 @@ export const isCspPackagePolicyInstalled = async (
): Promise => {
try {
const { total } = await packagePolicyClient.list(soClient, {
- kuery: getCSPKuery,
+ kuery: CSP_FLEET_PACKAGE_KUERY,
page: 1,
});
diff --git a/x-pack/plugins/cloud_security_posture/server/lib/fleet_util.ts b/x-pack/plugins/cloud_security_posture/server/lib/fleet_util.ts
index 7d348f2d70250..ada8548240ae9 100644
--- a/x-pack/plugins/cloud_security_posture/server/lib/fleet_util.ts
+++ b/x-pack/plugins/cloud_security_posture/server/lib/fleet_util.ts
@@ -4,19 +4,22 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
-import { uniq, map } from 'lodash';
+import { map, uniq } from 'lodash';
import type { SavedObjectsClientContract } from '@kbn/core/server';
import type {
- PackagePolicyClient,
AgentPolicyServiceInterface,
AgentService,
+ PackagePolicyClient,
} from '@kbn/fleet-plugin/server';
import type {
- GetAgentStatusResponse,
- PackagePolicy,
AgentPolicy,
+ GetAgentStatusResponse,
ListResult,
+ PackagePolicy,
} from '@kbn/fleet-plugin/common';
+import { PosturePolicyTemplate } from '../../common/types';
+import { SUPPORTED_POLICY_TEMPLATES } from '../../common/constants';
+import { CSP_FLEET_PACKAGE_KUERY } from '../../common/utils/helpers';
import {
BENCHMARK_PACKAGE_POLICY_PREFIX,
BenchmarksQueryParams,
@@ -24,6 +27,9 @@ import {
export const PACKAGE_POLICY_SAVED_OBJECT_TYPE = 'ingest-package-policies';
+const isPolicyTemplate = (input: any): input is PosturePolicyTemplate =>
+ SUPPORTED_POLICY_TEMPLATES.includes(input);
+
const getPackageNameQuery = (packageName: string, benchmarkFilter?: string): string => {
const integrationNameQuery = `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:${packageName}`;
const kquery = benchmarkFilter
@@ -79,3 +85,28 @@ export const getCspPackagePolicies = (
sortOrder: queryParams.sort_order,
});
};
+
+export const getInstalledPolicyTemplates = async (
+ packagePolicyClient: PackagePolicyClient,
+ soClient: SavedObjectsClientContract
+) => {
+ try {
+ // getting all installed csp package policies
+ const queryResult = await packagePolicyClient.list(soClient, {
+ kuery: CSP_FLEET_PACKAGE_KUERY,
+ perPage: 1000,
+ });
+
+ // getting installed policy templates by findings enabled inputs
+ const enabledPolicyTemplates = queryResult.items
+ .map((policy) => {
+ return policy.inputs.find((input) => input.enabled)?.policy_template;
+ })
+ .filter(isPolicyTemplate);
+
+ // removing duplicates
+ return [...new Set(enabledPolicyTemplates)];
+ } catch (e) {
+ return [];
+ }
+};
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.ts b/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.ts
index 00c32f1b46f4a..eafacfac12f4e 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/benchmarks/benchmarks.ts
@@ -69,7 +69,7 @@ const createBenchmarks = (
const agentPolicyStatus = {
id: agentPolicy.id,
name: agentPolicy.name,
- agents: agentStatusByAgentPolicyId[agentPolicy.id].total,
+ agents: agentStatusByAgentPolicyId[agentPolicy.id]?.total,
};
return {
package_policy: cspPackage,
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.ts
index aa82b5844ce26..b59ad93d8f254 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/compliance_dashboard.ts
@@ -7,7 +7,8 @@
import { transformError } from '@kbn/securitysolution-es-utils';
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
-import type { ComplianceDashboardData } from '../../../common/types';
+import { schema } from '@kbn/config-schema';
+import type { PosturePolicyTemplate, ComplianceDashboardData } from '../../../common/types';
import { LATEST_FINDINGS_INDEX_DEFAULT_NS, STATS_ROUTE_PATH } from '../../../common/constants';
import { getGroupedFindingsEvaluation } from './get_grouped_findings_evaluation';
import { ClusterWithoutTrend, getClusters } from './get_clusters';
@@ -32,16 +33,23 @@ const getClustersTrends = (clustersWithoutTrends: ClusterWithoutTrend[], trends:
const getSummaryTrend = (trends: Trends) =>
trends.map(({ timestamp, summary }) => ({ timestamp, ...summary }));
+const queryParamsSchema = {
+ params: schema.object({
+ // TODO: CIS AWS - replace with strict policy template values once available
+ policy_template: schema.string(),
+ }),
+};
+
export const defineGetComplianceDashboardRoute = (router: CspRouter): void =>
router.get(
{
path: STATS_ROUTE_PATH,
- validate: false,
+ validate: queryParamsSchema,
options: {
tags: ['access:cloud-security-posture-read'],
},
},
- async (context, _, response) => {
+ async (context, request, response) => {
const cspContext = await context.csp;
try {
@@ -52,8 +60,13 @@ export const defineGetComplianceDashboardRoute = (router: CspRouter): void =>
keep_alive: '30s',
});
+ const policyTemplate = request.params.policy_template as PosturePolicyTemplate;
+
const query: QueryDslQueryContainer = {
- match_all: {},
+ bool: {
+ // TODO: CIS AWS - replace filtered field to `policy_template` when available
+ filter: [{ term: { 'rule.benchmark.id': policyTemplate } }],
+ },
};
const [stats, groupedFindingsEvaluation, clustersWithoutTrends, trends] = await Promise.all(
@@ -61,7 +74,7 @@ export const defineGetComplianceDashboardRoute = (router: CspRouter): void =>
getStats(esClient, query, pitId),
getGroupedFindingsEvaluation(esClient, query, pitId),
getClusters(esClient, query, pitId),
- getTrends(esClient),
+ getTrends(esClient, policyTemplate),
]
);
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_stats.test.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_stats.test.ts
index 9c006a0ccbecc..aff4e39f9d49c 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_stats.test.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_stats.test.ts
@@ -38,7 +38,7 @@ const oneIsZeroQueryResult: FindingsEvaluationsQueryResult = {
const bothAreZeroQueryResult: FindingsEvaluationsQueryResult = {
resources_evaluated: {
- value: 30,
+ value: 0,
},
failed_findings: {
doc_count: 0,
@@ -90,8 +90,13 @@ describe('getStatsFromFindingsEvaluationsAggs', () => {
});
});
- it('should throw error if both evaluations are zero', async () => {
- // const stats = getStatsFromFindingsEvaluationsAggs(bothAreZeroQueryResult);
- expect(() => getStatsFromFindingsEvaluationsAggs(bothAreZeroQueryResult)).toThrow();
+ it('should return zero on all stats if there are no failed or passed findings', async () => {
+ const stats = getStatsFromFindingsEvaluationsAggs(bothAreZeroQueryResult);
+ expect(stats).toEqual({
+ totalFailed: 0,
+ totalPassed: 0,
+ totalFindings: 0,
+ postureScore: 0,
+ });
});
});
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_stats.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_stats.ts
index abb1ecd510ab6..d0fcd5b796774 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_stats.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_stats.ts
@@ -68,8 +68,7 @@ export const getStatsFromFindingsEvaluationsAggs = (
const failedFindings = findingsEvaluationsAggs.failed_findings.doc_count || 0;
const passedFindings = findingsEvaluationsAggs.passed_findings.doc_count || 0;
const totalFindings = failedFindings + passedFindings;
- if (!totalFindings) throw new Error("couldn't calculate posture score");
- const postureScore = calculatePostureScore(passedFindings, failedFindings);
+ const postureScore = calculatePostureScore(passedFindings, failedFindings) || 0;
return {
totalFailed: failedFindings,
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_trends.ts b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_trends.ts
index 270ce4f1ce177..a47b63e1fb921 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_trends.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/compliance_dashboard/get_trends.ts
@@ -7,7 +7,7 @@
import { ElasticsearchClient } from '@kbn/core/server';
import { BENCHMARK_SCORE_INDEX_DEFAULT_NS } from '../../../common/constants';
-import { Stats } from '../../../common/types';
+import type { PosturePolicyTemplate, Stats } from '../../../common/types';
import { calculatePostureScore } from './get_stats';
export interface ScoreTrendDoc {
@@ -25,13 +25,20 @@ export interface ScoreTrendDoc {
>;
}
-export const getTrendsQuery = () => ({
+export type Trends = Array<{
+ timestamp: string;
+ summary: Stats;
+ clusters: Record;
+}>;
+
+export const getTrendsQuery = (policyTemplate: PosturePolicyTemplate) => ({
index: BENCHMARK_SCORE_INDEX_DEFAULT_NS,
// large number that should be sufficient for 24 hours considering we write to the score index every 5 minutes
size: 999,
sort: '@timestamp:desc',
query: {
bool: {
+ filter: [{ term: { policy_template: policyTemplate } }],
must: {
range: {
'@timestamp': {
@@ -44,12 +51,6 @@ export const getTrendsQuery = () => ({
},
});
-export type Trends = Array<{
- timestamp: string;
- summary: Stats;
- clusters: Record;
-}>;
-
export const getTrendsFromQueryResult = (scoreTrendDocs: ScoreTrendDoc[]): Trends =>
scoreTrendDocs.map((data) => ({
timestamp: data['@timestamp'],
@@ -72,8 +73,11 @@ export const getTrendsFromQueryResult = (scoreTrendDocs: ScoreTrendDoc[]): Trend
),
}));
-export const getTrends = async (esClient: ElasticsearchClient): Promise => {
- const trendsQueryResult = await esClient.search(getTrendsQuery());
+export const getTrends = async (
+ esClient: ElasticsearchClient,
+ policyTemplate: PosturePolicyTemplate
+): Promise => {
+ const trendsQueryResult = await esClient.search(getTrendsQuery(policyTemplate));
if (!trendsQueryResult.hits.hits) throw new Error('missing trend results from score index');
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts b/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts
index 49dbf07883b23..33627389511a1 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts
@@ -24,6 +24,7 @@ import {
getAgentStatusesByAgentPolicies,
getCspAgentPolicies,
getCspPackagePolicies,
+ getInstalledPolicyTemplates,
} from '../../lib/fleet_util';
import { checkIndexStatus } from '../../lib/check_index_status';
@@ -105,6 +106,7 @@ const getCspStatus = async ({
installation,
latestCspPackage,
installedPackagePolicies,
+ installedPolicyTemplates,
] = await Promise.all([
checkIndexStatus(esClient.asCurrentUser, LATEST_FINDINGS_INDEX_DEFAULT_NS, logger),
checkIndexStatus(esClient.asCurrentUser, FINDINGS_INDEX_PATTERN, logger),
@@ -114,6 +116,7 @@ const getCspStatus = async ({
getCspPackagePolicies(soClient, packagePolicyService, CLOUD_SECURITY_POSTURE_PACKAGE_NAME, {
per_page: 10000,
}),
+ getInstalledPolicyTemplates(packagePolicyService, soClient),
]);
const healthyAgents = await getHealthyAgents(
@@ -158,6 +161,7 @@ const getCspStatus = async ({
status,
indicesDetails,
latestPackageVersion: latestCspPackageVersion,
+ installedPolicyTemplates,
healthyAgents,
installedPackagePolicies: installedPackagePoliciesTotal,
isPluginInitialized: isPluginInitialized(),
@@ -168,6 +172,7 @@ const getCspStatus = async ({
indicesDetails,
latestPackageVersion: latestCspPackageVersion,
healthyAgents,
+ installedPolicyTemplates,
installedPackagePolicies: installedPackagePoliciesTotal,
installedPackageVersion: installation?.install_version,
isPluginInitialized: isPluginInitialized(),
diff --git a/x-pack/plugins/cloud_security_posture/server/tasks/findings_stats_task.ts b/x-pack/plugins/cloud_security_posture/server/tasks/findings_stats_task.ts
index df1edb464c112..96a410d3cdaea 100644
--- a/x-pack/plugins/cloud_security_posture/server/tasks/findings_stats_task.ts
+++ b/x-pack/plugins/cloud_security_posture/server/tasks/findings_stats_task.ts
@@ -14,12 +14,7 @@ import {
import { SearchRequest } from '@kbn/data-plugin/common';
import { ElasticsearchClient } from '@kbn/core/server';
import type { Logger } from '@kbn/core/server';
-import {
- AggregatedFindingsByCluster,
- ScoreBucket,
- FindingsStatsTaskResult,
- TaskHealthStatus,
-} from './types';
+import { FindingsStatsTaskResult, TaskHealthStatus, ScoreByPolicyTemplateBucket } from './types';
import {
BENCHMARK_SCORE_INDEX_DEFAULT_NS,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
@@ -109,16 +104,81 @@ export function taskRunner(coreStartServices: CspServerPluginStartServices, logg
};
}
-const aggregateLatestFindings = async (
+const getScoreQuery = (): SearchRequest => ({
+ index: LATEST_FINDINGS_INDEX_DEFAULT_NS,
+ size: 0,
+ query: {
+ match_all: {},
+ },
+ aggs: {
+ score_by_policy_template: {
+ terms: {
+ // TODO: CIS AWS - replace with policy_template when available
+ field: 'rule.benchmark.id',
+ },
+ aggs: {
+ total_findings: {
+ value_count: {
+ field: 'result.evaluation',
+ },
+ },
+ passed_findings: {
+ filter: {
+ term: {
+ 'result.evaluation': 'passed',
+ },
+ },
+ },
+ failed_findings: {
+ filter: {
+ term: {
+ 'result.evaluation': 'failed',
+ },
+ },
+ },
+ score_by_cluster_id: {
+ terms: {
+ field: 'cluster_id',
+ },
+ aggregations: {
+ total_findings: {
+ value_count: {
+ field: 'result.evaluation',
+ },
+ },
+ passed_findings: {
+ filter: {
+ term: {
+ 'result.evaluation': 'passed',
+ },
+ },
+ },
+ failed_findings: {
+ filter: {
+ term: {
+ 'result.evaluation': 'failed',
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+});
+
+export const aggregateLatestFindings = async (
esClient: ElasticsearchClient,
stateRuns: number,
logger: Logger
): Promise => {
try {
const startAggTime = performance.now();
- const evaluationsQueryResult = await esClient.search(getScoreQuery());
+ const scoreIndexQueryResult = await esClient.search(
+ getScoreQuery()
+ );
- if (!evaluationsQueryResult.aggregations) {
+ if (!scoreIndexQueryResult.aggregations) {
logger.warn(`No data found in latest findings index`);
return 'warning';
}
@@ -130,31 +190,45 @@ const aggregateLatestFindings = async (
).toFixed(2)}ms]`
);
- const clustersStats = Object.fromEntries(
- evaluationsQueryResult.aggregations.score_by_cluster_id.buckets.map(
- (clusterStats: AggregatedFindingsByCluster) => {
+ // getting score per policy template buckets
+ const scoresByPolicyTemplatesBuckets =
+ scoreIndexQueryResult.aggregations.score_by_policy_template.buckets;
+
+ // iterating over the buckets and return promises which will index a modified document into the scores index
+ const docIndexingPromises = scoresByPolicyTemplatesBuckets.map((policyTemplateTrend) => {
+ // creating score per cluster id objects
+ const clustersStats = Object.fromEntries(
+ policyTemplateTrend.score_by_cluster_id.buckets.map((clusterStats) => {
+ const clusterId = clusterStats.key;
+
return [
- clusterStats.key,
+ clusterId,
{
total_findings: clusterStats.total_findings.value,
passed_findings: clusterStats.passed_findings.doc_count,
failed_findings: clusterStats.failed_findings.doc_count,
},
];
- }
- )
- );
+ })
+ );
+
+ // each document contains the policy template and its scores
+ return esClient.index({
+ index: BENCHMARK_SCORE_INDEX_DEFAULT_NS,
+ document: {
+ policy_template: policyTemplateTrend.key,
+ passed_findings: policyTemplateTrend.passed_findings.doc_count,
+ failed_findings: policyTemplateTrend.failed_findings.doc_count,
+ total_findings: policyTemplateTrend.total_findings.value,
+ score_by_cluster_id: clustersStats,
+ },
+ });
+ });
const startIndexTime = performance.now();
- await esClient.index({
- index: BENCHMARK_SCORE_INDEX_DEFAULT_NS,
- document: {
- passed_findings: evaluationsQueryResult.aggregations.passed_findings.doc_count,
- failed_findings: evaluationsQueryResult.aggregations.failed_findings.doc_count,
- total_findings: evaluationsQueryResult.aggregations.total_findings.value,
- score_by_cluster_id: clustersStats,
- },
- });
+
+ // executing indexing commands
+ await Promise.all(docIndexingPromises);
const totalIndexTime = Number(performance.now() - startIndexTime).toFixed(2);
logger.debug(
@@ -176,58 +250,3 @@ const aggregateLatestFindings = async (
return 'error';
}
};
-
-const getScoreQuery = (): SearchRequest => ({
- index: LATEST_FINDINGS_INDEX_DEFAULT_NS,
- size: 0,
- query: {
- match_all: {},
- },
- aggs: {
- total_findings: {
- value_count: {
- field: 'result.evaluation',
- },
- },
- passed_findings: {
- filter: {
- term: {
- 'result.evaluation': 'passed',
- },
- },
- },
- failed_findings: {
- filter: {
- term: {
- 'result.evaluation': 'failed',
- },
- },
- },
- score_by_cluster_id: {
- terms: {
- field: 'cluster_id',
- },
- aggregations: {
- total_findings: {
- value_count: {
- field: 'result.evaluation',
- },
- },
- passed_findings: {
- filter: {
- term: {
- 'result.evaluation': 'passed',
- },
- },
- },
- failed_findings: {
- filter: {
- term: {
- 'result.evaluation': 'failed',
- },
- },
- },
- },
- },
- },
-});
diff --git a/x-pack/plugins/cloud_security_posture/server/tasks/types.ts b/x-pack/plugins/cloud_security_posture/server/tasks/types.ts
index 783d534b7d550..0e2ab6f655d4b 100644
--- a/x-pack/plugins/cloud_security_posture/server/tasks/types.ts
+++ b/x-pack/plugins/cloud_security_posture/server/tasks/types.ts
@@ -5,18 +5,23 @@
* 2.0.
*/
-export interface AggregatedFindings {
- passed_findings: { doc_count: number };
- failed_findings: { doc_count: number };
- total_findings: { value: number };
-}
-
-export interface AggregatedFindingsByCluster extends AggregatedFindings {
- key: string;
-}
-export interface ScoreBucket extends AggregatedFindings {
- score_by_cluster_id: {
- buckets: AggregatedFindingsByCluster[];
+export interface ScoreByPolicyTemplateBucket {
+ score_by_policy_template: {
+ buckets: Array<{
+ key: string; // policy template
+ doc_count: number;
+ passed_findings: { doc_count: number };
+ failed_findings: { doc_count: number };
+ total_findings: { value: number };
+ score_by_cluster_id: {
+ buckets: Array<{
+ key: string; // cluster id
+ passed_findings: { doc_count: number };
+ failed_findings: { doc_count: number };
+ total_findings: { value: number };
+ }>;
+ };
+ }>;
};
}
diff --git a/x-pack/plugins/dashboard_enhanced/kibana.json b/x-pack/plugins/dashboard_enhanced/kibana.json
index eb9e5241503d1..0d5daf1574c5d 100644
--- a/x-pack/plugins/dashboard_enhanced/kibana.json
+++ b/x-pack/plugins/dashboard_enhanced/kibana.json
@@ -8,6 +8,19 @@
"server": true,
"ui": true,
"configPath": ["xpack", "dashboardEnhanced"],
- "requiredPlugins": ["dashboard", "data", "embeddable", "share", "uiActionsEnhanced", "unifiedSearch"],
- "requiredBundles": ["embeddable", "embeddableEnhanced", "kibanaReact", "kibanaUtils"]
+ "requiredPlugins": [
+ "dashboard",
+ "data",
+ "embeddable",
+ "share",
+ "uiActionsEnhanced",
+ "unifiedSearch"
+ ],
+ "requiredBundles": [
+ "embeddable",
+ "embeddableEnhanced",
+ "kibanaReact",
+ "kibanaUtils",
+ "imageEmbeddable"
+ ]
}
diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx
index 39c0b07ddd4ad..468cbaf9940a9 100644
--- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx
+++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/embeddable_to_dashboard_drilldown/embeddable_to_dashboard_drilldown.tsx
@@ -13,6 +13,7 @@ import { extractTimeRange } from '@kbn/es-query';
import { ApplyGlobalFilterActionContext } from '@kbn/unified-search-plugin/public';
import { IEmbeddable, EmbeddableInput } from '@kbn/embeddable-plugin/public';
import { EnhancedEmbeddableContext } from '@kbn/embeddable-enhanced-plugin/public';
+import { IMAGE_CLICK_TRIGGER } from '@kbn/image-embeddable-plugin/public';
import {
AbstractDashboardDrilldown,
AbstractDashboardDrilldownParams,
@@ -40,7 +41,7 @@ export type Params = AbstractDashboardDrilldownParams;
export class EmbeddableToDashboardDrilldown extends AbstractDashboardDrilldown {
public readonly id = EMBEDDABLE_TO_DASHBOARD_DRILLDOWN;
- public readonly supportedTriggers = () => [APPLY_FILTER_TRIGGER];
+ public readonly supportedTriggers = () => [APPLY_FILTER_TRIGGER, IMAGE_CLICK_TRIGGER];
protected async getLocation(
config: Config,
diff --git a/x-pack/plugins/dashboard_enhanced/tsconfig.json b/x-pack/plugins/dashboard_enhanced/tsconfig.json
index f5a6c6faaeb8c..dd5a78b87dc4f 100644
--- a/x-pack/plugins/dashboard_enhanced/tsconfig.json
+++ b/x-pack/plugins/dashboard_enhanced/tsconfig.json
@@ -22,6 +22,7 @@
"@kbn/es-query",
"@kbn/unified-search-plugin",
"@kbn/ui-actions-plugin",
+ "@kbn/image-embeddable-plugin"
],
"exclude": [
"target/**/*",
diff --git a/x-pack/plugins/data_visualizer/kibana.json b/x-pack/plugins/data_visualizer/kibana.json
index afc9fe34be640..98d27ba9f0481 100644
--- a/x-pack/plugins/data_visualizer/kibana.json
+++ b/x-pack/plugins/data_visualizer/kibana.json
@@ -26,6 +26,7 @@
],
"requiredBundles": [
"kibanaReact",
+ "kibanaUtils",
"maps",
"esUiShared",
"fieldFormats",
diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_content.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_content.tsx
index 09b59cf10abb5..4e3ed74c4470e 100644
--- a/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_content.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/common/components/document_count_content/document_count_content.tsx
@@ -22,7 +22,7 @@ import {
import { i18n } from '@kbn/i18n';
import { debounce, sortedIndex } from 'lodash';
import { FormattedMessage } from '@kbn/i18n-react';
-import { isDefined } from '../../util/is_defined';
+import { isDefined } from '@kbn/ml-is-defined';
import type { DocumentCountChartPoint } from './document_count_chart';
import {
RANDOM_SAMPLER_STEP,
diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx
index 387c41f2b44f9..9f84bb6d1debd 100644
--- a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx
@@ -14,9 +14,9 @@ import { RefreshInterval } from '@kbn/data-plugin/public';
import { FindFileStructureResponse } from '@kbn/file-upload-plugin/common';
import type { FileUploadPluginStart } from '@kbn/file-upload-plugin/public';
import { flatten } from 'lodash';
+import { isDefined } from '@kbn/ml-is-defined';
import { LinkCardProps } from '../link_card/link_card';
import { useDataVisualizerKibana } from '../../../kibana_context';
-import { isDefined } from '../../util/is_defined';
type LinkType = 'file' | 'index';
diff --git a/x-pack/plugins/data_visualizer/public/application/common/util/example_utils.ts b/x-pack/plugins/data_visualizer/public/application/common/util/example_utils.ts
index cc4a9a3ca9bfa..e3e97666844c4 100644
--- a/x-pack/plugins/data_visualizer/public/application/common/util/example_utils.ts
+++ b/x-pack/plugins/data_visualizer/public/application/common/util/example_utils.ts
@@ -6,7 +6,7 @@
*/
import { isPopulatedObject } from '@kbn/ml-is-populated-object';
-import { isDefined } from './is_defined';
+import { isDefined } from '@kbn/ml-is-defined';
import { GeoPointExample, LatLongExample } from '../../../../common/types/field_request_config';
export function isGeoPointExample(arg: unknown): arg is GeoPointExample {
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx
index fc2efab6610bc..a8f454816e2b6 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/actions_panel/actions_panel.tsx
@@ -14,12 +14,12 @@ import { i18n } from '@kbn/i18n';
import { EuiSpacer, EuiTitle } from '@elastic/eui';
import { DataView } from '@kbn/data-views-plugin/public';
import { useUrlState } from '@kbn/ml-url-state';
+import { isDefined } from '@kbn/ml-is-defined';
import { LinkCardProps } from '../../../common/components/link_card/link_card';
import { useDataVisualizerKibana } from '../../../kibana_context';
import { LinkCard } from '../../../common/components/link_card';
import { GetAdditionalLinks } from '../../../common/components/results_links';
-import { isDefined } from '../../../common/util/is_defined';
interface Props {
dataView: DataView;
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx
index 1cade1deaa59a..57c9f4fa18a40 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/full_time_range_selector/full_time_range_selector.tsx
@@ -23,9 +23,16 @@ import {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
+import { useStorage } from '@kbn/ml-local-storage';
import { setFullTimeRange } from './full_time_range_selector_service';
import { useDataVisualizerKibana } from '../../../kibana_context';
-import { DV_FROZEN_TIER_PREFERENCE, useStorage } from '../../hooks/use_storage';
+import {
+ DV_FROZEN_TIER_PREFERENCE,
+ FROZEN_TIER_PREFERENCE,
+ type DVKey,
+ type DVStorageMapped,
+ type FrozenTierPreference,
+} from '../../types/storage';
export const ML_FROZEN_TIER_PREFERENCE = 'ml.frozenDataTierPreference';
@@ -37,13 +44,6 @@ interface Props {
callback?: (a: any) => void;
}
-const FROZEN_TIER_PREFERENCE = {
- EXCLUDE: 'exclude-frozen',
- INCLUDE: 'include-frozen',
-} as const;
-
-type FrozenTierPreference = typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE];
-
// Component for rendering a button which automatically sets the range of the time filter
// to the time range of data in the index(es) mapped to the supplied Kibana data view or query.
export const FullTimeRangeSelector: FC = ({
@@ -83,7 +83,10 @@ export const FullTimeRangeSelector: FC = ({
const [isPopoverOpen, setPopover] = useState(false);
- const [frozenDataPreference, setFrozenDataPreference] = useStorage(
+ const [frozenDataPreference, setFrozenDataPreference] = useStorage<
+ DVKey,
+ DVStorageMapped
+ >(
DV_FROZEN_TIER_PREFERENCE,
// By default we will exclude frozen data tier
FROZEN_TIER_PREFERENCE.EXCLUDE
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx
index 8e13ce92a5c1e..9ec8b90d84f02 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_view.tsx
@@ -27,8 +27,13 @@ import { generateFilters } from '@kbn/data-plugin/public';
import { DataView, DataViewField } from '@kbn/data-views-plugin/public';
import { usePageUrlState, useUrlState } from '@kbn/ml-url-state';
+import { useStorage } from '@kbn/ml-local-storage';
import { useCurrentEuiTheme } from '../../../common/hooks/use_current_eui_theme';
-import { DV_RANDOM_SAMPLER_PREFERENCE, useStorage } from '../../hooks/use_storage';
+import {
+ DV_RANDOM_SAMPLER_PREFERENCE,
+ type DVKey,
+ type DVStorageMapped,
+} from '../../types/storage';
import { FullTimeRangeSelector } from '../full_time_range_selector';
import {
DataVisualizerTable,
@@ -58,7 +63,7 @@ import { DataVisualizerDataViewManagement } from '../data_view_management';
import { GetAdditionalLinks } from '../../../common/components/results_links';
import { useDataVisualizerGridData } from '../../hooks/use_data_visualizer_grid_data';
import { DataVisualizerGridInput } from '../../embeddables/grid_embeddable/grid_embeddable';
-import { RANDOM_SAMPLER_OPTION, RandomSamplerOption } from '../../constants/random_sampler';
+import { RANDOM_SAMPLER_OPTION } from '../../constants/random_sampler';
interface DataVisualizerPageState {
overallStats: OverallStats;
@@ -126,18 +131,17 @@ export interface IndexDataVisualizerViewProps {
export const IndexDataVisualizerView: FC = (dataVisualizerProps) => {
const euiTheme = useCurrentEuiTheme();
- const [savedRandomSamplerPreference, saveRandomSamplerPreference] =
- useStorage(
- DV_RANDOM_SAMPLER_PREFERENCE,
- RANDOM_SAMPLER_OPTION.ON_AUTOMATIC
- );
+ const [savedRandomSamplerPreference, saveRandomSamplerPreference] = useStorage<
+ DVKey,
+ DVStorageMapped
+ >(DV_RANDOM_SAMPLER_PREFERENCE, RANDOM_SAMPLER_OPTION.ON_AUTOMATIC);
const restorableDefaults = useMemo(
() =>
getDefaultDataVisualizerListState({
rndSamplerPref: savedRandomSamplerPreference,
}),
- // We just need to load the saved preference when the page is first loaded
+ // We just need to load the saved preference when the page is first loaded
// eslint-disable-next-line react-hooks/exhaustive-deps
[]
);
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx
index b6981bf996da2..ee4a002071b3f 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/search_panel/search_panel.tsx
@@ -12,7 +12,7 @@ import { i18n } from '@kbn/i18n';
import { Query, Filter } from '@kbn/es-query';
import type { TimeRange } from '@kbn/es-query';
import { DataView, DataViewField } from '@kbn/data-views-plugin/public';
-import { isDefined } from '../../../common/util/is_defined';
+import { isDefined } from '@kbn/ml-is-defined';
import { DataVisualizerFieldNamesFilter } from './field_name_filter';
import { DataVisualizerFieldTypeFilter } from './field_type_filter';
import { SupportedFieldType } from '../../../../../common/types';
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_storage.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_storage.ts
deleted file mode 100644
index cd09967a81fa0..0000000000000
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_storage.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; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import { useCallback, useState } from 'react';
-import { useDataVisualizerKibana } from '../../kibana_context';
-
-export const DV_FROZEN_TIER_PREFERENCE = 'dataVisualizer.frozenDataTierPreference';
-export const DV_RANDOM_SAMPLER_PREFERENCE = 'dataVisualizer.randomSamplerPreference';
-export const DV_RANDOM_SAMPLER_P_VALUE = 'dataVisualizer.randomSamplerPValue';
-
-export type DV = Partial<{
- [DV_FROZEN_TIER_PREFERENCE]: 'exclude_frozen' | 'include_frozen';
- [DV_RANDOM_SAMPLER_PREFERENCE]: 'true' | 'false';
- [DV_RANDOM_SAMPLER_P_VALUE]: number;
-}> | null;
-
-export type DVKey = keyof Exclude;
-
-/**
- * Hook for accessing and changing a value in the storage.
- * @param key - Storage key
- * @param initValue
- */
-export function useStorage(key: DVKey, initValue?: T): [T, (value: T) => void] {
- const {
- services: { storage },
- } = useDataVisualizerKibana();
-
- const [val, setVal] = useState(storage.get(key) ?? initValue);
-
- const setStorage = useCallback(
- (value: T): void => {
- try {
- storage.set(key, value);
- setVal(value);
- } catch (e) {
- throw new Error('Unable to update storage with provided value');
- }
- },
- [key, storage]
- );
-
- return [val, setStorage];
-}
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx
index 671d410523fdd..156898449ee79 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx
@@ -13,7 +13,9 @@ import { EuiResizeObserver } from '@elastic/eui';
import { encode } from '@kbn/rison';
import { SimpleSavedObject } from '@kbn/core/public';
import { i18n } from '@kbn/i18n';
+import { Storage } from '@kbn/kibana-utils-plugin/public';
import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
+import { StorageContextProvider } from '@kbn/ml-local-storage';
import { DataView } from '@kbn/data-views-plugin/public';
import { getNestedProperty } from '@kbn/ml-nested-property';
import {
@@ -34,6 +36,9 @@ import { GetAdditionalLinks } from '../common/components/results_links';
import { DATA_VISUALIZER_APP_LOCATOR, IndexDataVisualizerLocatorParams } from './locator';
import { DATA_VISUALIZER_INDEX_VIEWER } from './constants/index_data_visualizer_viewer';
import { INDEX_DATA_VISUALIZER_NAME } from '../common/constants';
+import { DV_STORAGE_KEYS } from './types/storage';
+
+const localStorage = new Storage(window.localStorage);
export interface DataVisualizerStateContextProviderProps {
IndexDataVisualizerComponent: FC;
@@ -316,10 +321,12 @@ export const IndexDataVisualizer: FC<{
return (
-
+
+
+
);
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_document_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_document_stats.ts
index f74a8800d2bd0..e6fc220ea7f3c 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_document_stats.ts
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_document_stats.ts
@@ -10,7 +10,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { isPopulatedObject } from '@kbn/ml-is-populated-object';
import { DataPublicPluginStart, ISearchOptions } from '@kbn/data-plugin/public';
import seedrandom from 'seedrandom';
-import { isDefined } from '../../../common/util/is_defined';
+import { isDefined } from '@kbn/ml-is-defined';
import { RANDOM_SAMPLER_PROBABILITIES } from '../../constants/random_sampler';
import { buildBaseFilterCriteria } from '../../../../../common/utils/query_utils';
import type {
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_numeric_field_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_numeric_field_stats.ts
index 66a7134919760..20143f5fc1581 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_numeric_field_stats.ts
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/requests/get_numeric_field_stats.ts
@@ -17,8 +17,8 @@ import type {
} from '@kbn/data-plugin/common';
import type { ISearchStart } from '@kbn/data-plugin/public';
import { isPopulatedObject } from '@kbn/ml-is-populated-object';
+import { isDefined } from '@kbn/ml-is-defined';
import { processTopValues } from './utils';
-import { isDefined } from '../../../common/util/is_defined';
import { buildAggregationWithSamplingOption } from './build_random_sampler_agg';
import { MAX_PERCENT, PERCENTILE_SPACING, SAMPLER_TOP_TERMS_THRESHOLD } from './constants';
import type {
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/types/storage.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/types/storage.ts
new file mode 100644
index 0000000000000..f2718bc8e803f
--- /dev/null
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/types/storage.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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { RandomSamplerOption } from '../constants/random_sampler';
+
+export const DV_FROZEN_TIER_PREFERENCE = 'dataVisualizer.frozenDataTierPreference';
+export const DV_RANDOM_SAMPLER_PREFERENCE = 'dataVisualizer.randomSamplerPreference';
+export const DV_RANDOM_SAMPLER_P_VALUE = 'dataVisualizer.randomSamplerPValue';
+
+export const FROZEN_TIER_PREFERENCE = {
+ EXCLUDE: 'exclude-frozen',
+ INCLUDE: 'include-frozen',
+} as const;
+
+export type FrozenTierPreference =
+ typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE];
+
+export type DV = Partial<{
+ [DV_FROZEN_TIER_PREFERENCE]: FrozenTierPreference;
+ [DV_RANDOM_SAMPLER_PREFERENCE]: RandomSamplerOption;
+ [DV_RANDOM_SAMPLER_P_VALUE]: number;
+}> | null;
+
+export type DVKey = keyof Exclude;
+
+export type DVStorageMapped = T extends typeof DV_FROZEN_TIER_PREFERENCE
+ ? FrozenTierPreference | undefined
+ : T extends typeof DV_RANDOM_SAMPLER_PREFERENCE
+ ? RandomSamplerOption | undefined
+ : T extends typeof DV_RANDOM_SAMPLER_P_VALUE
+ ? number | undefined
+ : null;
+
+export const DV_STORAGE_KEYS = [
+ DV_FROZEN_TIER_PREFERENCE,
+ DV_RANDOM_SAMPLER_PREFERENCE,
+ DV_RANDOM_SAMPLER_P_VALUE,
+] as const;
diff --git a/x-pack/plugins/data_visualizer/tsconfig.json b/x-pack/plugins/data_visualizer/tsconfig.json
index b6c5477266e4c..3098da0f61bc2 100644
--- a/x-pack/plugins/data_visualizer/tsconfig.json
+++ b/x-pack/plugins/data_visualizer/tsconfig.json
@@ -52,6 +52,8 @@
"@kbn/field-types",
"@kbn/ml-nested-property",
"@kbn/ml-url-state",
+ "@kbn/ml-local-storage",
+ "@kbn/ml-is-defined",
],
"exclude": [
"target/**/*",
diff --git a/x-pack/plugins/drilldowns/url_drilldown/kibana.json b/x-pack/plugins/drilldowns/url_drilldown/kibana.json
index 83ea4b7be54bf..8e7c290cfd185 100644
--- a/x-pack/plugins/drilldowns/url_drilldown/kibana.json
+++ b/x-pack/plugins/drilldowns/url_drilldown/kibana.json
@@ -9,5 +9,5 @@
},
"description": "Adds drilldown implementations to Kibana",
"requiredPlugins": ["embeddable", "uiActions", "uiActionsEnhanced"],
- "requiredBundles": ["kibanaUtils", "kibanaReact"]
+ "requiredBundles": ["kibanaUtils", "kibanaReact", "imageEmbeddable"]
}
diff --git a/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx b/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx
index f1a25398c7e4c..6f16c47df15df 100644
--- a/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx
+++ b/x-pack/plugins/drilldowns/url_drilldown/public/lib/url_drilldown.tsx
@@ -15,6 +15,7 @@ import {
SELECT_RANGE_TRIGGER,
VALUE_CLICK_TRIGGER,
} from '@kbn/embeddable-plugin/public';
+import { IMAGE_CLICK_TRIGGER } from '@kbn/image-embeddable-plugin/public';
import { ActionExecutionContext, ROW_CLICK_TRIGGER } from '@kbn/ui-actions-plugin/public';
import type { Query, Filter, TimeRange } from '@kbn/es-query';
import type {
@@ -65,7 +66,8 @@ export type UrlTrigger =
| typeof VALUE_CLICK_TRIGGER
| typeof SELECT_RANGE_TRIGGER
| typeof ROW_CLICK_TRIGGER
- | typeof CONTEXT_MENU_TRIGGER;
+ | typeof CONTEXT_MENU_TRIGGER
+ | typeof IMAGE_CLICK_TRIGGER;
export interface ActionFactoryContext extends BaseActionFactoryContext {
embeddable?: EmbeddableWithQueryInput;
@@ -110,7 +112,13 @@ export class UrlDrilldown implements Drilldown = ({
@@ -231,6 +239,7 @@ export class UrlDrilldown implements Drilldown {
events: [
{
eventId: '1',
- triggers: [OTHER_TRIGGER],
+ triggers: [OTHER_TRIGGER, VALUE_CLICK_TRIGGER],
+ action: {
+ factoryId: 'DASHBOARD_TO_DASHBOARD_DRILLDOWN',
+ name: '',
+ config: {},
+ },
+ },
+ {
+ eventId: '3',
+ triggers: [OTHER_TRIGGER, SELECT_RANGE_TRIGGER],
action: {
factoryId: 'DASHBOARD_TO_DASHBOARD_DRILLDOWN',
name: '',
@@ -561,7 +575,7 @@ describe('EmbeddableActionStorage', () => {
},
},
{
- eventId: '2',
+ eventId: '3',
triggers: [OTHER_TRIGGER],
action: {
factoryId: 'SOME_OTHER',
@@ -575,9 +589,10 @@ describe('EmbeddableActionStorage', () => {
});
const storage = new EmbeddableActionStorage(embeddable);
- const [event1, event2] = await storage.list();
- expect(event1.triggers).toEqual([APPLY_FILTER_TRIGGER]);
- expect(event2.triggers).toEqual([OTHER_TRIGGER]);
+ const [event1, event2, event3] = await storage.list();
+ expect(event1.triggers).toEqual([OTHER_TRIGGER, APPLY_FILTER_TRIGGER]);
+ expect(event2.triggers).toEqual([OTHER_TRIGGER, APPLY_FILTER_TRIGGER]);
+ expect(event3.triggers).toEqual([OTHER_TRIGGER]);
});
});
});
diff --git a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts b/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts
index 63291f652d3f3..2eebc52ba55cf 100644
--- a/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts
+++ b/x-pack/plugins/embeddable_enhanced/public/embeddables/embeddable_action_storage.ts
@@ -11,7 +11,13 @@ import {
UiActionsEnhancedAbstractActionStorage as AbstractActionStorage,
UiActionsEnhancedSerializedEvent as SerializedEvent,
} from '@kbn/ui-actions-enhanced-plugin/public';
-import { EmbeddableInput, EmbeddableOutput, IEmbeddable } from '@kbn/embeddable-plugin/public';
+import {
+ EmbeddableInput,
+ EmbeddableOutput,
+ IEmbeddable,
+ VALUE_CLICK_TRIGGER,
+ SELECT_RANGE_TRIGGER,
+} from '@kbn/embeddable-plugin/public';
export interface EmbeddableWithDynamicActionsInput extends EmbeddableInput {
enhancements?: {
@@ -114,16 +120,26 @@ export class EmbeddableActionStorage extends AbstractActionStorage {
return this.migrate(events);
}
- // TODO: https://github.com/elastic/kibana/issues/71431
+ // TODO: https://github.com/elastic/kibana/issues/148005
// Migration implementation should use registry
// Action factories implementations should register own migrations
private migrate(events: SerializedEvent[]): SerializedEvent[] {
return events.map((event) => {
// Initially dashboard drilldown relied on VALUE_CLICK & RANGE_SELECT
if (event.action.factoryId === 'DASHBOARD_TO_DASHBOARD_DRILLDOWN') {
+ const migratedTriggers = event.triggers.filter(
+ (t) => t !== VALUE_CLICK_TRIGGER && t !== SELECT_RANGE_TRIGGER
+ );
+ if (
+ migratedTriggers.length !== event.triggers.length &&
+ !migratedTriggers.includes(`FILTER_TRIGGER`)
+ ) {
+ migratedTriggers.push(`FILTER_TRIGGER`);
+ }
+
return {
...event,
- triggers: ['FILTER_TRIGGER'],
+ triggers: migratedTriggers,
};
}
return event;
diff --git a/x-pack/plugins/enterprise_search/README.md b/x-pack/plugins/enterprise_search/README.md
index 76160d3fcc8db..5694258001dd4 100644
--- a/x-pack/plugins/enterprise_search/README.md
+++ b/x-pack/plugins/enterprise_search/README.md
@@ -49,11 +49,14 @@ To debug Kea state in-browser, Kea recommends [Redux Devtools](https://v2.keajs.
Documentation: https://www.elastic.co/guide/en/kibana/current/development-tests.html#_unit_testing
-Jest tests can be run directly from the `x-pack/plugins/enterprise_search` folder. This also works for any subfolders or subcomponents.
+Jest tests can be run from the root kibana directory, however, since the tests take so long to run you will likely want to apply the appropriate Jest configuration file to test only your changes. For example:
+- `x-pack/plugins/enterprise_search/common/jest.config.js`
+- `x-pack/plugins/enterprise_search/public/jest.config.js`
+- `x-pack/plugins/enterprise_search/server/jest.config.js`
```bash
-yarn test:jest
-yarn test:jest --watch
+yarn test:jest --config {YOUR_JEST_CONFIG_FILE}
+yarn test:jest --config {YOUR_JEST_CONFIG_FILE} --watch
```
Unfortunately coverage collection does not work as automatically, and requires using our handy jest.sh script if you want to run tests on a specific file or folder and only get coverage numbers for that file or folder:
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/api/delete_analytics_collection/delete_analytics_collection_api_logic.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/api/delete_analytics_collection/delete_analytics_collection_api_logic.tsx
index bdc01e65e95f7..1cd07433721d5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/api/delete_analytics_collection/delete_analytics_collection_api_logic.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/api/delete_analytics_collection/delete_analytics_collection_api_logic.tsx
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -20,5 +22,11 @@ export const deleteAnalyticsCollection = async ({ id }: { id: string }) => {
export const DeleteAnalyticsCollectionAPILogic = createApiLogic(
['analytics', 'delete_analytics_collection_api_logic'],
- deleteAnalyticsCollection
+ deleteAnalyticsCollection,
+ {
+ showSuccessFlashFn: () =>
+ i18n.translate('xpack.enterpriseSearch.analytics.collectionsDelete.action.successMessage', {
+ defaultMessage: 'The collection has been successfully deleted',
+ }),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/add_analytics_collections/add_analytics_collection_logic.ts b/x-pack/plugins/enterprise_search/public/applications/analytics/components/add_analytics_collections/add_analytics_collection_logic.ts
index 2e71bee479e68..1e97b48975d68 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/add_analytics_collections/add_analytics_collection_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/add_analytics_collections/add_analytics_collection_logic.ts
@@ -13,7 +13,7 @@ import { Status } from '../../../../../common/types/api';
import { Actions } from '../../../shared/api_logic/create_api_logic';
import { generateEncodedPath } from '../../../shared/encode_path_params';
-import { flashAPIErrors, flashSuccessToast } from '../../../shared/flash_messages';
+import { flashSuccessToast } from '../../../shared/flash_messages';
import { KibanaLogic } from '../../../shared/kibana';
import {
AddAnalyticsCollectionsAPILogic,
@@ -59,7 +59,6 @@ export const AddAnalyticsCollectionLogic = kea<
values: [AddAnalyticsCollectionsAPILogic, ['status']],
},
listeners: ({ values, actions }) => ({
- apiError: (error) => flashAPIErrors(error),
apiSuccess: async ({ name, id }, breakpoint) => {
// Wait for propagation of the new collection
flashSuccessToast(
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx
index 3d9988fef12ea..136617db09112 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_javascript_client_embed.tsx
@@ -58,10 +58,10 @@ export const javascriptClientEmbedSteps = (analyticsDNSUrl: string) => [
{`import {
-createTracker,
-trackPageView,
-trackEvent,
-} from "@elastic/behavioural-analytics-javascript-tracker";`}
+ createTracker,
+ trackPageView,
+ trackEvent,
+} from "@elastic/behavioral-analytics-javascript-tracker";`}
>
@@ -82,7 +82,7 @@ trackEvent,
'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.javascriptClientEmbed.stepThree.description',
{
defaultMessage:
- ' Use createTracker method to initialize the tracker with your DSN. You will then be able to use the tracker to send events to Behavioural Analytics.',
+ ' Use createTracker method to initialize the tracker with your DSN. You will then be able to use the tracker to send events to Behavioral Analytics.',
}
)}
@@ -91,7 +91,7 @@ trackEvent,
'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.javascriptClientEmbed.stepThree.descriptionTwo',
{
defaultMessage:
- 'Once you have called createTracker, you can use the tracker methods such as trackPageView to send events to Behavioural Analytics.',
+ 'Once you have called createTracker, you can use the tracker methods such as trackPageView to send events to Behavioral Analytics.',
}
)}
@@ -119,7 +119,7 @@ trackEvent,
'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.javascriptClientEmbed.stepFour.description',
{
defaultMessage:
- 'Once you have called createTracker, you can use the tracker methods such as trackPageView to send events to Behavioural Analytics.',
+ 'Once you have called createTracker, you can use the tracker methods such as trackPageView to send events to Behavioral Analytics.',
}
)}
@@ -133,7 +133,9 @@ trackEvent,
)}
- {`// track a page view in React
+ {`import { useEffect } from 'react';
+
+// track a page view in React
const SearchPage = (props) => {
useEffect(() => {
@@ -153,13 +155,13 @@ const SearchPage = (props) => {
'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.javascriptClientEmbed.stepFour.descriptionThree',
{
defaultMessage:
- 'You can also dispatch custom events to Behavioural Analytics by calling the trackEvent method.',
+ 'You can also dispatch custom events to Behavioral Analytics by calling the trackEvent method.',
}
)}
{`// track a custom event in React
-import { trackEvent } from '@elastic/behavioural-analytics-javascript-tracker';
+import { trackEvent } from '@elastic/behavioral-analytics-javascript-tracker';
const ProductDetailPage = (props) => {
@@ -173,11 +175,9 @@ const ProductDetailPage = (props) => {
label: "product_id",
value: "123"
})
- }} />
- }}>Add to Basket
+ }} value="Add to Basket"/>
- )
- }
+ )
}`}
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_searchui.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_searchui.tsx
index b12dbc6e45773..cae8799544033 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_searchui.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/analytics_collection_integrate/analytics_collection_integrate_searchui.tsx
@@ -106,7 +106,7 @@ export const searchUIEmbedSteps = (setSelectedTab: (tab: TabKey) => void) => [
'xpack.enterpriseSearch.analytics.collections.collectionsView.integrateTab.searchui.stepTwo.setupDescription',
{
defaultMessage:
- 'Finally, add the plugin to your Search UI configuration. Depending on how you have embedded Behavioural analytics, you may need to pass in the client. The example below shows how to pass in the client when using the Javascript client.',
+ 'Finally, add the plugin to your Search UI configuration. Depending on how you have embedded Behavioral analytics, you may need to pass in the client. The example below shows how to pass in the client when using the Javascript client.',
}
)}
@@ -116,9 +116,11 @@ import { getTracker } from "@elastic/behavioral-analytics-tracker";
const searchUIConfig = {
...
-plugins: [AnalyticsPlugin(
-client: getTracker();
-)],
+plugins: [
+ AnalyticsPlugin({
+ client: getTracker();
+ })
+],
...
}`}
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/delete_analytics_collection_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/delete_analytics_collection_logic.test.ts
index 0e5db4adacb54..7db951a31ea93 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/delete_analytics_collection_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/delete_analytics_collection_logic.test.ts
@@ -14,7 +14,7 @@ import {
import { nextTick } from '@kbn/test-jest-helpers';
import { AnalyticsCollection } from '../../../../../common/types/analytics';
-import { HttpError, Status } from '../../../../../common/types/api';
+import { Status } from '../../../../../common/types/api';
import { DeleteAnalyticsCollectionLogic } from './delete_analytics_collection_logic';
@@ -48,12 +48,6 @@ describe('deleteAnalyticsCollectionLogic', () => {
expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1);
});
- it('calls flashAPIErrors on apiError', () => {
- DeleteAnalyticsCollectionLogic.actions.apiError({} as HttpError);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({});
- });
-
it('calls makeRequest on deleteAnalyticsCollections', async () => {
const collectionName = 'name';
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/delete_analytics_collection_logic.ts b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/delete_analytics_collection_logic.ts
index 1804dbe7f4fc2..f78e8ee76aff4 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/delete_analytics_collection_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/delete_analytics_collection_logic.ts
@@ -7,16 +7,9 @@
import { kea, MakeLogicType } from 'kea';
-import { i18n } from '@kbn/i18n';
-
import { AnalyticsCollection } from '../../../../../common/types/analytics';
import { Status } from '../../../../../common/types/api';
import { Actions } from '../../../shared/api_logic/create_api_logic';
-import {
- flashAPIErrors,
- clearFlashMessages,
- flashSuccessToast,
-} from '../../../shared/flash_messages';
import { KibanaLogic } from '../../../shared/kibana';
import {
DeleteAnalyticsCollectionAPILogic,
@@ -25,7 +18,6 @@ import {
import { ROOT_PATH } from '../../routes';
export interface DeleteAnalyticsCollectionActions {
- apiError: Actions<{}, DeleteAnalyticsCollectionApiLogicResponse>['apiError'];
apiSuccess: Actions<{}, DeleteAnalyticsCollectionApiLogicResponse>['apiSuccess'];
deleteAnalyticsCollection(id: string): { id: string };
makeRequest: Actions<{}, DeleteAnalyticsCollectionApiLogicResponse>['makeRequest'];
@@ -43,17 +35,11 @@ export const DeleteAnalyticsCollectionLogic = kea<
deleteAnalyticsCollection: (id) => ({ id }),
},
connect: {
- actions: [DeleteAnalyticsCollectionAPILogic, ['makeRequest', 'apiSuccess', 'apiError']],
+ actions: [DeleteAnalyticsCollectionAPILogic, ['makeRequest', 'apiSuccess']],
values: [DeleteAnalyticsCollectionAPILogic, ['status']],
},
listeners: ({ actions }) => ({
- apiError: (e) => flashAPIErrors(e),
- apiSuccess: async (undefined, breakpoint) => {
- flashSuccessToast(
- i18n.translate('xpack.enterpriseSearch.analytics.collectionsDelete.action.successMessage', {
- defaultMessage: 'The collection has been successfully deleted',
- })
- );
+ apiSuccess: async (_, breakpoint) => {
// Wait for propagation of the collection deletion
await breakpoint(1000);
KibanaLogic.values.navigateToUrl(ROOT_PATH);
@@ -61,7 +47,6 @@ export const DeleteAnalyticsCollectionLogic = kea<
deleteAnalyticsCollection: ({ id }) => {
actions.makeRequest({ id });
},
- makeRequest: () => clearFlashMessages(),
}),
path: ['enterprise_search', 'analytics', 'collections', 'delete'],
selectors: ({ selectors }) => ({
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/fetch_analytics_collection_logic.test.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/fetch_analytics_collection_logic.test.tsx
index efd6993a8411e..89c422da5739d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/fetch_analytics_collection_logic.test.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/fetch_analytics_collection_logic.test.tsx
@@ -10,14 +10,18 @@ import { LogicMounter, mockFlashMessageHelpers } from '../../../__mocks__/kea_lo
import { AnalyticsCollection } from '../../../../../common/types/analytics';
import { HttpError, Status } from '../../../../../common/types/api';
+import { FetchAnalyticsCollectionAPILogic } from '../../api/fetch_analytics_collection/fetch_analytics_collection_api_logic';
+
import { FetchAnalyticsCollectionLogic } from './fetch_analytics_collection_logic';
describe('fetchAnalyticsCollectionLogic', () => {
+ const { mount: apiLogicMount } = new LogicMounter(FetchAnalyticsCollectionAPILogic);
const { mount } = new LogicMounter(FetchAnalyticsCollectionLogic);
beforeEach(() => {
jest.clearAllMocks();
jest.useRealTimers();
+ apiLogicMount();
mount();
});
@@ -39,7 +43,7 @@ describe('fetchAnalyticsCollectionLogic', () => {
});
it('calls flashAPIErrors on apiError', () => {
- FetchAnalyticsCollectionLogic.actions.apiError({} as HttpError);
+ FetchAnalyticsCollectionAPILogic.actions.apiError({} as HttpError);
expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({});
});
@@ -58,7 +62,7 @@ describe('fetchAnalyticsCollectionLogic', () => {
describe('selectors', () => {
describe('analyticsCollections', () => {
it('updates when apiSuccess listener triggered', () => {
- FetchAnalyticsCollectionLogic.actions.apiSuccess({} as AnalyticsCollection);
+ FetchAnalyticsCollectionAPILogic.actions.apiSuccess({} as AnalyticsCollection);
expect(FetchAnalyticsCollectionLogic.values).toEqual({
...DEFAULT_VALUES,
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/fetch_analytics_collection_logic.ts b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/fetch_analytics_collection_logic.ts
index bf9af189d79cc..6f9ab441716d4 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/fetch_analytics_collection_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_collection_view/fetch_analytics_collection_logic.ts
@@ -10,15 +10,12 @@ import { kea, MakeLogicType } from 'kea';
import { AnalyticsCollection } from '../../../../../common/types/analytics';
import { Status } from '../../../../../common/types/api';
import { Actions } from '../../../shared/api_logic/create_api_logic';
-import { flashAPIErrors, clearFlashMessages } from '../../../shared/flash_messages';
import {
FetchAnalyticsCollectionAPILogic,
FetchAnalyticsCollectionApiLogicResponse,
} from '../../api/fetch_analytics_collection/fetch_analytics_collection_api_logic';
export interface FetchAnalyticsCollectionActions {
- apiError: Actions<{}, FetchAnalyticsCollectionApiLogicResponse>['apiError'];
- apiSuccess: Actions<{}, FetchAnalyticsCollectionApiLogicResponse>['apiSuccess'];
fetchAnalyticsCollection(name: string): AnalyticsCollection;
makeRequest: Actions<{}, FetchAnalyticsCollectionApiLogicResponse>['makeRequest'];
}
@@ -36,15 +33,13 @@ export const FetchAnalyticsCollectionLogic = kea<
fetchAnalyticsCollection: (id) => ({ id }),
},
connect: {
- actions: [FetchAnalyticsCollectionAPILogic, ['makeRequest', 'apiSuccess', 'apiError']],
+ actions: [FetchAnalyticsCollectionAPILogic, ['makeRequest']],
values: [FetchAnalyticsCollectionAPILogic, ['data', 'status']],
},
listeners: ({ actions }) => ({
- apiError: (e) => flashAPIErrors(e),
fetchAnalyticsCollection: ({ id }) => {
actions.makeRequest({ id });
},
- makeRequest: () => clearFlashMessages(),
}),
path: ['enterprise_search', 'analytics', 'collection'],
selectors: ({ selectors }) => ({
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.test.ts
index 0089b30dc8cf1..888ab558f3006 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.test.ts
@@ -10,14 +10,18 @@ import { LogicMounter, mockFlashMessageHelpers } from '../../../__mocks__/kea_lo
import { AnalyticsCollection } from '../../../../../common/types/analytics';
import { HttpError, Status } from '../../../../../common/types/api';
+import { FetchAnalyticsCollectionsAPILogic } from '../../api/index/fetch_analytics_collections_api_logic';
+
import { AnalyticsCollectionsLogic } from './analytics_collections_logic';
describe('analyticsCollectionsLogic', () => {
+ const { mount: apiMount } = new LogicMounter(FetchAnalyticsCollectionsAPILogic);
const { mount } = new LogicMounter(AnalyticsCollectionsLogic);
beforeEach(() => {
jest.clearAllMocks();
jest.useRealTimers();
+ apiMount();
mount();
});
@@ -36,7 +40,7 @@ describe('analyticsCollectionsLogic', () => {
describe('reducers', () => {
describe('hasNoAnalyticsCollections', () => {
it('updates to true when apiSuccess returns empty analytics collections array', () => {
- AnalyticsCollectionsLogic.actions.apiSuccess([]);
+ FetchAnalyticsCollectionsAPILogic.actions.apiSuccess([]);
expect(AnalyticsCollectionsLogic.values.hasNoAnalyticsCollections).toBe(true);
expect(AnalyticsCollectionsLogic.values).toEqual({
...DEFAULT_VALUES,
@@ -57,7 +61,7 @@ describe('analyticsCollectionsLogic', () => {
name: 'collection1',
},
];
- AnalyticsCollectionsLogic.actions.apiSuccess(collections);
+ FetchAnalyticsCollectionsAPILogic.actions.apiSuccess(collections);
expect(AnalyticsCollectionsLogic.values.hasNoAnalyticsCollections).toBe(false);
expect(AnalyticsCollectionsLogic.values).toEqual({
...DEFAULT_VALUES,
@@ -77,7 +81,7 @@ describe('analyticsCollectionsLogic', () => {
});
it('calls flashAPIErrors on apiError', () => {
- AnalyticsCollectionsLogic.actions.apiError({} as HttpError);
+ FetchAnalyticsCollectionsAPILogic.actions.apiError({} as HttpError);
expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({});
});
@@ -92,7 +96,7 @@ describe('analyticsCollectionsLogic', () => {
describe('selectors', () => {
describe('analyticsCollections', () => {
it('updates when apiSuccess listener triggered', () => {
- AnalyticsCollectionsLogic.actions.apiSuccess([]);
+ FetchAnalyticsCollectionsAPILogic.actions.apiSuccess([]);
expect(AnalyticsCollectionsLogic.values).toEqual({
...DEFAULT_VALUES,
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.ts b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.ts
index 5736680893b2b..aa12b92b0f177 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_collections_logic.ts
@@ -10,15 +10,12 @@ import { kea, MakeLogicType } from 'kea';
import { AnalyticsCollection } from '../../../../../common/types/analytics';
import { Status } from '../../../../../common/types/api';
import { Actions } from '../../../shared/api_logic/create_api_logic';
-import { flashAPIErrors, clearFlashMessages } from '../../../shared/flash_messages';
import {
FetchAnalyticsCollectionsAPILogic,
FetchAnalyticsCollectionsApiLogicResponse,
} from '../../api/index/fetch_analytics_collections_api_logic';
export interface AnalyticsCollectionsActions {
- apiError: Actions<{}, FetchAnalyticsCollectionsApiLogicResponse>['apiError'];
- apiSuccess: Actions<{}, FetchAnalyticsCollectionsApiLogicResponse>['apiSuccess'];
fetchAnalyticsCollections(): void;
makeRequest: Actions<{}, FetchAnalyticsCollectionsApiLogicResponse>['makeRequest'];
}
@@ -37,15 +34,13 @@ export const AnalyticsCollectionsLogic = kea<
fetchAnalyticsCollections: () => {},
},
connect: {
- actions: [FetchAnalyticsCollectionsAPILogic, ['makeRequest', 'apiSuccess', 'apiError']],
+ actions: [FetchAnalyticsCollectionsAPILogic, ['makeRequest']],
values: [FetchAnalyticsCollectionsAPILogic, ['data', 'status']],
},
listeners: ({ actions }) => ({
- apiError: (e) => flashAPIErrors(e),
fetchAnalyticsCollections: () => {
actions.makeRequest({});
},
- makeRequest: () => clearFlashMessages(),
}),
path: ['enterprise_search', 'analytics', 'collections'],
selectors: ({ selectors }) => ({
diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_overview.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_overview.tsx
index 0fd3518240fbb..39ab22a675c42 100644
--- a/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_overview.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/analytics/components/analytics_overview/analytics_overview.tsx
@@ -44,7 +44,7 @@ export const AnalyticsOverview: React.FC = () => {
}
),
pageTitle: i18n.translate('xpack.enterpriseSearch.analytics.collections.pageTitle', {
- defaultMessage: 'Behaviorial Analytics',
+ defaultMessage: 'Behavioral Analytics',
}),
}}
>
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/cancel_syncs_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/cancel_syncs_api_logic.ts
index 297e26f2c05ec..53324ceb9f635 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/cancel_syncs_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/cancel_syncs_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -17,4 +19,9 @@ export const cancelSyncs = async ({ connectorId }: CancelSyncsApiArgs) => {
return await HttpLogic.values.http.post(route);
};
-export const CancelSyncsApiLogic = createApiLogic(['cancel_syncs_api_logic'], cancelSyncs);
+export const CancelSyncsApiLogic = createApiLogic(['cancel_syncs_api_logic'], cancelSyncs, {
+ showSuccessFlashFn: () =>
+ i18n.translate('xpack.enterpriseSearch.content.searchIndex.cancelSyncs.successMessage', {
+ defaultMessage: 'Successfully canceled syncs',
+ }),
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/start_sync_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/start_sync_api_logic.ts
index 4a97edfa528a8..20e51228114a5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/start_sync_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/start_sync_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
import { CrawlRequestOverrides } from '../../components/search_index/crawler/crawler_logic';
@@ -23,4 +25,9 @@ export const startSync = async ({ connectorId, nextSyncConfig }: StartSyncArgs)
});
};
-export const StartSyncApiLogic = createApiLogic(['start_sync_api_logic'], startSync);
+export const StartSyncApiLogic = createApiLogic(['start_sync_api_logic'], startSync, {
+ showSuccessFlashFn: () =>
+ i18n.translate('xpack.enterpriseSearch.content.searchIndex.index.syncSuccess.message', {
+ defaultMessage: 'Successfully scheduled a sync, waiting for a connector to pick it up',
+ }),
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_configuration_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_configuration_api_logic.ts
index 2b3b86b296ea1..79294d60b5af0 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_configuration_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_configuration_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { ConnectorConfiguration } from '../../../../../common/types/connectors';
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -35,5 +37,12 @@ export const postConnectorConfiguration = async ({
export const ConnectorConfigurationApiLogic = createApiLogic(
['content', 'configuration_connector_api_logic'],
- postConnectorConfiguration
+ postConnectorConfiguration,
+ {
+ showSuccessFlashFn: () =>
+ i18n.translate(
+ 'xpack.enterpriseSearch.content.indices.configurationConnector.configuration.successToast.title',
+ { defaultMessage: 'Configuration updated' }
+ ),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_filtering_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_filtering_api_logic.ts
index 3f1a668203615..023d06b8f957b 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_filtering_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_filtering_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { FilteringRule, FilteringRules } from '../../../../../common/types/connectors';
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -34,5 +36,12 @@ export const putConnectorFiltering = async ({
export const ConnectorFilteringApiLogic = createApiLogic(
['content', 'connector_filtering_api_logic'],
- putConnectorFiltering
+ putConnectorFiltering,
+ {
+ showSuccessFlashFn: () =>
+ i18n.translate(
+ 'xpack.enterpriseSearch.content.index.connector.filtering.successToastRules.title',
+ { defaultMessage: 'Sync rules updated' }
+ ),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_filtering_draft_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_filtering_draft_api_logic.ts
index aa7406aee253f..f380af36e849e 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_filtering_draft_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_filtering_draft_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { FilteringRule, FilteringRules } from '../../../../../common/types/connectors';
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -34,5 +36,12 @@ export const putConnectorFilteringDraft = async ({
export const ConnectorFilteringDraftApiLogic = createApiLogic(
['content', 'connector_filtering_draft_api_logic'],
- putConnectorFilteringDraft
+ putConnectorFilteringDraft,
+ {
+ showSuccessFlashFn: () =>
+ i18n.translate(
+ 'xpack.enterpriseSearch.content.index.connector.syncRules.successToastDraft.title',
+ { defaultMessage: 'Draft rules saved' }
+ ),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_name_and_description_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_name_and_description_api_logic.ts
index 639bd56208546..88d2c19a59eb0 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_name_and_description_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_name_and_description_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { Connector } from '../../../../../common/types/connectors';
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -36,5 +38,12 @@ export const putConnectorNameAndDescription = async ({
export const ConnectorNameAndDescriptionApiLogic = createApiLogic(
['content', 'connector_name_and_description_api_logic'],
- putConnectorNameAndDescription
+ putConnectorNameAndDescription,
+ {
+ showSuccessFlashFn: () =>
+ i18n.translate(
+ 'xpack.enterpriseSearch.content.indices.configurationConnector.nameAndDescription.successToast.title',
+ { defaultMessage: 'Connector name and description updated' }
+ ),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_scheduling_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_scheduling_api_logic.ts
index eebbd2b2bedf4..2c68b5994e398 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_scheduling_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_scheduling_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { ConnectorScheduling } from '../../../../../common/types/connectors';
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -28,5 +30,12 @@ export const updateConnectorScheduling = async ({
export const UpdateConnectorSchedulingApiLogic = createApiLogic(
['content', 'update_connector_scheduling_api_logic'],
- updateConnectorScheduling
+ updateConnectorScheduling,
+ {
+ showSuccessFlashFn: () =>
+ i18n.translate(
+ 'xpack.enterpriseSearch.content.indices.configurationConnector.scheduling.successToast.title',
+ { defaultMessage: 'Scheduling successfully updated' }
+ ),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_default_pipeline_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_default_pipeline_api_logic.ts
index 612403a1f0472..81cfeadf8e39a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_default_pipeline_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_default_pipeline_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { IngestPipelineParams } from '../../../../../common/types/connectors';
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
@@ -25,5 +27,11 @@ export const updateDefaultPipeline = async (
export const UpdateDefaultPipelineApiLogic = createApiLogic(
['content', 'update_default_pipeline_api_logic'],
- updateDefaultPipeline
+ updateDefaultPipeline,
+ {
+ showSuccessFlashFn: () =>
+ i18n.translate('xpack.enterpriseSearch.content.indices.defaultPipelines.successToast.title', {
+ defaultMessage: 'Default pipeline successfully updated',
+ }),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_pipeline_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_pipeline_api_logic.ts
index b3f3b2f673622..496b50fce7444 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_pipeline_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_pipeline_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { IngestPipelineParams } from '../../../../../common/types/connectors';
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -33,5 +35,11 @@ export const updatePipeline = async ({
export const UpdatePipelineApiLogic = createApiLogic(
['content', 'update_pipeline_api_logic'],
- updatePipeline
+ updatePipeline,
+ {
+ showSuccessFlashFn: () =>
+ i18n.translate('xpack.enterpriseSearch.content.indices.pipelines.successToast.title', {
+ defaultMessage: 'Pipelines updated',
+ }),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/crawler/delete_crawler_domain_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/crawler/delete_crawler_domain_api_logic.ts
index 8857ef95a32fa..28d03f44a7c0a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/crawler/delete_crawler_domain_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/crawler/delete_crawler_domain_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -34,5 +36,14 @@ export const deleteCrawlerDomain = async ({
export const DeleteCrawlerDomainApiLogic = createApiLogic(
['delete_crawler_domain'],
- deleteCrawlerDomain
+ deleteCrawlerDomain,
+ {
+ showSuccessFlashFn: ({ domain }) =>
+ i18n.translate('xpack.enterpriseSearch.crawler.domainsTable.action.delete.successMessage', {
+ defaultMessage: "Successfully deleted domain '{domainUrl}'",
+ values: {
+ domainUrl: domain.url,
+ },
+ }),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/engines/fetch_engines_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/engines/fetch_engines_api_logic.ts
new file mode 100644
index 0000000000000..5c2e57be2a39d
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/engines/fetch_engines_api_logic.ts
@@ -0,0 +1,59 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
+
+import { EngineListDetails, Meta } from '../../components/engines/types';
+
+export interface EnginesListAPIResponse {
+ results: EngineListDetails[];
+ meta: Meta;
+ searchQuery?: string;
+}
+export interface EnginesListAPIArguments {
+ meta: Meta;
+ searchQuery?: string;
+}
+
+const metaValue: Meta = {
+ from: 1,
+ size: 3,
+ total: 5,
+};
+// These are mocked values. To be changed as per the latest requirement when Backend API is ready
+export const mockedEngines: EnginesListAPIResponse[] = [
+ {
+ meta: metaValue,
+ results: [
+ {
+ name: 'engine-name-1',
+ indices: ['index-18', 'index-23'],
+ last_updated: '21 March 2021',
+ document_count: 18,
+ },
+ {
+ name: 'engine-name-2',
+ indices: ['index-180', 'index-230', 'index-8', 'index-2'],
+ last_updated: '10 Jul 2018',
+ document_count: 10,
+ },
+
+ {
+ name: 'engine-name-3',
+ indices: ['index-2', 'index-3'],
+ last_updated: '21 December 2022',
+ document_count: 8,
+ },
+ ],
+ },
+];
+export const fetchEngines = async () => {
+ // TODO replace with http call when backend is ready
+ return mockedEngines[0];
+};
+
+export const FetchEnginesAPILogic = createApiLogic(['content', 'engines_api_logic'], fetchEngines);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/create_custom_pipeline_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/create_custom_pipeline_api_logic.ts
index 9b3f8e9bd5c03..7d9a7ede6ad98 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/create_custom_pipeline_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/create_custom_pipeline_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -26,5 +28,11 @@ export const createCustomPipeline = async ({
export const CreateCustomPipelineApiLogic = createApiLogic(
['content', 'create_custom_pipeline_api_logic'],
- createCustomPipeline
+ createCustomPipeline,
+ {
+ showSuccessFlashFn: () =>
+ i18n.translate('xpack.enterpriseSearch.content.indices.pipelines.successToastCustom.title', {
+ defaultMessage: 'Custom pipeline created',
+ }),
+ }
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/delete_index_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/delete_index_api_logic.ts
index ff92e4ecef6bc..391e3e102383a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/delete_index_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/delete_index_api_logic.ts
@@ -5,6 +5,8 @@
* 2.0.
*/
+import { i18n } from '@kbn/i18n';
+
import { createApiLogic } from '../../../shared/api_logic/create_api_logic';
import { HttpLogic } from '../../../shared/http';
@@ -12,10 +14,25 @@ export interface DeleteIndexApiLogicArgs {
indexName: string;
}
-export const deleteIndex = async ({ indexName }: DeleteIndexApiLogicArgs): Promise => {
+export interface DeleteIndexApiLogicValues {
+ indexName: string;
+}
+
+export const deleteIndex = async ({
+ indexName,
+}: DeleteIndexApiLogicArgs): Promise => {
const route = `/internal/enterprise_search/indices/${indexName}`;
await HttpLogic.values.http.delete(route);
- return;
+ return { indexName };
};
-export const DeleteIndexApiLogic = createApiLogic(['delete_index_api_logic'], deleteIndex);
+export const DeleteIndexApiLogic = createApiLogic(['delete_index_api_logic'], deleteIndex, {
+ showSuccessFlashFn: ({ indexName }) =>
+ i18n.translate('xpack.enterpriseSearch.content.indices.deleteIndex.successToast.title', {
+ defaultMessage:
+ 'Your index {indexName} and any associated ingestion configurations were successfully deleted',
+ values: {
+ indexName,
+ },
+ }),
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_index_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_index_api_logic.ts
index 9473e9041da3b..9ba818bc6c57a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_index_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/index/fetch_index_api_logic.ts
@@ -23,4 +23,7 @@ export const fetchIndex = async ({
return await HttpLogic.values.http.get(route);
};
-export const FetchIndexApiLogic = createApiLogic(['fetch_index_api_logic'], fetchIndex);
+export const FetchIndexApiLogic = createApiLogic(['fetch_index_api_logic'], fetchIndex, {
+ clearFlashMessagesOnMakeRequest: false,
+ showErrorFlash: false,
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/ml_model_stats_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/ml_model_stats_logic.ts
index d80c1836a9597..7c0d1020cd265 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/ml_model_stats_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/ml_model_stats_logic.ts
@@ -22,7 +22,11 @@ export const getMLModelsStats = async () => {
export const MLModelsStatsApiLogic = createApiLogic(
['ml_models_stats_api_logic'],
- getMLModelsStats
+ getMLModelsStats,
+ {
+ clearFlashMessagesOnMakeRequest: false,
+ showErrorFlash: false,
+ }
);
export type MLModelsStatsApiLogicActions = Actions;
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/ml_models_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/ml_models_logic.ts
index 63095f3fbaa2d..fe610ed0b710a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/ml_models_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/ml_models/ml_models_logic.ts
@@ -19,6 +19,9 @@ export const getMLModels = async (size: GetMlModelsArgs = 1000) => {
});
};
-export const MLModelsApiLogic = createApiLogic(['ml_models_api_logic'], getMLModels);
+export const MLModelsApiLogic = createApiLogic(['ml_models_api_logic'], getMLModels, {
+ clearFlashMessagesOnMakeRequest: false,
+ showErrorFlash: false,
+});
export type MLModelsApiLogicActions = Actions;
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail_logic.ts
index 0b00622492c9b..e36f62333a588 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/crawler_domain_detail/crawler_domain_detail_logic.ts
@@ -135,9 +135,6 @@ export const CrawlerDomainDetailLogic = kea<
})
);
},
- deleteApiError: (error) => {
- flashAPIErrors(error);
- },
fetchDomainData: async ({ domainId }) => {
const { http } = HttpLogic.values;
const { indexName } = IndexNameLogic.values;
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/components/tables/engines_table.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/components/tables/engines_table.tsx
new file mode 100644
index 0000000000000..a66ff164e7b8f
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/components/tables/engines_table.tsx
@@ -0,0 +1,113 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React from 'react';
+
+import { CriteriaWithPagination, EuiBasicTable, EuiBasicTableColumn } from '@elastic/eui';
+
+import { i18n } from '@kbn/i18n';
+import { FormattedNumber } from '@kbn/i18n-react';
+
+import { DELETE_BUTTON_LABEL, MANAGE_BUTTON_LABEL } from '../../../../../shared/constants';
+
+import { convertMetaToPagination, EngineListDetails, Meta } from '../../types';
+
+// add health status
+interface EnginesListTableProps {
+ enginesList: EngineListDetails[];
+ loading: boolean;
+ meta: Meta;
+ isLoading?: boolean;
+ onChange: (criteria: CriteriaWithPagination) => void;
+}
+export const EnginesListTable: React.FC = ({
+ enginesList,
+ meta,
+ isLoading,
+ onChange,
+}) => {
+ const columns: Array> = [
+ {
+ field: 'name',
+ name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.name', {
+ defaultMessage: 'Engine Name',
+ }),
+ width: '30%',
+ truncateText: true,
+ mobileOptions: {
+ header: true,
+ enlarge: true,
+ width: '100%',
+ },
+ },
+ {
+ field: 'document_count',
+ name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.documents', {
+ defaultMessage: 'Documents',
+ }),
+ dataType: 'number',
+ render: (number: number) => ,
+ },
+ {
+ field: 'last_updated',
+ name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.lastUpdated', {
+ defaultMessage: 'Last updated',
+ }),
+ dataType: 'string',
+ },
+ {
+ field: 'indices.length',
+ datatype: 'number',
+ name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.indices', {
+ defaultMessage: 'Indices',
+ }),
+ },
+
+ {
+ name: i18n.translate('xpack.enterpriseSearch.content.enginesList.table.column.actions', {
+ defaultMessage: 'Actions',
+ }),
+ actions: [
+ {
+ name: MANAGE_BUTTON_LABEL,
+ description: i18n.translate(
+ 'xpack.enterpriseSearch.content.enginesList.table.column.action.manage.buttonDescription',
+ {
+ defaultMessage: 'Manage this engine',
+ }
+ ),
+ type: 'icon',
+ icon: 'eye',
+ onClick: () => {},
+ },
+ {
+ name: DELETE_BUTTON_LABEL,
+ description: i18n.translate(
+ 'xpack.enterpriseSearch.content.enginesList.table.column.action.delete.buttonDescription',
+ {
+ defaultMessage: 'Delete this engine',
+ }
+ ),
+ type: 'icon',
+ icon: 'trash',
+ color: 'danger',
+ onClick: () => {},
+ },
+ ],
+ },
+ ];
+
+ return (
+
+ );
+};
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engine_list_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engine_list_logic.test.ts
new file mode 100644
index 0000000000000..efd4ae2a622de
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engine_list_logic.test.ts
@@ -0,0 +1,153 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { LogicMounter, mockFlashMessageHelpers } from '../../../__mocks__/kea_logic';
+
+import { nextTick } from '@kbn/test-jest-helpers';
+
+import { HttpError, Status } from '../../../../../common/types/api';
+
+import { FetchEnginesAPILogic } from '../../api/engines/fetch_engines_api_logic';
+
+import { EnginesListLogic } from './engines_list_logic';
+import { DEFAULT_META, EngineListDetails } from './types';
+
+const DEFAULT_VALUES = {
+ data: undefined,
+ results: [],
+ meta: DEFAULT_META,
+ parameters: { meta: DEFAULT_META },
+ status: Status.IDLE,
+};
+
+// sample engines list
+
+const results: EngineListDetails[] = [
+ {
+ name: 'engine-name-1',
+ indices: ['index-18', 'index-23'],
+ last_updated: '21 March 2021',
+ document_count: 18,
+ },
+ {
+ name: 'engine-name-2',
+ indices: ['index-180', 'index-230', 'index-8', 'index-2'],
+ last_updated: '10 Jul 2018',
+ document_count: 10,
+ },
+
+ {
+ name: 'engine-name-3',
+ indices: ['index-2', 'index-3'],
+ last_updated: '21 December 2022',
+ document_count: 8,
+ },
+];
+
+describe('EnginesListLogic', () => {
+ const { mount: apiLogicMount } = new LogicMounter(FetchEnginesAPILogic);
+ const { mount } = new LogicMounter(EnginesListLogic);
+
+ beforeEach(() => {
+ jest.clearAllMocks();
+ jest.useRealTimers();
+ apiLogicMount();
+ mount();
+ });
+ it('has expected default values', () => {
+ expect(EnginesListLogic.values).toEqual(DEFAULT_VALUES);
+ });
+ describe('actions', () => {
+ describe('onPaginate', () => {
+ it('updates meta with newPageIndex', () => {
+ expect(EnginesListLogic.values).toEqual(DEFAULT_VALUES);
+ // This test does not work for now, test below code when Kibana GET API for pagination is ready
+ // EnginesListLogic.actions.onPaginate(2);
+ // expect(EnginesListLogic.values).toEqual({
+ // ...DEFAULT_VALUES,
+ // meta: {
+ // ...DEFAULT_META,
+ // from: 2,
+ // },
+ // });
+ });
+ });
+ });
+ describe('reducers', () => {
+ describe('meta', () => {
+ it('updates when apiSuccess', () => {
+ const newPageMeta = {
+ from: 2,
+ size: 3,
+ total: 6,
+ };
+ expect(EnginesListLogic.values).toEqual(DEFAULT_VALUES);
+ EnginesListLogic.actions.apiSuccess({
+ meta: newPageMeta,
+ results,
+ searchQuery: 'k',
+ });
+ expect(EnginesListLogic.values).toEqual({
+ ...DEFAULT_VALUES,
+ data: {
+ results,
+ meta: newPageMeta,
+ searchQuery: 'k',
+ },
+ meta: newPageMeta,
+ parameters: {
+ meta: newPageMeta,
+ searchQuery: 'k',
+ },
+ results,
+ status: Status.SUCCESS,
+ });
+ });
+ });
+ });
+ describe('listeners', () => {
+ it('call flashAPIErrors on apiError', () => {
+ EnginesListLogic.actions.apiError({} as HttpError);
+ expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
+ expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({});
+ });
+
+ it('call makeRequest on fetchEngines', async () => {
+ jest.useFakeTimers({ legacyFakeTimers: true });
+ EnginesListLogic.actions.makeRequest = jest.fn();
+ EnginesListLogic.actions.fetchEngines({ meta: DEFAULT_META });
+ await nextTick();
+ expect(EnginesListLogic.actions.makeRequest).toHaveBeenCalledWith({
+ meta: DEFAULT_META,
+ });
+ });
+ });
+ describe('selectors', () => {
+ describe('enginesList', () => {
+ it('updates when apiSuccess', () => {
+ expect(EnginesListLogic.values).toEqual(DEFAULT_VALUES);
+ EnginesListLogic.actions.apiSuccess({
+ results,
+ meta: DEFAULT_META,
+ });
+ expect(EnginesListLogic.values).toEqual({
+ ...DEFAULT_VALUES,
+ data: {
+ results,
+ meta: DEFAULT_META,
+ },
+ meta: DEFAULT_META,
+ parameters: {
+ meta: DEFAULT_META,
+ },
+ results,
+ status: Status.SUCCESS,
+ });
+ });
+ });
+ });
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.test.tsx
new file mode 100644
index 0000000000000..20ee8ac80bd49
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.test.tsx
@@ -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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { setMockActions, setMockValues } from '../../../__mocks__/kea_logic';
+
+import React from 'react';
+
+import { shallow } from 'enzyme';
+
+import { mockedEngines } from '../../api/engines/fetch_engines_api_logic';
+
+import { EnginesListTable } from './components/tables/engines_table';
+import { EnginesList } from './engines_list';
+import { DEFAULT_META } from './types';
+
+const mockValues = {
+ enginesList: mockedEngines,
+ meta: DEFAULT_META,
+};
+const mockActions = {
+ fetchEngines: jest.fn(),
+ onPaginate: jest.fn(),
+};
+
+describe('EnginesList', () => {
+ beforeEach(() => {
+ jest.clearAllMocks();
+ global.localStorage.clear();
+ });
+ describe('Empty state', () => {});
+
+ it('renders with Engines data ', async () => {
+ setMockValues(mockValues);
+ setMockActions(mockActions);
+
+ const wrapper = shallow();
+
+ expect(wrapper.find(EnginesListTable)).toHaveLength(1);
+ });
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.tsx
index 7292dad6db745..702d623c44dc1 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list.tsx
@@ -5,13 +5,35 @@
* 2.0.
*/
-import React from 'react';
+import React, { useEffect, useState } from 'react';
+
+import { useActions, useValues } from 'kea';
+
+import { EuiButton, EuiFieldSearch, EuiLink, EuiSpacer, EuiText } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
+import { FormattedMessage, FormattedNumber } from '@kbn/i18n-react';
+
+import { DataPanel } from '../../../shared/data_panel/data_panel';
+import { handlePageChange } from '../../../shared/table_pagination';
import { EnterpriseSearchContentPageTemplate } from '../layout/page_template';
-export const EnginesList = () => {
+import { EnginesListTable } from './components/tables/engines_table';
+import { EnginesListLogic } from './engines_list_logic';
+
+export const EnginesList: React.FC = () => {
+ const { fetchEngines, onPaginate } = useActions(EnginesListLogic);
+ const { meta, results } = useValues(EnginesListLogic);
+ const [searchQuery, setSearchValue] = useState('');
+
+ useEffect(() => {
+ fetchEngines({
+ meta,
+ searchQuery,
+ });
+ }, [meta, searchQuery]);
+
return (
{
}),
]}
pageHeader={{
- pageTitle: i18n.translate('xpack.enterpriseSearch.content.engines.headerTitle', {
+ pageTitle: i18n.translate('xpack.enterpriseSearch.content.engines.title', {
defaultMessage: 'Engines',
}),
+ rightSideItems: [
+
+ {i18n.translate('xpack.enterpriseSearch.content.engines.createEngineButtonLabel', {
+ defaultMessage: 'Create engine',
+ })}
+ ,
+ ],
}}
pageViewTelemetry="Engines"
isLoading={false}
>
+
+ {i18n.translate('xpack.enterpriseSearch.content.engines.description', {
+ defaultMessage:
+ 'Engines allow you to query indexed data with a complete set of relevance, analytics and personalization tools. To learn more about how engines work in Enterprise search ',
+ })}
+
+
+ {i18n.translate('xpack.enterpriseSearch.content.engines.documentation', {
+ defaultMessage: 'explore our Engines documentation',
+ })}
+
+
+
+
+ {
+ setSearchValue(event.currentTarget.value);
+ }}
+ />
+
+
+
+ {i18n.translate('xpack.enterpriseSearch.content.engines.searchPlaceholder.description', {
+ defaultMessage: 'Locate an engine via name or indices',
+ })}
+
+
+
+
+
+
+
+ ),
+ size: (
+
+
+
+ ),
+ total: ,
+ }}
+ />
+
+
+ {i18n.translate('xpack.enterpriseSearch.content.engines.title', {
+ defaultMessage: 'Engines',
+ })}
+
+ }
+ >
+
+
+
+
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list_logic.ts
new file mode 100644
index 0000000000000..bccb560f79ac8
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/engines_list_logic.ts
@@ -0,0 +1,76 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { kea, MakeLogicType } from 'kea';
+
+import { Actions } from '../../../shared/api_logic/create_api_logic';
+
+import {
+ EnginesListAPIArguments,
+ EnginesListAPIResponse,
+ FetchEnginesAPILogic,
+} from '../../api/engines/fetch_engines_api_logic';
+
+import { DEFAULT_META, EngineListDetails, Meta, updateMetaPageIndex } from './types';
+
+type EnginesListActions = Pick<
+ Actions,
+ 'apiError' | 'apiSuccess' | 'makeRequest'
+> & {
+ fetchEngines({ meta, searchQuery }: { meta: Meta; searchQuery?: string }): {
+ meta: Meta;
+ searchQuery?: string;
+ };
+ onPaginate(pageNumber: number): { pageNumber: number };
+};
+interface EngineListValues {
+ data: typeof FetchEnginesAPILogic.values.data;
+ meta: Meta;
+ parameters: { meta: Meta; searchQuery?: string }; // Added this variable to store to the search Query value as well
+ results: EngineListDetails[]; // stores engine list value from data
+ status: typeof FetchEnginesAPILogic.values.status;
+}
+
+export const EnginesListLogic = kea>({
+ actions: {
+ fetchEngines: ({ meta, searchQuery }) => ({
+ meta,
+ searchQuery,
+ }),
+
+ onPaginate: (pageNumber) => ({ pageNumber }),
+ },
+ connect: {
+ actions: [FetchEnginesAPILogic, ['makeRequest', 'apiSuccess', 'apiError']],
+ values: [FetchEnginesAPILogic, ['data', 'status']],
+ },
+ listeners: ({ actions }) => ({
+ fetchEngines: async (input) => {
+ actions.makeRequest(input);
+ },
+ }),
+ path: ['enterprise_search', 'content', 'engine_list_logic'],
+ reducers: ({}) => ({
+ parameters: [
+ { meta: DEFAULT_META },
+ {
+ apiSuccess: (_, { meta, searchQuery }) => ({
+ meta,
+ searchQuery,
+ }),
+ onPaginate: (state, { pageNumber }) => ({
+ ...state,
+ meta: updateMetaPageIndex(state.meta, pageNumber),
+ }),
+ },
+ ],
+ }),
+ selectors: ({ selectors }) => ({
+ meta: [() => [selectors.parameters], (parameters) => parameters.meta],
+ results: [() => [selectors.data], (data) => data?.results ?? []],
+ }),
+});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/types.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/types.ts
new file mode 100644
index 0000000000000..d21e3c92c8329
--- /dev/null
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/engines/types.ts
@@ -0,0 +1,33 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+export interface Meta {
+ from: number;
+ size: number;
+ total: number;
+}
+
+export interface EngineListDetails {
+ name: string;
+ indices: string[];
+ last_updated: string;
+ document_count: number;
+}
+export const DEFAULT_META = {
+ from: 1,
+ size: 3,
+ total: 0,
+};
+
+export const convertMetaToPagination = (meta: Meta) => ({
+ pageIndex: meta.from - 1,
+ pageSize: meta.size,
+ totalItemCount: meta.total,
+});
+export const updateMetaPageIndex = (oldState: Meta, newPageIndex: number) => {
+ return { ...oldState, from: newPageIndex };
+};
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api_logic.test.ts
index f5f185e420b05..2e4c5949be426 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api_logic.test.ts
@@ -5,19 +5,12 @@
* 2.0.
*/
-import {
- LogicMounter,
- mockFlashMessageHelpers,
- mockKibanaValues,
-} from '../../../../__mocks__/kea_logic';
-
-import { HttpError } from '../../../../../../common/types/api';
+import { LogicMounter, mockKibanaValues } from '../../../../__mocks__/kea_logic';
import { MethodApiLogic } from './method_api_logic';
describe('MethodApiLogic', () => {
const { mount } = new LogicMounter(MethodApiLogic);
- const { clearFlashMessages, flashAPIErrors } = mockFlashMessageHelpers;
const { navigateToUrl } = mockKibanaValues;
beforeEach(() => {
@@ -33,23 +26,5 @@ describe('MethodApiLogic', () => {
expect(navigateToUrl).toHaveBeenCalledWith('/search_indices/my-index/overview');
});
});
-
- describe('makeRequest', () => {
- it('clears any displayed errors', () => {
- MethodApiLogic.actions.makeRequest({ indexName: 'my-index', language: 'Universal' });
-
- expect(clearFlashMessages).toHaveBeenCalled();
- });
- });
-
- describe('apiError', () => {
- it('displays the error to the user', () => {
- const error = {} as HttpError;
-
- MethodApiLogic.actions.apiError(error);
-
- expect(flashAPIErrors).toHaveBeenCalledWith(error);
- });
- });
});
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api_logic.ts
index 65d1563458319..3608395cf5f34 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_api/method_api_logic.ts
@@ -10,8 +10,6 @@ import { kea, MakeLogicType } from 'kea';
import { Actions } from '../../../../shared/api_logic/create_api_logic';
import { generateEncodedPath } from '../../../../shared/encode_path_params';
-import { clearFlashMessages, flashAPIErrors } from '../../../../shared/flash_messages';
-
import { KibanaLogic } from '../../../../shared/kibana';
import {
CreateApiIndexApiLogic,
@@ -23,17 +21,14 @@ import { SearchIndexTabId } from '../../search_index/search_index';
type MethodApiActions = Pick<
Actions,
- 'apiError' | 'apiSuccess' | 'makeRequest'
+ 'apiSuccess' | 'makeRequest'
>;
export const MethodApiLogic = kea>({
connect: {
- actions: [CreateApiIndexApiLogic, ['apiError', 'apiSuccess', 'makeRequest']],
+ actions: [CreateApiIndexApiLogic, ['apiSuccess', 'makeRequest']],
},
listeners: {
- apiError: (error) => {
- flashAPIErrors(error);
- },
apiSuccess: ({ indexName }) => {
KibanaLogic.values.navigateToUrl(
generateEncodedPath(SEARCH_INDEX_TAB_PATH, {
@@ -42,7 +37,6 @@ export const MethodApiLogic = kea>({
})
);
},
- makeRequest: () => clearFlashMessages(),
},
path: ['enterprise_search', 'method_api'],
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/add_connector_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/add_connector_logic.ts
index dd9a33320d649..bfef21d4bbba5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/add_connector_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_connector/add_connector_logic.ts
@@ -12,7 +12,6 @@ import { ErrorCode } from '../../../../../../common/types/error_codes';
import { generateEncodedPath } from '../../../../app_search/utils/encode_path_params';
import { Actions } from '../../../../shared/api_logic/create_api_logic';
-import { flashAPIErrors } from '../../../../shared/flash_messages';
import { KibanaLogic } from '../../../../shared/kibana';
import {
AddConnectorApiLogic,
@@ -41,7 +40,6 @@ export const AddConnectorLogic = kea flashAPIErrors(error),
apiSuccess: async ({ indexName }, breakpoint) => {
// Give Elasticsearch the chance to propagate the index so we don't end up in an error state after navigating
await breakpoint(1000);
@@ -53,7 +51,7 @@ export const AddConnectorLogic = kea {
const { mount } = new LogicMounter(MethodCrawlerLogic);
+ const { mount: apiLogicMount } = new LogicMounter(CreateCrawlerIndexApiLogic);
const { clearFlashMessages, flashAPIErrors } = mockFlashMessageHelpers;
const { navigateToUrl } = mockKibanaValues;
beforeEach(() => {
jest.clearAllMocks();
+ apiLogicMount();
mount();
});
describe('listeners', () => {
describe('apiSuccess', () => {
it('navigates user to index detail view', () => {
- MethodCrawlerLogic.actions.apiSuccess({ created: 'my-index' });
+ CreateCrawlerIndexApiLogic.actions.apiSuccess({ created: 'my-index' });
expect(navigateToUrl).toHaveBeenCalledWith('/search_indices/my-index/domain_management');
});
@@ -36,7 +40,10 @@ describe('MethodCrawlerLogic', () => {
describe('makeRequest', () => {
it('clears any displayed errors', () => {
- MethodCrawlerLogic.actions.makeRequest({ indexName: 'my-index', language: 'Universal' });
+ CreateCrawlerIndexApiLogic.actions.makeRequest({
+ indexName: 'my-index',
+ language: 'Universal',
+ });
expect(clearFlashMessages).toHaveBeenCalled();
});
@@ -46,7 +53,7 @@ describe('MethodCrawlerLogic', () => {
it('displays the error to the user', () => {
const error = {} as HttpError;
- MethodCrawlerLogic.actions.apiError(error);
+ CreateCrawlerIndexApiLogic.actions.apiError(error);
expect(flashAPIErrors).toHaveBeenCalledWith(error);
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler_logic.ts
index 57649ea710eef..cbd53a07b4e0b 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler_logic.ts
@@ -10,8 +10,6 @@ import { kea, MakeLogicType } from 'kea';
import { Actions } from '../../../../shared/api_logic/create_api_logic';
import { generateEncodedPath } from '../../../../shared/encode_path_params';
-import { clearFlashMessages, flashAPIErrors } from '../../../../shared/flash_messages';
-
import { KibanaLogic } from '../../../../shared/kibana';
import {
CreateCrawlerIndexApiLogic,
@@ -28,12 +26,9 @@ type MethodCrawlerActions = Pick<
export const MethodCrawlerLogic = kea>({
connect: {
- actions: [CreateCrawlerIndexApiLogic, ['apiError', 'apiSuccess', 'makeRequest']],
+ actions: [CreateCrawlerIndexApiLogic, ['apiError', 'apiSuccess']],
},
listeners: {
- apiError: (error) => {
- flashAPIErrors(error);
- },
apiSuccess: ({ created }) => {
KibanaLogic.values.navigateToUrl(
generateEncodedPath(SEARCH_INDEX_TAB_PATH, {
@@ -42,7 +37,6 @@ export const MethodCrawlerLogic = kea>({
})
);
},
- makeRequest: () => clearFlashMessages(),
},
- path: ['enterprise_search', 'method_crawler'],
+ path: ['enterprise_search', 'content', 'method_crawler'],
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.test.ts
index 596ec459bc992..4dbfc574777ad 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.test.ts
@@ -5,9 +5,9 @@
* 2.0.
*/
-import { LogicMounter, mockFlashMessageHelpers } from '../../../../../__mocks__/kea_logic';
+import { LogicMounter } from '../../../../../__mocks__/kea_logic';
-import { HttpError, Status } from '../../../../../../../common/types/api';
+import { Status } from '../../../../../../../common/types/api';
import { GenerateApiKeyLogic } from '../../../../api/generate_api_key/generate_api_key_logic';
import { GenerateApiKeyModalLogic } from './generate_api_key_modal.logic';
@@ -63,19 +63,6 @@ describe('IndicesLogic', () => {
});
});
- describe('listeners', () => {
- it('calls clearFlashMessages on new makeRequest', () => {
- GenerateApiKeyModalLogic.actions.makeRequest({ indexName: 'test', keyName: 'test' });
- expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1);
- });
-
- it('calls flashAPIErrors on apiError', () => {
- GenerateApiKeyModalLogic.actions.apiError({} as HttpError);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({});
- });
- });
-
describe('selectors', () => {
describe('apiKey', () => {
it('updates when apiSuccess listener triggered', () => {
@@ -110,7 +97,7 @@ describe('IndicesLogic', () => {
describe('isLoading', () => {
it('should update with API status', () => {
expect(GenerateApiKeyModalLogic.values).toEqual(DEFAULT_VALUES);
- GenerateApiKeyModalLogic.actions.makeRequest({ indexName: 'test', keyName: 'test' });
+ GenerateApiKeyLogic.actions.makeRequest({ indexName: 'test', keyName: 'test' });
expect(GenerateApiKeyModalLogic.values).toEqual({
...DEFAULT_VALUES,
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts
index 654a984a171ca..022dee11d63c9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/generate_api_key_modal.logic.ts
@@ -7,15 +7,11 @@
import { kea, MakeLogicType } from 'kea';
-import { HttpError, Status } from '../../../../../../../common/types/api';
-
-import { flashAPIErrors, clearFlashMessages } from '../../../../../shared/flash_messages';
+import { Status } from '../../../../../../../common/types/api';
import { GenerateApiKeyLogic } from '../../../../api/generate_api_key/generate_api_key_logic';
interface GenerateApiKeyModalActions {
- apiError(error: HttpError): HttpError;
- makeRequest: typeof GenerateApiKeyLogic.actions.makeRequest;
setKeyName(keyName: string): { keyName: string };
}
@@ -35,13 +31,8 @@ export const GenerateApiKeyModalLogic = kea<
setKeyName: (keyName) => ({ keyName }),
},
connect: {
- actions: [GenerateApiKeyLogic, ['makeRequest', 'apiError']],
values: [GenerateApiKeyLogic, ['data', 'status']],
},
- listeners: () => ({
- apiError: (e) => flashAPIErrors(e),
- makeRequest: () => clearFlashMessages(),
- }),
path: ['enterprise_search', 'search_index', 'generate_api_key_modal'],
reducers: () => ({
keyName: [
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.tsx
index 9dbe7fb5e5aa4..18514ef93d9d9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/generate_api_key_modal/modal.tsx
@@ -34,6 +34,7 @@ import { i18n } from '@kbn/i18n';
import { docLinks } from '../../../../../shared/doc_links';
+import { GenerateApiKeyLogic } from '../../../../api/generate_api_key/generate_api_key_logic';
import { IndexViewLogic } from '../../index_view_logic';
import { GenerateApiKeyModalLogic } from './generate_api_key_modal.logic';
@@ -46,7 +47,8 @@ interface GenerateApiKeyModalProps {
export const GenerateApiKeyModal: React.FC = ({ indexName, onClose }) => {
const { keyName, apiKey, isLoading, isSuccess } = useValues(GenerateApiKeyModalLogic);
const { ingestionMethod } = useValues(IndexViewLogic);
- const { setKeyName, makeRequest } = useActions(GenerateApiKeyModalLogic);
+ const { setKeyName } = useActions(GenerateApiKeyModalLogic);
+ const { makeRequest } = useActions(GenerateApiKeyLogic);
return (
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/cancel_syncs_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/cancel_syncs_logic.test.ts
index a63dac6806cc8..36ee9b44ac9d9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/cancel_syncs_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/cancel_syncs_logic.test.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { LogicMounter, mockFlashMessageHelpers } from '../../../../__mocks__/kea_logic';
+import { LogicMounter } from '../../../../__mocks__/kea_logic';
import { indices } from '../../../__mocks__/search_indices.mock';
@@ -18,7 +18,6 @@ describe('CancelSyncsLogic', () => {
const { mount } = new LogicMounter(CancelSyncsLogic);
const { mount: IndexViewLogicMount } = new LogicMounter(IndexViewLogic);
const { mount: FetchIndexApiLogicMount } = new LogicMounter(FetchIndexApiLogic);
- const { clearFlashMessages, flashAPIErrors, flashSuccessToast } = mockFlashMessageHelpers;
const DEFAULT_VALUES = {
connectorId: null,
isConnectorIndex: false,
@@ -48,25 +47,5 @@ describe('CancelSyncsLogic', () => {
expect(CancelSyncsLogic.actions.makeCancelSyncsRequest).toHaveBeenCalled();
});
});
- describe('makeRequest', () => {
- it('should call clearFlashMessages', () => {
- CancelSyncsLogic.actions.makeCancelSyncsRequest({
- connectorId: 'id',
- });
- expect(clearFlashMessages).toHaveBeenCalled();
- });
- });
- describe('apiError', () => {
- it('should call flashAPIError', () => {
- CancelSyncsLogic.actions.cancelSyncsApiError('error' as any);
- expect(flashAPIErrors).toHaveBeenCalledWith('error');
- });
- });
- describe('apiSuccess', () => {
- it('should call flashAPIError', () => {
- CancelSyncsLogic.actions.cancelSyncsApiSuccess('success' as any);
- expect(flashSuccessToast).toHaveBeenCalledWith('Successfully canceled syncs');
- });
- });
});
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/cancel_syncs_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/cancel_syncs_logic.ts
index 73fa34d69c83d..43ae9d81a7336 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/cancel_syncs_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/cancel_syncs_logic.ts
@@ -7,14 +7,7 @@
import { kea, MakeLogicType } from 'kea';
-import { i18n } from '@kbn/i18n';
-
import { Actions } from '../../../../shared/api_logic/create_api_logic';
-import {
- clearFlashMessages,
- flashAPIErrors,
- flashSuccessToast,
-} from '../../../../shared/flash_messages';
import {
CancelSyncsApiArgs,
@@ -58,17 +51,6 @@ export const CancelSyncsLogic = kea flashAPIErrors(e),
- cancelSyncsApiSuccess: () => {
- flashSuccessToast(
- i18n.translate('xpack.enterpriseSearch.content.searchIndex.cancelSyncs.successMessage', {
- defaultMessage: 'Successfully canceled syncs',
- })
- );
- },
- makeCancelSyncsRequest: () => {
- clearFlashMessages();
- },
}),
}
);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_logic.test.ts
index 54b31d832af7f..632d60fac3cad 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_logic.test.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { LogicMounter, mockFlashMessageHelpers } from '../../../../__mocks__/kea_logic';
+import { LogicMounter } from '../../../../__mocks__/kea_logic';
import { connectorIndex } from '../../../__mocks__/view_index.mock';
import { ConnectorStatus } from '../../../../../../common/types/connectors';
@@ -33,7 +33,6 @@ describe('ConnectorConfigurationLogic', () => {
const { mount: mountIndexNameLogic } = new LogicMounter(IndexNameLogic);
const { mount: mountFetchIndexApiWrapperLogic } = new LogicMounter(CachedFetchIndexApiLogic);
const { mount: mountIndexViewLogic } = new LogicMounter(IndexViewLogic);
- const { clearFlashMessages, flashAPIErrors, flashSuccessToast } = mockFlashMessageHelpers;
beforeEach(() => {
jest.clearAllMocks();
@@ -70,31 +69,6 @@ describe('ConnectorConfigurationLogic', () => {
configView: [{ key: 'foo', label: 'thirdBar', value: 'fourthBar' }],
});
});
- describe('makeRequest', () => {
- it('should call clearFlashMessages', () => {
- ConnectorConfigurationLogic.actions.makeRequest({
- configuration: {},
- connectorId: 'id',
- indexName: 'name',
- });
- expect(clearFlashMessages).toHaveBeenCalled();
- });
- });
- describe('apiError', () => {
- it('should call flashAPIError', () => {
- ConnectorConfigurationLogic.actions.apiError('error' as any);
- expect(flashAPIErrors).toHaveBeenCalledWith('error');
- });
- });
- describe('apiSuccess', () => {
- it('should call flashAPIError', () => {
- ConnectorConfigurationLogic.actions.apiSuccess({
- configuration: {},
- indexName: 'name',
- });
- expect(flashSuccessToast).toHaveBeenCalledWith('Configuration successfully updated');
- });
- });
describe('setLocalConfigEntry', () => {
it('should set local config entry and sort keys', () => {
ConnectorConfigurationLogic.actions.setConfigState({
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_logic.ts
index b2c7d7091ad76..c939b37fac8ad 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_configuration_logic.ts
@@ -7,15 +7,8 @@
import { kea, MakeLogicType } from 'kea';
-import { i18n } from '@kbn/i18n';
-
import { ConnectorConfiguration, ConnectorStatus } from '../../../../../../common/types/connectors';
import { Actions } from '../../../../shared/api_logic/create_api_logic';
-import {
- clearFlashMessages,
- flashAPIErrors,
- flashSuccessToast,
-} from '../../../../shared/flash_messages';
import {
ConnectorConfigurationApiLogic,
@@ -31,7 +24,7 @@ import { isConnectorIndex } from '../../../utils/indices';
type ConnectorConfigurationActions = Pick<
Actions,
- 'apiError' | 'apiSuccess' | 'makeRequest'
+ 'apiSuccess' | 'makeRequest'
> & {
fetchIndexApiSuccess: CachedFetchIndexApiLogicActions['apiSuccess'];
saveConfig: () => void;
@@ -78,7 +71,7 @@ export const ConnectorConfigurationLogic = kea<
connect: {
actions: [
ConnectorConfigurationApiLogic,
- ['apiError', 'apiSuccess', 'makeRequest'],
+ ['apiSuccess'],
CachedFetchIndexApiLogic,
['apiSuccess as fetchIndexApiSuccess'],
],
@@ -101,14 +94,7 @@ export const ConnectorConfigurationLogic = kea<
},
}),
listeners: ({ actions, values }) => ({
- apiError: (error) => flashAPIErrors(error),
apiSuccess: ({ indexName }) => {
- flashSuccessToast(
- i18n.translate(
- 'xpack.enterpriseSearch.content.indices.configurationConnector.configuration.successToast.title',
- { defaultMessage: 'Configuration successfully updated' }
- )
- );
CachedFetchIndexApiLogic.actions.makeRequest({ indexName });
},
fetchIndexApiSuccess: (index) => {
@@ -127,7 +113,6 @@ export const ConnectorConfigurationLogic = kea<
actions.setIsEditing(true);
}
},
- makeRequest: () => clearFlashMessages(),
saveConfig: () => {
if (isConnectorIndex(values.index)) {
actions.makeRequest({
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts
index 934b7c11e180f..563951fddf3eb 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description_logic.ts
@@ -7,15 +7,8 @@
import { kea, MakeLogicType } from 'kea';
-import { i18n } from '@kbn/i18n';
-
import { Connector } from '../../../../../../../common/types/connectors';
import { Actions } from '../../../../../shared/api_logic/create_api_logic';
-import {
- flashAPIErrors,
- flashSuccessToast,
- clearFlashMessages,
-} from '../../../../../shared/flash_messages';
import {
ConnectorNameAndDescriptionApiLogic,
PutConnectorNameAndDescriptionArgs,
@@ -32,7 +25,7 @@ type NameAndDescription = Partial>;
type ConnectorNameAndDescriptionActions = Pick<
Actions,
- 'apiError' | 'apiSuccess' | 'makeRequest'
+ 'apiSuccess' | 'makeRequest'
> & {
fetchIndexApiSuccess: CachedFetchIndexApiLogicActions['apiSuccess'];
saveNameAndDescription: () => void;
@@ -77,22 +70,11 @@ export const ConnectorNameAndDescriptionLogic = kea<
),
}),
listeners: ({ actions, values }) => ({
- apiError: (error) => flashAPIErrors(error),
- apiSuccess: ({ indexName }) => {
- flashSuccessToast(
- i18n.translate(
- 'xpack.enterpriseSearch.content.indices.configurationConnector.configuration.successToast.title',
- { defaultMessage: 'Configuration successfully updated' }
- )
- );
- CachedFetchIndexApiLogic.actions.makeRequest({ indexName });
- },
fetchIndexApiSuccess: (index) => {
if (!values.isEditing && isConnectorIndex(index)) {
actions.setNameAndDescription(index.connector);
}
},
- makeRequest: () => clearFlashMessages(),
saveNameAndDescription: () => {
if (isConnectorIndex(values.index) || isCrawlerIndex(values.index)) {
actions.makeRequest({
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling_logic.test.ts
index b355273a71012..e2897a053a5b4 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling_logic.test.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { LogicMounter, mockFlashMessageHelpers } from '../../../../__mocks__/kea_logic';
+import { LogicMounter } from '../../../../__mocks__/kea_logic';
import { UpdateConnectorSchedulingApiLogic } from '../../../api/connector/update_connector_scheduling_api_logic';
@@ -13,7 +13,6 @@ import { ConnectorSchedulingLogic } from './connector_scheduling_logic';
describe('ConnectorSchedulingLogic', () => {
const { mount } = new LogicMounter(ConnectorSchedulingLogic);
- const { clearFlashMessages, flashAPIErrors, flashSuccessToast } = mockFlashMessageHelpers;
const DEFAULT_VALUES = {
hasChanges: false,
};
@@ -48,31 +47,4 @@ describe('ConnectorSchedulingLogic', () => {
});
});
});
-
- describe('actions', () => {
- describe('makeRequest', () => {
- it('should call clearFlashMessages', () => {
- ConnectorSchedulingLogic.actions.makeRequest({
- connectorId: 'id',
- scheduling: {
- enabled: true,
- interval: 'interval',
- },
- });
- expect(clearFlashMessages).toHaveBeenCalled();
- });
- });
- describe('apiError', () => {
- it('should call flashAPIError', () => {
- ConnectorSchedulingLogic.actions.apiError('error' as any);
- expect(flashAPIErrors).toHaveBeenCalledWith('error');
- });
- });
- describe('apiSuccess', () => {
- it('should call flashAPIError', () => {
- ConnectorSchedulingLogic.actions.apiSuccess('success' as any);
- expect(flashSuccessToast).toHaveBeenCalledWith('Scheduling successfully updated');
- });
- });
- });
});
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling_logic.ts
index a9b99a734d704..73a624351cbb8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_scheduling_logic.ts
@@ -7,15 +7,8 @@
import { kea, MakeLogicType } from 'kea';
-import { i18n } from '@kbn/i18n';
-
import { ConnectorScheduling } from '../../../../../../common/types/connectors';
import { Actions } from '../../../../shared/api_logic/create_api_logic';
-import {
- clearFlashMessages,
- flashAPIErrors,
- flashSuccessToast,
-} from '../../../../shared/flash_messages';
import {
UpdateConnectorSchedulingApiLogic,
@@ -24,7 +17,7 @@ import {
type ConnectorSchedulingActions = Pick<
Actions,
- 'apiError' | 'apiSuccess' | 'makeRequest'
+ 'apiSuccess'
> & { setHasChanges: (hasChanges: boolean) => { hasChanges: boolean } };
interface ConnectorSchedulingValues {
@@ -38,18 +31,7 @@ export const ConnectorSchedulingLogic = kea<
setHasChanges: (hasChanges) => ({ hasChanges }),
},
connect: {
- actions: [UpdateConnectorSchedulingApiLogic, ['apiError', 'apiSuccess', 'makeRequest']],
- },
- listeners: {
- apiError: (error) => flashAPIErrors(error),
- apiSuccess: () =>
- flashSuccessToast(
- i18n.translate(
- 'xpack.enterpriseSearch.content.indices.configurationConnector.scheduling.successToast.title',
- { defaultMessage: 'Scheduling successfully updated' }
- )
- ),
- makeRequest: () => clearFlashMessages(),
+ actions: [UpdateConnectorSchedulingApiLogic, ['apiSuccess']],
},
reducers: {
hasChanges: [
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/select_connector/select_connector_logic.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/select_connector/select_connector_logic.tsx
index 48af3e24fa8b9..fec06e823a4db 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/select_connector/select_connector_logic.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/select_connector/select_connector_logic.tsx
@@ -9,7 +9,6 @@ import { kea, MakeLogicType } from 'kea';
import { Actions } from '../../../../../shared/api_logic/create_api_logic';
import { generateEncodedPath } from '../../../../../shared/encode_path_params';
-import { clearFlashMessages, flashAPIErrors } from '../../../../../shared/flash_messages';
import { KibanaLogic } from '../../../../../shared/kibana';
import {
@@ -28,7 +27,7 @@ import { NativeConnector } from '../types';
type SelectConnectorActions = Pick<
Actions,
- 'apiError' | 'apiSuccess' | 'makeRequest'
+ 'apiSuccess' | 'makeRequest'
> & {
saveNativeConnector(): void;
setSelectedConnector(nativeConnector: NativeConnector): {
@@ -66,11 +65,9 @@ export const SelectConnectorLogic = kea<
},
}),
listeners: ({ actions, values }) => ({
- apiError: (error) => flashAPIErrors(error),
apiSuccess: () => {
CachedFetchIndexApiLogic.actions.makeRequest({ indexName: values.index.name });
},
- makeRequest: () => clearFlashMessages(),
saveNativeConnector: () => {
if (!isConnectorIndex(values.index) || values.selectedNativeConnector === null) {
KibanaLogic.values.navigateToUrl(
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx
index c430794063a76..13db854fa79e9 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/sync_rules/connector_filtering_logic.tsx
@@ -9,8 +9,6 @@ import { kea, MakeLogicType } from 'kea';
import { isEqual } from 'lodash';
-import { i18n } from '@kbn/i18n';
-
import { Status } from '../../../../../../../common/types/api';
import {
@@ -22,11 +20,7 @@ import {
FilteringValidationState,
} from '../../../../../../../common/types/connectors';
import { Actions } from '../../../../../shared/api_logic/create_api_logic';
-import {
- flashAPIErrors,
- flashSuccessToast,
- clearFlashMessages,
-} from '../../../../../shared/flash_messages';
+import { clearFlashMessages } from '../../../../../shared/flash_messages';
import {
ConnectorFilteringApiLogic,
PutConnectorFilteringArgs,
@@ -46,7 +40,7 @@ import { isConnectorIndex } from '../../../../utils/indices';
type ConnectorFilteringActions = Pick<
Actions,
- 'apiError' | 'apiSuccess' | 'makeRequest'
+ 'apiSuccess' | 'makeRequest'
> & {
addFilteringRule(filteringRule: FilteringRule): FilteringRule;
applyDraft: () => void;
@@ -134,7 +128,7 @@ export const ConnectorFilteringLogic = kea<
connect: {
actions: [
ConnectorFilteringApiLogic,
- ['apiError', 'apiSuccess', 'makeRequest'],
+ ['apiSuccess', 'makeRequest'],
ConnectorFilteringDraftApiLogic,
[
'apiError as draftApiError',
@@ -153,15 +147,6 @@ export const ConnectorFilteringLogic = kea<
),
}),
listeners: ({ actions, values }) => ({
- apiError: (error) => flashAPIErrors(error),
- apiSuccess: () => {
- flashSuccessToast(
- i18n.translate(
- 'xpack.enterpriseSearch.content.index.connector.filtering.successToastRules.title',
- { defaultMessage: 'Sync rules updated' }
- )
- );
- },
applyDraft: () => {
if (isConnectorIndex(values.index)) {
actions.makeRequest({
@@ -171,16 +156,6 @@ export const ConnectorFilteringLogic = kea<
});
}
},
- draftApiError: (error) => flashAPIErrors(error),
- draftApiSuccess: () => {
- flashSuccessToast(
- i18n.translate(
- 'xpack.enterpriseSearch.content.index.connector.syncRules.successToastDraft.title',
- { defaultMessage: 'Draft rules saved' }
- )
- );
- },
- draftMakeRequest: () => clearFlashMessages(),
fetchIndexApiSuccess: (index) => {
if (
!values.isEditing &&
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawler_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawler_logic.ts
index 3d8954d2210e6..7d25ad679d00c 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawler_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/crawler_logic.ts
@@ -86,9 +86,6 @@ export const CrawlerLogic = kea>({
values: [GetCrawlerApiLogic, ['status', 'data'], CachedFetchIndexApiLogic, ['indexData']],
},
listeners: ({ actions, values }) => ({
- apiError: (error) => {
- flashAPIErrors(error);
- },
fetchCrawlerData: () => {
const { indexName } = IndexNameLogic.values;
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal_logic.ts
index 96294170d6b77..9c69da8decbb5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/delete_domain_modal_logic.ts
@@ -13,11 +13,8 @@
import { kea, MakeLogicType } from 'kea';
-import { i18n } from '@kbn/i18n';
-
import { Status } from '../../../../../../../common/types/api';
import { Actions } from '../../../../../shared/api_logic/create_api_logic';
-import { flashAPIErrors, flashSuccessToast } from '../../../../../shared/flash_messages';
import {
DeleteCrawlerDomainApiLogic,
DeleteCrawlerDomainResponse,
@@ -74,18 +71,7 @@ export const DeleteDomainModalLogic = kea<
],
},
listeners: ({ values }) => ({
- apiError: (error) => {
- flashAPIErrors(error);
- },
- apiSuccess: ({ domain }) => {
- flashSuccessToast(
- i18n.translate('xpack.enterpriseSearch.crawler.domainsTable.action.delete.successMessage', {
- defaultMessage: "Successfully deleted domain '{domainUrl}'",
- values: {
- domainUrl: domain.url,
- },
- })
- );
+ apiSuccess: () => {
CrawlerLogic.actions.fetchCrawlerData();
},
deleteDomain: () => {
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domain_management_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domain_management_logic.ts
index 8131ceb250757..e023b865ca987 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domain_management_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/crawler/domain_management/domain_management_logic.ts
@@ -14,9 +14,8 @@
import { kea, MakeLogicType } from 'kea';
import { Meta } from '../../../../../../../common/types';
-import { HttpError, Status } from '../../../../../../../common/types/api';
+import { Status } from '../../../../../../../common/types/api';
import { DEFAULT_META } from '../../../../../shared/constants';
-import { flashAPIErrors } from '../../../../../shared/flash_messages';
import { updateMetaPageIndex } from '../../../../../shared/table_pagination';
import { DeleteCrawlerDomainApiLogic } from '../../../../api/crawler/delete_crawler_domain_api_logic';
import { GetCrawlerDomainsApiLogic } from '../../../../api/crawler/get_crawler_domains_api_logic';
@@ -33,10 +32,8 @@ interface DomainManagementValues {
}
interface DomainManagementActions {
- deleteApiError(error: HttpError): HttpError;
deleteDomain(domain: CrawlerDomain): { domain: CrawlerDomain };
deleteSuccess(): void;
- getApiError(error: HttpError): HttpError;
getApiSuccess(data: CrawlerDomainsWithMeta): CrawlerDomainsWithMeta;
getDomains(meta: Meta): { meta: Meta };
onPaginate(newPageIndex: number): { newPageIndex: number };
@@ -48,9 +45,9 @@ export const DomainManagementLogic = kea<
connect: {
actions: [
GetCrawlerDomainsApiLogic,
- ['apiError as getApiError', 'apiSuccess as getApiSuccess'],
+ ['apiSuccess as getApiSuccess'],
DeleteCrawlerDomainApiLogic,
- ['apiError as deleteApiError', 'apiSuccess as deleteApiSuccess'],
+ ['apiSuccess as deleteApiSuccess'],
],
values: [
GetCrawlerDomainsApiLogic,
@@ -68,9 +65,6 @@ export const DomainManagementLogic = kea<
}),
},
listeners: ({ values, actions }) => ({
- deleteApiError: (error) => {
- flashAPIErrors(error);
- },
deleteApiSuccess: () => {
actions.getDomains(values.meta);
},
@@ -78,9 +72,6 @@ export const DomainManagementLogic = kea<
const { indexName } = IndexNameLogic.values;
DeleteCrawlerDomainApiLogic.actions.makeRequest({ domain, indexName });
},
- getApiError: (error) => {
- flashAPIErrors(error);
- },
getDomains: ({ meta }) => {
const { indexName } = IndexNameLogic.values;
GetCrawlerDomainsApiLogic.actions.makeRequest({ indexName, meta });
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts
index 1f255a049d26e..28037f346c1ad 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.test.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { LogicMounter, mockFlashMessageHelpers } from '../../../__mocks__/kea_logic';
+import { LogicMounter } from '../../../__mocks__/kea_logic';
import { nextTick } from '@kbn/test-jest-helpers';
@@ -101,22 +101,6 @@ describe('DocumentsLogic', () => {
jest.useRealTimers();
});
});
- it('calls flashAPIErrors on apiError', () => {
- DocumentsLogic.actions.apiError({} as HttpError);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
- });
- it('calls flashAPIErrors on mappingsApiError', () => {
- DocumentsLogic.actions.mappingsApiError({} as HttpError);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
- });
- it('clears flash messages on new makeRequest', () => {
- DocumentsLogic.actions.makeRequest({
- indexName: 'index',
- pagination: convertMetaToPagination(INDEX_DOCUMENTS_META_DEFAULT),
- query: '',
- });
- expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1);
- });
});
describe('selectors', () => {
describe('isLoading', () => {
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts
index 439e8652ffc3c..093c4f5f399cc 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/documents_logic.ts
@@ -16,9 +16,8 @@ import {
import { ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT } from '../../../../../common/constants';
import { Meta } from '../../../../../common/types';
-import { HttpError, Status } from '../../../../../common/types/api';
+import { Status } from '../../../../../common/types/api';
-import { flashAPIErrors, clearFlashMessages } from '../../../shared/flash_messages';
import { updateMetaPageIndex } from '../../../shared/table_pagination';
import { MappingsApiLogic } from '../../api/mappings/mappings_logic';
@@ -42,11 +41,9 @@ export const DEFAULT_PAGINATION = {
};
interface DocumentsLogicActions {
- apiError(error: HttpError): HttpError;
apiReset: typeof SearchDocumentsApiLogic.actions.apiReset;
makeMappingRequest: typeof MappingsApiLogic.actions.makeRequest;
makeRequest: typeof SearchDocumentsApiLogic.actions.makeRequest;
- mappingsApiError(error: HttpError): HttpError;
onPaginate(newPageIndex: number): { newPageIndex: number };
setDocsPerPage(docsPerPage: number): { docsPerPage: number };
setSearchQuery(query: string): { query: string };
@@ -81,9 +78,9 @@ export const DocumentsLogic = kea ({
- apiError: (e) => flashAPIErrors(e),
- makeRequest: () => clearFlashMessages(),
- mappingsApiError: (e) => flashAPIErrors(e),
onPaginate: () => {
actions.makeRequest({
docsPerPage: values.docsPerPage,
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_view_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_view_logic.test.ts
index f4f28ace3ae9a..3ff4355636f89 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_view_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_view_logic.test.ts
@@ -14,7 +14,7 @@ import { apiIndex, connectorIndex, crawlerIndex } from '../../__mocks__/view_ind
import { nextTick } from '@kbn/test-jest-helpers';
-import { HttpError, Status } from '../../../../../common/types/api';
+import { Status } from '../../../../../common/types/api';
import { SyncStatus } from '../../../../../common/types/connectors';
import { StartSyncApiLogic } from '../../api/connector/start_sync_api_logic';
@@ -229,16 +229,6 @@ describe('IndexViewLogic', () => {
});
describe('listeners', () => {
- it('calls clearFlashMessages on makeStartSyncRequest', () => {
- IndexViewLogic.actions.makeStartSyncRequest({ connectorId: 'connectorId' });
- expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1);
- });
-
- it('calls flashAPIErrors on apiError', () => {
- IndexViewLogic.actions.startSyncApiError({} as HttpError);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({});
- });
it('calls makeFetchIndexRequest on fetchIndex', () => {
IndexViewLogic.actions.makeFetchIndexRequest = jest.fn();
IndexNameLogic.actions.setIndexName('indexName');
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_view_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_view_logic.ts
index 07f6f70aae37b..2d3651a598fc1 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_view_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/index_view_logic.ts
@@ -18,11 +18,7 @@ import {
} from '../../../../../common/types/connectors';
import { ElasticsearchIndexWithIngestion } from '../../../../../common/types/indices';
import { Actions } from '../../../shared/api_logic/create_api_logic';
-import {
- flashAPIErrors,
- clearFlashMessages,
- flashSuccessToast,
-} from '../../../shared/flash_messages';
+import { flashSuccessToast } from '../../../shared/flash_messages';
import { StartSyncApiLogic, StartSyncArgs } from '../../api/connector/start_sync_api_logic';
import {
@@ -60,8 +56,6 @@ export interface IndexViewActions {
resetRecheckIndexLoading: () => void;
startFetchIndexPoll: CachedFetchIndexApiLogicActions['startPolling'];
startSync(): void;
- startSyncApiError: StartSyncApiActions['apiError'];
- startSyncApiSuccess: StartSyncApiActions['apiSuccess'];
stopFetchIndexPoll(): CachedFetchIndexApiLogicActions['stopPolling'];
stopFetchIndexPoll(): void;
}
@@ -114,11 +108,7 @@ export const IndexViewLogic = kea clearFlashMessages(),
recheckIndex: () => actions.fetchIndex(),
setIndexName: ({ indexName }) => {
actions.startFetchIndexPoll(indexName);
@@ -166,14 +155,6 @@ export const IndexViewLogic = kea flashAPIErrors(e),
- startSyncApiSuccess: () => {
- flashSuccessToast(
- i18n.translate('xpack.enterpriseSearch.content.searchIndex.index.syncSuccess.message', {
- defaultMessage: 'Successfully scheduled a sync, waiting for a connector to pick it up',
- })
- );
- },
}),
path: ['enterprise_search', 'content', 'index_view_logic'],
reducers: {
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts
index 4d3a8ec40834b..34584d394b93a 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/overview.logic.ts
@@ -8,7 +8,6 @@
import { kea, MakeLogicType } from 'kea';
import { Status } from '../../../../../common/types/api';
-import { flashAPIErrors } from '../../../shared/flash_messages';
import { KibanaLogic } from '../../../shared/kibana';
import { GenerateApiKeyLogic } from '../../api/generate_api_key/generate_api_key_logic';
@@ -58,8 +57,7 @@ export const OverviewLogic = kea ({
- apiError: async (error, breakpoint) => {
- flashAPIErrors(error);
+ apiError: async (_, breakpoint) => {
// show error for a second before navigating away
await breakpoint(1000);
KibanaLogic.values.navigateToUrl(SEARCH_INDICES_PATH);
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors.tsx
index 0b380e003f48d..554c7d1162d0d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors.tsx
@@ -16,14 +16,16 @@ import { i18n } from '@kbn/i18n';
import { MlInferenceError } from '../../../../../../common/types/pipelines';
import { DataPanel } from '../../../../shared/data_panel/data_panel';
+import { FetchMlInferenceErrorsApiLogic } from '../../../api/pipelines/fetch_ml_inference_pipeline_errors';
+
import { InferenceErrorsLogic } from './inference_errors_logic';
export const InferenceErrors: React.FC = () => {
const { indexName, isLoading, inferenceErrors } = useValues(InferenceErrorsLogic);
- const { fetchIndexInferenceErrorLogs } = useActions(InferenceErrorsLogic);
+ const { makeRequest } = useActions(FetchMlInferenceErrorsApiLogic);
useEffect(() => {
- fetchIndexInferenceErrorLogs({ indexName });
+ makeRequest({ indexName });
}, [indexName]);
const errorsColumns: Array> = [
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors_logic.test.ts
index a9d07657b94ab..9b4414b4ec1ba 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors_logic.test.ts
@@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
-import { LogicMounter, mockFlashMessageHelpers } from '../../../../__mocks__/kea_logic';
+import { LogicMounter } from '../../../../__mocks__/kea_logic';
import { Status } from '../../../../../../common/types/api';
import { FetchMlInferenceErrorsApiLogic } from '../../../api/pipelines/fetch_ml_inference_pipeline_errors';
@@ -24,7 +24,6 @@ describe('InferenceErrorsLogic', () => {
const { mount: mountFetchInferenceErrorsApiLogic } = new LogicMounter(
FetchMlInferenceErrorsApiLogic
);
- const { clearFlashMessages, flashAPIErrors } = mockFlashMessageHelpers;
beforeEach(() => {
jest.clearAllMocks();
mountFetchInferenceErrorsApiLogic();
@@ -36,14 +35,6 @@ describe('InferenceErrorsLogic', () => {
});
describe('actions', () => {
- it('should clear flash errors when fetching data', () => {
- FetchMlInferenceErrorsApiLogic.actions.makeRequest({ indexName: 'test' });
- expect(clearFlashMessages).toHaveBeenCalledTimes(1);
- });
- it('should flash errors fetching errors', () => {
- FetchMlInferenceErrorsApiLogic.actions.apiError('error' as any);
- expect(flashAPIErrors).toHaveBeenCalledWith('error');
- });
it('should load fetched errors', () => {
const inferenceErrorsData = {
errors: [
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors_logic.ts
index 520af1bbd6c39..9bc466597d92d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_errors_logic.ts
@@ -9,26 +9,12 @@ import { kea, MakeLogicType } from 'kea';
import { Status } from '../../../../../../common/types/api';
import { MlInferenceError } from '../../../../../../common/types/pipelines';
-import { Actions } from '../../../../shared/api_logic/create_api_logic';
-import { clearFlashMessages, flashAPIErrors } from '../../../../shared/flash_messages';
import {
- FetchMlInferenceErrorsApiLogicArgs,
FetchMlInferenceErrorsApiLogicResponse,
FetchMlInferenceErrorsApiLogic,
} from '../../../api/pipelines/fetch_ml_inference_pipeline_errors';
import { IndexNameLogic } from '../index_name_logic';
-interface InferenceErrorsActions {
- fetchIndexInferenceErrorLogs: Actions<
- FetchMlInferenceErrorsApiLogicArgs,
- FetchMlInferenceErrorsApiLogicResponse
- >['makeRequest'];
- fetchIndexInferenceErrorLogsError: Actions<
- FetchMlInferenceErrorsApiLogicArgs,
- FetchMlInferenceErrorsApiLogicResponse
- >['apiError'];
-}
-
interface InferenceErrorsValues {
fetchIndexInferenceHistoryStatus: Status;
indexName: string;
@@ -37,17 +23,8 @@ interface InferenceErrorsValues {
isLoading: boolean;
}
-export const InferenceErrorsLogic = kea<
- MakeLogicType
->({
+export const InferenceErrorsLogic = kea>({
connect: {
- actions: [
- FetchMlInferenceErrorsApiLogic,
- [
- 'makeRequest as fetchIndexInferenceErrorLogs',
- 'apiError as fetchIndexInferenceErrorLogsError',
- ],
- ],
values: [
IndexNameLogic,
['indexName'],
@@ -55,10 +32,6 @@ export const InferenceErrorsLogic = kea<
['data as inferenceErrorsData', 'status as fetchIndexInferenceHistoryStatus'],
],
},
- listeners: () => ({
- fetchIndexInferenceErrorLogs: () => clearFlashMessages(),
- fetchIndexInferenceErrorLogsError: (error) => flashAPIErrors(error),
- }),
path: ['enterprise_search', 'content', 'pipelines_inference_errors'],
selectors: ({ selectors }) => ({
inferenceErrors: [
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_history_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_history_logic.ts
index e1ec8feb77f09..2d2e4021f2feb 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_history_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/inference_history_logic.ts
@@ -10,7 +10,6 @@ import { kea, MakeLogicType } from 'kea';
import { Status } from '../../../../../../common/types/api';
import { MlInferenceHistoryItem } from '../../../../../../common/types/pipelines';
import { Actions } from '../../../../shared/api_logic/create_api_logic';
-import { clearFlashMessages, flashAPIErrors } from '../../../../shared/flash_messages';
import {
FetchMlInferencePipelineHistoryApiLogicArgs,
FetchMlInferencePipelineHistoryApiLogicResponse,
@@ -48,10 +47,6 @@ export const InferenceHistoryLogic = kea<
['data as inferenceHistoryData', 'status as fetchIndexInferenceHistoryStatus'],
],
},
- listeners: () => ({
- fetchIndexInferenceHistory: () => clearFlashMessages(),
- fetchIndexInferenceHistoryError: (error) => flashAPIErrors(error),
- }),
path: ['enterprise_search', 'content', 'pipelines_inference_history'],
selectors: ({ selectors }) => ({
inferenceHistory: [
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.test.ts
index 8d74cae4ba998..970119cd58b4f 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.test.ts
@@ -135,7 +135,7 @@ describe('PipelinesLogic', () => {
describe('apiSuccess', () => {
it('should call flashSuccessToast', () => {
PipelinesLogic.actions.apiSuccess({ connectorId: 'a', pipeline: newPipeline });
- expect(flashSuccessToast).toHaveBeenCalledWith('Pipelines successfully updated');
+ expect(flashSuccessToast).toHaveBeenCalledWith('Pipelines updated');
});
});
describe('createCustomPipelineError', () => {
@@ -151,7 +151,7 @@ describe('PipelinesLogic', () => {
PipelinesLogic.actions.fetchCustomPipeline = jest.fn();
PipelinesLogic.actions.fetchIndexApiSuccess(connectorIndex);
PipelinesLogic.actions.createCustomPipelineSuccess({ created: ['a', 'b'] });
- expect(flashSuccessToast).toHaveBeenCalledWith('Custom pipeline successfully created');
+ expect(flashSuccessToast).toHaveBeenCalledWith('Custom pipeline created');
expect(PipelinesLogic.actions.setPipelineState).toHaveBeenCalledWith({
...PipelinesLogic.values.pipelineState,
name: 'a',
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts
index 487f89f57c22a..134155f88a64c 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_logic.ts
@@ -8,6 +8,7 @@
import { kea, MakeLogicType } from 'kea';
import { IngestPipeline } from '@elastic/elasticsearch/lib/api/types';
+
import { i18n } from '@kbn/i18n';
import { DEFAULT_PIPELINE_VALUES } from '../../../../../../common/constants';
@@ -17,11 +18,7 @@ import { IngestPipelineParams } from '../../../../../../common/types/connectors'
import { ElasticsearchIndexWithIngestion } from '../../../../../../common/types/indices';
import { InferencePipeline } from '../../../../../../common/types/pipelines';
import { Actions } from '../../../../shared/api_logic/create_api_logic';
-import {
- clearFlashMessages,
- flashAPIErrors,
- flashSuccessToast,
-} from '../../../../shared/flash_messages';
+import { flashSuccessToast } from '../../../../shared/flash_messages';
import {
FetchDefaultPipelineApiLogic,
@@ -227,7 +224,6 @@ export const PipelinesLogic = kea ({
- apiError: (error) => flashAPIErrors(error),
apiSuccess: ({ pipeline }) => {
if (isConnectorIndex(values.index) || isCrawlerIndex(values.index)) {
if (values.index.connector) {
@@ -238,11 +234,6 @@ export const PipelinesLogic = kea {
// Re-fetch processors to ensure we display newly added ml processor
@@ -256,16 +247,7 @@ export const PipelinesLogic = kea flashAPIErrors(error),
createCustomPipelineSuccess: ({ created }) => {
- flashSuccessToast(
- i18n.translate(
- 'xpack.enterpriseSearch.content.indices.pipelines.successToastCustom.title',
- {
- defaultMessage: 'Custom pipeline successfully created',
- }
- )
- );
actions.setPipelineState({ ...values.pipelineState, name: created[0] });
actions.savePipeline();
actions.fetchCustomPipeline({ indexName: values.index.name });
@@ -276,7 +258,6 @@ export const PipelinesLogic = kea flashAPIErrors(error),
deleteMlPipelineSuccess: (value) => {
if (value.deleted) {
flashSuccessToast(
@@ -296,7 +277,6 @@ export const PipelinesLogic = kea flashAPIErrors(error),
detachMlPipelineSuccess: (response) => {
if (response.updated) {
flashSuccessToast(
@@ -326,7 +306,6 @@ export const PipelinesLogic = kea clearFlashMessages(),
openModal: () => {
const pipeline =
isCrawlerIndex(values.index) || isConnectorIndex(values.index)
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.test.ts
index 544d48110941a..28af9f3d1a72d 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.test.ts
@@ -188,11 +188,9 @@ describe('SyncJobsViewLogic', () => {
expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1);
});
- it('calls flashAPIErrors on apiError', async () => {
+ it('updates state on apiError', async () => {
SyncJobsViewLogic.actions.fetchSyncJobsError({} as HttpError);
await nextTick();
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({});
expect(SyncJobsViewLogic.values).toEqual({
...DEFAULT_VALUES,
syncJobsLoading: false,
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.ts
index 91852dbaaec72..e8feb159dbcd0 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/sync_jobs/sync_jobs_view_logic.ts
@@ -14,7 +14,6 @@ import { Status } from '../../../../../../common/types/api';
import { ConnectorSyncJob } from '../../../../../../common/types/connectors';
import { Paginate } from '../../../../../../common/types/pagination';
import { Actions } from '../../../../shared/api_logic/create_api_logic';
-import { clearFlashMessages, flashAPIErrors } from '../../../../shared/flash_messages';
import {
FetchSyncJobsApiLogic,
FetchSyncJobsArgs,
@@ -61,10 +60,6 @@ export const SyncJobsViewLogic = kea ({
- fetchSyncJobs: () => clearFlashMessages(),
- fetchSyncJobsError: (e) => flashAPIErrors(e),
- }),
path: ['enterprise_search', 'content', 'sync_jobs_view_logic'],
selectors: ({ selectors }) => ({
syncJobs: [
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.ts
index e7405c45bf4a6..acf1eaa9f8331 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.test.ts
@@ -266,7 +266,7 @@ describe('IndicesLogic', () => {
isDeleteLoading: true,
});
});
- it('should update isDeleteLoading to to false on apiError', () => {
+ it('should update isDeleteLoading to false on apiError', () => {
IndicesLogic.actions.deleteIndex({ indexName: 'to-delete' });
IndicesLogic.actions.deleteError({} as HttpError);
@@ -276,9 +276,9 @@ describe('IndicesLogic', () => {
isDeleteLoading: false,
});
});
- it('should update isDeleteLoading to to false on apiSuccess', () => {
+ it('should update isDeleteLoading to false on apiSuccess', () => {
IndicesLogic.actions.deleteIndex({ indexName: 'to-delete' });
- IndicesLogic.actions.deleteSuccess();
+ IndicesLogic.actions.deleteSuccess({ indexName: 'to-delete' });
expect(IndicesLogic.values).toEqual({
...DEFAULT_VALUES,
@@ -294,20 +294,10 @@ describe('IndicesLogic', () => {
IndicesLogic.actions.makeRequest({ meta: DEFAULT_META, returnHiddenIndices: false });
expect(mockFlashMessageHelpers.clearFlashMessages).toHaveBeenCalledTimes(1);
});
- it('calls flashAPIErrors on apiError', () => {
- IndicesLogic.actions.apiError({} as HttpError);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({});
- });
- it('calls flashAPIErrors on deleteError', () => {
- IndicesLogic.actions.deleteError({} as HttpError);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledTimes(1);
- expect(mockFlashMessageHelpers.flashAPIErrors).toHaveBeenCalledWith({});
- });
it('calls flashSuccessToast, closeDeleteModal and fetchIndices on deleteSuccess', () => {
IndicesLogic.actions.fetchIndices = jest.fn();
IndicesLogic.actions.closeDeleteModal = jest.fn();
- IndicesLogic.actions.deleteSuccess();
+ IndicesLogic.actions.deleteSuccess({ indexName: 'index-name' });
expect(mockFlashMessageHelpers.flashSuccessToast).toHaveBeenCalledTimes(1);
expect(IndicesLogic.actions.fetchIndices).toHaveBeenCalledWith(
IndicesLogic.values.searchParams
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts
index a771a29a3c0d9..282566637e103 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/indices_logic.ts
@@ -7,22 +7,16 @@
import { kea, MakeLogicType } from 'kea';
-import { i18n } from '@kbn/i18n';
-
import { Meta } from '../../../../../common/types';
import { HttpError, Status } from '../../../../../common/types/api';
import { ElasticsearchIndexWithIngestion } from '../../../../../common/types/indices';
import { Actions } from '../../../shared/api_logic/create_api_logic';
import { DEFAULT_META } from '../../../shared/constants';
-import {
- flashAPIErrors,
- clearFlashMessages,
- flashSuccessToast,
-} from '../../../shared/flash_messages';
import { updateMetaPageIndex } from '../../../shared/table_pagination';
import {
DeleteIndexApiLogic,
DeleteIndexApiLogicArgs,
+ DeleteIndexApiLogicValues,
} from '../../api/index/delete_index_api_logic';
import { FetchIndicesAPILogic } from '../../api/index/fetch_indices_api_logic';
import { ElasticsearchViewIndex, IngestionMethod } from '../../types';
@@ -50,9 +44,9 @@ export interface IndicesActions {
searchQuery?: string;
};
closeDeleteModal(): void;
- deleteError: Actions['apiError'];
- deleteIndex: Actions['makeRequest'];
- deleteSuccess: Actions['apiSuccess'];
+ deleteError: Actions['apiError'];
+ deleteIndex: Actions['makeRequest'];
+ deleteSuccess: Actions['apiSuccess'];
fetchIndices({
meta,
returnHiddenIndices,
@@ -111,18 +105,7 @@ export const IndicesLogic = kea>({
],
},
listeners: ({ actions, values }) => ({
- apiError: (e) => flashAPIErrors(e),
- deleteError: (e) => flashAPIErrors(e),
deleteSuccess: () => {
- flashSuccessToast(
- i18n.translate('xpack.enterpriseSearch.content.indices.deleteIndex.successToast.title', {
- defaultMessage:
- 'Your index {indexName} and any associated ingestion configurations were successfully deleted',
- values: {
- indexName: values.deleteModalIndexName,
- },
- })
- );
actions.closeDeleteModal();
actions.fetchIndices(values.searchParams);
},
@@ -130,7 +113,6 @@ export const IndicesLogic = kea>({
await breakpoint(150);
actions.makeRequest(input);
},
- makeRequest: () => clearFlashMessages(),
}),
path: ['enterprise_search', 'content', 'indices_logic'],
reducers: () => ({
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_logic.ts
index 11c63043e989a..84c03f821442b 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/settings/settings_logic.ts
@@ -9,18 +9,11 @@ import { kea, MakeLogicType } from 'kea';
import { isDeepEqual } from 'react-use/lib/util';
-import { i18n } from '@kbn/i18n';
-
import { DEFAULT_PIPELINE_VALUES } from '../../../../../common/constants';
import { Status } from '../../../../../common/types/api';
import { IngestPipelineParams } from '../../../../../common/types/connectors';
import { Actions } from '../../../shared/api_logic/create_api_logic';
-import {
- clearFlashMessages,
- flashAPIErrors,
- flashSuccessToast,
-} from '../../../shared/flash_messages';
import {
FetchDefaultPipelineApiLogic,
@@ -81,22 +74,12 @@ export const SettingsLogic = kea ({
- apiError: (error) => flashAPIErrors(error),
apiSuccess: (pipeline) => {
- flashSuccessToast(
- i18n.translate(
- 'xpack.enterpriseSearch.content.indices.defaultPipelines.successToast.title',
- {
- defaultMessage: 'Default pipeline successfully updated',
- }
- )
- );
actions.fetchDefaultPipelineSuccess(pipeline);
},
fetchDefaultPipelineSuccess: (pipeline) => {
actions.setPipeline(pipeline);
},
- makeRequest: () => clearFlashMessages(),
}),
path: ['enterprise_search', 'content', 'settings'],
reducers: () => ({
diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts
index 82a2af053773a..edd3aa3d42edb 100644
--- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/routes.ts
@@ -23,5 +23,6 @@ export const SEARCH_INDEX_CRAWLER_DOMAIN_DETAIL_PATH = `${SEARCH_INDEX_PATH}/cra
export const SEARCH_INDEX_SELECT_CONNECTOR_PATH = `${SEARCH_INDEX_PATH}/select_connector`;
export const ENGINES_PATH = `${ROOT_PATH}engines`;
+export const ENGINE_CREATION_PATH = `${ENGINES_PATH}/new`;
export const ML_MANAGE_TRAINED_MODELS_PATH = '/app/ml/trained_models';
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.test.ts b/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.test.ts
index 7349f036c255d..ced4a7c5004b5 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.test.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.test.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { LogicMounter } from '../../__mocks__/kea_logic';
+import { LogicMounter, mockFlashMessageHelpers } from '../../__mocks__/kea_logic';
import { nextTick } from '@kbn/test-jest-helpers';
@@ -26,6 +26,7 @@ describe('CreateApiLogic', () => {
const apiCallMock = jest.fn();
const logic = createApiLogic(['path'], apiCallMock);
const { mount } = new LogicMounter(logic);
+ const { clearFlashMessages, flashSuccessToast, flashAPIErrors } = mockFlashMessageHelpers;
beforeEach(() => {
jest.clearAllMocks();
@@ -45,6 +46,7 @@ describe('CreateApiLogic', () => {
apiStatus: { status: Status.LOADING },
status: Status.LOADING,
});
+ expect(clearFlashMessages).toHaveBeenCalled();
});
it('should set persist data in between new requests', () => {
@@ -57,6 +59,16 @@ describe('CreateApiLogic', () => {
status: Status.LOADING,
});
});
+
+ it('should not call clearFlashMessages if clearFlashMessages param is false', () => {
+ const messageLogic = createApiLogic(['message_path'], apiCallMock, {
+ clearFlashMessagesOnMakeRequest: false,
+ });
+ const { mount: messageMount } = messageLogic;
+ messageMount();
+ messageLogic.actions.makeRequest({});
+ expect(clearFlashMessages).not.toHaveBeenCalled();
+ });
});
describe('apiSuccess', () => {
it('should set status to SUCCESS and load data', () => {
@@ -70,6 +82,16 @@ describe('CreateApiLogic', () => {
data: { success: 'data' },
status: Status.SUCCESS,
});
+ expect(flashSuccessToast).not.toHaveBeenCalled();
+ });
+ it('should call flashSuccessToast if success function provided', () => {
+ const messageLogic = createApiLogic(['message_path'], apiCallMock, {
+ showSuccessFlashFn: () => 'test message',
+ });
+ const { mount: messageMount } = messageLogic;
+ messageMount();
+ messageLogic.actions.apiSuccess({});
+ expect(flashSuccessToast).toHaveBeenCalledWith('test message');
});
});
describe('apiError', () => {
@@ -86,6 +108,16 @@ describe('CreateApiLogic', () => {
error: 'error',
status: Status.ERROR,
});
+ expect(flashAPIErrors).toHaveBeenCalledWith('error');
+ });
+ it('should not call flashApiErrors if showErrorFlash param is set to false', () => {
+ const messageLogic = createApiLogic(['message_path'], apiCallMock, {
+ showErrorFlash: false,
+ });
+ const { mount: messageMount } = messageLogic;
+ messageMount();
+ messageLogic.actions.apiError('error' as any as HttpError);
+ expect(flashAPIErrors).not.toHaveBeenCalledWith('error');
});
});
describe('apiReset', () => {
diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts
index b8f6aac6f8624..f8a3eb7a823d8 100644
--- a/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/shared/api_logic/create_api_logic.ts
@@ -8,6 +8,7 @@
import { kea, MakeLogicType } from 'kea';
import { ApiStatus, Status, HttpError } from '../../../../common/types/api';
+import { clearFlashMessages, flashAPIErrors, flashSuccessToast } from '../flash_messages';
export interface Values {
apiStatus: ApiStatus;
@@ -23,11 +24,25 @@ export interface Actions {
makeRequest(args: Args): Args;
}
+export interface CreateApiOptions {
+ clearFlashMessagesOnMakeRequest: boolean;
+ showErrorFlash: boolean;
+ showSuccessFlashFn?: (result: Result) => string;
+}
+
+const DEFAULT_CREATE_API_OPTIONS = {
+ clearFlashMessagesOnMakeRequest: true,
+ showErrorFlash: true,
+};
+
export const createApiLogic = (
path: string[],
- apiFunction: (args: Args) => Promise
-) =>
- kea, Actions>>({
+ apiFunction: (args: Args) => Promise,
+ incomingOptions: Partial> = {}
+) => {
+ const options = { ...DEFAULT_CREATE_API_OPTIONS, ...incomingOptions };
+
+ return kea, Actions>>({
actions: {
apiError: (error) => error,
apiReset: true,
@@ -35,7 +50,20 @@ export const createApiLogic = (
makeRequest: (args) => args,
},
listeners: ({ actions }) => ({
+ apiError: (error) => {
+ if (options.showErrorFlash) {
+ flashAPIErrors(error);
+ }
+ },
+ apiSuccess: (result) => {
+ if (options.showSuccessFlashFn) {
+ flashSuccessToast(options.showSuccessFlashFn(result));
+ }
+ },
makeRequest: async (args) => {
+ if (options.clearFlashMessagesOnMakeRequest) {
+ clearFlashMessages();
+ }
try {
const result = await apiFunction(args);
actions.apiSuccess(result);
@@ -75,3 +103,4 @@ export const createApiLogic = (
status: [() => [selectors.apiStatus], (apiStatus: ApiStatus) => apiStatus.status],
}),
});
+};
diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_custom_source/add_custom_source_logic.ts b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_custom_source/add_custom_source_logic.ts
index 0f81e78d98868..1aa292c1efc3f 100644
--- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_custom_source/add_custom_source_logic.ts
+++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/content_sources/components/add_source/add_custom_source/add_custom_source_logic.ts
@@ -8,7 +8,6 @@
import { kea, MakeLogicType } from 'kea';
import { HttpError, Status } from '../../../../../../../../common/types/api';
-import { clearFlashMessages, flashAPIErrors } from '../../../../../../shared/flash_messages';
import { CustomSource } from '../../../../../types';
import { AddCustomSourceApiLogic } from './add_custom_source_api_logic';
@@ -92,8 +91,6 @@ export const AddCustomSourceLogic = kea<
const { baseServiceType } = props;
actions.makeRequest({ name: customSourceNameValue, baseServiceType });
},
- makeRequest: () => clearFlashMessages(),
- apiError: (error) => flashAPIErrors(error),
apiSuccess: ({ source }) => {
actions.setNewCustomSource(source);
},
diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts
index e9f22cae5b94b..14c3532efee91 100644
--- a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.test.ts
@@ -35,7 +35,6 @@ describe('addConnector lib function', () => {
create: jest.fn(),
exists: jest.fn(),
getMapping: jest.fn(),
- refresh: jest.fn(),
},
},
asInternalUser: {},
@@ -160,6 +159,7 @@ describe('addConnector lib function', () => {
sync_now: false,
},
index: CONNECTORS_INDEX,
+ refresh: true,
});
expect(mockClient.asCurrentUser.indices.create).toHaveBeenCalledWith({
index: 'index_name',
@@ -343,6 +343,7 @@ describe('addConnector lib function', () => {
sync_now: false,
},
index: CONNECTORS_INDEX,
+ refresh: true,
});
expect(mockClient.asCurrentUser.indices.create).toHaveBeenCalledWith({
index: 'index_name',
@@ -448,6 +449,7 @@ describe('addConnector lib function', () => {
sync_now: false,
},
index: CONNECTORS_INDEX,
+ refresh: true,
});
expect(mockClient.asCurrentUser.indices.create).toHaveBeenCalledWith({
index: 'search-index_name',
diff --git a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.ts b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.ts
index f0ff60a075439..e697cf57522f8 100644
--- a/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/connectors/add_connector.ts
@@ -59,9 +59,9 @@ const createConnector = async (
const result = await client.asCurrentUser.index({
document,
index: CONNECTORS_INDEX,
+ refresh: true,
});
await createIndex(client, document.index_name, language, false);
- await client.asCurrentUser.indices.refresh({ index: CONNECTORS_INDEX });
return { id: result._id, index_name: document.index_name };
};
diff --git a/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.test.ts b/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.test.ts
index 2e3b7a202f153..1f7f1eec9cdff 100644
--- a/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.test.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.test.ts
@@ -87,7 +87,28 @@ describe('fetchSearchResults lib function', () => {
expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({
from: DEFAULT_FROM_VALUE,
index: indexName,
- q: JSON.stringify(query),
+ q: query,
+ size: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
+ });
+ });
+
+ it('should escape quotes in queries and return results with hits', async () => {
+ mockClient.asCurrentUser.search.mockImplementation(
+ () => regularSearchResultsResponse as SearchResponseBody
+ );
+
+ await expect(
+ fetchSearchResults(
+ mockClient as unknown as IScopedClusterClient,
+ indexName,
+ '"yellow banana"'
+ )
+ ).resolves.toEqual(regularSearchResultsResponse);
+
+ expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({
+ from: DEFAULT_FROM_VALUE,
+ index: indexName,
+ q: '\\"yellow banana\\"',
size: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
});
});
@@ -120,7 +141,7 @@ describe('fetchSearchResults lib function', () => {
expect(mockClient.asCurrentUser.search).toHaveBeenCalledWith({
from: DEFAULT_FROM_VALUE,
index: indexName,
- q: JSON.stringify(query),
+ q: query,
size: ENTERPRISE_SEARCH_DOCUMENTS_DEFAULT_DOC_COUNT,
});
});
diff --git a/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.ts b/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.ts
index b7c3bf81e0ca5..a1b8da77f887d 100644
--- a/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.ts
+++ b/x-pack/plugins/enterprise_search/server/lib/fetch_search_results.ts
@@ -21,7 +21,7 @@ export const fetchSearchResults = async (
from,
index: indexName,
size,
- ...(!!query ? { q: JSON.stringify(query) } : {}),
+ ...(!!query ? { q: query.replace(/"/g, '\\"') } : {}),
});
return results;
};
diff --git a/x-pack/plugins/enterprise_search/server/plugin.ts b/x-pack/plugins/enterprise_search/server/plugin.ts
index 408413398aa29..c3ba5c95476e6 100644
--- a/x-pack/plugins/enterprise_search/server/plugin.ts
+++ b/x-pack/plugins/enterprise_search/server/plugin.ts
@@ -258,7 +258,7 @@ export class EnterpriseSearchPlugin implements Plugin {
indexName: 'logs-elastic_analytics.events-*',
type: 'index_name',
},
- name: 'Enterprise Search Behaviorial Analytics Logs',
+ name: 'Enterprise Search Behavioral Analytics Logs',
});
/**
diff --git a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js
index d05212223ef3d..7b621c4ccbcad 100644
--- a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js
+++ b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.test.js
@@ -278,4 +278,74 @@ describe('previewFile', () => {
expect(results.features).toEqual([]);
expect(results.invalidFeatures.length).toBe(2);
});
+
+ describe('crs', () => {
+ test('should read features with supported CRS', async () => {
+ const file = new File(
+ [
+ JSON.stringify({
+ ...FEATURE_COLLECTION,
+ crs: {
+ type: 'name',
+ properties: {
+ name: 'urn:ogc:def:crs:OGC:1.3:CRS84',
+ },
+ },
+ }),
+ ],
+ 'testfile.json',
+ { type: 'text/json' }
+ );
+
+ const importer = new GeoJsonImporter(file);
+ const results = await importer.previewFile();
+
+ expect(results).toEqual({
+ previewCoverage: 100,
+ hasPoints: true,
+ hasShapes: false,
+ features: FEATURE_COLLECTION.features,
+ invalidFeatures: [],
+ });
+ });
+
+ test('should reject "link" CRS', async () => {
+ const file = new File(
+ [
+ JSON.stringify({
+ ...FEATURE_COLLECTION,
+ crs: {
+ type: 'link',
+ },
+ }),
+ ],
+ 'testfile.json',
+ { type: 'text/json' }
+ );
+
+ const importer = new GeoJsonImporter(file);
+ await expect(importer.previewFile()).rejects.toThrow();
+ });
+
+ test('should reject unsupported CRS', async () => {
+ const file = new File(
+ [
+ JSON.stringify({
+ ...FEATURE_COLLECTION,
+ crs: {
+ type: 'name',
+ properties: {
+ name: 'urn:ogc:def:crs:EPSG::25833',
+ },
+ },
+ }),
+ ],
+ 'testfile.json',
+ { type: 'text/json' }
+ );
+
+ const importer = new GeoJsonImporter(file);
+ await expect(importer.previewFile()).rejects.toThrow();
+ });
+ });
});
diff --git a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts
index cc2f387e5bff4..e0405d1e998b8 100644
--- a/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts
+++ b/x-pack/plugins/file_upload/public/importer/geo/geojson_importer/geojson_importer.ts
@@ -13,6 +13,8 @@ import { AbstractGeoFileImporter } from '../abstract_geo_file_importer';
export const GEOJSON_FILE_TYPES = ['.json', '.geojson'];
+const SUPPORTED_CRS_LIST = ['EPSG:4326', 'urn:ogc:def:crs:OGC:1.3:CRS84'];
+
interface LoaderBatch {
bytesUsed?: number;
batchType?: string;
@@ -51,6 +53,28 @@ export class GeoJsonImporter extends AbstractGeoFileImporter {
const { value: batch, done } = await this._iterator.next();
+ // geojson only supports WGS 84 datum, with longitude and latitude units of decimal degrees.
+ // https://datatracker.ietf.org/doc/html/rfc7946#section-4
+ // Deprecated geojson specification supported crs
+ // https://geojson.org/geojson-spec.html#named-crs
+ // This importer only supports WGS 84 datum
+ if (typeof batch?.container?.crs === 'object') {
+ const crs = batch.container.crs as { type?: string; properties?: { name?: string } };
+ if (
+ crs?.type === 'link' ||
+ (crs?.type === 'name' && !SUPPORTED_CRS_LIST.includes(crs?.properties?.name ?? ''))
+ ) {
+ throw new Error(
+ i18n.translate('xpack.fileUpload.geojsonImporter.unsupportedCrs', {
+ defaultMessage: 'Unsupported coordinate reference system, expecting {supportedCrsList}',
+ values: {
+ supportedCrsList: SUPPORTED_CRS_LIST.join(', '),
+ },
+ })
+ );
+ }
+ }
+
if (!this._getIsActive() || done) {
results.hasNext = false;
return results;
diff --git a/x-pack/plugins/fleet/common/authz.test.ts b/x-pack/plugins/fleet/common/authz.test.ts
index cadb90651b01c..9602fabdce7c1 100644
--- a/x-pack/plugins/fleet/common/authz.test.ts
+++ b/x-pack/plugins/fleet/common/authz.test.ts
@@ -15,11 +15,8 @@ import { ENDPOINT_PRIVILEGES } from './constants';
const SECURITY_SOLUTION_ID = DEFAULT_APP_CATEGORIES.security.id;
-function generateActions(
- privileges: typeof ENDPOINT_PRIVILEGES,
- overrides: Record = {}
-) {
- return privileges.reduce((acc, privilege) => {
+function generateActions(privileges: T, overrides: Record = {}) {
+ return Object.keys(privileges).reduce((acc, privilege) => {
const executePackageAction = overrides[privilege] || false;
return {
diff --git a/x-pack/plugins/fleet/common/authz.ts b/x-pack/plugins/fleet/common/authz.ts
index 72812576e13b3..fa30f2b8f7f33 100644
--- a/x-pack/plugins/fleet/common/authz.ts
+++ b/x-pack/plugins/fleet/common/authz.ts
@@ -5,7 +5,6 @@
* 2.0.
*/
-import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common';
import type { Capabilities } from '@kbn/core-capabilities-common';
import { ENDPOINT_PRIVILEGES } from './constants';
@@ -95,14 +94,17 @@ export function calculatePackagePrivilegesFromCapabilities(
return {};
}
- const endpointActions = ENDPOINT_PRIVILEGES.reduce((acc, privilege) => {
- return {
- ...acc,
- [privilege]: {
- executePackageAction: capabilities.siem[privilege] || false,
- },
- };
- }, {});
+ const endpointActions = Object.entries(ENDPOINT_PRIVILEGES).reduce(
+ (acc, [privilege, { privilegeName }]) => {
+ return {
+ ...acc,
+ [privilege]: {
+ executePackageAction: capabilities.siem[privilegeName] || false,
+ },
+ };
+ },
+ {}
+ );
return {
endpoint: {
@@ -117,10 +119,11 @@ function getAuthorizationFromPrivileges(
privilege: string;
authorized: boolean;
}>,
+ prefix: string,
searchPrivilege: string
): boolean {
const privilege = kibanaPrivileges.find((p) =>
- p.privilege.endsWith(`${DEFAULT_APP_CATEGORIES.security.id}-${searchPrivilege}`)
+ p.privilege.endsWith(`${prefix}${searchPrivilege}`)
);
return privilege?.authorized || false;
}
@@ -138,15 +141,22 @@ export function calculatePackagePrivilegesFromKibanaPrivileges(
return {};
}
- const endpointActions = ENDPOINT_PRIVILEGES.reduce((acc, privilege: string) => {
- const kibanaPrivilege = getAuthorizationFromPrivileges(kibanaPrivileges, privilege);
- return {
- ...acc,
- [privilege]: {
- executePackageAction: kibanaPrivilege,
- },
- };
- }, {});
+ const endpointActions = Object.entries(ENDPOINT_PRIVILEGES).reduce(
+ (acc, [privilege, { appId, privilegeSplit, privilegeName }]) => {
+ const kibanaPrivilege = getAuthorizationFromPrivileges(
+ kibanaPrivileges,
+ `${appId}${privilegeSplit}`,
+ privilegeName
+ );
+ return {
+ ...acc,
+ [privilege]: {
+ executePackageAction: kibanaPrivilege,
+ },
+ };
+ },
+ {}
+ );
return {
endpoint: {
diff --git a/x-pack/plugins/fleet/common/constants/authz.ts b/x-pack/plugins/fleet/common/constants/authz.ts
index d7a0ca4ade2eb..fa2a2c0b44e93 100644
--- a/x-pack/plugins/fleet/common/constants/authz.ts
+++ b/x-pack/plugins/fleet/common/constants/authz.ts
@@ -5,22 +5,137 @@
* 2.0.
*/
-export const ENDPOINT_PRIVILEGES = [
- 'writeEndpointList',
- 'readEndpointList',
- 'writeTrustedApplications',
- 'readTrustedApplications',
- 'writeHostIsolationExceptions',
- 'readHostIsolationExceptions',
- 'writeBlocklist',
- 'readBlocklist',
- 'writeEventFilters',
- 'readEventFilters',
- 'writePolicyManagement',
- 'readPolicyManagement',
- 'writeActionsLogManagement',
- 'readActionsLogManagement',
- 'writeHostIsolation',
- 'writeProcessOperations',
- 'writeFileOperations',
-] as const;
+import { deepFreeze } from '@kbn/std';
+import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common';
+
+const SECURITY_SOLUTION_APP_ID = 'siem';
+
+interface PrivilegeMapObject {
+ appId: string;
+ privilegeSplit: string;
+ privilegeType: 'ui' | 'api';
+ privilegeName: string;
+}
+
+/**
+ * defines endpoint package privileges
+ * the key is the name of the packagePrivilege (ie. 'readSecuritySolution')
+ * the value object is for mapping kibana privileges and capabilities
+ * see x-pack/plugins/fleet/server/services/security/security.ts for example of how object values are used
+ */
+export const ENDPOINT_PRIVILEGES: Record = deepFreeze({
+ readSecuritySolution: {
+ appId: SECURITY_SOLUTION_APP_ID,
+ privilegeSplit: '/',
+ privilegeType: 'ui',
+ privilegeName: 'show',
+ },
+ writeSecuritySolution: {
+ appId: SECURITY_SOLUTION_APP_ID,
+ privilegeSplit: '/',
+ privilegeType: 'ui',
+ privilegeName: 'crud',
+ },
+ writeEndpointList: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writeEndpointList',
+ },
+ readEndpointList: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'readEndpointList',
+ },
+ writeTrustedApplications: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writeTrustedApplications',
+ },
+ readTrustedApplications: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'readTrustedApplications',
+ },
+ writeHostIsolationExceptions: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writeHostIsolationExceptions',
+ },
+ readHostIsolationExceptions: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'readHostIsolationExceptions',
+ },
+ writeBlocklist: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writeBlocklist',
+ },
+ readBlocklist: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'readBlocklist',
+ },
+ writeEventFilters: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writeEventFilters',
+ },
+ readEventFilters: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'readEventFilters',
+ },
+ writePolicyManagement: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writePolicyManagement',
+ },
+ readPolicyManagement: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'readPolicyManagement',
+ },
+ writeActionsLogManagement: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writeActionsLogManagement',
+ },
+ readActionsLogManagement: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'readActionsLogManagement',
+ },
+ writeHostIsolation: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writeHostIsolation',
+ },
+ writeProcessOperations: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writeProcessOperations',
+ },
+ writeFileOperations: {
+ appId: DEFAULT_APP_CATEGORIES.security.id,
+ privilegeSplit: '-',
+ privilegeType: 'api',
+ privilegeName: 'writeFileOperations',
+ },
+});
diff --git a/x-pack/plugins/fleet/common/experimental_features.ts b/x-pack/plugins/fleet/common/experimental_features.ts
index e7379ba1e2a4b..b64a1192f3930 100644
--- a/x-pack/plugins/fleet/common/experimental_features.ts
+++ b/x-pack/plugins/fleet/common/experimental_features.ts
@@ -16,6 +16,7 @@ export const allowedExperimentalValues = Object.freeze({
packageVerification: true,
showDevtoolsRequest: true,
diagnosticFileUploadEnabled: false,
+ experimentalDataStreamSettings: false,
});
type ExperimentalConfigKeys = Array;
diff --git a/x-pack/plugins/fleet/common/index.ts b/x-pack/plugins/fleet/common/index.ts
index 5b3765bf9e40b..b347b5b29dd81 100644
--- a/x-pack/plugins/fleet/common/index.ts
+++ b/x-pack/plugins/fleet/common/index.ts
@@ -147,6 +147,7 @@ export type {
KibanaAssetReference,
KibanaSavedObjectType,
EsAssetReference,
+ AssetsGroupedByServiceByType,
KibanaAssetTypeToParts,
KibanaAssetParts,
KibanaAssetType,
diff --git a/x-pack/plugins/fleet/common/mocks.ts b/x-pack/plugins/fleet/common/mocks.ts
index d5aca8398abd8..526110e133137 100644
--- a/x-pack/plugins/fleet/common/mocks.ts
+++ b/x-pack/plugins/fleet/common/mocks.ts
@@ -62,7 +62,7 @@ export const deletePackagePolicyMock = (): DeletePackagePoliciesResponse => {
* Creates mock `authz` object
*/
export const createFleetAuthzMock = (): FleetAuthz => {
- const endpointActions = ENDPOINT_PRIVILEGES.reduce((acc, privilege) => {
+ const endpointActions = Object.keys(ENDPOINT_PRIVILEGES).reduce((acc, privilege) => {
return {
...acc,
[privilege]: {
diff --git a/x-pack/plugins/fleet/cypress/e2e/a11y/home_page.cy.ts b/x-pack/plugins/fleet/cypress/e2e/a11y/home_page.cy.ts
index 9b3803679a0de..18369a048b464 100644
--- a/x-pack/plugins/fleet/cypress/e2e/a11y/home_page.cy.ts
+++ b/x-pack/plugins/fleet/cypress/e2e/a11y/home_page.cy.ts
@@ -33,15 +33,15 @@ import { setFleetServerHost } from '../../tasks/fleet_server';
describe('Home page', () => {
before(() => {
setFleetServerHost('https://fleetserver:8220');
- navigateTo(FLEET);
- cy.getBySel(LANDING_PAGE_ADD_FLEET_SERVER_BUTTON).click();
});
describe('Agents', () => {
- before(() => {
+ beforeEach(() => {
+ navigateTo(FLEET);
+ cy.getBySel(LANDING_PAGE_ADD_FLEET_SERVER_BUTTON).click();
cy.getBySel(AGENT_FLYOUT.QUICK_START_TAB_BUTTON, { timeout: 15000 }).should('be.visible');
- setFleetServerHost('https://fleetserver:8220');
});
+
const fleetServerHost = 'https://localhost:8220';
describe('Quick Start', () => {
@@ -63,7 +63,10 @@ describe('Home page', () => {
});
describe('Advanced', () => {
- before(() => {
+ beforeEach(() => {
+ navigateTo(FLEET);
+ cy.getBySel(LANDING_PAGE_ADD_FLEET_SERVER_BUTTON).click();
+ cy.getBySel(AGENT_FLYOUT.QUICK_START_TAB_BUTTON, { timeout: 15000 }).should('be.visible');
cy.getBySel(AGENT_FLYOUT.ADVANCED_TAB_BUTTON).click();
});
it('Select policy for fleet', () => {
@@ -88,7 +91,7 @@ describe('Home page', () => {
});
describe('Agent Policies', () => {
- before(() => {
+ beforeEach(() => {
navigateTo(FLEET);
cy.getBySel(AGENT_POLICIES_TAB).click();
cy.getBySel(AGENT_POLICIES_CREATE_AGENT_POLICY_FLYOUT.CREATE_BUTTON, {
@@ -111,6 +114,11 @@ describe('Home page', () => {
checkA11y({ skipFailures: false });
});
it('Agent Table After Adding Another Agent', () => {
+ cy.getBySel(AGENT_POLICIES_CREATE_AGENT_POLICY_FLYOUT.CREATE_BUTTON).click();
+ cy.getBySel(AGENT_POLICIES_CREATE_AGENT_POLICY_FLYOUT.TITLE, { timeout: 15000 }).should(
+ 'be.visible'
+ );
+ cy.getBySel(AGENT_POLICY_CREATE_AGENT_POLICY_NAME_FIELD).type('testName');
cy.getBySel(AGENT_POLICY_FLYOUT_CREATE_BUTTON).click();
cy.getBySel(AGENT_POLICY_NAME_LINK, { timeout: 15000 }).should('be.visible');
checkA11y({ skipFailures: true });
@@ -118,7 +126,7 @@ describe('Home page', () => {
});
describe('Enrollment Tokens', () => {
- before(() => {
+ beforeEach(() => {
navigateTo(FLEET);
cy.getBySel(ENROLLMENT_TOKENS_TAB).click();
});
@@ -137,7 +145,7 @@ describe('Home page', () => {
describe('Data Streams', () => {
before(() => {
- cy.getBySel('confirmModalCancelButton').click();
+ navigateTo(FLEET);
cy.getBySel(DATA_STREAMS_TAB, { timeout: 15000 }).should('be.visible');
cy.getBySel(DATA_STREAMS_TAB).click();
});
diff --git a/x-pack/plugins/fleet/cypress/e2e/enrollment_token.cy.ts b/x-pack/plugins/fleet/cypress/e2e/enrollment_token.cy.ts
index 88c94815eee0d..862e49e6c2119 100644
--- a/x-pack/plugins/fleet/cypress/e2e/enrollment_token.cy.ts
+++ b/x-pack/plugins/fleet/cypress/e2e/enrollment_token.cy.ts
@@ -49,6 +49,12 @@ describe('Enrollment token page', () => {
cy.get('.euiPanel').contains('Are you sure you want to revoke');
cy.get('.euiButton').contains('Revoke enrollment token').click({ force: true });
- cy.getBySel(ENROLLMENT_TOKENS.TABLE_REVOKE_BTN).first().should('not.exist');
+ cy.getBySel(ENROLLMENT_TOKENS.LIST_TABLE).within(() => {
+ cy.get('.euiTableRow')
+ .first()
+ .within(() => {
+ cy.getBySel(ENROLLMENT_TOKENS.TABLE_REVOKE_BTN).should('not.exist');
+ });
+ });
});
});
diff --git a/x-pack/plugins/fleet/dev_docs/data_model.md b/x-pack/plugins/fleet/dev_docs/data_model.md
index a36cda76fffb6..1e74afe3115b9 100644
--- a/x-pack/plugins/fleet/dev_docs/data_model.md
+++ b/x-pack/plugins/fleet/dev_docs/data_model.md
@@ -29,6 +29,8 @@ In prior alpha versions of Fleet, this data was also stored in Saved Objects bec
communicating directly with Kibana for policy updates. Once Fleet Server was introduced, that data was migrated to these
Elasticsearch indices to be readable by Fleet Server.
+_Note: All of these system indices are plain indices, and not data streams._
+
### `.fleet-agents` index
Each document in this index tracks an individual Elastic Agent's enrollment in the Fleet, which policy it is current
@@ -38,6 +40,8 @@ All of the code that interacts with this index is currently located in
[`x-pack/plugins/fleet/server/services/agents/crud.ts`](../server/services/agents/crud.ts) and the schema of these
documents is maintained by the `FleetServerAgent` TypeScript interface.
+- Cleanup model: N/A
+
### `.fleet-actions` index
Each document in this index represents an action that was initiated by a user and needs to be processed by Fleet Server
@@ -47,18 +51,35 @@ list.
The total schema for actions is represented by the `FleetServerAgentAction` type.
+- Cleanup model: Fleet Server considers actions expired after 30 days, and will remove them via an hourly process
+- [Source](https://github.com/elastic/fleet-server/blob/9af3b2176b42a0de34c5583b5430558c03792dd0/internal/pkg/gc/schedules.go#L29-L33)
+
### `.fleet-actions-results`
+- Cleanup model: N/A
+
### `.fleet-servers`
+- Cleanup model: N/A
+
### `.fleet-artifacts`
-### `.fleet-entrollment-api-keys`
+- Cleanup model: N/A
+
+### `.fleet-enrollment-api-keys`
+
+- Cleanup model: Deleteable via Fleet UI/API, deleted when an agent policy is deleted
+- [Source](https://github.com/elastic/kibana/blob/7a35748cb43f2c73623ffda6fa02b91c3cb4c689/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts#L102)
### `.fleet-policies`
+- Cleanup model: Deleted when a corresponding agent policy is deleted in the Fleet UI or API
+- [Source](https://github.com/elastic/kibana/blob/976b1b2331371f4a1325f6947d38d1f4de7a7254/x-pack/plugins/fleet/server/services/agent_policy.ts#L699-L701)
+
### `.fleet-policies-leader`
+- Cleanup model: N/A
+
## Saved Object types
The Fleet plugin leverages several Saved Object types to track metadata on install packages, agent policies, and more.
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx
index 4bfdff96a9d50..2191b151414ba 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_stream.tsx
@@ -21,7 +21,7 @@ import {
} from '@elastic/eui';
import { useRouteMatch } from 'react-router-dom';
-import { useGetDataStreams } from '../../../../../../../../hooks';
+import { useConfig, useGetDataStreams } from '../../../../../../../../hooks';
import { mapPackageReleaseToIntegrationCardRelease } from '../../../../../../../../services/package_prerelease';
import type { ExperimentalDataStreamFeature } from '../../../../../../../../../common/types/models/epm';
@@ -71,6 +71,10 @@ export const PackagePolicyInputStreamConfig = memo(
inputStreamValidationResults,
forceShowErrors,
}) => {
+ const config = useConfig();
+ const isExperimentalDataStreamSettingsEnabled =
+ config.enableExperimental?.includes('experimentalDataStreamSettings') ?? false;
+
const {
params: { packagePolicyId },
} = useRouteMatch<{ packagePolicyId?: string }>();
@@ -305,13 +309,15 @@ export const PackagePolicyInputStreamConfig = memo(
>
)}
{/* Experimental index/datastream settings e.g. synthetic source */}
-
+ {isExperimentalDataStreamSettingsEnabled && (
+
+ )}
>
) : null}
diff --git a/x-pack/plugins/fleet/server/routes/agent/handlers.ts b/x-pack/plugins/fleet/server/routes/agent/handlers.ts
index 2177fcdc252f6..71e21378e6f5f 100644
--- a/x-pack/plugins/fleet/server/routes/agent/handlers.ts
+++ b/x-pack/plugins/fleet/server/routes/agent/handlers.ts
@@ -205,9 +205,10 @@ export const getAgentTagsHandler: RequestHandler<
> = async (context, request, response) => {
const coreContext = await context.core;
const esClient = coreContext.elasticsearch.client.asInternalUser;
+ const soClient = coreContext.savedObjects.client;
try {
- const tags = await AgentService.getAgentTags(esClient, {
+ const tags = await AgentService.getAgentTags(soClient, esClient, {
showInactive: request.query.showInactive,
kuery: request.query.kuery,
});
diff --git a/x-pack/plugins/fleet/server/routes/epm/handlers.ts b/x-pack/plugins/fleet/server/routes/epm/handlers.ts
index b4b189d3ad2bb..702b70bee117b 100644
--- a/x-pack/plugins/fleet/server/routes/epm/handlers.ts
+++ b/x-pack/plugins/fleet/server/routes/epm/handlers.ts
@@ -53,7 +53,7 @@ import {
} from '../../services/epm/packages';
import type { BulkInstallResponse } from '../../services/epm/packages';
import { defaultFleetErrorHandler, fleetErrorToResponseOptions, FleetError } from '../../errors';
-import { licenseService } from '../../services';
+import { checkAllowedPackages, licenseService } from '../../services';
import { getArchiveEntry } from '../../services/epm/archive/cache';
import { getAsset } from '../../services/epm/archive/storage';
import { getPackageUsageStats } from '../../services/epm/packages/get';
@@ -91,6 +91,7 @@ export const getListHandler: FleetRequestHandler<
savedObjectsClient,
...request.query,
});
+
const body: GetPackagesResponse = {
items: res,
response: res,
@@ -209,7 +210,11 @@ export const getInfoHandler: FleetRequestHandler<
> = async (context, request, response) => {
try {
const savedObjectsClient = (await context.fleet).internalSoClient;
+ const { limitedToPackages } = await context.fleet;
const { pkgName, pkgVersion } = request.params;
+
+ checkAllowedPackages([pkgName], limitedToPackages);
+
const { ignoreUnverified = false, full = false, prerelease } = request.query;
if (pkgVersion && !semverValid(pkgVersion)) {
throw new FleetError('Package version is not a valid semver');
diff --git a/x-pack/plugins/fleet/server/routes/epm/index.ts b/x-pack/plugins/fleet/server/routes/epm/index.ts
index 383f9c3116d8d..fecf49471c97d 100644
--- a/x-pack/plugins/fleet/server/routes/epm/index.ts
+++ b/x-pack/plugins/fleet/server/routes/epm/index.ts
@@ -7,7 +7,13 @@
import type { IKibanaResponse } from '@kbn/core/server';
-import type { FleetAuthzRouter } from '../../services/security';
+import type { FleetAuthz } from '../../../common';
+
+import {
+ calculateRouteAuthz,
+ type FleetAuthzRouter,
+ getRouteRequiredAuthz,
+} from '../../services/security';
import type {
DeletePackageResponse,
@@ -111,9 +117,9 @@ export const registerRoutes = (router: FleetAuthzRouter) => {
{
path: EPM_API_ROUTES.INFO_PATTERN,
validate: GetInfoRequestSchema,
- fleetAuthz: {
- integrations: { readPackageInfo: true },
- },
+ fleetAuthz: (fleetAuthz: FleetAuthz): boolean =>
+ calculateRouteAuthz(fleetAuthz, getRouteRequiredAuthz('get', EPM_API_ROUTES.INFO_PATTERN))
+ .granted,
},
getInfoHandler
);
@@ -186,9 +192,11 @@ export const registerRoutes = (router: FleetAuthzRouter) => {
{
path: EPM_API_ROUTES.INFO_PATTERN_DEPRECATED,
validate: GetInfoRequestSchemaDeprecated,
- fleetAuthz: {
- integrations: { readPackageInfo: true },
- },
+ fleetAuthz: (fleetAuthz: FleetAuthz): boolean =>
+ calculateRouteAuthz(
+ fleetAuthz,
+ getRouteRequiredAuthz('get', EPM_API_ROUTES.INFO_PATTERN_DEPRECATED)
+ ).granted,
},
async (context, request, response) => {
const newRequest = { ...request, params: splitPkgKey(request.params.pkgkey) } as any;
diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts
index 045f32cbf6c6e..ca29e7c0d079b 100644
--- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts
+++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts
@@ -15,7 +15,12 @@ import { groupBy, keyBy } from 'lodash';
import { populatePackagePolicyAssignedAgentsCount } from '../../services/package_policies/populate_package_policy_assigned_agents_count';
-import { agentPolicyService, appContextService, packagePolicyService } from '../../services';
+import {
+ agentPolicyService,
+ appContextService,
+ checkAllowedPackages,
+ packagePolicyService,
+} from '../../services';
import type {
GetPackagePoliciesRequestSchema,
GetOnePackagePolicyRequestSchema,
@@ -45,44 +50,6 @@ import { simplifiedPackagePolicytoNewPackagePolicy } from '../../../common/servi
import type { SimplifiedPackagePolicy } from '../../../common/services/simplified_package_policy_helper';
-const getAllowedPackageNamesMessage = (allowedPackageNames: string[]): string => {
- return `Allowed package.name's: ${allowedPackageNames.join(', ')}`;
-};
-
-/**
- * Validates that Package Policy data only includes `package.name`'s that are in the list of
- * `allowedPackageNames`. If an error is encountered, then a message is return, otherwise, undefined.
- *
- * @param data
- * @param allowedPackageNames
- */
-const validatePackagePolicyDataIsScopedToAllowedPackageNames = (
- data: PackagePolicy[],
- allowedPackageNames: string[] | undefined
-): string | undefined => {
- if (!data.length || typeof allowedPackageNames === 'undefined') {
- return;
- }
-
- if (!allowedPackageNames.length) {
- return 'Authorization denied due to lack of integration package privileges';
- }
-
- // Because List type of APIs have an un-bounded `perPage` query param, we only validate the
- // data up to the first package.name that we find is not authorized.
- for (const packagePolicy of data) {
- if (!packagePolicy.package) {
- return `Authorization denied. ${getAllowedPackageNamesMessage(allowedPackageNames)}`;
- }
-
- if (!allowedPackageNames.includes(packagePolicy.package.name)) {
- return `Authorization denied to [package.name=${
- packagePolicy.package.name
- }]. ${getAllowedPackageNamesMessage(allowedPackageNames)}`;
- }
- }
-};
-
export const getPackagePoliciesHandler: FleetRequestHandler<
undefined,
TypeOf
@@ -98,18 +65,7 @@ export const getPackagePoliciesHandler: FleetRequestHandler<
request.query
);
- // specific to package-level RBAC
- const validationResult = validatePackagePolicyDataIsScopedToAllowedPackageNames(
- items,
- limitedToPackages
- );
- if (validationResult) {
- return response.forbidden({
- body: {
- message: validationResult,
- },
- });
- }
+ checkAllowedPackages(items, limitedToPackages, 'package.name');
if (request.query.withAgentCount) {
await populatePackagePolicyAssignedAgentsCount(esClient, items);
@@ -146,17 +102,7 @@ export const bulkGetPackagePoliciesHandler: FleetRequestHandler<
const body: BulkGetPackagePoliciesResponse = { items: items ?? [] };
- const validationResult = validatePackagePolicyDataIsScopedToAllowedPackageNames(
- body.items,
- limitedToPackages
- );
- if (validationResult) {
- return response.forbidden({
- body: {
- message: validationResult,
- },
- });
- }
+ checkAllowedPackages(body.items, limitedToPackages, 'package.name');
return response.ok({
body,
@@ -186,17 +132,7 @@ export const getOnePackagePolicyHandler: FleetRequestHandler<
const packagePolicy = await packagePolicyService.get(soClient, packagePolicyId);
if (packagePolicy) {
- const validationResult = validatePackagePolicyDataIsScopedToAllowedPackageNames(
- [packagePolicy],
- limitedToPackages
- );
- if (validationResult) {
- return response.forbidden({
- body: {
- message: validationResult,
- },
- });
- }
+ checkAllowedPackages([packagePolicy], limitedToPackages, 'package.name');
return response.ok({
body: {
diff --git a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts
index ab1f9617a8917..249b74db13256 100644
--- a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts
+++ b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.test.ts
@@ -24,7 +24,11 @@ describe('buildStatusRuntimeField', () => {
"source": "
long lastCheckinMillis = doc['last_checkin'].size() > 0
? doc['last_checkin'].value.toInstant().toEpochMilli()
- : -1;
+ : (
+ doc['enrolled_at'].size() > 0
+ ? doc['enrolled_at'].value.toInstant().toEpochMilli()
+ : -1
+ );
if (doc['active'].size() > 0 && doc['active'].value == false) {
emit('unenrolled');
} else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && false) {
@@ -76,7 +80,11 @@ describe('buildStatusRuntimeField', () => {
"source": "
long lastCheckinMillis = doc['my.prefix.last_checkin'].size() > 0
? doc['my.prefix.last_checkin'].value.toInstant().toEpochMilli()
- : -1;
+ : (
+ doc['my.prefix.enrolled_at'].size() > 0
+ ? doc['my.prefix.enrolled_at'].value.toInstant().toEpochMilli()
+ : -1
+ );
if (doc['my.prefix.active'].size() > 0 && doc['my.prefix.active'].value == false) {
emit('unenrolled');
} else if (lastCheckinMillis > 0 && doc['my.prefix.policy_id'].size() > 0 && false) {
@@ -133,7 +141,11 @@ describe('buildStatusRuntimeField', () => {
"source": "
long lastCheckinMillis = doc['last_checkin'].size() > 0
? doc['last_checkin'].value.toInstant().toEpochMilli()
- : -1;
+ : (
+ doc['enrolled_at'].size() > 0
+ ? doc['enrolled_at'].value.toInstant().toEpochMilli()
+ : -1
+ );
if (doc['active'].size() > 0 && doc['active'].value == false) {
emit('unenrolled');
} else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && (doc['policy_id'].value == 'policy-1') && lastCheckinMillis < 1234567590123L) {
@@ -190,7 +202,11 @@ describe('buildStatusRuntimeField', () => {
"source": "
long lastCheckinMillis = doc['last_checkin'].size() > 0
? doc['last_checkin'].value.toInstant().toEpochMilli()
- : -1;
+ : (
+ doc['enrolled_at'].size() > 0
+ ? doc['enrolled_at'].value.toInstant().toEpochMilli()
+ : -1
+ );
if (doc['active'].size() > 0 && doc['active'].value == false) {
emit('unenrolled');
} else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && (doc['policy_id'].value == 'policy-1' || doc['policy_id'].value == 'policy-2') && lastCheckinMillis < 1234567590123L) {
@@ -251,7 +267,11 @@ describe('buildStatusRuntimeField', () => {
"source": "
long lastCheckinMillis = doc['last_checkin'].size() > 0
? doc['last_checkin'].value.toInstant().toEpochMilli()
- : -1;
+ : (
+ doc['enrolled_at'].size() > 0
+ ? doc['enrolled_at'].value.toInstant().toEpochMilli()
+ : -1
+ );
if (doc['active'].size() > 0 && doc['active'].value == false) {
emit('unenrolled');
} else if (lastCheckinMillis > 0 && doc['policy_id'].size() > 0 && (doc['policy_id'].value == 'policy-1' || doc['policy_id'].value == 'policy-2') && lastCheckinMillis < 1234567590123L || (doc['policy_id'].value == 'policy-3') && lastCheckinMillis < 1234567490123L) {
diff --git a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts
index 3250c632d0200..cebf3a440e511 100644
--- a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts
+++ b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts
@@ -45,7 +45,11 @@ function _buildSource(inactivityTimeouts: InactivityTimeouts, pathPrefix?: strin
return `
long lastCheckinMillis = ${field('last_checkin')}.size() > 0
? ${field('last_checkin')}.value.toInstant().toEpochMilli()
- : -1;
+ : (
+ ${field('enrolled_at')}.size() > 0
+ ? ${field('enrolled_at')}.value.toInstant().toEpochMilli()
+ : -1
+ );
if (${field('active')}.size() > 0 && ${field('active')}.value == false) {
emit('unenrolled');
} else if (${_buildInactiveClause(now, inactivityTimeouts, field)}) {
diff --git a/x-pack/plugins/fleet/server/services/agents/crud.test.ts b/x-pack/plugins/fleet/server/services/agents/crud.test.ts
index 2a0b341201202..623ca8d0039bc 100644
--- a/x-pack/plugins/fleet/server/services/agents/crud.test.ts
+++ b/x-pack/plugins/fleet/server/services/agents/crud.test.ts
@@ -54,17 +54,23 @@ describe('Agents CRUD test', () => {
},
});
- const result = await getAgentTags(esClientMock, { showInactive: false });
+ const result = await getAgentTags(soClientMock, esClientMock, { showInactive: false });
expect(result).toEqual(['tag1', 'tag2']);
- expect(searchMock).toHaveBeenCalledWith({
- aggs: { tags: { terms: { field: 'tags', size: 10000 } } },
- body: {
- query: expect.any(Object),
- },
- index: '.fleet-agents',
- size: 0,
- });
+ expect(searchMock).toHaveBeenCalledWith(
+ expect.objectContaining({
+ aggs: { tags: { terms: { field: 'tags', size: 10000 } } },
+ body: {
+ query: expect.any(Object),
+ },
+ index: '.fleet-agents',
+ size: 0,
+ fields: ['status'],
+ runtime_mappings: {
+ status: expect.anything(),
+ },
+ })
+ );
});
it('should return empty list if no agent tags', async () => {
@@ -74,7 +80,7 @@ describe('Agents CRUD test', () => {
},
});
- const result = await getAgentTags(esClientMock, { showInactive: false });
+ const result = await getAgentTags(soClientMock, esClientMock, { showInactive: false });
expect(result).toEqual([]);
});
@@ -82,7 +88,7 @@ describe('Agents CRUD test', () => {
it('should return empty list if no agent index', async () => {
searchMock.mockRejectedValueOnce(new errors.ResponseError({ statusCode: 404 } as any));
- const result = await getAgentTags(esClientMock, { showInactive: false });
+ const result = await getAgentTags(soClientMock, esClientMock, { showInactive: false });
expect(result).toEqual([]);
});
@@ -94,30 +100,36 @@ describe('Agents CRUD test', () => {
},
});
- await getAgentTags(esClientMock, {
+ await getAgentTags(soClientMock, esClientMock, {
showInactive: true,
kuery: 'fleet-agents.policy_id: 123',
});
- expect(searchMock).toHaveBeenCalledWith({
- aggs: { tags: { terms: { field: 'tags', size: 10000 } } },
- body: {
- query: {
- bool: {
- minimum_should_match: 1,
- should: [
- {
- match: {
- policy_id: '123',
+ expect(searchMock).toHaveBeenCalledWith(
+ expect.objectContaining({
+ aggs: { tags: { terms: { field: 'tags', size: 10000 } } },
+ body: {
+ query: {
+ bool: {
+ minimum_should_match: 1,
+ should: [
+ {
+ match: {
+ policy_id: '123',
+ },
},
- },
- ],
+ ],
+ },
},
},
- },
- index: '.fleet-agents',
- size: 0,
- });
+ index: '.fleet-agents',
+ size: 0,
+ fields: ['status'],
+ runtime_mappings: {
+ status: expect.anything(),
+ },
+ })
+ );
});
});
diff --git a/x-pack/plugins/fleet/server/services/agents/crud.ts b/x-pack/plugins/fleet/server/services/agents/crud.ts
index 3e5c45c10b0f6..412603df68c81 100644
--- a/x-pack/plugins/fleet/server/services/agents/crud.ts
+++ b/x-pack/plugins/fleet/server/services/agents/crud.ts
@@ -119,6 +119,7 @@ export async function closePointInTime(esClient: ElasticsearchClient, pitId: str
}
export async function getAgentTags(
+ soClient: SavedObjectsClientContract,
esClient: ElasticsearchClient,
options: ListWithKuery & {
showInactive: boolean;
@@ -137,11 +138,14 @@ export async function getAgentTags(
const kueryNode = _joinFilters(filters);
const body = kueryNode ? { query: toElasticsearchQuery(kueryNode) } : {};
+ const runtimeFields = await buildAgentStatusRuntimeField(soClient);
try {
const result = await esClient.search<{}, { tags: { buckets: Array<{ key: string }> } }>({
index: AGENTS_INDEX,
size: 0,
body,
+ fields: Object.keys(runtimeFields),
+ runtime_mappings: runtimeFields,
aggs: {
tags: {
terms: { field: 'tags', size: SO_SEARCH_LIMIT },
diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts
index b0876a4c27d81..8abab53e66272 100644
--- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts
+++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags_action_runner.ts
@@ -111,7 +111,12 @@ export async function updateTagsBatch(
} else if (options.tagsToRemove.length === 1 && options.tagsToAdd.length === 0) {
extraFilters.push(`tags:${options.tagsToRemove[0]}`);
}
- query = getElasticsearchQuery(options.kuery, false, false, hostedIds, extraFilters);
+ const DEFAULT_STATUS_FILTER =
+ 'status:online or (status:error or status:degraded) or (status:updating or status:unenrolling or status:enrolling) or status:offline';
+ // removing default staus filters, as it is a runtime field and doesn't work with updateByQuery
+ // this is a quick fix for bulk update tags with default filters
+ const kuery = options.kuery === DEFAULT_STATUS_FILTER ? '' : options.kuery;
+ query = getElasticsearchQuery(kuery, false, false, hostedIds, extraFilters);
} else {
query = {
terms: {
diff --git a/x-pack/plugins/fleet/server/services/artifacts/artifacts.test.ts b/x-pack/plugins/fleet/server/services/artifacts/artifacts.test.ts
index 2c9d93ee47f32..30a59f51e3232 100644
--- a/x-pack/plugins/fleet/server/services/artifacts/artifacts.test.ts
+++ b/x-pack/plugins/fleet/server/services/artifacts/artifacts.test.ts
@@ -23,6 +23,7 @@ import {
setEsClientMethodResponseToError,
} from './mocks';
import {
+ bulkCreateArtifacts,
createArtifact,
deleteArtifact,
encodeArtifactContent,
@@ -114,6 +115,68 @@ describe('When using the artifacts services', () => {
});
});
+ describe('and calling `bulkCreateArtifacts()`', () => {
+ let newArtifact: NewArtifact;
+
+ beforeEach(() => {
+ const { id, created, ...artifact } = generateArtifactMock();
+ newArtifact = artifact;
+ });
+
+ it('should create and return artifacts', async () => {
+ const { artifacts } = await bulkCreateArtifacts(esClientMock, [newArtifact]);
+ const artifact = artifacts![0];
+
+ expect(esClientMock.bulk).toHaveBeenCalledWith({
+ index: FLEET_SERVER_ARTIFACTS_INDEX,
+ refresh: false,
+ body: [
+ {
+ create: {
+ _id: `${artifact.packageName}:${artifact.identifier}-${artifact.decodedSha256}`,
+ },
+ },
+ {
+ ...newArtifactToElasticsearchProperties(newArtifact),
+ created: expect.any(String),
+ },
+ ],
+ });
+
+ expect(artifact).toEqual({
+ ...newArtifact,
+ id: expect.any(String),
+ created: expect.any(String),
+ });
+ });
+
+ it('should ignore 409 errors from elasticsearch', async () => {
+ esClientMock.bulk.mockResolvedValue({
+ errors: true,
+ items: [{ create: { status: 409 } as any }],
+ } as any);
+ const { artifacts, errors: responseErrors } = await bulkCreateArtifacts(esClientMock, [
+ newArtifact,
+ ]);
+
+ expect(responseErrors).toBeUndefined();
+ expect(artifacts?.length).toEqual(1);
+ });
+
+ it('should return error if one is encountered', async () => {
+ esClientMock.bulk.mockResolvedValue({
+ errors: true,
+ items: [{ create: { status: 400, error: { reason: 'error' } } as any }],
+ } as any);
+ const { artifacts, errors: responseErrors } = await bulkCreateArtifacts(esClientMock, [
+ newArtifact,
+ ]);
+
+ expect(responseErrors).toEqual([new Error('error')]);
+ expect(artifacts).toBeUndefined();
+ });
+ });
+
describe('and calling `deleteArtifact()`', () => {
it('should delete the artifact', async () => {
deleteArtifact(esClientMock, '123');
diff --git a/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts b/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts
index edaec33191937..63eace294dd77 100644
--- a/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts
+++ b/x-pack/plugins/fleet/server/services/artifacts/artifacts.ts
@@ -20,6 +20,8 @@ import { ArtifactsElasticsearchError } from '../../errors';
import { isElasticsearchVersionConflictError } from '../../errors/utils';
+import { withPackageSpan } from '../epm/packages/utils';
+
import { isElasticsearchItemNotFoundError } from './utils';
import type {
Artifact,
@@ -82,6 +84,58 @@ export const createArtifact = async (
return esSearchHitToArtifact({ _id: id, _source: newArtifactData });
};
+export const bulkCreateArtifacts = async (
+ esClient: ElasticsearchClient,
+ artifacts: NewArtifact[],
+ refresh = false
+): Promise<{ artifacts?: Artifact[]; errors?: Error[] }> => {
+ const { ids, newArtifactsData } = artifacts.reduce<{
+ ids: string[];
+ newArtifactsData: ArtifactElasticsearchProperties[];
+ }>(
+ (acc, artifact) => {
+ acc.ids.push(uniqueIdFromArtifact(artifact));
+ acc.newArtifactsData.push(newArtifactToElasticsearchProperties(artifact));
+ return acc;
+ },
+ { ids: [], newArtifactsData: [] }
+ );
+
+ const body = ids.flatMap((id, index) => [
+ {
+ create: {
+ _id: id,
+ },
+ },
+ newArtifactsData[index],
+ ]);
+
+ const res = await withPackageSpan('Bulk create fleet artifacts', () =>
+ esClient.bulk({
+ index: FLEET_SERVER_ARTIFACTS_INDEX,
+ body,
+ refresh,
+ })
+ );
+ if (res.errors) {
+ const nonConflictErrors = res.items.reduce((acc, item) => {
+ if (item.create?.status !== 409) {
+ acc.push(new Error(item.create?.error?.reason));
+ }
+ return acc;
+ }, []);
+ if (nonConflictErrors.length > 0) {
+ return { errors: nonConflictErrors };
+ }
+ }
+
+ return {
+ artifacts: ids.map((id, index) =>
+ esSearchHitToArtifact({ _id: id, _source: newArtifactsData[index] })
+ ),
+ };
+};
+
export const deleteArtifact = async (esClient: ElasticsearchClient, id: string): Promise => {
try {
await esClient.delete({
diff --git a/x-pack/plugins/fleet/server/services/artifacts/client.test.ts b/x-pack/plugins/fleet/server/services/artifacts/client.test.ts
index f2acdc59e10de..f5c882eee9fbe 100644
--- a/x-pack/plugins/fleet/server/services/artifacts/client.test.ts
+++ b/x-pack/plugins/fleet/server/services/artifacts/client.test.ts
@@ -80,6 +80,56 @@ describe('When using the Fleet Artifacts Client', () => {
});
});
+ describe('and calling `bulkCreateArtifacts()`', () => {
+ it('should create a new artifact', async () => {
+ expect(
+ await artifactClient.bulkCreateArtifacts([
+ {
+ content: '{ "key": "value" }',
+ identifier: 'some-identifier',
+ type: 'type A',
+ },
+ {
+ content: '{ "key": "value2" }',
+ identifier: 'some-identifier2',
+ type: 'type B',
+ },
+ ])
+ ).toEqual({
+ artifacts: [
+ {
+ ...generateArtifactMock(),
+ body: 'eJyrVlDKTq1UslJQKkvMKU1VUqgFADNPBYE=',
+ created: expect.any(String),
+ decodedSha256: '05d13b11501327cc43f9a29165f1b4cab5c65783d86227536fcf798e6fa45586',
+ decodedSize: 18,
+ encodedSha256: '373d059bac3b51b05af96128cdaf013abd0c59d3d50579589937068059690a68',
+ encodedSize: 26,
+ id: expect.any(String),
+ identifier: 'some-identifier',
+ relative_url:
+ '/api/fleet/artifacts/some-identifier/05d13b11501327cc43f9a29165f1b4cab5c65783d86227536fcf798e6fa45586',
+ type: 'type A',
+ },
+ {
+ ...generateArtifactMock(),
+ body: 'eJyrVlDKTq1UslJQKkvMKU01UlKoBQA42QWz',
+ created: expect.any(String),
+ decodedSha256: '98fdb0001b0ddb7acb15136579aab7074cf2b6df9db009568e04294bd97e7dd3',
+ decodedSize: 19,
+ encodedSha256: '220b82f2f2013cd5137966d0f9c81ace9156319e8f420bbad0f05fc0f61eec5d',
+ encodedSize: 27,
+ id: expect.any(String),
+ identifier: 'some-identifier2',
+ relative_url:
+ '/api/fleet/artifacts/some-identifier2/98fdb0001b0ddb7acb15136579aab7074cf2b6df9db009568e04294bd97e7dd3',
+ type: 'type B',
+ },
+ ],
+ });
+ });
+ });
+
describe('and calling `deleteArtifact()`', () => {
it('should delete the artifact', async () => {
setEsClientGetMock();
diff --git a/x-pack/plugins/fleet/server/services/artifacts/client.ts b/x-pack/plugins/fleet/server/services/artifacts/client.ts
index 081038447c8f9..3cf28e4847d0d 100644
--- a/x-pack/plugins/fleet/server/services/artifacts/client.ts
+++ b/x-pack/plugins/fleet/server/services/artifacts/client.ts
@@ -27,6 +27,7 @@ import {
generateArtifactContentHash,
getArtifact,
listArtifacts,
+ bulkCreateArtifacts,
} from './artifacts';
/**
@@ -76,6 +77,32 @@ export class FleetArtifactsClient implements ArtifactsClientInterface {
return createArtifact(this.esClient, newArtifactData);
}
+ async bulkCreateArtifacts(
+ optionsList: ArtifactsClientCreateOptions[]
+ ): Promise<{ artifacts?: Artifact[]; errors?: Error[] }> {
+ const newArtifactsData = [];
+
+ for (const options of optionsList) {
+ const { content, type = '', identifier = this.packageName } = options;
+
+ const encodedMetaData = await this.encodeContent(content);
+ const newArtifactData: NewArtifact = {
+ type,
+ identifier,
+ packageName: this.packageName,
+ encryptionAlgorithm: 'none',
+ relative_url: relativeDownloadUrlFromArtifact({
+ identifier,
+ decodedSha256: encodedMetaData.decodedSha256,
+ }),
+ ...encodedMetaData,
+ };
+ newArtifactsData.push(newArtifactData);
+ }
+
+ return bulkCreateArtifacts(this.esClient, newArtifactsData);
+ }
+
async deleteArtifact(id: string) {
// get the artifact first, which will also ensure its validated
const artifact = await this.getArtifact(id);
diff --git a/x-pack/plugins/fleet/server/services/artifacts/mocks.ts b/x-pack/plugins/fleet/server/services/artifacts/mocks.ts
index f20c72ab0f78b..1ded8743297f9 100644
--- a/x-pack/plugins/fleet/server/services/artifacts/mocks.ts
+++ b/x-pack/plugins/fleet/server/services/artifacts/mocks.ts
@@ -24,6 +24,7 @@ export const createArtifactsClientMock = (): jest.Mocked;
+ bulkCreateArtifacts(
+ optionsList: ArtifactsClientCreateOptions[]
+ ): Promise<{ artifacts?: Artifact[]; errors?: Error[] }>;
+
deleteArtifact(id: string): Promise;
listArtifacts(options?: ListArtifactsProps): Promise>;
diff --git a/x-pack/plugins/fleet/server/services/check_allowed_packages.test.ts b/x-pack/plugins/fleet/server/services/check_allowed_packages.test.ts
new file mode 100644
index 0000000000000..d475a4af61854
--- /dev/null
+++ b/x-pack/plugins/fleet/server/services/check_allowed_packages.test.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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { FleetUnauthorizedError } from '../errors';
+
+import { checkAllowedPackages } from './check_allowed_packages';
+
+describe('#checkAllowedPackages', () => {
+ it('does not throw if no packages', () => {
+ expect(() => checkAllowedPackages([], [])).not.toThrowError(FleetUnauthorizedError);
+ });
+
+ it('does not throw if allowedPackages is undefined', () => {
+ expect(() => checkAllowedPackages([])).not.toThrowError(FleetUnauthorizedError);
+ });
+
+ it('throws if allowedPackages is empty array', () => {
+ expect(() => checkAllowedPackages([{ name: 'packageA' }], [], 'name')).toThrowError(
+ new FleetUnauthorizedError(
+ 'Authorization denied due to lack of integration package privileges'
+ )
+ );
+ });
+
+ it('does not throw if all packages allowed', () => {
+ const packages = ['packageA', 'packageB', 'packageC'];
+ const allowedPackages = ['packageA', 'packageB', 'packageC'];
+ expect(() => checkAllowedPackages(packages, allowedPackages)).not.toThrowError(
+ FleetUnauthorizedError
+ );
+ });
+
+ it('throws if contains unresolved package', () => {
+ const packages = [{ name: 'packageA' }, { name: 'packageB' }, { name: undefined }];
+ const allowedPackages = ['packageA', 'packageB', 'packageC'];
+ expect(() => checkAllowedPackages(packages, allowedPackages, 'name')).toThrowError(
+ new FleetUnauthorizedError(
+ 'Authorization denied. Allowed package(s): packageA, packageB, packageC.'
+ )
+ );
+ });
+
+ it('throws if contains restricted packages', () => {
+ const packages = [{ name: 'packageA' }, { name: 'packageB' }, { name: 'packageC' }];
+ const allowedPackages = ['packageA', 'packageB'];
+ expect(() => checkAllowedPackages(packages, allowedPackages, 'name')).toThrowError(
+ new FleetUnauthorizedError(
+ 'Authorization denied to package: packageC. Allowed package(s): packageA, packageB'
+ )
+ );
+ });
+});
diff --git a/x-pack/plugins/fleet/server/services/check_allowed_packages.ts b/x-pack/plugins/fleet/server/services/check_allowed_packages.ts
new file mode 100644
index 0000000000000..fffd8d0bdcb91
--- /dev/null
+++ b/x-pack/plugins/fleet/server/services/check_allowed_packages.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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { get } from 'lodash';
+
+import { FleetUnauthorizedError } from '../errors';
+
+export function checkAllowedPackages(
+ packages: T[],
+ allowedPackages?: string[],
+ keyPath: string = ''
+) {
+ // allowedPackages is undefined when user has privileges from fleet
+ if (!packages.length || !allowedPackages) {
+ return;
+ }
+
+ if (!allowedPackages.length) {
+ throw new FleetUnauthorizedError(
+ 'Authorization denied due to lack of integration package privileges'
+ );
+ }
+
+ const allowedPackagedSet = new Set(allowedPackages);
+ const allowedPackagesStr = allowedPackages.join(', ');
+
+ packages.some((pkg) => {
+ const pkgName = typeof pkg === 'string' ? pkg : get(pkg, keyPath, undefined);
+ if (!pkgName) {
+ throw new FleetUnauthorizedError(
+ `Authorization denied. Allowed package(s): ${allowedPackagesStr}.`
+ );
+ }
+
+ const isRestricted = !allowedPackagedSet.has(pkgName);
+ if (isRestricted) {
+ throw new FleetUnauthorizedError(
+ `Authorization denied to package: ${pkgName}. Allowed package(s): ${allowedPackagesStr}`
+ );
+ }
+
+ return false;
+ });
+}
diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts
index c293b38a6f46a..8ba41a5556f46 100644
--- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts
+++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts
@@ -279,7 +279,7 @@ describe('EPM index template install', () => {
});
expect(indexTemplate.indexTemplate.template.settings).toEqual({
- index: { mode: 'time_series', routing_path: ['test_dimension'] },
+ index: { mode: 'time_series' },
});
});
});
diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts
index 23c55db1d43f0..4455c719207b2 100644
--- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts
+++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts
@@ -18,7 +18,6 @@ import type {
} from '../../../../types';
import { appContextService } from '../../..';
import { getRegistryDataStreamAssetBaseName } from '../../../../../common/services';
-import { builRoutingPath } from '../../../package_policies';
import {
FLEET_GLOBALS_COMPONENT_TEMPLATE_NAME,
FLEET_AGENT_ID_VERIFY_COMPONENT_TEMPLATE_NAME,
@@ -499,17 +498,10 @@ function getBaseTemplate({
const isIndexModeTimeSeries = registryElasticsearch?.index_mode === 'time_series';
- const mappingsProperties = mappings?.properties ?? {};
-
- // All mapped fields of type keyword and time_series_dimension enabled will be included in the generated routing path
- // Temporarily generating routing_path here until fixed in elasticsearch https://github.com/elastic/elasticsearch/issues/91592
- const routingPath = builRoutingPath(mappingsProperties);
-
let settingsIndex = {};
- if (isIndexModeTimeSeries && routingPath.length > 0) {
+ if (isIndexModeTimeSeries) {
settingsIndex = {
mode: 'time_series',
- routing_path: routingPath,
};
}
diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts
index dd2a66a1526ab..4dbceb772cc20 100644
--- a/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts
+++ b/x-pack/plugins/fleet/server/services/epm/kibana/assets/install.ts
@@ -294,6 +294,7 @@ export async function installKibanaSavedObjects({
overwrite: true,
readStream: createListStream(toBeSavedObjects),
createNewCopies: false,
+ refresh: false,
})
);
diff --git a/x-pack/plugins/fleet/server/services/index.ts b/x-pack/plugins/fleet/server/services/index.ts
index 133d5cf88d71c..a5078471d934d 100644
--- a/x-pack/plugins/fleet/server/services/index.ts
+++ b/x-pack/plugins/fleet/server/services/index.ts
@@ -64,3 +64,5 @@ export type { PackageService, PackageClient } from './epm';
export { migrateSettingsToFleetServerHost } from './fleet_server_host';
export { FleetUsageSender } from './telemetry/fleet_usage_sender';
+
+export { checkAllowedPackages } from './check_allowed_packages';
diff --git a/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.test.ts b/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.test.ts
index 40d67b079655c..9d43a9fad7efd 100644
--- a/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.test.ts
+++ b/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.test.ts
@@ -10,10 +10,7 @@ import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks
import type { NewPackagePolicy, PackagePolicy } from '../../types';
-import {
- builRoutingPath,
- handleExperimentalDatastreamFeatureOptIn,
-} from './experimental_datastream_features';
+import { handleExperimentalDatastreamFeatureOptIn } from './experimental_datastream_features';
function getNewTestPackagePolicy({
isSyntheticSourceEnabled,
@@ -187,7 +184,7 @@ describe('experimental_datastream_features', () => {
body: expect.objectContaining({
template: expect.objectContaining({
settings: expect.objectContaining({
- index: { mode: 'time_series', routing_path: ['test_dimension'] },
+ index: { mode: 'time_series' },
}),
}),
}),
@@ -291,7 +288,7 @@ describe('experimental_datastream_features', () => {
body: expect.objectContaining({
template: expect.objectContaining({
settings: expect.objectContaining({
- index: { mode: 'time_series', routing_path: ['test_dimension'] },
+ index: { mode: 'time_series' },
}),
}),
}),
@@ -300,64 +297,4 @@ describe('experimental_datastream_features', () => {
});
});
});
- it('should build routing path', () => {
- const mappingProperties = {
- cloud: {
- properties: {
- availability_zone: {
- ignore_above: 1024,
- type: 'keyword',
- },
- image: {
- properties: {
- id: {
- ignore_above: 1024,
- type: 'keyword',
- },
- },
- },
- },
- },
- test_dimension: {
- time_series_dimension: true,
- type: 'keyword',
- },
- '@timestamp': {
- type: 'date',
- },
- };
- const routingPath = builRoutingPath(mappingProperties as any);
- expect(routingPath).toEqual(['test_dimension']);
- });
-
- it('should build routing path from nested properties', () => {
- const mappingProperties = {
- cloud: {
- properties: {
- availability_zone: {
- ignore_above: 1024,
- type: 'keyword',
- },
- image: {
- properties: {
- id: {
- ignore_above: 1024,
- type: 'keyword',
- time_series_dimension: true,
- },
- },
- },
- },
- },
- test_dimension: {
- time_series_dimension: true,
- type: 'keyword',
- },
- '@timestamp': {
- type: 'date',
- },
- };
- const routingPath = builRoutingPath(mappingProperties as any);
- expect(routingPath).toEqual(['cloud.image.id', 'test_dimension']);
- });
});
diff --git a/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.ts b/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.ts
index 3a60733a57eb5..06a51a0b02eb4 100644
--- a/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.ts
+++ b/x-pack/plugins/fleet/server/services/package_policies/experimental_datastream_features.ts
@@ -5,10 +5,6 @@
* 2.0.
*/
-import type {
- MappingProperty,
- PropertyName,
-} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server';
@@ -16,31 +12,6 @@ import type { NewPackagePolicy, PackagePolicy } from '../../types';
import { getInstallation } from '../epm/packages';
import { updateDatastreamExperimentalFeatures } from '../epm/packages/update';
-function mapFields(mappingProperties: Record) {
- const mappings = Object.keys(mappingProperties).reduce((acc, curr) => {
- const property = mappingProperties[curr] as any;
- if (property.properties) {
- const childMappings = mapFields(property.properties);
- Object.keys(childMappings).forEach((key) => {
- acc[curr + '.' + key] = childMappings[key];
- });
- } else {
- acc[curr] = property;
- }
- return acc;
- }, {} as any);
- return mappings;
-}
-
-export function builRoutingPath(properties: Record) {
- const mappingsProperties = mapFields(properties);
- return Object.keys(mappingsProperties).filter(
- (mapping) =>
- mappingsProperties[mapping].type === 'keyword' &&
- mappingsProperties[mapping].time_series_dimension
- );
-}
-
export async function handleExperimentalDatastreamFeatureOptIn({
soClient,
esClient,
@@ -106,14 +77,6 @@ export async function handleExperimentalDatastreamFeatureOptIn({
}
if (isTSDBOptInChanged && featureMapEntry.features.tsdb) {
- const mappingsProperties = componentTemplate.template?.mappings?.properties ?? {};
-
- // All mapped fields of type keyword and time_series_dimension enabled will be included in the generated routing path
- // Temporarily generating routing_path here until fixed in elasticsearch https://github.com/elastic/elasticsearch/issues/91592
- const routingPath = builRoutingPath(mappingsProperties);
-
- if (routingPath.length === 0) continue;
-
const indexTemplateRes = await esClient.indices.getIndexTemplate({
name: featureMapEntry.data_stream,
});
@@ -127,7 +90,6 @@ export async function handleExperimentalDatastreamFeatureOptIn({
...(indexTemplate.template?.settings ?? {}),
index: {
mode: 'time_series',
- routing_path: routingPath,
},
},
},
diff --git a/x-pack/plugins/fleet/server/services/security/fleet_router.test.ts b/x-pack/plugins/fleet/server/services/security/fleet_router.test.ts
index 1f2b6c3fab22b..6af9c891b31fc 100644
--- a/x-pack/plugins/fleet/server/services/security/fleet_router.test.ts
+++ b/x-pack/plugins/fleet/server/services/security/fleet_router.test.ts
@@ -71,6 +71,8 @@ describe('FleetAuthzRouter', () => {
const mockContext = createAppContextStartContractMock();
// @ts-expect-error type doesn't properly respect deeply mocked keys
mockContext.securityStart.authz.actions.api.get.mockImplementation((priv) => `api:${priv}`);
+ // @ts-expect-error type doesn't properly respect deeply mocked keys
+ mockContext.securityStart.authz.actions.ui.get.mockImplementation((priv) => `ui:${priv}`);
mockContext.securityStart.authc.getCurrentUser.mockReturnValue({
username: 'foo',
diff --git a/x-pack/plugins/fleet/server/services/security/route_required_authz.ts b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts
index 107279f5f33e4..98effa4070c96 100644
--- a/x-pack/plugins/fleet/server/services/security/route_required_authz.ts
+++ b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts
@@ -11,6 +11,8 @@ import type { RouteMethod } from '@kbn/core-http-server';
import { PACKAGE_POLICY_API_ROUTES, AGENT_API_ROUTES } from '../../../common';
+import { EPM_API_ROUTES } from '../../constants';
+
import type { FleetRouteRequiredAuthz } from './types';
/**
@@ -144,6 +146,40 @@ const ROUTE_AUTHZ_REQUIREMENTS = deepFreeze
- security.authz.actions.api.get(`${DEFAULT_APP_CATEGORIES.security.id}-${privilege}`)
+ const endpointPrivileges = Object.entries(ENDPOINT_PRIVILEGES).map(
+ ([_, { appId, privilegeType, privilegeName }]) => {
+ if (privilegeType === 'ui') {
+ return security.authz.actions[privilegeType].get(`${appId}`, `${privilegeName}`);
+ }
+ return security.authz.actions[privilegeType].get(`${appId}-${privilegeName}`);
+ }
);
const { privileges } = await checkPrivileges({
kibana: [
diff --git a/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts b/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts
index 8e13ca99eb722..40c3c77f9418c 100644
--- a/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts
+++ b/x-pack/plugins/fleet/server/services/telemetry/fleet_usages_schema.ts
@@ -60,6 +60,18 @@ export const fleetUsagesSchema: RootSchema = {
description: 'The total number of enrolled agents currently offline',
},
},
+ inactive: {
+ type: 'long',
+ _meta: {
+ description: 'The total number of enrolled agents currently inactive',
+ },
+ },
+ unenrolled: {
+ type: 'long',
+ _meta: {
+ description: 'The total number of unenrolled agents',
+ },
+ },
total_all_statuses: {
type: 'long',
_meta: {
@@ -113,6 +125,18 @@ export const fleetUsagesSchema: RootSchema = {
description: 'The number of Fleet Server hosts configured in Fleet settings.',
},
},
+ inactive: {
+ type: 'long',
+ _meta: {
+ description: 'The total number of enrolled agents currently inactive',
+ },
+ },
+ unenrolled: {
+ type: 'long',
+ _meta: {
+ description: 'The total number of unenrolled agents',
+ },
+ },
},
},
packages: {
diff --git a/x-pack/plugins/infra/public/pages/metrics/hosts/components/unified_search_bar.tsx b/x-pack/plugins/infra/public/pages/metrics/hosts/components/unified_search_bar.tsx
index a588537244d0f..cc9f6e7ef4102 100644
--- a/x-pack/plugins/infra/public/pages/metrics/hosts/components/unified_search_bar.tsx
+++ b/x-pack/plugins/infra/public/pages/metrics/hosts/components/unified_search_bar.tsx
@@ -11,6 +11,7 @@ import type { Filter, Query, TimeRange } from '@kbn/es-query';
import type { DataView } from '@kbn/data-views-plugin/public';
import type { SavedQuery } from '@kbn/data-plugin/public';
import { i18n } from '@kbn/i18n';
+import { EuiFlexGrid } from '@elastic/eui';
import deepEqual from 'fast-deep-equal';
import type { InfraClientStartDeps } from '../../../../types';
import { useUnifiedSearchContext } from '../hooks/use_unified_search';
@@ -72,7 +73,7 @@ export const UnifiedSearchBar = ({ dataView }: Props) => {
};
return (
- <>
+
{
filters={unifiedSearchFilters}
onFilterChange={onPanelFiltersChange}
/>
- >
+
);
};
diff --git a/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx
index 411b8cd094ab2..f774525518e49 100644
--- a/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx
+++ b/x-pack/plugins/lens/public/datasources/form_based/datapanel.test.tsx
@@ -374,6 +374,7 @@ describe('FormBased Data Panel', () => {
(UseExistingFieldsApi.useExistingFieldsReader as jest.Mock).mockClear();
(UseExistingFieldsApi.useExistingFieldsFetcher as jest.Mock).mockClear();
UseExistingFieldsApi.resetExistingFieldsCache();
+ window.localStorage.removeItem('lens.unifiedFieldList.initiallyOpenSections');
});
it('should render a warning if there are no index patterns', async () => {
diff --git a/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx b/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx
index 01feaa4187627..374eb430dae9c 100644
--- a/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx
+++ b/x-pack/plugins/lens/public/datasources/form_based/datapanel.tsx
@@ -428,6 +428,7 @@ export const InnerFormBasedDataPanel = function InnerFormBasedDataPanel({
{...fieldListGroupedProps}
renderFieldItem={renderFieldItem}
data-test-subj="lnsIndexPattern"
+ localStorageKeyPrefix="lens"
/>
diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/label_input.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/label_input.tsx
index 9d8730d38216a..ded5298a93879 100644
--- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/label_input.tsx
+++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/shared_components/label_input.tsx
@@ -27,7 +27,10 @@ export const LabelInput = ({
dataTestSubj?: string;
compressed?: boolean;
}) => {
- const { inputValue, handleInputChange } = useDebouncedValue({ value, onChange });
+ const { inputValue, handleInputChange } = useDebouncedValue(
+ { value, onChange },
+ { allowFalsyValue: true }
+ );
const localKeyHold = useRef(false);
return (
diff --git a/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx b/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx
index b278284bad8e9..aad9bae11faf4 100644
--- a/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx
+++ b/x-pack/plugins/lens/public/datasources/text_based/datapanel.tsx
@@ -161,6 +161,7 @@ export function TextBasedDataPanel({
{...fieldListGroupedProps}
renderFieldItem={renderFieldItem}
data-test-subj="lnsTextBasedLanguages"
+ localStorageKeyPrefix="lens"
/>
diff --git a/x-pack/plugins/maps/common/mvt_request_body.test.ts b/x-pack/plugins/maps/common/mvt_request_body.test.ts
index 4f06d21ff2507..fd67cdeed3e8b 100644
--- a/x-pack/plugins/maps/common/mvt_request_body.test.ts
+++ b/x-pack/plugins/maps/common/mvt_request_body.test.ts
@@ -5,73 +5,123 @@
* 2.0.
*/
-import { decodeMvtResponseBody, encodeMvtResponseBody } from './mvt_request_body';
+import {
+ decodeMvtResponseBody,
+ encodeMvtResponseBody,
+ getAggsTileRequest,
+ getHitsTileRequest,
+} from './mvt_request_body';
+import { RENDER_AS } from './constants';
-test('Should encode shape into URI safe string and decode back to original shape', () => {
- const searchRequest = {
- docvalue_fields: [],
- size: 10000,
- _source: false,
- script_fields: {},
- stored_fields: ['geopoint'],
- runtime_mappings: {
- 'day of week': {
- type: 'keyword',
- script: {
- source:
- "ZonedDateTime input = doc['ISSUE_DATE'].value;\nString output = input.format(DateTimeFormatter.ofPattern('e')) + ' ' + input.format(DateTimeFormatter.ofPattern('E'));\nemit(output);",
+describe('decodeMvtResponseBody', () => {
+ test('Should encode shape into URI safe string and decode back to original shape', () => {
+ const searchRequest = {
+ docvalue_fields: [],
+ size: 10000,
+ _source: false,
+ script_fields: {},
+ stored_fields: ['geopoint'],
+ runtime_mappings: {
+ 'day of week': {
+ type: 'keyword',
+ script: {
+ source:
+ "ZonedDateTime input = doc['ISSUE_DATE'].value;\nString output = input.format(DateTimeFormatter.ofPattern('e')) + ' ' + input.format(DateTimeFormatter.ofPattern('E'));\nemit(output);",
+ },
},
},
- },
- query: {
- bool: {
- must: [],
- filter: [],
- should: [],
- must_not: [],
+ query: {
+ bool: {
+ must: [],
+ filter: [],
+ should: [],
+ must_not: [],
+ },
},
- },
- };
- const encodedSearchRequest = encodeMvtResponseBody(searchRequest);
- expect(encodedSearchRequest).toBe(
- `(_source%3A!f%2Cdocvalue_fields%3A!()%2Cquery%3A(bool%3A(filter%3A!()%2Cmust%3A!()%2Cmust_not%3A!()%2Cshould%3A!()))%2Cruntime_mappings%3A('day%20of%20week'%3A(script%3A(source%3A'ZonedDateTime%20input%20%3D%20doc%5B!'ISSUE_DATE!'%5D.value%3B%0AString%20output%20%3D%20input.format(DateTimeFormatter.ofPattern(!'e!'))%20%2B%20!'%20!'%20%2B%20input.format(DateTimeFormatter.ofPattern(!'E!'))%3B%0Aemit(output)%3B')%2Ctype%3Akeyword))%2Cscript_fields%3A()%2Csize%3A10000%2Cstored_fields%3A!(geopoint))`
- );
- expect(decodeMvtResponseBody(encodedSearchRequest)).toEqual(searchRequest);
-});
+ };
+ const encodedSearchRequest = encodeMvtResponseBody(searchRequest);
+ expect(encodedSearchRequest).toBe(
+ `(_source%3A!f%2Cdocvalue_fields%3A!()%2Cquery%3A(bool%3A(filter%3A!()%2Cmust%3A!()%2Cmust_not%3A!()%2Cshould%3A!()))%2Cruntime_mappings%3A('day%20of%20week'%3A(script%3A(source%3A'ZonedDateTime%20input%20%3D%20doc%5B!'ISSUE_DATE!'%5D.value%3B%0AString%20output%20%3D%20input.format(DateTimeFormatter.ofPattern(!'e!'))%20%2B%20!'%20!'%20%2B%20input.format(DateTimeFormatter.ofPattern(!'E!'))%3B%0Aemit(output)%3B')%2Ctype%3Akeyword))%2Cscript_fields%3A()%2Csize%3A10000%2Cstored_fields%3A!(geopoint))`
+ );
+ expect(decodeMvtResponseBody(encodedSearchRequest)).toEqual(searchRequest);
+ });
-test(`Should handle '%' character`, () => {
- const runtimeFieldScript = `if (doc['price'].size() != 0){
- String tmp=dissect('$%{price}').extract(doc["price"].value)?.price;
+ test(`Should handle '%' character`, () => {
+ const runtimeFieldScript = `if (doc['price'].size() != 0){
+ String tmp=dissect('$%{price}').extract(doc["price"].value)?.price;
- tmp = tmp.replace(',','');
+ tmp = tmp.replace(',','');
- def pn = Double.parseDouble( tmp );
+ def pn = Double.parseDouble( tmp );
- if (pn != null) emit(pn);
-}
-else {
- emit(0)
-}`;
- const searchRequest = {
- size: 10000,
- _source: false,
- runtime_mappings: {
- price_as_number: {
- type: 'keyword',
- script: {
- source: runtimeFieldScript,
+ if (pn != null) emit(pn);
+ }
+ else {
+ emit(0)
+ }`;
+ const searchRequest = {
+ size: 10000,
+ _source: false,
+ runtime_mappings: {
+ price_as_number: {
+ type: 'keyword',
+ script: {
+ source: runtimeFieldScript,
+ },
},
},
- },
- query: {
- bool: {
- must: [],
- filter: [],
- should: [],
- must_not: [],
+ query: {
+ bool: {
+ must: [],
+ filter: [],
+ should: [],
+ must_not: [],
+ },
},
- },
- };
- const encodedSearchRequest = encodeMvtResponseBody(searchRequest);
- expect(decodeMvtResponseBody(encodedSearchRequest)).toEqual(searchRequest);
+ };
+ const encodedSearchRequest = encodeMvtResponseBody(searchRequest);
+ expect(decodeMvtResponseBody(encodedSearchRequest)).toEqual(searchRequest);
+ });
+});
+
+describe('getAggsTileRequest', () => {
+ test(`Should URL encode path parameters`, () => {
+ const searchRequest = {
+ aggs: {},
+ runtime_mappings: {},
+ query: {},
+ };
+ const { path } = getAggsTileRequest({
+ encodedRequestBody: encodeMvtResponseBody(searchRequest),
+ geometryFieldName: 'my location',
+ gridPrecision: 8,
+ hasLabels: true,
+ index: 'my index',
+ renderAs: RENDER_AS.POINT,
+ x: 0,
+ y: 0,
+ z: 0,
+ });
+ expect(path).toEqual('/my%20index/_mvt/my%20location/0/0/0');
+ });
+});
+
+describe('getHitsTileRequest', () => {
+ test(`Should URL encode path parameters`, () => {
+ const searchRequest = {
+ size: 10000,
+ runtime_mappings: {},
+ query: {},
+ };
+ const { path } = getHitsTileRequest({
+ encodedRequestBody: encodeMvtResponseBody(searchRequest),
+ geometryFieldName: 'my location',
+ hasLabels: true,
+ index: 'my index',
+ x: 0,
+ y: 0,
+ z: 0,
+ });
+ expect(path).toEqual('/my%20index/_mvt/my%20location/0/0/0');
+ });
});
diff --git a/x-pack/plugins/maps/common/mvt_request_body.ts b/x-pack/plugins/maps/common/mvt_request_body.ts
index dbf719d685c46..f876caefe0312 100644
--- a/x-pack/plugins/maps/common/mvt_request_body.ts
+++ b/x-pack/plugins/maps/common/mvt_request_body.ts
@@ -43,7 +43,9 @@ export function getAggsTileRequest({
}) {
const requestBody = decodeMvtResponseBody(encodedRequestBody) as any;
return {
- path: `/${encodeURIComponent(index)}/_mvt/${geometryFieldName}/${z}/${x}/${y}`,
+ path: `/${encodeURIComponent(index)}/_mvt/${encodeURIComponent(
+ geometryFieldName
+ )}/${z}/${x}/${y}`,
body: {
size: 0, // no hits
grid_precision: gridPrecision,
@@ -53,7 +55,7 @@ export function getAggsTileRequest({
grid_agg: renderAs === RENDER_AS.HEX ? 'geohex' : 'geotile',
grid_type: renderAs === RENDER_AS.GRID || renderAs === RENDER_AS.HEX ? 'grid' : 'centroid',
aggs: requestBody.aggs,
- fields: requestBody.fields,
+ fields: requestBody.fields ? requestBody.fields : [],
runtime_mappings: requestBody.runtime_mappings,
with_labels: hasLabels,
},
@@ -79,7 +81,9 @@ export function getHitsTileRequest({
}) {
const requestBody = decodeMvtResponseBody(encodedRequestBody) as any;
return {
- path: `/${encodeURIComponent(index)}/_mvt/${geometryFieldName}/${z}/${x}/${y}`,
+ path: `/${encodeURIComponent(index)}/_mvt/${encodeURIComponent(
+ geometryFieldName
+ )}/${z}/${x}/${y}`,
body: {
grid_precision: 0, // no aggs
exact_bounds: true,
diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/create_source_editor.js b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/create_source_editor.js
index 872c7b71c9f92..aede56a726713 100644
--- a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/create_source_editor.js
+++ b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/create_source_editor.js
@@ -52,14 +52,9 @@ export class CreateSourceEditor extends Component {
};
_onGeoFieldSelect = (geoFieldName) => {
- const geoField =
- this.state.indexPattern && geoFieldName
- ? this.state.indexPattern.fields.getByName(geoFieldName)
- : undefined;
this.setState(
{
geoField: geoFieldName,
- geoFieldType: geoField ? geoField.type : undefined,
},
this.previewLayer
);
@@ -115,11 +110,7 @@ export class CreateSourceEditor extends Component {
}
return (
-
+
);
}
diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/render_as_select/render_as_select.tsx b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/render_as_select/render_as_select.tsx
index e5baf65711d3f..ce95c4ef982b8 100644
--- a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/render_as_select/render_as_select.tsx
+++ b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/render_as_select/render_as_select.tsx
@@ -8,14 +8,13 @@
import React from 'react';
import { EuiFormRow, EuiButtonGroup } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
-import { ES_GEO_FIELD_TYPE, RENDER_AS } from '../../../../../common/constants';
+import { RENDER_AS } from '../../../../../common/constants';
import { getIsCloud } from '../../../../kibana_services';
import { getIsGoldPlus } from '../../../../licensed_features';
import { CLUSTER_LABEL, GRID_LABEL, HEX_LABEL } from './i18n_constants';
import { ShowAsLabel } from './show_as_label';
interface Props {
- geoFieldType?: ES_GEO_FIELD_TYPE;
renderAs: RENDER_AS;
onChange: (newValue: RENDER_AS) => void;
isColumnCompressed?: boolean;
@@ -34,12 +33,6 @@ export function RenderAsSelect(props: Props) {
defaultMessage: '{hexLabel} is a subscription feature.',
values: { hexLabel: HEX_LABEL },
});
- } else if (props.geoFieldType !== ES_GEO_FIELD_TYPE.GEO_POINT) {
- isHexDisabled = true;
- hexDisabledReason = i18n.translate('xpack.maps.hexbin.geoShape.disabledReason', {
- defaultMessage: `{hexLabel} requires a 'geo_point' cluster field.`,
- values: { hexLabel: HEX_LABEL },
- });
}
const options = [
diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/update_source_editor.tsx b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/update_source_editor.tsx
index 8b42bc2f162c5..52431b95f52c2 100644
--- a/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/update_source_editor.tsx
+++ b/x-pack/plugins/maps/public/classes/sources/es_geo_grid_source/update_source_editor.tsx
@@ -13,13 +13,7 @@ import { EuiPanel, EuiSpacer, EuiComboBoxOptionOption, EuiTitle } from '@elastic
import { DataViewField } from '@kbn/data-views-plugin/public';
import { indexPatterns } from '@kbn/data-plugin/public';
import { getDataViewNotFoundMessage } from '../../../../common/i18n_getters';
-import {
- AGG_TYPE,
- ES_GEO_FIELD_TYPE,
- GRID_RESOLUTION,
- LAYER_TYPE,
- RENDER_AS,
-} from '../../../../common/constants';
+import { AGG_TYPE, GRID_RESOLUTION, LAYER_TYPE, RENDER_AS } from '../../../../common/constants';
import { MetricsEditor } from '../../../components/metrics_editor';
import { getIndexPatternService } from '../../../kibana_services';
import { ResolutionEditor } from './resolution_editor';
@@ -41,7 +35,6 @@ interface Props {
}
interface State {
- geoFieldType?: ES_GEO_FIELD_TYPE;
metricsEditorKey: string;
fields: DataViewField[];
loadError?: string;
@@ -80,11 +73,8 @@ export class UpdateSourceEditor extends Component {
return;
}
- const geoField = indexPattern.fields.getByName(this.props.geoFieldName);
-
this.setState({
fields: indexPattern.fields.filter((field) => !indexPatterns.isNestedField(field)),
- geoFieldType: geoField ? (geoField.type as ES_GEO_FIELD_TYPE) : undefined,
});
}
@@ -188,7 +178,6 @@ export class UpdateSourceEditor extends Component {
/>
diff --git a/x-pack/plugins/maps/public/render_app.tsx b/x-pack/plugins/maps/public/render_app.tsx
index 196332d5e873e..23244df45b9b5 100644
--- a/x-pack/plugins/maps/public/render_app.tsx
+++ b/x-pack/plugins/maps/public/render_app.tsx
@@ -12,11 +12,6 @@ import { i18n } from '@kbn/i18n';
import type { CoreStart, AppMountParameters } from '@kbn/core/public';
import { ExitFullScreenButtonKibanaProvider } from '@kbn/shared-ux-button-exit-full-screen';
import { KibanaThemeProvider, toMountPoint } from '@kbn/kibana-react-plugin/public';
-import {
- createKbnUrlStateStorage,
- withNotifyOnErrors,
- IKbnUrlStateStorage,
-} from '@kbn/kibana-utils-plugin/public';
import { FormattedRelative } from '@kbn/i18n-react';
import type { SavedObjectTaggingPluginStart } from '@kbn/saved-objects-tagging-plugin/public';
import { TableListViewKibanaProvider } from '@kbn/content-management-table-list';
@@ -24,7 +19,6 @@ import {
getCoreChrome,
getCoreI18n,
getMapsCapabilities,
- getToasts,
getEmbeddableService,
getDocLinks,
getCore,
@@ -35,7 +29,6 @@ import { APP_ID } from '../common/constants';
import { registerLayerWizards } from './classes/layers/wizards/load_layer_wizards';
export let goToSpecifiedPath: (path: string) => void;
-export let kbnUrlStateStorage: IKbnUrlStateStorage;
function setAppChrome() {
if (!getMapsCapabilities().save) {
@@ -81,11 +74,6 @@ export async function renderApp(
}
) {
goToSpecifiedPath = (path) => history.push(path);
- kbnUrlStateStorage = createKbnUrlStateStorage({
- useHash: false,
- history,
- ...withNotifyOnErrors(getToasts()),
- });
const stateTransfer = getEmbeddableService().getStateTransfer();
diff --git a/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx b/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx
index 9aed108b62ad4..fffb12130a05d 100644
--- a/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx
+++ b/x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx
@@ -15,7 +15,18 @@ import { Subscription } from 'rxjs';
import { type Filter, FilterStateStore, type Query, type TimeRange } from '@kbn/es-query';
import type { DataViewSpec } from '@kbn/data-views-plugin/public';
import type { DataView } from '@kbn/data-plugin/common';
-import { SavedQuery, QueryStateChange, QueryState } from '@kbn/data-plugin/public';
+import {
+ GlobalQueryStateFromUrl,
+ QueryState,
+ QueryStateChange,
+ SavedQuery,
+ syncGlobalQueryStateWithUrl,
+} from '@kbn/data-plugin/public';
+import {
+ createKbnUrlStateStorage,
+ withNotifyOnErrors,
+ IKbnUrlStateStorage,
+} from '@kbn/kibana-utils-plugin/public';
import {
getData,
getExecutionContext,
@@ -27,14 +38,7 @@ import {
getTimeFilter,
getToasts,
} from '../../../kibana_services';
-import {
- AppStateManager,
- startAppStateSyncing,
- getGlobalState,
- updateGlobalState,
- startGlobalStateSyncing,
- MapsGlobalState,
-} from '../url_state';
+import { AppStateManager, startAppStateSyncing } from '../url_state';
import { MapContainer } from '../../../connected_components/map_container';
import { getIndexPatternsFromIds } from '../../../index_pattern_util';
import { getTopNavConfig } from '../top_nav_config';
@@ -44,7 +48,6 @@ import { getMapEmbeddableDisplayName } from '../../../../common/i18n_getters';
import {
getInitialQuery,
getInitialRefreshConfig,
- getInitialTimeFilters,
SavedMap,
unsavedChangesTitle,
unsavedChangesWarning,
@@ -100,6 +103,8 @@ export class MapApp extends React.Component {
_appStateManager = new AppStateManager();
_prevIndexPatternIds: string[] | null = null;
_isMounted: boolean = false;
+ _kbnUrlStateStorage: IKbnUrlStateStorage;
+ _initialTimeFromUrl: TimeRange | undefined;
constructor(props: Props) {
super(props);
@@ -109,6 +114,11 @@ export class MapApp extends React.Component {
isRefreshPaused: true,
refreshInterval: 0,
};
+ this._kbnUrlStateStorage = createKbnUrlStateStorage({
+ useHash: false,
+ history: props.history,
+ ...withNotifyOnErrors(getToasts()),
+ });
}
componentDidMount() {
@@ -132,8 +142,16 @@ export class MapApp extends React.Component {
)
.subscribe();
- this._globalSyncUnsubscribe = startGlobalStateSyncing();
- this._appSyncUnsubscribe = startAppStateSyncing(this._appStateManager);
+ // syncGlobalQueryStateWithUrl mutates global state by merging URL state with Kibana QueryStart state
+ // capture _initialTimeFromUrl before global state is mutated
+ this._initialTimeFromUrl = this._getGlobalState()?.time;
+ const { stop } = syncGlobalQueryStateWithUrl(getData().query, this._kbnUrlStateStorage);
+ this._globalSyncUnsubscribe = stop;
+
+ this._appSyncUnsubscribe = startAppStateSyncing(
+ this._appStateManager,
+ this._kbnUrlStateStorage
+ );
this._globalSyncChangeMonitorSubscription = getData().query.state$.subscribe(
this._updateFromGlobalState
);
@@ -193,6 +211,20 @@ export class MapApp extends React.Component {
this._onQueryChange({ time: globalState.time });
};
+ _getGlobalState() {
+ return this._kbnUrlStateStorage.get('_g') ?? {};
+ }
+
+ _updateGlobalState(newState: GlobalQueryStateFromUrl) {
+ this._kbnUrlStateStorage.set('_g', {
+ ...this._getGlobalState(),
+ ...newState,
+ });
+ if (!this.state.initialized) {
+ this._kbnUrlStateStorage.kbnUrlControls.flush(true);
+ }
+ }
+
async _updateIndexPatterns() {
const { nextIndexPatternIds } = this.props;
@@ -247,17 +279,27 @@ export class MapApp extends React.Component {
});
// sync globalState
- const updatedGlobalState: MapsGlobalState = {
+ const updatedGlobalState: GlobalQueryStateFromUrl = {
filters: filterManager.getGlobalFilters(),
};
if (time) {
updatedGlobalState.time = time;
}
- updateGlobalState(updatedGlobalState, !this.state.initialized);
+ this._updateGlobalState(updatedGlobalState);
};
+ _getInitialTime(serializedMapState?: SerializedMapState) {
+ if (this._initialTimeFromUrl) {
+ return this._initialTimeFromUrl;
+ }
+
+ return !this.props.savedMap.hasSaveAndReturnConfig() && serializedMapState?.timeFilters
+ ? serializedMapState.timeFilters
+ : getTimeFilter().getTime();
+ }
+
_initMapAndLayerSettings(serializedMapState?: SerializedMapState) {
- const globalState: MapsGlobalState = getGlobalState();
+ const globalState = this._getGlobalState();
const savedObjectFilters = serializedMapState?.filters ? serializedMapState.filters : [];
const appFilters = this._appStateManager.getFilters() || [];
@@ -273,11 +315,7 @@ export class MapApp extends React.Component {
this._onQueryChange({
filters: [..._.get(globalState, 'filters', []), ...appFilters, ...savedObjectFilters],
query,
- time: getInitialTimeFilters({
- hasSaveAndReturnConfig: this.props.savedMap.hasSaveAndReturnConfig(),
- serializedMapState,
- globalState,
- }),
+ time: this._getInitialTime(serializedMapState),
});
this._onRefreshConfigChange(
@@ -299,15 +337,12 @@ export class MapApp extends React.Component {
isRefreshPaused: isPaused,
refreshInterval: interval,
});
- updateGlobalState(
- {
- refreshInterval: {
- pause: isPaused,
- value: interval,
- },
+ this._updateGlobalState({
+ refreshInterval: {
+ pause: isPaused,
+ value: interval,
},
- !this.state.initialized
- );
+ });
}
_updateStateFromSavedQuery = (savedQuery: SavedQuery) => {
diff --git a/x-pack/plugins/maps/public/routes/map_page/saved_map/get_initial_time_filters.ts b/x-pack/plugins/maps/public/routes/map_page/saved_map/get_initial_time_filters.ts
deleted file mode 100644
index 12be55a07b257..0000000000000
--- a/x-pack/plugins/maps/public/routes/map_page/saved_map/get_initial_time_filters.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import { GlobalQueryStateFromUrl } from '@kbn/data-plugin/public';
-import { getUiSettings } from '../../../kibana_services';
-import { SerializedMapState } from './types';
-
-export function getInitialTimeFilters({
- hasSaveAndReturnConfig,
- serializedMapState,
- globalState,
-}: {
- hasSaveAndReturnConfig: boolean;
- serializedMapState?: SerializedMapState;
- globalState: GlobalQueryStateFromUrl;
-}) {
- if (!hasSaveAndReturnConfig && serializedMapState?.timeFilters) {
- return serializedMapState.timeFilters;
- }
-
- const defaultTime = getUiSettings().get('timepicker:timeDefaults');
- return { ...defaultTime, ...globalState.time };
-}
diff --git a/x-pack/plugins/maps/public/routes/map_page/saved_map/index.ts b/x-pack/plugins/maps/public/routes/map_page/saved_map/index.ts
index c204267e0f9a6..2c09f696a591d 100644
--- a/x-pack/plugins/maps/public/routes/map_page/saved_map/index.ts
+++ b/x-pack/plugins/maps/public/routes/map_page/saved_map/index.ts
@@ -10,6 +10,5 @@ export { SavedMap } from './saved_map';
export { getInitialLayersFromUrlParam } from './get_initial_layers_from_url_param';
export { getInitialQuery } from './get_initial_query';
export { getInitialRefreshConfig } from './get_initial_refresh_config';
-export { getInitialTimeFilters } from './get_initial_time_filters';
export { unsavedChangesTitle, unsavedChangesWarning } from './get_breadcrumbs';
export { getOpenLayerWizardFromUrlParam } from './get_open_layer_wizard_url_param';
diff --git a/x-pack/plugins/maps/public/routes/map_page/url_state/app_sync.ts b/x-pack/plugins/maps/public/routes/map_page/url_state/app_sync.ts
index 63461315b0ac1..e12efd7a8a99d 100644
--- a/x-pack/plugins/maps/public/routes/map_page/url_state/app_sync.ts
+++ b/x-pack/plugins/maps/public/routes/map_page/url_state/app_sync.ts
@@ -8,12 +8,18 @@
import { map } from 'rxjs/operators';
import { FilterStateStore } from '@kbn/es-query';
import { connectToQueryState } from '@kbn/data-plugin/public';
-import { syncState, BaseStateContainer } from '@kbn/kibana-utils-plugin/public';
+import {
+ IKbnUrlStateStorage,
+ syncState,
+ BaseStateContainer,
+} from '@kbn/kibana-utils-plugin/public';
import { getData } from '../../../kibana_services';
-import { kbnUrlStateStorage } from '../../../render_app';
import { AppStateManager } from './app_state_manager';
-export function startAppStateSyncing(appStateManager: AppStateManager) {
+export function startAppStateSyncing(
+ appStateManager: AppStateManager,
+ kbnUrlStateStorage: IKbnUrlStateStorage
+) {
// get appStateContainer
// sync app filters with app state container from data.query to state container
const { query } = getData();
diff --git a/x-pack/plugins/maps/public/routes/map_page/url_state/global_sync.ts b/x-pack/plugins/maps/public/routes/map_page/url_state/global_sync.ts
deleted file mode 100644
index eb9510c6bed23..0000000000000
--- a/x-pack/plugins/maps/public/routes/map_page/url_state/global_sync.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import type { Filter, TimeRange } from '@kbn/es-query';
-import { RefreshInterval } from '@kbn/data-plugin/public';
-import { syncQueryStateWithUrl } from '@kbn/data-plugin/public';
-import { getData } from '../../../kibana_services';
-import { kbnUrlStateStorage } from '../../../render_app';
-
-export interface MapsGlobalState {
- time?: TimeRange;
- refreshInterval?: RefreshInterval;
- filters?: Filter[];
-}
-
-export function startGlobalStateSyncing() {
- const { stop } = syncQueryStateWithUrl(getData().query, kbnUrlStateStorage);
- return stop;
-}
-
-export function getGlobalState(): MapsGlobalState {
- return kbnUrlStateStorage.get('_g') as MapsGlobalState;
-}
-
-export function updateGlobalState(newState: MapsGlobalState, flushUrlState = false) {
- const globalState = getGlobalState();
- kbnUrlStateStorage.set('_g', {
- ...globalState,
- ...newState,
- });
- if (flushUrlState) {
- kbnUrlStateStorage.kbnUrlControls.flush(true);
- }
-}
diff --git a/x-pack/plugins/maps/public/routes/map_page/url_state/index.ts b/x-pack/plugins/maps/public/routes/map_page/url_state/index.ts
index 6fa6514ac08df..9691b34350715 100644
--- a/x-pack/plugins/maps/public/routes/map_page/url_state/index.ts
+++ b/x-pack/plugins/maps/public/routes/map_page/url_state/index.ts
@@ -5,8 +5,6 @@
* 2.0.
*/
-export type { MapsGlobalState } from './global_sync';
-export { getGlobalState, updateGlobalState, startGlobalStateSyncing } from './global_sync';
export type { MapsAppState } from './app_state_manager';
export { AppStateManager } from './app_state_manager';
export { startAppStateSyncing } from './app_sync';
diff --git a/x-pack/plugins/ml/public/application/contexts/storage/storage_context.test.tsx b/x-pack/plugins/ml/common/types/storage.test.tsx
similarity index 77%
rename from x-pack/plugins/ml/public/application/contexts/storage/storage_context.test.tsx
rename to x-pack/plugins/ml/common/types/storage.test.tsx
index 6aeeb396f38c3..c27c6e74d9edb 100644
--- a/x-pack/plugins/ml/public/application/contexts/storage/storage_context.test.tsx
+++ b/x-pack/plugins/ml/common/types/storage.test.tsx
@@ -5,33 +5,38 @@
* 2.0.
*/
+import React, { FC } from 'react';
import { renderHook, act } from '@testing-library/react-hooks';
-import { MlStorageContextProvider, useStorage } from './storage_context';
-import { MlStorageKey } from '../../../../common/types/storage';
+
+import type { Storage } from '@kbn/kibana-utils-plugin/public';
+import { StorageContextProvider, useStorage } from '@kbn/ml-local-storage';
+
+import { ML_STORAGE_KEYS } from './storage';
const mockSet = jest.fn();
const mockRemove = jest.fn();
-
-jest.mock('../kibana', () => ({
- useMlKibana: () => {
- return {
- services: {
- storage: {
- set: mockSet,
- get: jest.fn((key: MlStorageKey) => {
- switch (key) {
- case 'ml.gettingStarted.isDismissed':
- return true;
- default:
- return;
- }
- }),
- remove: mockRemove,
- },
- },
- };
- },
-}));
+const mockStorage: Storage = {
+ set: mockSet,
+ get: jest.fn((key: string) => {
+ switch (key) {
+ case 'ml.gettingStarted.isDismissed':
+ return true;
+ default:
+ return;
+ }
+ }),
+ remove: mockRemove,
+ store: jest.fn() as any,
+ clear: jest.fn(),
+};
+
+const Provider: FC = ({ children }) => {
+ return (
+
+ {children}
+
+ );
+};
describe('useStorage', () => {
afterEach(() => {
@@ -40,7 +45,7 @@ describe('useStorage', () => {
test('returns the default value', () => {
const { result } = renderHook(() => useStorage('ml.jobSelectorFlyout.applyTimeRange', true), {
- wrapper: MlStorageContextProvider,
+ wrapper: Provider,
});
expect(result.current[0]).toBe(true);
@@ -48,7 +53,7 @@ describe('useStorage', () => {
test('returns the value from storage', () => {
const { result } = renderHook(() => useStorage('ml.gettingStarted.isDismissed', false), {
- wrapper: MlStorageContextProvider,
+ wrapper: Provider,
});
expect(result.current[0]).toBe(true);
@@ -58,7 +63,7 @@ describe('useStorage', () => {
const { result, waitForNextUpdate } = renderHook(
() => useStorage('ml.gettingStarted.isDismissed'),
{
- wrapper: MlStorageContextProvider,
+ wrapper: Provider,
}
);
@@ -79,7 +84,7 @@ describe('useStorage', () => {
const { result, waitForNextUpdate } = renderHook(
() => useStorage('ml.gettingStarted.isDismissed'),
{
- wrapper: MlStorageContextProvider,
+ wrapper: Provider,
}
);
@@ -100,7 +105,7 @@ describe('useStorage', () => {
const { result, waitForNextUpdate } = renderHook(
() => useStorage('ml.gettingStarted.isDismissed'),
{
- wrapper: MlStorageContextProvider,
+ wrapper: Provider,
}
);
diff --git a/x-pack/plugins/ml/common/types/storage.ts b/x-pack/plugins/ml/common/types/storage.ts
index 34673b7c51059..7e2e1ba799961 100644
--- a/x-pack/plugins/ml/common/types/storage.ts
+++ b/x-pack/plugins/ml/common/types/storage.ts
@@ -14,6 +14,14 @@ export const ML_FROZEN_TIER_PREFERENCE = 'ml.frozenDataTierPreference';
export const ML_ANOMALY_EXPLORER_PANELS = 'ml.anomalyExplorerPanels';
export const ML_NOTIFICATIONS_LAST_CHECKED_AT = 'ml.notificationsLastCheckedAt';
+export const FROZEN_TIER_PREFERENCE = {
+ EXCLUDE: 'exclude-frozen',
+ INCLUDE: 'include-frozen',
+} as const;
+
+export type FrozenTierPreference =
+ typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE];
+
export type PartitionFieldConfig =
| {
/**
@@ -51,14 +59,17 @@ export interface AnomalyExplorerPanelsState {
mainPage: { size: number };
}
-export type MlStorage = Partial<{
+export interface MlStorageRecord {
+ [key: string]: unknown;
[ML_ENTITY_FIELDS_CONFIG]: PartitionFieldsConfig;
[ML_APPLY_TIME_RANGE_CONFIG]: ApplyTimeRangeConfig;
[ML_GETTING_STARTED_CALLOUT_DISMISSED]: boolean | undefined;
- [ML_FROZEN_TIER_PREFERENCE]: 'exclude-frozen' | 'include-frozen';
+ [ML_FROZEN_TIER_PREFERENCE]: FrozenTierPreference;
[ML_ANOMALY_EXPLORER_PANELS]: AnomalyExplorerPanelsState | undefined;
[ML_NOTIFICATIONS_LAST_CHECKED_AT]: number | undefined;
-}> | null;
+}
+
+export type MlStorage = Partial | null;
export type MlStorageKey = keyof Exclude;
@@ -69,7 +80,7 @@ export type TMlStorageMapped = T extends typeof ML_ENTIT
: T extends typeof ML_GETTING_STARTED_CALLOUT_DISMISSED
? boolean | undefined
: T extends typeof ML_FROZEN_TIER_PREFERENCE
- ? 'exclude-frozen' | 'include-frozen' | undefined
+ ? FrozenTierPreference | undefined
: T extends typeof ML_ANOMALY_EXPLORER_PANELS
? AnomalyExplorerPanelsState | undefined
: T extends typeof ML_NOTIFICATIONS_LAST_CHECKED_AT
@@ -83,8 +94,4 @@ export const ML_STORAGE_KEYS = [
ML_FROZEN_TIER_PREFERENCE,
ML_ANOMALY_EXPLORER_PANELS,
ML_NOTIFICATIONS_LAST_CHECKED_AT,
-];
-
-export function isMlStorageKey(key: unknown): key is MlStorageKey {
- return typeof key === 'string' && ML_STORAGE_KEYS.includes(key);
-}
+] as const;
diff --git a/x-pack/plugins/ml/common/util/alerts.ts b/x-pack/plugins/ml/common/util/alerts.ts
index 6abc5333a1f73..6c997dfb71566 100644
--- a/x-pack/plugins/ml/common/util/alerts.ts
+++ b/x-pack/plugins/ml/common/util/alerts.ts
@@ -6,9 +6,9 @@
*/
import { pick } from 'lodash';
+import { isDefined } from '@kbn/ml-is-defined';
import { CombinedJobWithStats, Datafeed, Job } from '../types/anomaly_detection_jobs';
import { resolveMaxTimeInterval } from './job_utils';
-import { isDefined } from '../types/guards';
import { parseInterval } from './parse_interval';
import { JobsHealthRuleTestsConfig, JobsHealthTests } from '../types/alerts';
diff --git a/x-pack/plugins/ml/common/util/job_utils.ts b/x-pack/plugins/ml/common/util/job_utils.ts
index 4d50af19a8b96..a0cbb5d5762de 100644
--- a/x-pack/plugins/ml/common/util/job_utils.ts
+++ b/x-pack/plugins/ml/common/util/job_utils.ts
@@ -16,6 +16,7 @@ import { isPopulatedObject } from '@kbn/ml-is-populated-object';
import type { SerializableRecord } from '@kbn/utility-types';
import { FilterStateStore } from '@kbn/es-query';
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
+import { isDefined } from '@kbn/ml-is-defined';
import { ALLOWED_DATA_UNITS, JOB_ID_MAX_LENGTH } from '../constants/validation';
import { parseInterval } from './parse_interval';
import { maxLengthValidator } from './validators';
@@ -35,7 +36,6 @@ import { MLCATEGORY } from '../constants/field_types';
import { getAggregations, getDatafeedAggregations } from './datafeed_utils';
import { findAggField } from './validation_utils';
import { getFirstKeyInObject } from './object_utils';
-import { isDefined } from '../types/guards';
export interface ValidationResults {
valid: boolean;
diff --git a/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx b/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx
index 9fff85c82888f..daab200ff0709 100644
--- a/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx
+++ b/x-pack/plugins/ml/public/alerting/jobs_health_rule/anomaly_detection_jobs_health_rule_trigger.tsx
@@ -12,6 +12,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import useDebounce from 'react-use/lib/useDebounce';
import { RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public';
import { isPopulatedObject } from '@kbn/ml-is-populated-object';
+import { isDefined } from '@kbn/ml-is-defined';
import { MlAnomalyDetectionJobsHealthRuleParams } from '../../../common/types/alerts';
import { JobSelectorControl } from '../job_selector';
import { jobsApiProvider } from '../../application/services/ml_api_service/jobs';
@@ -20,7 +21,6 @@ import { useMlKibana } from '../../application/contexts/kibana';
import { TestsSelectionControl } from './tests_selection_control';
import { ALL_JOBS_SELECTION } from '../../../common/constants/alerts';
import { BetaBadge } from '../beta_badge';
-import { isDefined } from '../../../common/types/guards';
export type MlAnomalyAlertTriggerProps =
RuleTypeParamsExpressionProps;
diff --git a/x-pack/plugins/ml/public/alerting/ml_anomaly_alert_trigger.tsx b/x-pack/plugins/ml/public/alerting/ml_anomaly_alert_trigger.tsx
index a5ef1e7943438..980abb23e659d 100644
--- a/x-pack/plugins/ml/public/alerting/ml_anomaly_alert_trigger.tsx
+++ b/x-pack/plugins/ml/public/alerting/ml_anomaly_alert_trigger.tsx
@@ -10,6 +10,7 @@ import { EuiSpacer, EuiForm } from '@elastic/eui';
import useMount from 'react-use/lib/useMount';
import { i18n } from '@kbn/i18n';
import { RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public';
+import { isDefined } from '@kbn/ml-is-defined';
import { JobSelectorControl } from './job_selector';
import { useMlKibana } from '../application/contexts/kibana';
import { jobsApiProvider } from '../application/services/ml_api_service/jobs';
@@ -29,7 +30,6 @@ import { ConfigValidator } from './config_validator';
import { CombinedJobWithStats } from '../../common/types/anomaly_detection_jobs';
import { AdvancedSettings } from './advanced_settings';
import { getLookbackInterval, getTopNBuckets } from '../../common/util/alerts';
-import { isDefined } from '../../common/types/guards';
import { parseInterval } from '../../common/util/parse_interval';
import { BetaBadge } from './beta_badge';
diff --git a/x-pack/plugins/ml/public/application/app.tsx b/x-pack/plugins/ml/public/application/app.tsx
index 98fe9674bb567..463cb34691144 100644
--- a/x-pack/plugins/ml/public/application/app.tsx
+++ b/x-pack/plugins/ml/public/application/app.tsx
@@ -15,7 +15,8 @@ import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public';
import { Storage } from '@kbn/kibana-utils-plugin/public';
import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
-import { MlStorageContextProvider } from './contexts/storage';
+import { StorageContextProvider } from '@kbn/ml-local-storage';
+import { ML_STORAGE_KEYS } from '../../common/types/storage';
import { setDependencyCache, clearCache } from './util/dependency_cache';
import { setLicenseCache } from './license';
import type { MlSetupDependencies, MlStartDependencies } from '../plugin';
@@ -111,9 +112,9 @@ const App: FC = ({ coreStart, deps, appMountParams }) => {
mlServices: getMlGlobalServices(coreStart.http, deps.usageCollection),
}}
>
-
+
-
+
diff --git a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx
index 7566d3664af61..442b1407aaf6d 100644
--- a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx
+++ b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.test.tsx
@@ -20,7 +20,7 @@ jest.mock('./full_time_range_selector_service', () => ({
mockSetFullTimeRange(indexPattern, query),
}));
-jest.mock('../../contexts/storage', () => {
+jest.mock('@kbn/ml-local-storage', () => {
return {
useStorage: jest.fn(() => 'exclude-frozen'),
};
diff --git a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx
index 9b9154eb33660..3f4c42bc30ca5 100644
--- a/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx
+++ b/x-pack/plugins/ml/public/application/components/full_time_range_selector/full_time_range_selector.tsx
@@ -22,9 +22,15 @@ import {
import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
import { i18n } from '@kbn/i18n';
import type { DataView } from '@kbn/data-views-plugin/public';
+import { useStorage } from '@kbn/ml-local-storage';
import { setFullTimeRange } from './full_time_range_selector_service';
-import { useStorage } from '../../contexts/storage';
-import { ML_FROZEN_TIER_PREFERENCE } from '../../../../common/types/storage';
+import {
+ ML_FROZEN_TIER_PREFERENCE,
+ FROZEN_TIER_PREFERENCE,
+ type MlStorageKey,
+ type TMlStorageMapped,
+ type FrozenTierPreference,
+} from '../../../../common/types/storage';
import { GetTimeFieldRangeResponse } from '../../services/ml_api_service';
interface Props {
@@ -34,13 +40,6 @@ interface Props {
callback?: (a: GetTimeFieldRangeResponse) => void;
}
-const FROZEN_TIER_PREFERENCE = {
- EXCLUDE: 'exclude-frozen',
- INCLUDE: 'include-frozen',
-} as const;
-
-type FrozenTierPreference = typeof FROZEN_TIER_PREFERENCE[keyof typeof FROZEN_TIER_PREFERENCE];
-
// Component for rendering a button which automatically sets the range of the time filter
// to the time range of data in the index(es) mapped to the supplied Kibana index pattern or query.
export const FullTimeRangeSelector: FC = ({ dataView, query, disabled, callback }) => {
@@ -53,10 +52,10 @@ export const FullTimeRangeSelector: FC = ({ dataView, query, disabled, ca
}
const [isPopoverOpen, setPopover] = useState(false);
- const [frozenDataPreference, setFrozenDataPreference] = useStorage(
- ML_FROZEN_TIER_PREFERENCE,
- FROZEN_TIER_PREFERENCE.EXCLUDE
- );
+ const [frozenDataPreference, setFrozenDataPreference] = useStorage<
+ MlStorageKey,
+ TMlStorageMapped
+ >(ML_FROZEN_TIER_PREFERENCE, FROZEN_TIER_PREFERENCE.EXCLUDE);
const onButtonClick = () => {
setPopover(!isPopoverOpen);
diff --git a/x-pack/plugins/ml/public/application/components/job_selector/job_selector.tsx b/x-pack/plugins/ml/public/application/components/job_selector/job_selector.tsx
index 9c49099c45946..fa2808638cbf5 100644
--- a/x-pack/plugins/ml/public/application/components/job_selector/job_selector.tsx
+++ b/x-pack/plugins/ml/public/application/components/job_selector/job_selector.tsx
@@ -19,6 +19,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { useUrlState } from '@kbn/ml-url-state';
import './_index.scss';
+import { useStorage } from '@kbn/ml-local-storage';
import { Dictionary } from '../../../../common/types/common';
import { IdBadges } from './id_badges';
import {
@@ -27,7 +28,6 @@ import {
JobSelectorFlyoutProps,
} from './job_selector_flyout';
import { MlJobWithTimeRange } from '../../../../common/types/anomaly_detection_jobs';
-import { useStorage } from '../../contexts/storage';
import { ML_APPLY_TIME_RANGE_CONFIG } from '../../../../common/types/storage';
interface GroupObj {
diff --git a/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.test.tsx b/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.test.tsx
index dd24789462cf7..ad6c05d07d4e1 100644
--- a/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.test.tsx
+++ b/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.test.tsx
@@ -8,7 +8,7 @@
import { renderHook, act } from '@testing-library/react-hooks';
import { of, throwError } from 'rxjs';
import { useMlNotifications, MlNotificationsContextProvider } from './ml_notifications_context';
-import { useStorage } from '../storage';
+import { useStorage } from '@kbn/ml-local-storage';
import { useMlKibana } from '../kibana';
const mockCountMessages = jest.fn(() => {
@@ -43,7 +43,7 @@ jest.mock('../kibana', () => ({
}));
const mockSetStorageValue = jest.fn();
-jest.mock('../storage', () => ({
+jest.mock('@kbn/ml-local-storage', () => ({
useStorage: jest.fn(() => {
return [undefined, mockSetStorageValue];
}),
diff --git a/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.tsx b/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.tsx
index 74b0a1ad54cb8..67e479f1291f5 100644
--- a/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.tsx
+++ b/x-pack/plugins/ml/public/application/contexts/ml/ml_notifications_context.tsx
@@ -10,9 +10,13 @@ import { combineLatest, timer } from 'rxjs';
import { switchMap, map, tap, retry } from 'rxjs/operators';
import moment from 'moment';
import { isPopulatedObject } from '@kbn/ml-is-populated-object';
+import { useStorage } from '@kbn/ml-local-storage';
import { useMlKibana } from '../kibana';
-import { useStorage } from '../storage';
-import { ML_NOTIFICATIONS_LAST_CHECKED_AT } from '../../../../common/types/storage';
+import {
+ ML_NOTIFICATIONS_LAST_CHECKED_AT,
+ type MlStorageKey,
+ type TMlStorageMapped,
+} from '../../../../common/types/storage';
import { useAsObservable } from '../../hooks';
import type { NotificationsCountResponse } from '../../../../common/types/notifications';
@@ -47,7 +51,10 @@ export const MlNotificationsContextProvider: FC = ({ children }) => {
const canGetNotifications = canGetJobs && canGetDataFrameAnalytics && canGetTrainedModels;
- const [lastCheckedAt, setLastCheckedAt] = useStorage(ML_NOTIFICATIONS_LAST_CHECKED_AT);
+ const [lastCheckedAt, setLastCheckedAt] = useStorage<
+ MlStorageKey,
+ TMlStorageMapped
+ >(ML_NOTIFICATIONS_LAST_CHECKED_AT);
const lastCheckedAt$ = useAsObservable(lastCheckedAt);
/** Holds the value used for the actual request */
diff --git a/x-pack/plugins/ml/public/application/contexts/storage/storage_context.tsx b/x-pack/plugins/ml/public/application/contexts/storage/storage_context.tsx
deleted file mode 100644
index 65e2a64ee3181..0000000000000
--- a/x-pack/plugins/ml/public/application/contexts/storage/storage_context.tsx
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import React, { FC, useEffect, useMemo, useCallback, useState, useContext } from 'react';
-import { omit } from 'lodash';
-import { isDefined } from '../../../../common/types/guards';
-import { useMlKibana } from '../kibana';
-import { MlStorage, ML_STORAGE_KEYS, isMlStorageKey } from '../../../../common/types/storage';
-import { MlStorageKey, TMlStorageMapped } from '../../../../common/types/storage';
-
-interface StorageAPI {
- value: MlStorage;
- setValue: >(key: K, value: T) => void;
- removeValue: (key: K) => void;
-}
-
-export const MlStorageContext = React.createContext({
- value: null,
- setValue() {
- throw new Error('MlStorageContext set method is not implemented');
- },
- removeValue() {
- throw new Error('MlStorageContext remove method is not implemented');
- },
-});
-
-export const MlStorageContextProvider: FC = ({ children }) => {
- const {
- services: { storage },
- } = useMlKibana();
-
- const initialValue = useMemo(() => {
- return ML_STORAGE_KEYS.reduce((acc, curr) => {
- acc[curr as MlStorageKey] = storage.get(curr);
- return acc;
- }, {} as Exclude);
- }, [storage]);
-
- const [state, setState] = useState(initialValue);
-
- const setStorageValue = useCallback(
- >(key: K, value: T) => {
- storage.set(key, value);
-
- setState((prevState) => ({
- ...prevState,
- [key]: value,
- }));
- },
- [storage]
- );
-
- const removeStorageValue = useCallback(
- (key: MlStorageKey) => {
- storage.remove(key);
- setState((prevState) => omit(prevState, key));
- },
- [storage]
- );
-
- useEffect(function updateStorageOnExternalChange() {
- const eventListener = (event: StorageEvent) => {
- if (!isMlStorageKey(event.key)) return;
-
- if (isDefined(event.newValue)) {
- setState((prev) => {
- return {
- ...prev,
- [event.key as MlStorageKey]:
- typeof event.newValue === 'string' ? JSON.parse(event.newValue) : event.newValue,
- };
- });
- } else {
- setState((prev) => {
- return omit(prev, event.key as MlStorageKey);
- });
- }
- };
-
- /**
- * This event listener is only invoked when
- * the change happens in another browser's tab.
- */
- window.addEventListener('storage', eventListener);
-
- return () => {
- window.removeEventListener('storage', eventListener);
- };
- }, []);
-
- const value: StorageAPI = useMemo(() => {
- return {
- value: state,
- setValue: setStorageValue,
- removeValue: removeStorageValue,
- };
- }, [state, setStorageValue, removeStorageValue]);
-
- return {children};
-};
-
-/**
- * Hook for consuming a storage value
- * @param key
- * @param initValue
- */
-export function useStorage>(
- key: K,
- initValue?: T
-): [
- typeof initValue extends undefined
- ? TMlStorageMapped | undefined
- : Exclude, undefined>,
- (value: TMlStorageMapped) => void
-] {
- const { value, setValue, removeValue } = useContext(MlStorageContext);
-
- const resultValue = useMemo(() => {
- return (value?.[key] ?? initValue) as typeof initValue extends undefined
- ? TMlStorageMapped | undefined
- : Exclude, undefined>;
- }, [value, key, initValue]);
-
- const setVal = useCallback(
- (v: TMlStorageMapped) => {
- if (isDefined(v)) {
- setValue(key, v);
- } else {
- removeValue(key);
- }
- },
- [setValue, removeValue, key]
- );
-
- return [resultValue, setVal];
-}
diff --git a/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx b/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx
index b9a1ef555dbc1..3edfcd9842a18 100644
--- a/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx
+++ b/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx
@@ -25,8 +25,8 @@ import {
VectorLayerDescriptor,
} from '@kbn/maps-plugin/common';
import { EMSTermJoinConfig } from '@kbn/maps-plugin/public';
+import { isDefined } from '@kbn/ml-is-defined';
import { useMlKibana } from '../contexts/kibana';
-import { isDefined } from '../../../common/types/guards';
import { MlEmbeddedMapComponent } from '../components/ml_embedded_map';
import { AnomaliesTableRecord } from '../../../common/types/anomalies';
diff --git a/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx b/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx
index 2bfe0c3b2844e..55feffe8ff5c4 100644
--- a/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx
+++ b/x-pack/plugins/ml/public/application/explorer/anomaly_context_menu.tsx
@@ -19,7 +19,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
import useObservable from 'react-use/lib/useObservable';
import type { Query, TimeRange } from '@kbn/es-query';
-import { isDefined } from '../../../common/types/guards';
+import { isDefined } from '@kbn/ml-is-defined';
import { useAnomalyExplorerContext } from './anomaly_explorer_context';
import { escapeKueryForFieldValuePair } from '../util/string_utils';
import { SEARCH_QUERY_LANGUAGE } from '../../../common/constants/search';
diff --git a/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx b/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx
index 6b33ba8187d9d..a0ff293a2b203 100644
--- a/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx
+++ b/x-pack/plugins/ml/public/application/explorer/anomaly_timeline.tsx
@@ -27,6 +27,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import useDebounce from 'react-use/lib/useDebounce';
import useObservable from 'react-use/lib/useObservable';
import type { Query } from '@kbn/es-query';
+import { isDefined } from '@kbn/ml-is-defined';
import { SEARCH_QUERY_LANGUAGE } from '../../../common/constants/search';
import { useCasesModal } from '../contexts/kibana/use_cases_modal';
import { useTimeRangeUpdates } from '../contexts/kibana/use_timefilter';
@@ -46,7 +47,6 @@ import { AppStateSelectedCells, OverallSwimlaneData, ViewBySwimLaneData } from '
import { NoOverallData } from './components/no_overall_data';
import { SeverityControl } from '../components/severity_control';
import { AnomalyTimelineHelpPopover } from './anomaly_timeline_help_popover';
-import { isDefined } from '../../../common/types/guards';
import { MlTooltipComponent } from '../components/chart_tooltip';
import { SwimlaneAnnotationContainer, Y_AXIS_LABEL_WIDTH } from './swimlane_annotation_container';
import { AnomalyTimelineService } from '../services/anomaly_timeline_service';
diff --git a/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_anomaly_charts_to_dashboard_controls.tsx b/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_anomaly_charts_to_dashboard_controls.tsx
index 0e928166127fd..cb5d6d2b0201b 100644
--- a/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_anomaly_charts_to_dashboard_controls.tsx
+++ b/x-pack/plugins/ml/public/application/explorer/dashboard_controls/add_anomaly_charts_to_dashboard_controls.tsx
@@ -9,8 +9,8 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { EuiFieldNumber, EuiFormRow, htmlIdGenerator } from '@elastic/eui';
import type { Query } from '@kbn/es-query';
import useObservable from 'react-use/lib/useObservable';
+import { isDefined } from '@kbn/ml-is-defined';
import { getSelectionInfluencers } from '../explorer_utils';
-import { isDefined } from '../../../../common/types/guards';
import { useAnomalyExplorerContext } from '../anomaly_explorer_context';
import { escapeKueryForFieldValuePair } from '../../util/string_utils';
import { SEARCH_QUERY_LANGUAGE } from '../../../../common/constants/search';
diff --git a/x-pack/plugins/ml/public/application/explorer/explorer.tsx b/x-pack/plugins/ml/public/application/explorer/explorer.tsx
index 6e224b25f506f..f764ede7750c9 100644
--- a/x-pack/plugins/ml/public/application/explorer/explorer.tsx
+++ b/x-pack/plugins/ml/public/application/explorer/explorer.tsx
@@ -31,6 +31,8 @@ import { css } from '@emotion/react';
import useObservable from 'react-use/lib/useObservable';
import type { DataView } from '@kbn/data-views-plugin/common';
import type { TimefilterContract } from '@kbn/data-plugin/public';
+import { useStorage } from '@kbn/ml-local-storage';
+import { isDefined } from '@kbn/ml-is-defined';
import { HelpPopover } from '../components/help_popover';
import { AnnotationFlyout } from '../components/annotations/annotation_flyout';
// @ts-ignore
@@ -69,7 +71,6 @@ import { AnomaliesTable } from '../components/anomalies_table/anomalies_table';
import { AnomaliesMap } from './anomalies_map';
import { ANOMALY_DETECTION_DEFAULT_TIME_RANGE } from '../../../common/constants/settings';
import { AnomalyContextMenu } from './anomaly_context_menu';
-import { isDefined } from '../../../common/types/guards';
import type { JobSelectorProps } from '../components/job_selector/job_selector';
import type { ExplorerState } from './reducers';
import type { TimeBuckets } from '../util/time_buckets';
@@ -78,7 +79,6 @@ import { useMlKibana, useMlLocator } from '../contexts/kibana';
import { useMlContext } from '../contexts/ml';
import { useAnomalyExplorerContext } from './anomaly_explorer_context';
import { ML_ANOMALY_EXPLORER_PANELS } from '../../../common/types/storage';
-import { useStorage } from '../contexts/storage';
interface ExplorerPageProps {
jobSelectorProps: JobSelectorProps;
diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/settings.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/settings.tsx
index d5ad0488cec2f..0693a85d20cec 100644
--- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/settings.tsx
+++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/settings.tsx
@@ -29,7 +29,7 @@ export const GeoSettings: FC = ({ setIsValid }) => {
-
+
diff --git a/x-pack/plugins/ml/public/application/overview/components/getting_started_callout.tsx b/x-pack/plugins/ml/public/application/overview/components/getting_started_callout.tsx
index 7b1f380c90658..d7a0370b4aeac 100644
--- a/x-pack/plugins/ml/public/application/overview/components/getting_started_callout.tsx
+++ b/x-pack/plugins/ml/public/application/overview/components/getting_started_callout.tsx
@@ -8,8 +8,8 @@
import React, { FC } from 'react';
import { EuiButton, EuiCallOut, EuiLink, EuiSpacer } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
+import { useStorage } from '@kbn/ml-local-storage';
import { useMlKibana } from '../../contexts/kibana';
-import { useStorage } from '../../contexts/storage';
import { ML_GETTING_STARTED_CALLOUT_DISMISSED } from '../../../../common/types/storage';
const feedbackLink = 'https://www.elastic.co/community/';
diff --git a/x-pack/plugins/ml/public/application/services/anomaly_explorer_charts_service.ts b/x-pack/plugins/ml/public/application/services/anomaly_explorer_charts_service.ts
index 7aa0bb03611e1..6a0f3c8c692b0 100644
--- a/x-pack/plugins/ml/public/application/services/anomaly_explorer_charts_service.ts
+++ b/x-pack/plugins/ml/public/application/services/anomaly_explorer_charts_service.ts
@@ -10,6 +10,7 @@ import { map as mapObservable } from 'rxjs/operators';
import type { TimeRange } from '@kbn/es-query';
import type { TimefilterContract } from '@kbn/data-plugin/public';
import { isPopulatedObject } from '@kbn/ml-is-populated-object';
+import { isDefined } from '@kbn/ml-is-defined';
import type { RecordForInfluencer } from './results_service/results_service';
import type { EntityField } from '../../../common/util/anomaly_utils';
import type { CombinedJob } from '../../../common/types/anomaly_detection_jobs';
@@ -17,7 +18,6 @@ import type { MlApiServices } from './ml_api_service';
import type { MlResultsService } from './results_service';
import { ExplorerChartsData } from '../explorer/explorer_charts/explorer_charts_container_service';
import type { TimeRangeBounds } from '../util/time_buckets';
-import { isDefined } from '../../../common/types/guards';
import type { AppStateSelectedCells } from '../explorer/explorer_utils';
import type { InfluencersFilterQuery } from '../../../common/types/es_client';
import type { SeriesConfigWithMetadata } from '../../../common/types/results';
diff --git a/x-pack/plugins/ml/public/application/services/ml_api_service/notifications.ts b/x-pack/plugins/ml/public/application/services/ml_api_service/notifications.ts
index 653ceebc52cda..fd6f7bd708cd4 100644
--- a/x-pack/plugins/ml/public/application/services/ml_api_service/notifications.ts
+++ b/x-pack/plugins/ml/public/application/services/ml_api_service/notifications.ts
@@ -6,7 +6,7 @@
*/
import { omitBy } from 'lodash';
-import { isDefined } from '../../../../common/types/guards';
+import { isDefined } from '@kbn/ml-is-defined';
import type {
NotificationsQueryParams,
NotificationsSearchResponse,
diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx
index 23084c8d8886d..8d79a41b0ab36 100644
--- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx
+++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx
@@ -10,6 +10,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiSelect, EuiSelectProps } from '@elastic/eui';
import { debounce } from 'lodash';
import { lastValueFrom } from 'rxjs';
+import { useStorage } from '@kbn/ml-local-storage';
import { EntityControl } from '../entity_control';
import { mlJobService } from '../../../services/job_service';
import { Detector, JobId } from '../../../../../common/types/anomaly_detection_jobs';
@@ -23,10 +24,11 @@ import {
import { getControlsForDetector } from '../../get_controls_for_detector';
import {
ML_ENTITY_FIELDS_CONFIG,
- PartitionFieldConfig,
- PartitionFieldsConfig,
+ type PartitionFieldConfig,
+ type PartitionFieldsConfig,
+ type MlStorageKey,
+ type TMlStorageMapped,
} from '../../../../../common/types/storage';
-import { useStorage } from '../../../contexts/storage';
import { EntityFieldType } from '../../../../../common/types/anomalies';
import { FieldDefinition } from '../../../services/results_service/result_service_rx';
import { getViewableDetectors } from '../../timeseriesexplorer_utils/get_viewable_detectors';
@@ -113,7 +115,10 @@ export const SeriesControls: FC = ({
return getControlsForDetector(selectedDetectorIndex, selectedEntities, selectedJobId);
}, [selectedDetectorIndex, selectedEntities, selectedJobId]);
- const [storageFieldsConfig, setStorageFieldsConfig] = useStorage(ML_ENTITY_FIELDS_CONFIG);
+ const [storageFieldsConfig, setStorageFieldsConfig] = useStorage<
+ MlStorageKey,
+ TMlStorageMapped
+ >(ML_ENTITY_FIELDS_CONFIG);
// Merge the default config with the one from the local storage
const resultFieldsConfig = useMemo(() => {
diff --git a/x-pack/plugins/ml/public/application/trained_models/models_management/expanded_row.tsx b/x-pack/plugins/ml/public/application/trained_models/models_management/expanded_row.tsx
index 879bed447c864..daa813fe4e1e6 100644
--- a/x-pack/plugins/ml/public/application/trained_models/models_management/expanded_row.tsx
+++ b/x-pack/plugins/ml/public/application/trained_models/models_management/expanded_row.tsx
@@ -24,8 +24,8 @@ import {
import { FormattedMessage } from '@kbn/i18n-react';
import { FIELD_FORMAT_IDS } from '@kbn/field-formats-plugin/common';
import { isPopulatedObject } from '@kbn/ml-is-populated-object';
+import { isDefined } from '@kbn/ml-is-defined';
import type { ModelItemFull } from './models_list';
-import { isDefined } from '../../../../common/types/guards';
import { ModelPipelines } from './pipelines';
import { AllocatedModels } from '../nodes_overview/allocated_models';
import type { AllocatedModel } from '../../../../common/types/trained_models';
diff --git a/x-pack/plugins/ml/public/application/util/string_utils.ts b/x-pack/plugins/ml/public/application/util/string_utils.ts
index b870cdff345b5..e1fa570efc20c 100644
--- a/x-pack/plugins/ml/public/application/util/string_utils.ts
+++ b/x-pack/plugins/ml/public/application/util/string_utils.ts
@@ -12,7 +12,7 @@ import d3 from 'd3';
import he from 'he';
import { escapeKuery } from '@kbn/es-query';
-import { isDefined } from '../../../common/types/guards';
+import { isDefined } from '@kbn/ml-is-defined';
import { CustomUrlAnomalyRecordDoc } from '../../../common/types/custom_urls';
import { Detector } from '../../../common/types/anomaly_detection_jobs';
diff --git a/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts b/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts
index 45eef7f63226a..36182956b7388 100644
--- a/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts
+++ b/x-pack/plugins/ml/server/lib/alerts/alerting_service.ts
@@ -15,6 +15,7 @@ import {
IFieldFormat,
SerializedFieldFormat,
} from '@kbn/field-formats-plugin/common';
+import { isDefined } from '@kbn/ml-is-defined';
import { MlClient } from '../ml_client';
import {
MlAnomalyDetectionAlertParams,
@@ -32,7 +33,6 @@ import {
} from '../../../common/types/alerts';
import { AnomalyDetectionAlertContext } from './register_anomaly_detection_alert_type';
import { resolveMaxTimeInterval } from '../../../common/util/job_utils';
-import { isDefined } from '../../../common/types/guards';
import { getTopNBuckets, resolveLookbackInterval } from '../../../common/util/alerts';
import type { DatafeedsService } from '../../models/job_service/datafeeds';
import { getEntityFieldName, getEntityFieldValue } from '../../../common/util/anomaly_utils';
diff --git a/x-pack/plugins/ml/server/lib/alerts/jobs_health_service.ts b/x-pack/plugins/ml/server/lib/alerts/jobs_health_service.ts
index 4c19846794de1..a1ec1931485ac 100644
--- a/x-pack/plugins/ml/server/lib/alerts/jobs_health_service.ts
+++ b/x-pack/plugins/ml/server/lib/alerts/jobs_health_service.ts
@@ -9,6 +9,7 @@ import { groupBy, keyBy, memoize, partition } from 'lodash';
import { KibanaRequest, Logger, SavedObjectsClientContract } from '@kbn/core/server';
import { i18n } from '@kbn/i18n';
import { MlJob } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
+import { isDefined } from '@kbn/ml-is-defined';
import { MlClient } from '../ml_client';
import { JobSelection } from '../../routes/schemas/alerting_schema';
import { datafeedsProvider, DatafeedsService } from '../../models/job_service/datafeeds';
@@ -30,7 +31,6 @@ import {
import { AnnotationService } from '../../models/annotation_service/annotation';
import { annotationServiceProvider } from '../../models/annotation_service';
import { parseInterval } from '../../../common/util/parse_interval';
-import { isDefined } from '../../../common/types/guards';
import {
jobAuditMessagesProvider,
JobAuditMessagesService,
diff --git a/x-pack/plugins/ml/server/models/data_frame_analytics/models_provider.ts b/x-pack/plugins/ml/server/models/data_frame_analytics/models_provider.ts
index 1f6bb64fd76f4..ccb60e6379e48 100644
--- a/x-pack/plugins/ml/server/models/data_frame_analytics/models_provider.ts
+++ b/x-pack/plugins/ml/server/models/data_frame_analytics/models_provider.ts
@@ -11,6 +11,7 @@ import {
MlTrainedModelStats,
NodesInfoNodeInfo,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
+import { isDefined } from '@kbn/ml-is-defined';
import type {
NodeDeploymentStatsResponse,
PipelineDefinition,
@@ -21,7 +22,6 @@ import {
TrainedModelDeploymentStatsResponse,
TrainedModelModelSizeStats,
} from '../../../common/types/trained_models';
-import { isDefined } from '../../../common/types/guards';
export type ModelService = ReturnType;
diff --git a/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts b/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts
index 136722f4ab5b1..e9b92c2f01e6c 100644
--- a/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts
+++ b/x-pack/plugins/ml/server/models/data_recognizer/data_recognizer.ts
@@ -18,6 +18,7 @@ import moment from 'moment';
import { merge } from 'lodash';
import type { DataViewsService } from '@kbn/data-views-plugin/common';
import { isPopulatedObject } from '@kbn/ml-is-populated-object';
+import { isDefined } from '@kbn/ml-is-defined';
import type { AnalysisLimits } from '../../../common/types/anomaly_detection_jobs';
import { getAuthorizationHeader } from '../../lib/request_authorization';
import type { MlClient } from '../../lib/ml_client';
@@ -54,7 +55,6 @@ import { resultsServiceProvider } from '../results_service';
import type { JobExistResult, JobStat } from '../../../common/types/data_recognizer';
import type { Datafeed } from '../../../common/types/anomaly_detection_jobs';
import type { MLSavedObjectService } from '../../saved_objects';
-import { isDefined } from '../../../common/types/guards';
const ML_DIR = 'ml';
const KIBANA_DIR = 'kibana';
diff --git a/x-pack/plugins/ml/server/models/results_service/anomaly_charts.ts b/x-pack/plugins/ml/server/models/results_service/anomaly_charts.ts
index dbbf95d4806c2..bcce2455539f7 100644
--- a/x-pack/plugins/ml/server/models/results_service/anomaly_charts.ts
+++ b/x-pack/plugins/ml/server/models/results_service/anomaly_charts.ts
@@ -11,6 +11,7 @@ import { each, find, get, keyBy, map, reduce, sortBy } from 'lodash';
import type * as estypes from '@elastic/elasticsearch/lib/api/types';
import { extent, max, min } from 'd3';
import { isPopulatedObject } from '@kbn/ml-is-populated-object';
+import { isDefined } from '@kbn/ml-is-defined';
import type { MlClient } from '../../lib/ml_client';
import { isRuntimeMappings } from '../../../common';
import type {
@@ -40,7 +41,6 @@ import {
isMultiBucketAnomaly,
} from '../../../common/util/anomaly_utils';
import { InfluencersFilterQuery } from '../../../common/types/es_client';
-import { isDefined } from '../../../common/types/guards';
import { AnomalyRecordDoc, CombinedJob, Datafeed, RecordForInfluencer } from '../../shared';
import { ES_AGGREGATION, ML_JOB_AGGREGATION } from '../../../common/constants/aggregation_types';
import { parseInterval } from '../../../common/util/parse_interval';
diff --git a/x-pack/plugins/ml/tsconfig.json b/x-pack/plugins/ml/tsconfig.json
index d5d42f865e2c0..2b99e5d22616a 100644
--- a/x-pack/plugins/ml/tsconfig.json
+++ b/x-pack/plugins/ml/tsconfig.json
@@ -68,6 +68,8 @@
"@kbn/repo-info",
"@kbn/ml-url-state",
"@kbn/ml-nested-property",
+ "@kbn/ml-local-storage",
+ "@kbn/ml-is-defined",
],
"exclude": [
"target/**/*",
diff --git a/x-pack/plugins/observability/common/index.ts b/x-pack/plugins/observability/common/index.ts
index 86104ab47c07a..63efd8494dbf8 100644
--- a/x-pack/plugins/observability/common/index.ts
+++ b/x-pack/plugins/observability/common/index.ts
@@ -8,6 +8,7 @@
export type { AsDuration, AsPercent, TimeUnitChar } from './utils/formatters';
export { formatDurationFromTimeUnitChar } from './utils/formatters';
+export { getInspectResponse } from './utils/get_inspect_response';
export { ProcessorEvent } from './processor_event';
diff --git a/x-pack/plugins/observability/e2e/synthetics_runner.ts b/x-pack/plugins/observability/e2e/synthetics_runner.ts
index 51ca09abfadfc..cb824fadf256f 100644
--- a/x-pack/plugins/observability/e2e/synthetics_runner.ts
+++ b/x-pack/plugins/observability/e2e/synthetics_runner.ts
@@ -12,6 +12,7 @@ import { run as syntheticsRun } from '@elastic/synthetics';
import { PromiseType } from 'utility-types';
import { createApmUsers } from '@kbn/apm-plugin/server/test_helpers/create_apm_users/create_apm_users';
+import { EsArchiver } from '@kbn/es-archiver';
import { esArchiverUnload } from './tasks/es_archiver';
import { TestReporter } from './test_reporter';
@@ -59,9 +60,17 @@ export class SyntheticsRunner {
try {
console.log('Loading esArchiver...');
- const esArchiver = this.getService('esArchiver');
-
- const promises = dataArchives.map((archive) => esArchiver.loadIfNeeded(e2eDir + archive));
+ const esArchiver: EsArchiver = this.getService('esArchiver');
+
+ const promises = dataArchives.map((archive) => {
+ if (archive === 'synthetics_data') {
+ return esArchiver.load(e2eDir + archive, {
+ docsOnly: true,
+ skipExisting: true,
+ });
+ }
+ return esArchiver.load(e2eDir + archive, { skipExisting: true });
+ });
await Promise.all([...promises]);
} catch (e) {
diff --git a/x-pack/plugins/observability/e2e/test_reporter.ts b/x-pack/plugins/observability/e2e/test_reporter.ts
index 85f007d0867aa..be4b04190f8a1 100644
--- a/x-pack/plugins/observability/e2e/test_reporter.ts
+++ b/x-pack/plugins/observability/e2e/test_reporter.ts
@@ -135,7 +135,12 @@ export class TestReporter implements Reporter {
);
successfulJourneys.forEach(([journeyName, steps]) => {
- // fs.unlinkSync('.journeys/videos/' + journeyName + '.webm');
+ try {
+ fs.unlinkSync('.journeys/videos/' + journeyName + '.webm');
+ } catch (e) {
+ // eslint-disable-next-line no-console
+ console.log(e);
+ }
});
const { failed, succeeded, skipped } = this.metrics;
diff --git a/x-pack/plugins/observability/e2e/tsconfig.json b/x-pack/plugins/observability/e2e/tsconfig.json
index b6b7f0d2c6808..1488f5f3b5b55 100644
--- a/x-pack/plugins/observability/e2e/tsconfig.json
+++ b/x-pack/plugins/observability/e2e/tsconfig.json
@@ -9,5 +9,6 @@
"kbn_references": [
"@kbn/apm-plugin",
"@kbn/test",
+ "@kbn/es-archiver",
]
}
diff --git a/x-pack/plugins/observability/public/hooks/use_es_search.ts b/x-pack/plugins/observability/public/hooks/use_es_search.ts
index b25feef4d3f54..d99a7e80781c0 100644
--- a/x-pack/plugins/observability/public/hooks/use_es_search.ts
+++ b/x-pack/plugins/observability/public/hooks/use_es_search.ts
@@ -105,7 +105,10 @@ export const useEsSearch = , loading };
+ return {
+ data: rawResponse as ESSearchResponse,
+ loading: Boolean(loading),
+ };
};
export function createEsParams(params: T): T {
diff --git a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.test.tsx b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.test.tsx
index c8214d8d310bf..9c437f5f5da64 100644
--- a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.test.tsx
+++ b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.test.tsx
@@ -6,11 +6,11 @@
*/
import moment from 'moment';
-import { getDefaultAlertSummaryTimeRange } from '.';
+import { getAlertSummaryWidgetTimeRange } from '.';
describe('getDefaultAlertSummaryTimeRange', () => {
it('should return default time in UTC format', () => {
- const defaultTimeRange = getDefaultAlertSummaryTimeRange();
+ const defaultTimeRange = getAlertSummaryWidgetTimeRange();
const utcFormat = 'YYYY-MM-DDTHH:mm:ss.SSSZ';
expect(moment(defaultTimeRange.utcFrom, utcFormat, true).isValid()).toBeTruthy();
diff --git a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.tsx b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.tsx
index dea999736fdfd..973bfc628ea60 100644
--- a/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.tsx
+++ b/x-pack/plugins/observability/public/pages/rule_details/helpers/get_alert_summary_time_range.tsx
@@ -10,7 +10,7 @@ import React from 'react';
import { getAbsoluteTimeRange } from '@kbn/data-plugin/common';
import { FormattedMessage } from '@kbn/i18n-react';
-export const getDefaultAlertSummaryTimeRange = (): AlertSummaryTimeRange => {
+export const getAlertSummaryWidgetTimeRange = (): AlertSummaryTimeRange => {
const { to, from } = getAbsoluteTimeRange({
from: 'now-30d',
to: 'now',
diff --git a/x-pack/plugins/observability/public/pages/rule_details/helpers/index.ts b/x-pack/plugins/observability/public/pages/rule_details/helpers/index.ts
index 711c088601a99..e93f2f4cc5ee0 100644
--- a/x-pack/plugins/observability/public/pages/rule_details/helpers/index.ts
+++ b/x-pack/plugins/observability/public/pages/rule_details/helpers/index.ts
@@ -5,4 +5,4 @@
* 2.0.
*/
-export { getDefaultAlertSummaryTimeRange } from './get_alert_summary_time_range';
+export { getAlertSummaryWidgetTimeRange } from './get_alert_summary_time_range';
diff --git a/x-pack/plugins/observability/public/pages/rule_details/index.tsx b/x-pack/plugins/observability/public/pages/rule_details/index.tsx
index 7201e3882667c..420757b7b50bd 100644
--- a/x-pack/plugins/observability/public/pages/rule_details/index.tsx
+++ b/x-pack/plugins/observability/public/pages/rule_details/index.tsx
@@ -42,7 +42,7 @@ import { fromQuery, toQuery } from '../../utils/url';
import { ObservabilityAlertSearchbarWithUrlSync } from '../../components/shared/alert_search_bar';
import { DeleteModalConfirmation } from './components/delete_modal_confirmation';
import { CenterJustifiedSpinner } from './components/center_justified_spinner';
-import { getDefaultAlertSummaryTimeRange } from './helpers';
+import { getAlertSummaryWidgetTimeRange } from './helpers';
import {
EXECUTION_TAB,
@@ -111,7 +111,9 @@ export function RuleDetailsPage() {
const [editFlyoutVisible, setEditFlyoutVisible] = useState(false);
const [isRuleEditPopoverOpen, setIsRuleEditPopoverOpen] = useState(false);
const [esQuery, setEsQuery] = useState<{ bool: BoolQuery }>();
- const [defaultAlertTimeRange] = useState(getDefaultAlertSummaryTimeRange);
+ const [alertSummaryWidgetTimeRange, setAlertSummaryWidgetTimeRange] = useState(
+ getAlertSummaryWidgetTimeRange
+ );
const ruleQuery = useRef([
{ query: `kibana.alert.rule.uuid: ${ruleId}`, language: 'kuery' },
]);
@@ -123,11 +125,15 @@ export function RuleDetailsPage() {
const tabsRef = useRef(null);
const onAlertSummaryWidgetClick = async (status: AlertStatus = ALERT_STATUS_ALL) => {
+ const timeRange = getAlertSummaryWidgetTimeRange();
+ setAlertSummaryWidgetTimeRange(timeRange);
await locators.get(ruleDetailsLocatorID)?.navigate(
{
+ rangeFrom: timeRange.utcFrom,
+ rangeTo: timeRange.utcTo,
ruleId,
- tabId: ALERTS_TAB,
status,
+ tabId: ALERTS_TAB,
},
{
replace: true,
@@ -386,7 +392,7 @@ export function RuleDetailsPage() {
diff --git a/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts b/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts
index d22d1f9748504..38ac4e4eb32d6 100644
--- a/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts
+++ b/x-pack/plugins/observability/server/lib/rules/slo_burn_rate/executor.ts
@@ -58,8 +58,8 @@ export const getRuleExecutor = (): LifecycleRuleExecutor<
);
const sliData = await sliClient.fetchSLIDataFrom(slo, [
- { name: LONG_WINDOW, duration: longWindowDuration },
- { name: SHORT_WINDOW, duration: shortWindowDuration },
+ { name: LONG_WINDOW, duration: longWindowDuration.add(slo.settings.syncDelay) },
+ { name: SHORT_WINDOW, duration: shortWindowDuration.add(slo.settings.syncDelay) },
]);
const longWindowBurnRate = computeBurnRate(slo, sliData[LONG_WINDOW]);
diff --git a/x-pack/plugins/osquery/common/ecs/file/index.ts b/x-pack/plugins/osquery/common/ecs/file/index.ts
index 5b8a269b7941e..6a69ea1b70ae5 100644
--- a/x-pack/plugins/osquery/common/ecs/file/index.ts
+++ b/x-pack/plugins/osquery/common/ecs/file/index.ts
@@ -10,7 +10,7 @@ export interface CodeSignature {
trusted: string[];
}
export interface Ext {
- code_signature: CodeSignature[] | CodeSignature;
+ code_signature?: CodeSignature[] | CodeSignature;
}
export interface Hash {
sha256: string[];
diff --git a/x-pack/plugins/osquery/common/ecs/rule/index.ts b/x-pack/plugins/osquery/common/ecs/rule/index.ts
index 51d7722a3ecde..ae7e5064a8ece 100644
--- a/x-pack/plugins/osquery/common/ecs/rule/index.ts
+++ b/x-pack/plugins/osquery/common/ecs/rule/index.ts
@@ -9,7 +9,7 @@ export interface RuleEcs {
id?: string[];
rule_id?: string[];
name?: string[];
- false_positives: string[];
+ false_positives?: string[];
saved_id?: string[];
timeline_id?: string[];
timeline_title?: string[];
@@ -27,10 +27,7 @@ export interface RuleEcs {
severity?: string[];
tags?: string[];
threat?: unknown;
- threshold?: {
- field: string | string[];
- value: number;
- };
+ threshold?: unknown;
type?: string[];
size?: string[];
to?: string[];
diff --git a/x-pack/plugins/osquery/common/schemas/routes/live_query/create_live_query_request_body_schema.ts b/x-pack/plugins/osquery/common/schemas/routes/live_query/create_live_query_request_body_schema.ts
index beb46aac98b58..462490fdbae96 100644
--- a/x-pack/plugins/osquery/common/schemas/routes/live_query/create_live_query_request_body_schema.ts
+++ b/x-pack/plugins/osquery/common/schemas/routes/live_query/create_live_query_request_body_schema.ts
@@ -12,7 +12,7 @@ import {
savedQueryIdOrUndefined,
packIdOrUndefined,
queryOrUndefined,
- queriesOrUndefined,
+ arrayQueries,
} from '@kbn/osquery-io-ts-types';
export const createLiveQueryRequestBodySchema = t.partial({
@@ -21,7 +21,7 @@ export const createLiveQueryRequestBodySchema = t.partial({
agent_platforms: t.array(t.string),
agent_policy_ids: t.array(t.string),
query: queryOrUndefined,
- queries: queriesOrUndefined,
+ queries: arrayQueries,
saved_query_id: savedQueryIdOrUndefined,
ecs_mapping: ecsMappingOrUndefined,
pack_id: packIdOrUndefined,
diff --git a/x-pack/plugins/osquery/common/utils/replace_params_query.test.ts b/x-pack/plugins/osquery/common/utils/replace_params_query.test.ts
new file mode 100644
index 0000000000000..3a6a5416f2b97
--- /dev/null
+++ b/x-pack/plugins/osquery/common/utils/replace_params_query.test.ts
@@ -0,0 +1,85 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { replaceParamsQuery } from './replace_params_query';
+
+describe('replaceParamsQuery', () => {
+ it('should return unchanged query, and skipped true', () => {
+ const query = 'SELECT * FROM processes WHERE version = {{params.version}}';
+ const { result, skipped } = replaceParamsQuery(query, {});
+ expect(result).toBe(query);
+ expect(skipped).toBe(true);
+ });
+ it('should return proper value instead of params if field is found', () => {
+ const query = 'SELECT * FROM processes WHERE version = {{kibana.version}}';
+ const { result, skipped } = replaceParamsQuery(query, { kibana: { version: '8.7.0' } });
+ const expectedQuery = 'SELECT * FROM processes WHERE version = 8.7.0';
+ expect(result).toBe(expectedQuery);
+ expect(skipped).toBe(false);
+ });
+ it('should return proper value instead of params with multiple params', () => {
+ const query =
+ 'SELECT * FROM processes WHERE version = {{kibana.version}} and pid = {{kibana.pid}}';
+ const { result, skipped } = replaceParamsQuery(query, {
+ kibana: { version: '8.7.0', pid: '123' },
+ });
+ const expectedQuery = 'SELECT * FROM processes WHERE version = 8.7.0 and pid = 123';
+ expect(result).toBe(expectedQuery);
+ expect(skipped).toBe(false);
+ });
+ it('should return proper value if param has white spaces inside', () => {
+ const query = 'SELECT * FROM processes WHERE version = {{ kibana.version }}';
+ const { result, skipped } = replaceParamsQuery(query, { kibana: { version: '8.7.0' } });
+ const expectedQuery = 'SELECT * FROM processes WHERE version = 8.7.0';
+ expect(result).toBe(expectedQuery);
+ expect(skipped).toBe(false);
+ });
+
+ it('should not change query if there are no opening curly braces but still skipped false', () => {
+ const query = 'SELECT * FROM processes WHERE version = kibana.version }}';
+ const { result, skipped } = replaceParamsQuery(query, { kibana: { version: '8.7.0' } });
+ const expectedQuery = 'SELECT * FROM processes WHERE version = kibana.version }}';
+ expect(result).toBe(expectedQuery);
+ expect(skipped).toBe(false);
+ });
+ it('should return skipped true if {{params}} field not found', () => {
+ const query =
+ 'SELECT * FROM processes WHERE version = {{kibana.version}} {{not.existing}} {{agent.name}}';
+ const { result, skipped } = replaceParamsQuery(query, {
+ kibana: { version: '8.7.0' },
+ agent: { name: 'testAgent' },
+ });
+ const expectedQuery =
+ 'SELECT * FROM processes WHERE version = 8.7.0 {{not.existing}} testAgent';
+ expect(result).toBe(expectedQuery);
+ expect(skipped).toBe(true);
+ });
+ it('should return replaced values even if params are duplicated, but also return skip true', () => {
+ const query =
+ 'SELECT * FROM processes WHERE version = {{ kibana.version}} {{not.existing }} {{kibana.version}} {{kibana.version}} {{agent.name}}';
+ const { result, skipped } = replaceParamsQuery(query, {
+ kibana: { version: '8.7.0' },
+ agent: { name: 'testAgent' },
+ });
+ const expectedQuery =
+ 'SELECT * FROM processes WHERE version = 8.7.0 {{not.existing }} 8.7.0 8.7.0 testAgent';
+ expect(result).toBe(expectedQuery);
+ expect(skipped).toBe(true);
+ });
+
+ it('handle complex windows query with registry as param', () => {
+ // eslint-disable-next-line no-useless-escape
+ const query = `select * FROM registry WHERE key LIKE 'HKEY_USERS\{{user.id}}\Software\Microsoft\IdentityCRL\Immersive\production\Token\{0CB4A94A-6E8C-477B-88C8-A3799FC97414}'`;
+ const { result, skipped } = replaceParamsQuery(query, {
+ user: { id: 'S-1-5-20' },
+ });
+ // eslint-disable-next-line no-useless-escape
+ const expectedQuery = `select * FROM registry WHERE key LIKE 'HKEY_USERS\S-1-5-20\Software\Microsoft\IdentityCRL\Immersive\production\Token\{0CB4A94A-6E8C-477B-88C8-A3799FC97414}'`;
+ expect(result).toBe(expectedQuery);
+ expect(skipped).toBe(false);
+ });
+});
diff --git a/x-pack/plugins/osquery/common/utils/replace_params_query.ts b/x-pack/plugins/osquery/common/utils/replace_params_query.ts
new file mode 100644
index 0000000000000..2f7df42e6a3b1
--- /dev/null
+++ b/x-pack/plugins/osquery/common/utils/replace_params_query.ts
@@ -0,0 +1,33 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { each, get } from 'lodash';
+
+export const replaceParamsQuery = (query: string, data: object) => {
+ const regex = /\{{([^}]+)\}}/g; // when there are 2 opening and 2 closing curly brackets (including brackets)
+ const matchedBrackets = query.match(regex);
+ let resultQuery = query;
+
+ if (matchedBrackets) {
+ each(matchedBrackets, (bracesText: string) => {
+ const field = bracesText.replace(/{{|}}/g, '').trim();
+ if (resultQuery.includes(bracesText)) {
+ const foundFieldValue = get(data, field);
+ if (foundFieldValue) {
+ resultQuery = resultQuery.replace(bracesText, foundFieldValue);
+ }
+ }
+ });
+ }
+
+ const skipped = regex.test(resultQuery);
+
+ return {
+ result: resultQuery,
+ skipped,
+ };
+};
diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts
index 3c52f70b6d491..d098c2bc57fb2 100644
--- a/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts
+++ b/x-pack/plugins/osquery/cypress/e2e/all/alerts.cy.ts
@@ -10,6 +10,7 @@ import {
RESPONSE_ACTIONS_ITEM_1,
RESPONSE_ACTIONS_ITEM_2,
OSQUERY_RESPONSE_ACTION_ADD_BUTTON,
+ RESPONSE_ACTIONS_ITEM_3,
} from '../../tasks/response_actions';
import { ArchiverMethod, runKbnArchiverScript } from '../../tasks/archiver';
import { login } from '../../tasks/login';
@@ -34,6 +35,7 @@ describe('Alert Event Details', () => {
runKbnArchiverScript(ArchiverMethod.LOAD, 'example_pack');
runKbnArchiverScript(ArchiverMethod.LOAD, 'rule');
});
+
beforeEach(() => {
login(ROLES.soc_manager);
});
@@ -196,6 +198,40 @@ describe('Alert Event Details', () => {
});
});
+ it('should be able to add investigation guides to response actions', () => {
+ const investigationGuideNote =
+ 'It seems that you have suggested queries in investigation guide, would you like to add them as response actions?';
+ cy.visit('/app/security/rules');
+ cy.contains(RULE_NAME).click();
+ cy.contains('Edit rule settings').click();
+ cy.getBySel('edit-rule-actions-tab').wait(500).click();
+
+ cy.getBySel(RESPONSE_ACTIONS_ITEM_0).within(() => {
+ cy.contains('Example');
+ });
+ cy.getBySel(RESPONSE_ACTIONS_ITEM_1).within(() => {
+ cy.contains('select * from uptime');
+ });
+ cy.getBySel(RESPONSE_ACTIONS_ITEM_2).should('not.exist');
+ cy.getBySel(RESPONSE_ACTIONS_ITEM_3).should('not.exist');
+ cy.contains(investigationGuideNote);
+ cy.getBySel('osqueryAddInvestigationGuideQueries').click();
+ cy.contains(investigationGuideNote).should('not.exist');
+
+ cy.getBySel(RESPONSE_ACTIONS_ITEM_0).within(() => {
+ cy.contains('Example');
+ });
+ cy.getBySel(RESPONSE_ACTIONS_ITEM_1).within(() => {
+ cy.contains('select * from uptime');
+ });
+ cy.getBySel(RESPONSE_ACTIONS_ITEM_2).within(() => {
+ cy.contains('SELECT * FROM processes;');
+ });
+ cy.getBySel(RESPONSE_ACTIONS_ITEM_3).within(() => {
+ cy.contains('select * from users');
+ });
+ });
+
it('should be able to run live query and add to timeline (-depending on the previous test)', () => {
const TIMELINE_NAME = 'Untitled timeline';
cy.visit('/app/security/alerts');
diff --git a/x-pack/plugins/osquery/cypress/e2e/all/edit_saved_queries.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/edit_saved_queries.cy.ts
index 7551176853f5e..4453132dccd5e 100644
--- a/x-pack/plugins/osquery/cypress/e2e/all/edit_saved_queries.cy.ts
+++ b/x-pack/plugins/osquery/cypress/e2e/all/edit_saved_queries.cy.ts
@@ -32,31 +32,35 @@ describe('ALL - Edit saved query', () => {
}).click();
cy.contains('Custom key/value pairs.').should('exist');
cy.contains('Hours of uptime').should('exist');
- cy.get('[data-test-subj="ECSMappingEditorForm"]').within(() => {
- cy.react('EuiButtonIcon', { props: { iconType: 'trash' } }).click();
- });
+ cy.get('[data-test-subj="ECSMappingEditorForm"]')
+ .first()
+ .within(() => {
+ cy.react('EuiButtonIcon', { props: { iconType: 'trash' } }).click();
+ });
- cy.react('PlatformCheckBoxGroupField').within(() => {
- cy.react('EuiCheckbox', {
- props: {
- id: 'linux',
- checked: true,
- },
- }).should('exist');
- cy.react('EuiCheckbox', {
- props: {
- id: 'darwin',
- checked: true,
- },
- }).should('exist');
+ cy.react('PlatformCheckBoxGroupField')
+ .first()
+ .within(() => {
+ cy.react('EuiCheckbox', {
+ props: {
+ id: 'linux',
+ checked: true,
+ },
+ }).should('exist');
+ cy.react('EuiCheckbox', {
+ props: {
+ id: 'darwin',
+ checked: true,
+ },
+ }).should('exist');
- cy.react('EuiCheckbox', {
- props: {
- id: 'windows',
- checked: false,
- },
- }).should('exist');
- });
+ cy.react('EuiCheckbox', {
+ props: {
+ id: 'windows',
+ checked: false,
+ },
+ }).should('exist');
+ });
cy.get('#windows').check({ force: true });
@@ -70,26 +74,28 @@ describe('ALL - Edit saved query', () => {
cy.contains('Custom key/value pairs').should('not.exist');
cy.contains('Hours of uptime').should('not.exist');
- cy.react('PlatformCheckBoxGroupField').within(() => {
- cy.react('EuiCheckbox', {
- props: {
- id: 'linux',
- checked: true,
- },
- }).should('exist');
- cy.react('EuiCheckbox', {
- props: {
- id: 'darwin',
- checked: true,
- },
- }).should('exist');
+ cy.react('PlatformCheckBoxGroupField')
+ .first()
+ .within(() => {
+ cy.react('EuiCheckbox', {
+ props: {
+ id: 'linux',
+ checked: true,
+ },
+ }).should('exist');
+ cy.react('EuiCheckbox', {
+ props: {
+ id: 'darwin',
+ checked: true,
+ },
+ }).should('exist');
- cy.react('EuiCheckbox', {
- props: {
- id: 'windows',
- checked: true,
- },
- }).should('exist');
- });
+ cy.react('EuiCheckbox', {
+ props: {
+ id: 'windows',
+ checked: true,
+ },
+ }).should('exist');
+ });
});
});
diff --git a/x-pack/plugins/osquery/cypress/e2e/roles/t2_analyst.cy.ts b/x-pack/plugins/osquery/cypress/e2e/roles/t2_analyst.cy.ts
index 6f2ba0a26882f..7c468a679404d 100644
--- a/x-pack/plugins/osquery/cypress/e2e/roles/t2_analyst.cy.ts
+++ b/x-pack/plugins/osquery/cypress/e2e/roles/t2_analyst.cy.ts
@@ -24,13 +24,14 @@ describe('T2 Analyst - READ + Write Live/Saved + runSavedQueries ', () => {
//
// const NEW_SAVED_QUERY_ID = `Saved-Query-Id-${randomNumber}`;
// const NEW_SAVED_QUERY_DESCRIPTION = `Test saved query description ${randomNumber}`;
+ before(() => {
+ runKbnArchiverScript(ArchiverMethod.LOAD, 'saved_query');
+ });
+
beforeEach(() => {
login(ROLES.t2_analyst);
navigateTo('/app/osquery');
});
- before(() => {
- runKbnArchiverScript(ArchiverMethod.LOAD, 'saved_query');
- });
after(() => {
runKbnArchiverScript(ArchiverMethod.UNLOAD, 'saved_query');
@@ -100,6 +101,7 @@ describe('T2 Analyst - READ + Write Live/Saved + runSavedQueries ', () => {
});
});
});
+
it('to click the edit button and edit pack', () => {
navigateTo('/app/osquery/saved_queries');
cy.getBySel('pagination-button-next').click();
@@ -109,9 +111,11 @@ describe('T2 Analyst - READ + Write Live/Saved + runSavedQueries ', () => {
}).click();
cy.contains('Custom key/value pairs.').should('exist');
cy.contains('Hours of uptime').should('exist');
- cy.get('[data-test-subj="ECSMappingEditorForm"]').within(() => {
- cy.react('EuiButtonIcon', { props: { iconType: 'trash' } }).click();
- });
+ cy.get('[data-test-subj="ECSMappingEditorForm"]')
+ .first()
+ .within(() => {
+ cy.react('EuiButtonIcon', { props: { iconType: 'trash' } }).click();
+ });
cy.react('EuiButton').contains('Update query').click();
cy.wait(5000);
diff --git a/x-pack/plugins/osquery/cypress/tasks/login.ts b/x-pack/plugins/osquery/cypress/tasks/login.ts
index 0f19f71f67011..eec845c255e65 100644
--- a/x-pack/plugins/osquery/cypress/tasks/login.ts
+++ b/x-pack/plugins/osquery/cypress/tasks/login.ts
@@ -163,19 +163,21 @@ export const loginWithRole = async (role: ROLES) => {
port: Cypress.env('configport'),
} as UrlObject);
cy.log(`origin: ${theUrl}`);
- cy.request({
- body: {
- providerType: 'basic',
- providerName: 'basic',
- currentURL: '/',
- params: {
- username: role,
- password: 'changeme',
+ cy.session([role], () => {
+ cy.request({
+ body: {
+ providerType: 'basic',
+ providerName: 'basic',
+ currentURL: '/',
+ params: {
+ username: role,
+ password: 'changeme',
+ },
},
- },
- headers: { 'kbn-xsrf': 'cypress-creds-via-config' },
- method: 'POST',
- url: getUrlWithRoute(role, LOGIN_API_ENDPOINT),
+ headers: { 'kbn-xsrf': 'cypress-creds-via-config' },
+ method: 'POST',
+ url: getUrlWithRoute(role, LOGIN_API_ENDPOINT),
+ });
});
};
@@ -217,20 +219,25 @@ const loginViaEnvironmentCredentials = () => {
`Authenticating via environment credentials from the \`CYPRESS_${ELASTICSEARCH_USERNAME}\` and \`CYPRESS_${ELASTICSEARCH_PASSWORD}\` environment variables`
);
+ const username = Cypress.env(ELASTICSEARCH_USERNAME);
+ const password = Cypress.env(ELASTICSEARCH_PASSWORD);
+
// programmatically authenticate without interacting with the Kibana login page
- cy.request({
- body: {
- providerType: 'basic',
- providerName: url && !url.includes('localhost') ? 'cloud-basic' : 'basic',
- currentURL: '/',
- params: {
- username: Cypress.env(ELASTICSEARCH_USERNAME),
- password: Cypress.env(ELASTICSEARCH_PASSWORD),
+ cy.session([username, password], () => {
+ cy.request({
+ body: {
+ providerType: 'basic',
+ providerName: url && !url.includes('localhost') ? 'cloud-basic' : 'basic',
+ currentURL: '/',
+ params: {
+ username,
+ password,
+ },
},
- },
- headers: { 'kbn-xsrf': 'cypress-creds-via-env' },
- method: 'POST',
- url: `${Cypress.config().baseUrl}${LOGIN_API_ENDPOINT}`,
+ headers: { 'kbn-xsrf': 'cypress-creds-via-env' },
+ method: 'POST',
+ url: `${Cypress.config().baseUrl}${LOGIN_API_ENDPOINT}`,
+ });
});
};
@@ -248,20 +255,25 @@ const loginViaConfig = () => {
cy.readFile(KIBANA_DEV_YML_PATH).then((kibanaDevYml) => {
const config = yaml.safeLoad(kibanaDevYml);
+ const username = 'elastic';
+ const password = config.elasticsearch.password;
+
// programmatically authenticate without interacting with the Kibana login page
- cy.request({
- body: {
- providerType: 'basic',
- providerName: 'basic',
- currentURL: '/',
- params: {
- username: 'elastic',
- password: config.elasticsearch.password,
+ cy.session([username, password], () => {
+ cy.request({
+ body: {
+ providerType: 'basic',
+ providerName: 'basic',
+ currentURL: '/',
+ params: {
+ username,
+ password,
+ },
},
- },
- headers: { 'kbn-xsrf': 'cypress-creds-via-config' },
- method: 'POST',
- url: `${Cypress.config().baseUrl}${LOGIN_API_ENDPOINT}`,
+ headers: { 'kbn-xsrf': 'cypress-creds-via-config' },
+ method: 'POST',
+ url: `${Cypress.config().baseUrl}${LOGIN_API_ENDPOINT}`,
+ });
});
});
};
diff --git a/x-pack/plugins/osquery/cypress/tasks/response_actions.ts b/x-pack/plugins/osquery/cypress/tasks/response_actions.ts
index 2c9d726648340..4a5567238c8fd 100644
--- a/x-pack/plugins/osquery/cypress/tasks/response_actions.ts
+++ b/x-pack/plugins/osquery/cypress/tasks/response_actions.ts
@@ -8,5 +8,6 @@
export const RESPONSE_ACTIONS_ITEM_0 = 'response-actions-list-item-0';
export const RESPONSE_ACTIONS_ITEM_1 = 'response-actions-list-item-1';
export const RESPONSE_ACTIONS_ITEM_2 = 'response-actions-list-item-2';
+export const RESPONSE_ACTIONS_ITEM_3 = 'response-actions-list-item-3';
export const OSQUERY_RESPONSE_ACTION_ADD_BUTTON = 'osquery-response-action-type-selection-option';
diff --git a/x-pack/plugins/osquery/public/action_results/action_results_summary.tsx b/x-pack/plugins/osquery/public/action_results/action_results_summary.tsx
index 81feb53fb4012..d8299dd672d35 100644
--- a/x-pack/plugins/osquery/public/action_results/action_results_summary.tsx
+++ b/x-pack/plugins/osquery/public/action_results/action_results_summary.tsx
@@ -18,6 +18,7 @@ interface ActionResultsSummaryProps {
actionId: string;
expirationDate?: string;
agentIds?: string[];
+ error?: string;
}
const renderErrorMessage = (error: string) => (
@@ -30,6 +31,7 @@ const ActionResultsSummaryComponent: React.FC = ({
actionId,
expirationDate,
agentIds,
+ error,
}) => {
const [pageIndex] = useState(0);
const [pageSize] = useState(50);
@@ -52,22 +54,42 @@ const ActionResultsSummaryComponent: React.FC = ({
isLive,
skip: !hasActionResultsPrivileges,
});
- if (expired) {
- edges.forEach((edge) => {
- if (!edge.fields?.completed_at && edge.fields) {
- edge.fields['error.keyword'] = edge.fields.error = [
- i18n.translate('xpack.osquery.liveQueryActionResults.table.expiredErrorText', {
- defaultMessage: 'The action request timed out.',
- }),
- ];
- }
- });
- }
+
+ useEffect(() => {
+ if (error) {
+ edges.forEach((edge) => {
+ if (edge.fields) {
+ edge.fields['error.skipped'] = edge.fields.error = [
+ i18n.translate('xpack.osquery.liveQueryActionResults.table.skippedErrorText', {
+ defaultMessage:
+ "This query hasn't been called due to parameter used and its value not found in the alert.",
+ }),
+ ];
+ }
+ });
+ } else if (expired) {
+ edges.forEach((edge) => {
+ if (!edge.fields?.completed_at && edge.fields) {
+ edge.fields['error.keyword'] = edge.fields.error = [
+ i18n.translate('xpack.osquery.liveQueryActionResults.table.expiredErrorText', {
+ defaultMessage: 'The action request timed out.',
+ }),
+ ];
+ }
+ });
+ }
+ }, [edges, error, expired]);
const renderAgentIdColumn = useCallback((agentId) => , []);
const renderRowsColumn = useCallback((rowsCount) => rowsCount ?? '-', []);
const renderStatusColumn = useCallback(
(_, item) => {
+ if (item.fields['error.skipped']) {
+ return i18n.translate('xpack.osquery.liveQueryActionResults.table.skippedStatusText', {
+ defaultMessage: 'skipped',
+ });
+ }
+
if (!item.fields.completed_at) {
return expired
? i18n.translate('xpack.osquery.liveQueryActionResults.table.expiredStatusText', {
@@ -139,11 +161,11 @@ const ActionResultsSummaryComponent: React.FC = ({
useEffect(() => {
setIsLive(() => {
- if (!agentIds?.length || expired) return false;
+ if (!agentIds?.length || expired || error) return false;
return !!(aggregations.totalResponded !== agentIds?.length);
});
- }, [agentIds?.length, aggregations.totalResponded, expired]);
+ }, [agentIds?.length, aggregations.totalResponded, error, expired]);
return edges.length ? (
diff --git a/x-pack/plugins/osquery/public/actions/use_all_live_queries.ts b/x-pack/plugins/osquery/public/actions/use_all_live_queries.ts
index 8310217a7f864..78a6514ce4a3a 100644
--- a/x-pack/plugins/osquery/public/actions/use_all_live_queries.ts
+++ b/x-pack/plugins/osquery/public/actions/use_all_live_queries.ts
@@ -10,33 +10,42 @@ import { useQuery } from '@tanstack/react-query';
import { i18n } from '@kbn/i18n';
import { createFilter } from '../common/helpers';
import { useKibana } from '../common/lib/kibana';
-import type { ActionEdges, ActionsStrategyResponse, Direction } from '../../common/search_strategy';
+import type { ActionEdges, ActionsStrategyResponse } from '../../common/search_strategy';
import type { ESTermQuery, ESExistsQuery } from '../../common/typed_json';
import { useErrorToast } from '../common/hooks/use_error_toast';
+import { Direction } from '../../common/search_strategy';
-interface UseAllLiveQueries {
+export interface UseAllLiveQueriesConfig {
activePage: number;
- direction: Direction;
+ direction?: Direction;
limit: number;
sortField: string;
filterQuery?: ESTermQuery | ESExistsQuery | string;
skip?: boolean;
+ alertId?: string;
}
+// Make sure we keep this and ACTIONS_QUERY_KEY in osquery_flyout.tsx in sync.
+const ACTIONS_QUERY_KEY = 'actions';
+
export const useAllLiveQueries = ({
activePage,
- direction,
+ direction = Direction.desc,
limit,
sortField,
filterQuery,
skip = false,
-}: UseAllLiveQueries) => {
+ alertId,
+}: UseAllLiveQueriesConfig) => {
const { http } = useKibana().services;
const setErrorToast = useErrorToast();
return useQuery(
- ['actions', { activePage, direction, limit, sortField }],
+ [
+ ACTIONS_QUERY_KEY,
+ { activePage, direction, limit, sortField, ...(alertId ? { alertId } : {}) },
+ ],
() =>
http.get<{ data: Omit & { items: ActionEdges } }>(
'/api/osquery/live_queries',
diff --git a/x-pack/plugins/osquery/public/common/contexts.tsx b/x-pack/plugins/osquery/public/common/contexts.tsx
index e035e08710a91..f0967f9c94d44 100644
--- a/x-pack/plugins/osquery/public/common/contexts.tsx
+++ b/x-pack/plugins/osquery/public/common/contexts.tsx
@@ -6,10 +6,6 @@
*/
import React from 'react';
+import type { Ecs } from '../../common/ecs';
-export interface AlertEcsData {
- _id: string;
- _index?: string;
-}
-
-export const AlertAttachmentContext = React.createContext(null);
+export const AlertAttachmentContext = React.createContext(null);
diff --git a/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx b/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx
index 78bde0469651d..6808684fa8cf3 100644
--- a/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx
+++ b/x-pack/plugins/osquery/public/live_queries/form/pack_queries_status_table.tsx
@@ -86,7 +86,7 @@ const DocsColumnResults: React.FC = ({ count, isLive })
{count ? {count} : '-'}
- {isLive ? (
+ {!isLive ? (
@@ -130,6 +130,7 @@ type PackQueryStatusItem = Partial<{
status?: string;
pending?: number;
docs?: number;
+ error?: string;
}>;
interface PackQueriesStatusTableProps {
@@ -192,15 +193,12 @@ const PackQueriesStatusTableComponent: React.FC = (
[handleQueryFlyoutOpen]
);
- const renderDocsColumn = useCallback(
- (item: PackQueryStatusItem) => (
-
- ),
- []
- );
+ const renderDocsColumn = useCallback((item: PackQueryStatusItem) => {
+ const isLive =
+ !item?.status || !!item.error || (item?.status !== 'running' && item?.pending === 0);
+
+ return ;
+ }, []);
const renderAgentsColumn = useCallback((item) => {
if (!item.action_id) return;
@@ -239,6 +237,7 @@ const PackQueriesStatusTableComponent: React.FC = (
endDate={expirationDate}
agentIds={agentIds}
failedAgentsCount={item?.failed ?? 0}
+ error={item.error}
/>
diff --git a/x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx b/x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx
index 97618369dfd81..f3e8c2d9cc966 100644
--- a/x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx
+++ b/x-pack/plugins/osquery/public/live_queries/form/query_pack_selectable.tsx
@@ -12,22 +12,29 @@ import styled from 'styled-components';
import { useController } from 'react-hook-form';
const StyledEuiCard = styled(EuiCard)`
- padding: 16px 92px 16px 16px !important;
-
+ padding: 0;
+ display: flex;
+ flex-direction: row;
+ border: ${(props) => {
+ if (props.selectable?.isSelected) {
+ return `1px solid ${props.theme.eui.euiColorSuccess}`;
+ }
+ }};
+ .euiCard__content {
+ padding: 16px 92px 16px 16px !important;
+ }
.euiTitle {
font-size: 1rem;
}
-
.euiText {
margin-top: 0;
color: ${(props) => props.theme.eui.euiTextSubduedColor};
}
> button[role='switch'] {
- left: auto;
+ min-inline-size: 80px;
height: 100% !important;
width: 80px;
- right: 0;
border-radius: 0 5px 5px 0;
> span {
@@ -43,12 +50,7 @@ const StyledEuiCard = styled(EuiCard)`
}
}
}
-
- button[aria-checked='false'] > span > svg {
- display: none;
- }
`;
-
interface QueryPackSelectableProps {
canRunSingleQuery: boolean;
canRunPacks: boolean;
@@ -79,6 +81,7 @@ export const QueryPackSelectable = ({
onClick: () => handleChange('query'),
isSelected: queryType === 'query',
iconType: 'check',
+ textProps: {}, // this is needed for the text to get wrapped in span
}),
[queryType, handleChange]
);
@@ -88,6 +91,7 @@ export const QueryPackSelectable = ({
onClick: () => handleChange('pack'),
isSelected: queryType === 'pack',
iconType: 'check',
+ textProps: {}, // this is needed for the text to get wrapped in span
}),
[queryType, handleChange]
);
diff --git a/x-pack/plugins/osquery/public/live_queries/index.tsx b/x-pack/plugins/osquery/public/live_queries/index.tsx
index c0900c8565d37..9f149c0082669 100644
--- a/x-pack/plugins/osquery/public/live_queries/index.tsx
+++ b/x-pack/plugins/osquery/public/live_queries/index.tsx
@@ -7,10 +7,12 @@
import { castArray, isEmpty, pickBy } from 'lodash';
import { EuiCode, EuiLoadingContent, EuiEmptyPrompt } from '@elastic/eui';
-import React, { useMemo } from 'react';
+import React, { useContext, useMemo } from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
import type { ECSMapping } from '@kbn/osquery-io-ts-types';
+import { replaceParamsQuery } from '../../common/utils/replace_params_query';
+import { AlertAttachmentContext } from '../common/contexts';
import { LiveQueryForm } from './form';
import { useActionResultsPrivileges } from '../action_results/use_action_privileges';
import { OSQUERY_INTEGRATION_NAME } from '../../common';
@@ -72,19 +74,30 @@ const LiveQueryComponent: React.FC = ({
return null;
}, [agentId, agentIds, agentPolicyIds, agentSelection]);
+ const ecsData = useContext(AlertAttachmentContext);
+
+ const initialQuery = useMemo(() => {
+ if (ecsData && query) {
+ const { result } = replaceParamsQuery(query, ecsData);
+
+ return result;
+ }
+
+ return query;
+ }, [ecsData, query]);
const defaultValue = useMemo(() => {
const initialValue = {
...(initialAgentSelection ? { agentSelection: initialAgentSelection } : {}),
alertIds,
- query,
+ query: initialQuery,
savedQueryId,
ecs_mapping,
packId,
};
return !isEmpty(pickBy(initialValue, (value) => !isEmpty(value))) ? initialValue : undefined;
- }, [alertIds, ecs_mapping, initialAgentSelection, packId, query, savedQueryId]);
+ }, [alertIds, ecs_mapping, initialAgentSelection, initialQuery, packId, savedQueryId]);
if (isLoading) {
return ;
diff --git a/x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx b/x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx
index 35da6a666ea22..a63fe1fb57c9d 100644
--- a/x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx
+++ b/x-pack/plugins/osquery/public/packs/form/shards/pack_type_selectable.tsx
@@ -23,6 +23,10 @@ const StyledEuiCard = styled(EuiCard)`
font-size: 1rem;
}
+ .euiSpacer {
+ display: none;
+ }
+
.euiText {
margin-top: 0;
margin-left: 25px;
diff --git a/x-pack/plugins/osquery/public/plugin.ts b/x-pack/plugins/osquery/public/plugin.ts
index 7e7a91da2e908..fa36d5adabfb6 100644
--- a/x-pack/plugins/osquery/public/plugin.ts
+++ b/x-pack/plugins/osquery/public/plugin.ts
@@ -14,6 +14,7 @@ import type {
} from '@kbn/core/public';
import { DEFAULT_APP_CATEGORIES } from '@kbn/core/public';
import { Storage } from '@kbn/kibana-utils-plugin/public';
+import { useAllLiveQueries } from './actions/use_all_live_queries';
import { getLazyOsqueryResponseActionTypeForm } from './shared_components/lazy_osquery_action_params_form';
import { useFetchStatus } from './fleet_integration/use_fetch_status';
import { getLazyOsqueryResults } from './shared_components/lazy_osquery_results';
@@ -128,6 +129,7 @@ export class OsqueryPlugin implements Plugin = ({
@@ -70,6 +71,7 @@ const ResultsTableComponent: React.FC = ({
startDate,
endDate,
liveQueryActionId,
+ error,
}) => {
const [isLive, setIsLive] = useState(true);
const { data: hasActionResultsPrivileges } = useActionResultsPrivileges();
@@ -367,7 +369,7 @@ const ResultsTableComponent: React.FC = ({
useEffect(
() =>
setIsLive(() => {
- if (!agentIds?.length || expired) return false;
+ if (!agentIds?.length || expired || error) return false;
return !!(
aggregations.totalResponded !== agentIds?.length ||
@@ -381,6 +383,7 @@ const ResultsTableComponent: React.FC = ({
aggregations?.totalRowCount,
allResultsData?.edges.length,
allResultsData?.total,
+ error,
expired,
]
);
diff --git a/x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx b/x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx
index 9fe31e920564c..3094a076afedf 100644
--- a/x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx
+++ b/x-pack/plugins/osquery/public/routes/saved_queries/edit/tabs.tsx
@@ -27,6 +27,7 @@ interface ResultTabsProps {
failedAgentsCount?: number;
endDate?: string;
liveQueryActionId?: string;
+ error?: string;
}
const ResultTabsComponent: React.FC = ({
@@ -37,6 +38,7 @@ const ResultTabsComponent: React.FC = ({
failedAgentsCount,
startDate,
liveQueryActionId,
+ error,
}) => {
const tabs = useMemo(
() => [
@@ -52,6 +54,7 @@ const ResultTabsComponent: React.FC = ({
startDate={startDate}
endDate={endDate}
liveQueryActionId={liveQueryActionId}
+ error={error}
/>
),
},
@@ -60,7 +63,12 @@ const ResultTabsComponent: React.FC = ({
name: 'Status',
'data-test-subj': 'osquery-status-tab',
content: (
-
+
),
append: failedAgentsCount ? (
@@ -69,7 +77,16 @@ const ResultTabsComponent: React.FC = ({
) : null,
},
],
- [actionId, agentIds, ecsMapping, startDate, endDate, liveQueryActionId, failedAgentsCount]
+ [
+ actionId,
+ agentIds,
+ ecsMapping,
+ startDate,
+ endDate,
+ liveQueryActionId,
+ error,
+ failedAgentsCount,
+ ]
);
return (
diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx b/x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx
index a8b369b86342f..00ef03a941e5b 100644
--- a/x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx
+++ b/x-pack/plugins/osquery/public/shared_components/lazy_live_query_field.tsx
@@ -12,6 +12,8 @@ import type { LiveQueryQueryFieldProps } from '../live_queries/form/live_query_q
import type { ServicesWrapperProps } from './services_wrapper';
import ServicesWrapper from './services_wrapper';
+const LiveQueryField = lazy(() => import('../live_queries/form/live_query_query_field'));
+
export const getLazyLiveQueryField =
(services: ServicesWrapperProps['services']) =>
// eslint-disable-next-line react/display-name
@@ -24,10 +26,8 @@ export const getLazyLiveQueryField =
query: string;
ecs_mapping: Record;
}>;
- }) => {
- const LiveQueryField = lazy(() => import('../live_queries/form/live_query_query_field'));
-
- return (
+ }) =>
+ (
@@ -36,4 +36,3 @@ export const getLazyLiveQueryField =
);
- };
diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx b/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx
index 15ffbdee14c4a..968e43cea5477 100644
--- a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx
+++ b/x-pack/plugins/osquery/public/shared_components/lazy_osquery_action.tsx
@@ -6,18 +6,17 @@
*/
import React, { lazy, Suspense, useMemo } from 'react';
+import type { Ecs } from '../../common/ecs';
import ServicesWrapper from './services_wrapper';
import type { ServicesWrapperProps } from './services_wrapper';
import type { OsqueryActionProps } from './osquery_action';
-import type { AlertEcsData } from '../common/contexts';
import { AlertAttachmentContext } from '../common/contexts';
+const OsqueryAction = lazy(() => import('./osquery_action'));
export const getLazyOsqueryAction =
(services: ServicesWrapperProps['services']) =>
// eslint-disable-next-line react/display-name
- (props: OsqueryActionProps & { ecsData?: AlertEcsData }) => {
- const OsqueryAction = lazy(() => import('./osquery_action'));
-
+ (props: OsqueryActionProps & { ecsData?: Ecs }) => {
const { ecsData, ...restProps } = props;
const renderAction = useMemo(() => {
if (ecsData && ecsData?._id) {
@@ -29,7 +28,7 @@ export const getLazyOsqueryAction =
}
return ;
- }, [OsqueryAction, ecsData, restProps]);
+ }, [ecsData, restProps]);
return (
diff --git a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx b/x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx
index a50de706ab067..22b6af098a468 100644
--- a/x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx
+++ b/x-pack/plugins/osquery/public/shared_components/lazy_osquery_results.tsx
@@ -14,14 +14,13 @@ interface BigServices extends StartServices {
storage: unknown;
}
+const OsqueryResults = lazy(() => import('./osquery_results'));
+
export const getLazyOsqueryResults =
// eslint-disable-next-line react/display-name
- (services: BigServices) => (props: OsqueryActionResultsProps) => {
- const OsqueryResults = lazy(() => import('./osquery_results'));
-
- return (
+ (services: BigServices) => (props: OsqueryActionResultsProps) =>
+ (
);
- };
diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx
index 402dacf7a6542..13d4e8745e233 100644
--- a/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx
+++ b/x-pack/plugins/osquery/public/shared_components/osquery_action/index.tsx
@@ -21,6 +21,7 @@ export interface OsqueryActionProps {
defaultValues?: {};
formType: 'steps' | 'simple';
hideAgentsField?: boolean;
+ onSuccess?: () => void;
}
const OsqueryActionComponent: React.FC = ({
@@ -28,6 +29,7 @@ const OsqueryActionComponent: React.FC = ({
formType = 'simple',
defaultValues,
hideAgentsField,
+ onSuccess,
}) => {
const permissions = useKibana().services.application.capabilities.osquery;
@@ -91,6 +93,7 @@ const OsqueryActionComponent: React.FC = ({
formType={formType}
agentId={agentId}
hideAgentsField={hideAgentsField}
+ onSuccess={onSuccess}
{...defaultValues}
/>
);
diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx
index 1d2f79f273c58..5902eafddaa84 100644
--- a/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx
+++ b/x-pack/plugins/osquery/public/shared_components/osquery_response_action_type/index.tsx
@@ -7,7 +7,6 @@
import React, { useEffect, useMemo } from 'react';
import { EuiSpacer } from '@elastic/eui';
-import uuid from 'uuid';
import type { FieldErrors } from 'react-hook-form';
import { useFieldArray } from 'react-hook-form';
import { useForm as useHookForm, FormProvider } from 'react-hook-form';
@@ -35,7 +34,6 @@ interface OsqueryResponseActionsValues {
interface OsqueryResponseActionsParamsFormFields {
savedQueryId: string | null;
- id: string;
ecs_mapping: ECSMapping;
query: string;
packId?: string[];
@@ -58,7 +56,6 @@ const OsqueryResponseActionParamsFormComponent = ({
onError,
onChange,
}: OsqueryResponseActionsParamsFormProps) => {
- const uniqueId = useMemo(() => uuid.v4(), []);
const hooksForm = useHookForm({
mode: 'all',
defaultValues: defaultValues
@@ -70,14 +67,13 @@ const OsqueryResponseActionParamsFormComponent = ({
}
: {
ecs_mapping: {},
- id: uniqueId,
queryType: 'query',
},
});
const { watch, register, formState, control } = hooksForm;
- const [packId, queryType, queries, id] = watch(['packId', 'queryType', 'queries', 'id']);
+ const [packId, queryType, queries] = watch(['packId', 'queryType', 'queries']);
const { data: packData } = usePack({
packId: packId?.[0],
skip: !packId?.[0],
@@ -105,7 +101,6 @@ const OsqueryResponseActionParamsFormComponent = ({
useEffect(() => {
register('savedQueryId');
- register('id');
}, [register]);
useEffect(() => {
@@ -114,12 +109,10 @@ const OsqueryResponseActionParamsFormComponent = ({
// @ts-expect-error update types
formData.queryType === 'pack'
? {
- id: formData.id,
packId: formData?.packId?.length ? formData?.packId[0] : undefined,
queries: formData.queries,
}
: {
- id: formData.id,
savedQueryId: formData.savedQueryId,
query: formData.query,
ecsMapping: formData.ecs_mapping,
@@ -150,10 +143,9 @@ const OsqueryResponseActionParamsFormComponent = ({
const queryDetails = useMemo(
() => ({
queries,
- action_id: id,
agents: [],
}),
- [id, queries]
+ [queries]
);
return (
diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/index.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_results/index.tsx
index 36c09a2bce188..e7f3bd47a181a 100644
--- a/x-pack/plugins/osquery/public/shared_components/osquery_results/index.tsx
+++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/index.tsx
@@ -10,9 +10,7 @@ import React from 'react';
import { QueryClientProvider } from '@tanstack/react-query';
import type { CoreStart } from '@kbn/core/public';
-import { useAllLiveQueries } from '../../actions/use_all_live_queries';
import { KibanaContextProvider } from '../../common/lib/kibana';
-import { Direction } from '../../../common/search_strategy';
import { queryClient } from '../../query_client';
import { KibanaThemeProvider } from '../../shared_imports';
@@ -23,41 +21,30 @@ import { OsqueryResult } from './osquery_result';
const OsqueryActionResultsComponent: React.FC = ({
agentIds,
ruleName,
- alertId,
+ actionItems,
ecsData,
-}) => {
- const { data: actionsData } = useAllLiveQueries({
- filterQuery: { term: { alert_ids: alertId } },
- activePage: 0,
- limit: 100,
- direction: Direction.desc,
- sortField: '@timestamp',
- });
-
- return (
-
- {actionsData?.data.items.map((item, index) => {
- const actionId = item.fields?.action_id?.[0];
- const queryId = item.fields?.['queries.action_id']?.[0];
- // const query = item.fields?.['queries.query']?.[0];
- const startDate = item.fields?.['@timestamp'][0];
+}) => (
+
+ {actionItems?.map((item) => {
+ const actionId = item.fields?.action_id?.[0];
+ const queryId = item.fields?.['queries.action_id']?.[0];
+ const startDate = item.fields?.['@timestamp'][0];
- return (
-
- );
- })}
-
-
- );
-};
+ return (
+
+ );
+ })}
+
+
+);
export const OsqueryActionResults = React.memo(OsqueryActionResultsComponent);
diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx
index c48e75c44ba82..a726f7c9b9070 100644
--- a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx
+++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result.tsx
@@ -15,7 +15,7 @@ import { ATTACHED_QUERY } from '../../agents/translations';
import { PackQueriesStatusTable } from '../../live_queries/form/pack_queries_status_table';
import { AlertAttachmentContext } from '../../common/contexts';
-interface OsqueryResultProps extends Omit {
+interface OsqueryResultProps extends OsqueryActionResultsProps {
actionId: string;
queryId: string;
startDate: string;
diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx
index fcfa6b1a720a3..5a8ac2a3b9846 100644
--- a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx
+++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.test.tsx
@@ -13,11 +13,11 @@ import { QueryClientProvider } from '@tanstack/react-query';
import { OsqueryActionResults } from '.';
import { queryClient } from '../../query_client';
import { useKibana } from '../../common/lib/kibana';
-import * as useAllLiveQueries from '../../actions/use_all_live_queries';
import * as useLiveQueryDetails from '../../actions/use_live_query_details';
import { PERMISSION_DENIED } from '../osquery_action/translations';
import * as privileges from '../../action_results/use_action_privileges';
import { defaultLiveQueryDetails, DETAILS_QUERY, getMockedKibanaConfig } from './test_utils';
+import type { OsqueryActionResultsProps } from './types';
jest.mock('../../common/lib/kibana');
@@ -31,11 +31,21 @@ const enablePrivileges = () => {
}));
};
-const defaultProps = {
+const defaultProps: OsqueryActionResultsProps = {
agentIds: ['agent1'],
ruleName: ['Test-rule'],
- ruleActions: [{ action_type_id: 'action1' }, { action_type_id: 'action2' }],
- alertId: 'test-alert-id',
+ actionItems: [
+ {
+ _id: 'test',
+ _index: 'test',
+ fields: {
+ action_id: ['testActionId'],
+ 'queries.action_id': ['queriesActionId'],
+ 'queries.query': [DETAILS_QUERY],
+ '@timestamp': ['2022-09-08T18:16:30.256Z'],
+ },
+ },
+ ],
ecsData: {
_id: 'test',
},
@@ -66,23 +76,6 @@ const renderWithContext = (Element: React.ReactElement) =>
describe('Osquery Results', () => {
beforeAll(() => {
mockKibana();
- // @ts-expect-error update types
- jest.spyOn(useAllLiveQueries, 'useAllLiveQueries').mockImplementation(() => ({
- data: {
- data: {
- items: [
- {
- fields: {
- action_id: ['sfdsfds'],
- 'queries.action_id': ['dsadas'],
- 'queries.query': [DETAILS_QUERY],
- '@timestamp': ['2022-09-08T18:16:30.256Z'],
- },
- },
- ],
- },
- },
- }));
jest
.spyOn(useLiveQueryDetails, 'useLiveQueryDetails')
diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts b/x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts
index cb4b11651ee45..6cc918f936751 100644
--- a/x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts
+++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/types.ts
@@ -5,11 +5,12 @@
* 2.0.
*/
-import type { AlertEcsData } from '../../common/contexts';
+import type { Ecs } from '../../../common/ecs';
+import type { ActionEdges } from '../../../common/search_strategy';
export interface OsqueryActionResultsProps {
agentIds?: string[];
ruleName?: string[];
- alertId: string;
- ecsData: AlertEcsData;
+ ecsData: Ecs;
+ actionItems?: ActionEdges;
}
diff --git a/x-pack/plugins/osquery/public/types.ts b/x-pack/plugins/osquery/public/types.ts
index d591776a41ecd..f6d05a3d45996 100644
--- a/x-pack/plugins/osquery/public/types.ts
+++ b/x-pack/plugins/osquery/public/types.ts
@@ -25,6 +25,7 @@ import type {
getLazyOsqueryAction,
getLazyOsqueryResponseActionTypeForm,
} from './shared_components';
+import type { useAllLiveQueries, UseAllLiveQueriesConfig } from './actions/use_all_live_queries';
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface OsqueryPluginSetup {}
@@ -36,6 +37,7 @@ export interface OsqueryPluginStart {
isOsqueryAvailable: (props: { agentId: string }) => boolean;
fetchInstallationStatus: () => { loading: boolean; disabled: boolean; permissionDenied: boolean };
OsqueryResponseActionTypeForm: ReturnType;
+ fetchAllLiveQueries: (config: UseAllLiveQueriesConfig) => ReturnType;
}
export interface AppPluginStartDependencies {
diff --git a/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts b/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts
index cd7a46cfa72c8..a38f8eb08b57b 100644
--- a/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts
+++ b/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts
@@ -7,16 +7,16 @@
import uuid from 'uuid';
import moment from 'moment';
-import { flatten, isEmpty, map, omit, pick, pickBy, some } from 'lodash';
+import { filter, flatten, isEmpty, map, omit, pick, pickBy, some } from 'lodash';
import { AGENT_ACTIONS_INDEX } from '@kbn/fleet-plugin/common';
-import type { SavedObjectsClientContract } from '@kbn/core/server';
+import type { Ecs, SavedObjectsClientContract } from '@kbn/core/server';
+import { createDynamicQueries, createQueries } from './create_queries';
import { getInternalSavedObjectsClient } from '../../routes/utils';
import { parseAgentSelection } from '../../lib/parse_agent_groups';
import { packSavedObjectType } from '../../../common/types';
import type { OsqueryAppContext } from '../../lib/osquery_app_context_services';
import type { CreateLiveQueryRequestBodySchema } from '../../../common/schemas/routes/live_query';
import { convertSOQueriesToPack } from '../../routes/pack/utils';
-import { isSavedQueryPrebuilt } from '../../routes/saved_query/utils';
import { ACTIONS_INDEX } from '../../../common/constants';
import { TELEMETRY_EBT_LIVE_QUERY_EVENT } from '../../lib/telemetry/constants';
import type { PackSavedObjectAttributes } from '../../common/types';
@@ -25,17 +25,23 @@ interface Metadata {
currentUser: string | undefined;
}
+interface CreateActionHandlerOptions {
+ soClient?: SavedObjectsClientContract;
+ metadata?: Metadata;
+ ecsData?: Ecs;
+}
+
export const createActionHandler = async (
osqueryContext: OsqueryAppContext,
params: CreateLiveQueryRequestBodySchema,
- soClient?: SavedObjectsClientContract,
- metadata?: Metadata
+ options: CreateActionHandlerOptions
) => {
const [coreStartServices] = await osqueryContext.getStartServices();
const esClientInternal = coreStartServices.elasticsearch.client.asInternalUser;
const internalSavedObjectsClient = await getInternalSavedObjectsClient(
osqueryContext.getStartServices
);
+ const { soClient, metadata, ecsData } = options;
const savedObjectsClient = soClient ?? coreStartServices.savedObjects.createInternalRepository();
// eslint-disable-next-line @typescript-eslint/naming-convention
@@ -46,6 +52,7 @@ export const createActionHandler = async (
platformsSelected: agent_platforms,
policiesSelected: agent_policy_ids,
});
+
if (!selectedAgents.length) {
throw new Error('No agents found for selection');
}
@@ -95,49 +102,24 @@ export const createActionHandler = async (
(value) => !isEmpty(value)
)
)
- : params.queries?.length
- ? map(params.queries, (query) =>
- pickBy(
- {
- // @ts-expect-error where does type 'number' comes from?
- ...query,
- action_id: uuid.v4(),
- agents: selectedAgents,
- },
- (value) => !isEmpty(value)
- )
- )
- : [
- pickBy(
- {
- action_id: uuid.v4(),
- id: uuid.v4(),
- query: params.query,
- saved_query_id: params.saved_query_id,
- saved_query_prebuilt: params.saved_query_id
- ? await isSavedQueryPrebuilt(
- osqueryContext.service.getPackageService()?.asInternalUser,
- params.saved_query_id
- )
- : undefined,
- ecs_mapping: params.ecs_mapping,
- agents: selectedAgents,
- },
- (value) => !isEmpty(value)
- ),
- ],
+ : ecsData
+ ? await createDynamicQueries(params, ecsData, osqueryContext)
+ : await createQueries(params, selectedAgents, osqueryContext),
};
- const fleetActions = map(osqueryAction.queries, (query) => ({
- action_id: query.action_id,
- '@timestamp': moment().toISOString(),
- expiration: moment().add(5, 'minutes').toISOString(),
- type: 'INPUT_ACTION',
- input_type: 'osquery',
- agents: query.agents,
- user_id: metadata?.currentUser,
- data: pick(query, ['id', 'query', 'ecs_mapping', 'version', 'platform']),
- }));
+ const fleetActions = map(
+ filter(osqueryAction.queries, (query) => !query.error),
+ (query) => ({
+ action_id: query.action_id,
+ '@timestamp': moment().toISOString(),
+ expiration: moment().add(5, 'minutes').toISOString(),
+ type: 'INPUT_ACTION',
+ input_type: 'osquery',
+ agents: query.agents,
+ user_id: metadata?.currentUser,
+ data: pick(query, ['id', 'query', 'ecs_mapping', 'version', 'platform']),
+ })
+ );
await esClientInternal.bulk({
refresh: 'wait_for',
diff --git a/x-pack/plugins/osquery/server/handlers/action/create_queries.ts b/x-pack/plugins/osquery/server/handlers/action/create_queries.ts
new file mode 100644
index 0000000000000..f9f918a7ea623
--- /dev/null
+++ b/x-pack/plugins/osquery/server/handlers/action/create_queries.ts
@@ -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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { isEmpty, map, pickBy } from 'lodash';
+import uuid from 'uuid';
+import type { Ecs } from '@kbn/core/server';
+import { i18n } from '@kbn/i18n';
+
+import type { OsqueryAppContext } from '../../lib/osquery_app_context_services';
+import type { CreateLiveQueryRequestBodySchema } from '../../../common/schemas/routes/live_query';
+import { replaceParamsQuery } from '../../../common/utils/replace_params_query';
+import { isSavedQueryPrebuilt } from '../../routes/saved_query/utils';
+
+export const createQueries = async (
+ params: CreateLiveQueryRequestBodySchema,
+ agents: string[],
+ osqueryContext: OsqueryAppContext
+) =>
+ params.queries?.length
+ ? map(params.queries, (query) =>
+ pickBy(
+ {
+ ...query,
+ action_id: uuid.v4(),
+ agents,
+ },
+ (value) => !isEmpty(value) || value === true
+ )
+ )
+ : [
+ pickBy(
+ {
+ action_id: uuid.v4(),
+ id: uuid.v4(),
+ query: params.query,
+ saved_query_id: params.saved_query_id,
+ saved_query_prebuilt: params.saved_query_id
+ ? await isSavedQueryPrebuilt(
+ osqueryContext.service.getPackageService()?.asInternalUser,
+ params.saved_query_id
+ )
+ : undefined,
+ ecs_mapping: params.ecs_mapping,
+ agents,
+ },
+ (value) => !isEmpty(value)
+ ),
+ ];
+
+export const createDynamicQueries = async (
+ params: CreateLiveQueryRequestBodySchema,
+ alert: Ecs,
+ osqueryContext: OsqueryAppContext
+) =>
+ params.queries?.length
+ ? map(params.queries, ({ query, ...restQuery }) => {
+ const replacedQuery = replacedQueries(query, alert);
+
+ return pickBy(
+ {
+ ...replacedQuery,
+ ...restQuery,
+ action_id: uuid.v4(),
+ alert_ids: params.alert_ids,
+ agents: params.agent_ids,
+ },
+ (value) => !isEmpty(value) || value === true
+ );
+ })
+ : [
+ pickBy(
+ {
+ action_id: uuid.v4(),
+ id: uuid.v4(),
+ ...replacedQueries(params.query, alert),
+ // just for single queries - we need to overwrite the error property
+ error: undefined,
+ saved_query_id: params.saved_query_id,
+ saved_query_prebuilt: params.saved_query_id
+ ? await isSavedQueryPrebuilt(
+ osqueryContext.service.getPackageService()?.asInternalUser,
+ params.saved_query_id
+ )
+ : undefined,
+ ecs_mapping: params.ecs_mapping,
+ alert_ids: params.alert_ids,
+ agents: params.agent_ids,
+ },
+ (value) => !isEmpty(value)
+ ),
+ ];
+
+const replacedQueries = (
+ query: string | undefined,
+ ecsData?: Ecs
+): { query: string | undefined; error?: string } => {
+ if (ecsData && query) {
+ const { result, skipped } = replaceParamsQuery(query, ecsData);
+
+ return {
+ query: result,
+ ...(skipped
+ ? {
+ error: i18n.translate('xpack.osquery.liveQueryActions.error.notFoundParameters', {
+ defaultMessage:
+ "This query hasn't been called due to parameter used and its value not found in the alert.",
+ }),
+ }
+ : {}),
+ };
+ }
+
+ return { query };
+};
diff --git a/x-pack/plugins/osquery/server/plugin.ts b/x-pack/plugins/osquery/server/plugin.ts
index fd23d67741dbc..365299750a9ce 100644
--- a/x-pack/plugins/osquery/server/plugin.ts
+++ b/x-pack/plugins/osquery/server/plugin.ts
@@ -11,6 +11,7 @@ import type {
CoreStart,
Plugin,
Logger,
+ Ecs,
} from '@kbn/core/server';
import { SavedObjectsClient } from '@kbn/core/server';
import type { DataRequestHandlerContext } from '@kbn/data-plugin/server';
@@ -92,8 +93,8 @@ export class OsqueryPlugin implements Plugin
- createActionHandler(osqueryContext, params),
+ osqueryCreateAction: (params: CreateLiveQueryRequestBodySchema, ecsData?: Ecs) =>
+ createActionHandler(osqueryContext, params, { ecsData }),
};
}
diff --git a/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts b/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts
index fd4754577d1cd..668b5b3f924df 100644
--- a/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts
+++ b/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts
@@ -86,8 +86,7 @@ export const createLiveQueryRoute = (router: IRouter, osqueryContext: OsqueryApp
const { response: osqueryAction } = await createActionHandler(
osqueryContext,
request.body,
- soClient,
- { currentUser }
+ { soClient, metadata: { currentUser } }
);
return response.ok({
diff --git a/x-pack/plugins/osquery/server/types.ts b/x-pack/plugins/osquery/server/types.ts
index ef0bdacf0dfd2..5a5725bbc019b 100644
--- a/x-pack/plugins/osquery/server/types.ts
+++ b/x-pack/plugins/osquery/server/types.ts
@@ -11,6 +11,8 @@ import type {
PluginSetup as DataPluginSetup,
PluginStart as DataPluginStart,
} from '@kbn/data-plugin/server';
+import type { Ecs } from '@kbn/ecs';
+
import type { FleetStartContract } from '@kbn/fleet-plugin/server';
import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server';
import type { PluginSetupContract } from '@kbn/features-plugin/server';
@@ -24,7 +26,7 @@ import type { RuleRegistryPluginStartContract } from '@kbn/rule-registry-plugin/
import type { CreateLiveQueryRequestBodySchema } from '../common/schemas/routes/live_query';
export interface OsqueryPluginSetup {
- osqueryCreateAction: (payload: CreateLiveQueryRequestBodySchema) => void;
+ osqueryCreateAction: (payload: CreateLiveQueryRequestBodySchema, ecsData?: Ecs) => void;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
diff --git a/x-pack/plugins/osquery/tsconfig.json b/x-pack/plugins/osquery/tsconfig.json
index e29bd4d10cd73..7896d572e5bd5 100644
--- a/x-pack/plugins/osquery/tsconfig.json
+++ b/x-pack/plugins/osquery/tsconfig.json
@@ -65,5 +65,6 @@
"@kbn/securitysolution-es-utils",
"@kbn/core-elasticsearch-client-server-mocks",
"@kbn/std",
+ "@kbn/ecs",
]
}
diff --git a/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions/schemas/osquery.ts b/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions/schemas/osquery.ts
index 878f76129463f..0fd840a0c8e71 100644
--- a/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions/schemas/osquery.ts
+++ b/x-pack/plugins/security_solution/common/detection_engine/rule_response_actions/schemas/osquery.ts
@@ -9,7 +9,6 @@ import * as t from 'io-ts';
import { ecsMapping, arrayQueries } from '@kbn/osquery-io-ts-types';
export const OsqueryParams = t.type({
- id: t.string,
query: t.union([t.string, t.undefined]),
ecs_mapping: t.union([ecsMapping, t.undefined]),
queries: t.union([arrayQueries, t.undefined]),
@@ -18,7 +17,6 @@ export const OsqueryParams = t.type({
});
export const OsqueryParamsCamelCase = t.type({
- id: t.string,
query: t.union([t.string, t.undefined]),
ecsMapping: t.union([ecsMapping, t.undefined]),
queries: t.union([arrayQueries, t.undefined]),
diff --git a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts
index c9a72be3bdcc8..18b59998b0745 100644
--- a/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts
+++ b/x-pack/plugins/security_solution/common/endpoint/data_loaders/index_endpoint_hosts.ts
@@ -11,11 +11,7 @@ import type { AxiosResponse } from 'axios';
import uuid from 'uuid';
import type { KbnClient } from '@kbn/test';
import type { DeleteByQueryResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
-import type {
- Agent,
- CreatePackagePolicyResponse,
- GetPackagesResponse,
-} from '@kbn/fleet-plugin/common';
+import type { Agent, CreatePackagePolicyResponse, GetInfoResponse } from '@kbn/fleet-plugin/common';
import { EndpointDocGenerator } from '../generate_data';
import type { HostMetadata, HostPolicyResponse } from '../types';
import type {
@@ -95,7 +91,7 @@ export async function indexEndpointHostDocs({
client: Client;
kbnClient: KbnClient;
realPolicies: Record;
- epmEndpointPackage: GetPackagesResponse['items'][0];
+ epmEndpointPackage: GetInfoResponse['item'];
metadataIndex: string;
policyResponseIndex: string;
enrollFleet: boolean;
diff --git a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts
index 59808b1df430c..9cda7554f0819 100644
--- a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts
+++ b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts
@@ -10,8 +10,10 @@ import { assertNever } from '@kbn/std';
import type {
GetAgentPoliciesResponseItem,
GetPackagesResponse,
+ GetInfoResponse,
EsAssetReference,
KibanaAssetReference,
+ AssetsGroupedByServiceByType,
} from '@kbn/fleet-plugin/common';
import { agentPolicyStatuses } from '@kbn/fleet-plugin/common';
import { EndpointMetadataGenerator } from './data_generators/endpoint_metadata_generator';
@@ -1657,6 +1659,90 @@ export class EndpointDocGenerator extends BaseDataGenerator {
};
}
+ /**
+ * Generate a Fleet EPM Package for Endpoint
+ */
+ public generateEpmPackageInfo(): GetInfoResponse['item'] {
+ return {
+ name: 'endpoint',
+ title: 'Elastic Endpoint',
+ version: '0.5.0',
+ description: 'This is the Elastic Endpoint package.',
+ type: 'integration',
+ download: '/epr/endpoint/endpoint-0.5.0.tar.gz',
+ path: '/package/endpoint/0.5.0',
+ format_version: '',
+ owner: { github: '' },
+ latestVersion: '',
+ assets: {} as AssetsGroupedByServiceByType,
+ icons: [
+ {
+ path: '/package/endpoint/0.5.0/img/logo-endpoint-64-color.svg',
+ src: '/img/logo-endpoint-64-color.svg',
+ size: '16x16',
+ type: 'image/svg+xml',
+ },
+ ],
+ status: 'installed',
+ release: 'ga',
+ savedObject: {
+ type: 'epm-packages',
+ id: 'endpoint',
+ attributes: {
+ installed_kibana: [
+ { id: '826759f0-7074-11ea-9bc8-6b38f4d29a16', type: 'dashboard' },
+ { id: '1cfceda0-728b-11ea-9bc8-6b38f4d29a16', type: 'visualization' },
+ { id: '1e525190-7074-11ea-9bc8-6b38f4d29a16', type: 'visualization' },
+ { id: '55387750-729c-11ea-9bc8-6b38f4d29a16', type: 'visualization' },
+ { id: '92b1edc0-706a-11ea-9bc8-6b38f4d29a16', type: 'visualization' },
+ { id: 'a3a3bd10-706b-11ea-9bc8-6b38f4d29a16', type: 'map' },
+ ] as KibanaAssetReference[],
+ installed_es: [
+ { id: 'logs-endpoint.alerts', type: 'index_template' },
+ { id: 'events-endpoint', type: 'index_template' },
+ { id: 'logs-endpoint.events.file', type: 'index_template' },
+ { id: 'logs-endpoint.events.library', type: 'index_template' },
+ { id: 'metrics-endpoint.metadata', type: 'index_template' },
+ { id: 'metrics-endpoint.metadata_mirror', type: 'index_template' },
+ { id: 'logs-endpoint.events.network', type: 'index_template' },
+ { id: 'metrics-endpoint.policy', type: 'index_template' },
+ { id: 'logs-endpoint.events.process', type: 'index_template' },
+ { id: 'logs-endpoint.events.registry', type: 'index_template' },
+ { id: 'logs-endpoint.events.security', type: 'index_template' },
+ { id: 'metrics-endpoint.telemetry', type: 'index_template' },
+ ] as EsAssetReference[],
+ package_assets: [],
+ es_index_patterns: {
+ alerts: 'logs-endpoint.alerts-*',
+ events: 'events-endpoint-*',
+ file: 'logs-endpoint.events.file-*',
+ library: 'logs-endpoint.events.library-*',
+ metadata: 'metrics-endpoint.metadata-*',
+ metadata_mirror: 'metrics-endpoint.metadata_mirror-*',
+ network: 'logs-endpoint.events.network-*',
+ policy: 'metrics-endpoint.policy-*',
+ process: 'logs-endpoint.events.process-*',
+ registry: 'logs-endpoint.events.registry-*',
+ security: 'logs-endpoint.events.security-*',
+ telemetry: 'metrics-endpoint.telemetry-*',
+ },
+ name: 'endpoint',
+ version: '0.5.0',
+ internal: false,
+ install_version: '0.5.0',
+ install_status: 'installed',
+ install_started_at: '2020-06-24T14:41:23.098Z',
+ install_source: 'registry',
+ keep_policies_up_to_date: false,
+ verification_status: 'unknown',
+ },
+ references: [],
+ updated_at: '2020-06-24T14:41:23.098Z',
+ version: 'Wzc0LDFd',
+ },
+ };
+ }
+
/**
* Generates a Host Policy response message
*/
diff --git a/x-pack/plugins/security_solution/common/endpoint/index_data.ts b/x-pack/plugins/security_solution/common/endpoint/index_data.ts
index 4971dc83c29aa..454f945ca656a 100644
--- a/x-pack/plugins/security_solution/common/endpoint/index_data.ts
+++ b/x-pack/plugins/security_solution/common/endpoint/index_data.ts
@@ -9,8 +9,8 @@ import type { Client } from '@elastic/elasticsearch';
import seedrandom from 'seedrandom';
import type { KbnClient } from '@kbn/test';
import type { AxiosResponse } from 'axios';
-import type { CreatePackagePolicyResponse, GetPackagesResponse } from '@kbn/fleet-plugin/common';
-import { EPM_API_ROUTES } from '@kbn/fleet-plugin/common';
+import type { CreatePackagePolicyResponse, GetInfoResponse } from '@kbn/fleet-plugin/common';
+import { epmRouteService } from '@kbn/fleet-plugin/common';
import type { TreeOptions } from './generate_data';
import { EndpointDocGenerator } from './generate_data';
import type {
@@ -121,15 +121,16 @@ export async function indexHostsAndAlerts(
return response;
}
-const getEndpointPackageInfo = async (
+export const getEndpointPackageInfo = async (
kbnClient: KbnClient
-): Promise => {
+): Promise => {
+ const path = epmRouteService.getInfoPath('endpoint');
const endpointPackage = (
(await kbnClient.request({
- path: `${EPM_API_ROUTES.LIST_PATTERN}?category=security`,
+ path,
method: 'GET',
- })) as AxiosResponse
- ).data.items.find((epmPackage) => epmPackage.name === 'endpoint');
+ })) as AxiosResponse
+ ).data.item;
if (!endpointPackage) {
throw new Error('EPM Endpoint package was not found!');
diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts
index 6bd6bbdbda02b..34226900cbcc7 100644
--- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts
+++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts
@@ -5,13 +5,7 @@
* 2.0.
*/
-import {
- calculateEndpointAuthz,
- calculatePermissionsFromCapabilities,
- calculatePermissionsFromPrivileges,
- defaultEndpointPermissions,
- getEndpointAuthzInitialState,
-} from './authz';
+import { calculateEndpointAuthz, getEndpointAuthzInitialState } from './authz';
import type { FleetAuthz } from '@kbn/fleet-plugin/common';
import { createFleetAuthzMock } from '@kbn/fleet-plugin/common';
import { createLicenseServiceMock } from '../../../license/mocks';
@@ -87,9 +81,7 @@ describe('Endpoint Authz service', () => {
it(`should allow Host Isolation Exception read/delete when license is not Platinum+, but entries exist`, () => {
licenseService.isPlatinumPlus.mockReturnValue(false);
- expect(
- calculateEndpointAuthz(licenseService, fleetAuthz, userRoles, false, undefined, true)
- ).toEqual(
+ expect(calculateEndpointAuthz(licenseService, fleetAuthz, userRoles, false, true)).toEqual(
expect.objectContaining({
canWriteHostIsolationExceptions: false,
canReadHostIsolationExceptions: true,
@@ -197,24 +189,6 @@ describe('Endpoint Authz service', () => {
expect(authz[auth]).toBe(false);
});
});
-
- it('correctly handles permissions', () => {
- const authz = calculateEndpointAuthz(licenseService, fleetAuthz, userRoles, true, {
- canWriteSecuritySolution: false,
- canReadSecuritySolution: true,
- });
- expect(authz.canWriteSecuritySolution).toBe(false);
- expect(authz.canReadSecuritySolution).toBe(true);
- });
- });
-
- describe('defaultEndpointPermissions', () => {
- it('returns expected permissions', () => {
- expect(defaultEndpointPermissions()).toEqual({
- canWriteSecuritySolution: false,
- canReadSecuritySolution: false,
- });
- });
});
describe('getEndpointAuthzInitialState()', () => {
@@ -251,49 +225,4 @@ describe('Endpoint Authz service', () => {
});
});
});
-
- describe('calculatePermissionsFromPrivileges', () => {
- it('returns default permissions if no privileges', () => {
- const permissions = calculatePermissionsFromPrivileges(undefined);
- expect(permissions).toEqual(defaultEndpointPermissions());
- });
-
- it('returns expected permissions from privileges', () => {
- const privileges = [
- { privilege: 'ui:8.6.0:siem/crud', authorized: false },
- { privilege: 'ui:8.6.0:siem/show', authorized: true },
- { privilege: 'ui:8.6.0:siem/foobar', authorized: true },
- ];
- const permissions = calculatePermissionsFromPrivileges(privileges);
- expect(permissions).toEqual({
- canWriteSecuritySolution: false,
- canReadSecuritySolution: true,
- });
- });
- });
-
- describe('calculatePermissionsFromCapabilities', () => {
- it('returns default permissions if no capabilities', () => {
- const permissions = calculatePermissionsFromCapabilities(undefined);
- expect(permissions).toEqual(defaultEndpointPermissions());
- });
-
- it('returns expected permissions from capabilities', () => {
- const capabilities = {
- navLinks: {},
- management: {},
- catalogue: {},
- siem: {
- crud: false,
- show: true,
- foobar: true,
- },
- };
- const permissions = calculatePermissionsFromCapabilities(capabilities);
- expect(permissions).toEqual({
- canWriteSecuritySolution: false,
- canReadSecuritySolution: true,
- });
- });
- });
});
diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts
index 87c56ff4d94b1..45bc24e42416b 100644
--- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts
+++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts
@@ -6,19 +6,11 @@
*/
import type { ENDPOINT_PRIVILEGES, FleetAuthz } from '@kbn/fleet-plugin/common';
-import type { Capabilities } from '@kbn/core-capabilities-common';
import type { LicenseService } from '../../../license';
-import type { EndpointPermissions, EndpointAuthz } from '../../types/authz';
+import type { EndpointAuthz } from '../../types/authz';
import type { MaybeImmutable } from '../../types';
-export function defaultEndpointPermissions(): EndpointPermissions {
- return {
- canWriteSecuritySolution: false,
- canReadSecuritySolution: false,
- };
-}
-
/**
* Checks to see if a given Kibana privilege was granted.
* Note that this only checks if the user has the privilege as part of their role. That
@@ -35,7 +27,7 @@ export function hasKibanaPrivilege(
fleetAuthz: FleetAuthz,
isEndpointRbacEnabled: boolean,
isSuperuser: boolean,
- privilege: typeof ENDPOINT_PRIVILEGES[number]
+ privilege: keyof typeof ENDPOINT_PRIVILEGES
): boolean {
// user is superuser, always return true
if (isSuperuser) {
@@ -70,13 +62,21 @@ export const calculateEndpointAuthz = (
fleetAuthz: FleetAuthz,
userRoles: MaybeImmutable,
isEndpointRbacEnabled: boolean = false,
- permissions: Partial = defaultEndpointPermissions(),
hasHostIsolationExceptionsItems: boolean = false
): EndpointAuthz => {
const isPlatinumPlusLicense = licenseService.isPlatinumPlus();
const isEnterpriseLicense = licenseService.isEnterprise();
const hasEndpointManagementAccess = userRoles.includes('superuser');
- const { canWriteSecuritySolution = false, canReadSecuritySolution = false } = permissions;
+
+ const canWriteSecuritySolution = hasKibanaPrivilege(
+ fleetAuthz,
+ true,
+ hasEndpointManagementAccess,
+ 'writeSecuritySolution'
+ );
+ const canReadSecuritySolution =
+ canWriteSecuritySolution ||
+ hasKibanaPrivilege(fleetAuthz, true, hasEndpointManagementAccess, 'readSecuritySolution');
const canWriteEndpointList = hasKibanaPrivilege(
fleetAuthz,
isEndpointRbacEnabled,
@@ -251,7 +251,8 @@ export const calculateEndpointAuthz = (
export const getEndpointAuthzInitialState = (): EndpointAuthz => {
return {
- ...defaultEndpointPermissions(),
+ canWriteSecuritySolution: false,
+ canReadSecuritySolution: false,
canAccessFleet: false,
canAccessEndpointActionsLogManagement: false,
canAccessEndpointManagement: false,
@@ -280,66 +281,3 @@ export const getEndpointAuthzInitialState = (): EndpointAuthz => {
canReadEventFilters: false,
};
};
-
-const SIEM_PERMISSIONS = [
- { permission: 'canWriteSecuritySolution', privilege: 'crud' },
- { permission: 'canReadSecuritySolution', privilege: 'show' },
-] as const;
-
-function hasPrivilege(
- kibanaPrivileges: Array<{
- resource?: string;
- privilege: string;
- authorized: boolean;
- }>,
- prefix: string,
- searchPrivilege: string
-): boolean {
- const privilege = kibanaPrivileges.find((p) =>
- p.privilege.endsWith(`${prefix}${searchPrivilege}`)
- );
- return privilege?.authorized || false;
-}
-
-export function calculatePermissionsFromPrivileges(
- kibanaPrivileges:
- | Array<{
- resource?: string;
- privilege: string;
- authorized: boolean;
- }>
- | undefined
-): EndpointPermissions {
- if (!kibanaPrivileges || !kibanaPrivileges.length) {
- return defaultEndpointPermissions();
- }
-
- const siemPermissions: EndpointPermissions = SIEM_PERMISSIONS.reduce(
- (acc, { permission, privilege }) => {
- return {
- ...acc,
- [permission]: hasPrivilege(kibanaPrivileges, 'siem/', privilege),
- };
- },
- {} as EndpointPermissions
- );
-
- return {
- ...siemPermissions,
- };
-}
-
-export function calculatePermissionsFromCapabilities(
- capabilities: Capabilities | undefined
-): EndpointPermissions {
- if (!capabilities || !capabilities.siem) {
- return defaultEndpointPermissions();
- }
-
- return SIEM_PERMISSIONS.reduce((acc, { permission, privilege }) => {
- return {
- ...acc,
- [permission]: capabilities.siem[privilege] || false,
- };
- }, {} as EndpointPermissions);
-}
diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts
index e1e2d241754e9..03d14a0945184 100644
--- a/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts
+++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/index.ts
@@ -5,10 +5,4 @@
* 2.0.
*/
-export {
- getEndpointAuthzInitialState,
- calculateEndpointAuthz,
- calculatePermissionsFromPrivileges,
- calculatePermissionsFromCapabilities,
- defaultEndpointPermissions,
-} from './authz';
+export { getEndpointAuthzInitialState, calculateEndpointAuthz } from './authz';
diff --git a/x-pack/plugins/security_solution/common/endpoint/types/authz.ts b/x-pack/plugins/security_solution/common/endpoint/types/authz.ts
index e693e6d0e4cff..d6f67e3efe8c5 100644
--- a/x-pack/plugins/security_solution/common/endpoint/types/authz.ts
+++ b/x-pack/plugins/security_solution/common/endpoint/types/authz.ts
@@ -6,20 +6,14 @@
*/
/**
- * Endpoint permissions derived from Kibana capabilities and privileges
+ * Set of Endpoint Specific privileges that control application authorization. This interface is
+ * used both on the client and server for consistency
*/
-export interface EndpointPermissions {
+export interface EndpointAuthz {
/** if user has write permissions to the security solution app */
canWriteSecuritySolution: boolean;
/** if user has read permissions to the security solution app */
canReadSecuritySolution: boolean;
-}
-
-/**
- * Set of Endpoint Specific privileges that control application authorization. This interface is
- * used both on the client and server for consistency
- */
-export interface EndpointAuthz extends EndpointPermissions {
/** If user has permissions to access Fleet */
canAccessFleet: boolean;
/** If user has permissions to access Endpoint management (includes check to ensure they also have access to fleet) */
diff --git a/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts b/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts
index eb33e8cd629fe..c8deaf824bc2c 100644
--- a/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts
+++ b/x-pack/plugins/security_solution/common/utils/format_page_filter_search_param.ts
@@ -5,16 +5,14 @@
* 2.0.
*/
-import rison from '@kbn/rison';
import type { FilterItemObj } from '../../public/common/components/filter_group/types';
export const formatPageFilterSearchParam = (filters: FilterItemObj[]) => {
- const modifiedFilters = filters.map((filter) => ({
+ return filters.map((filter) => ({
title: filter.title ?? filter.fieldName,
selectedOptions: filter.selectedOptions ?? [],
fieldName: filter.fieldName,
existsSelected: filter.existsSelected ?? false,
exclude: filter.exclude ?? false,
}));
- return rison.encode(modifiedFilters);
};
diff --git a/x-pack/plugins/security_solution/cypress/e2e/dashboards/entity_analytics.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/dashboards/entity_analytics.cy.ts
index b5c2b07dc72b6..525ee79a8e1dc 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/dashboards/entity_analytics.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/dashboards/entity_analytics.cy.ts
@@ -47,7 +47,7 @@ describe('Entity Analytics Dashboard', () => {
});
describe('Without data', () => {
- before(() => {
+ beforeEach(() => {
visit(ENTITY_ANALYTICS_URL);
});
@@ -64,7 +64,9 @@ describe('Entity Analytics Dashboard', () => {
before(() => {
esArchiverLoad('risk_hosts_no_data');
esArchiverLoad('risk_users_no_data');
+ });
+ beforeEach(() => {
visit(ENTITY_ANALYTICS_URL);
});
@@ -86,7 +88,9 @@ describe('Entity Analytics Dashboard', () => {
before(() => {
esArchiverLoad('risk_hosts_legacy_data');
esArchiverLoad('risk_users_legacy_data');
+ });
+ beforeEach(() => {
visit(ENTITY_ANALYTICS_URL);
});
@@ -107,6 +111,9 @@ describe('Entity Analytics Dashboard', () => {
describe('With host risk data', () => {
before(() => {
esArchiverLoad('risk_hosts');
+ });
+
+ beforeEach(() => {
visit(ENTITY_ANALYTICS_URL);
});
@@ -137,6 +144,9 @@ describe('Entity Analytics Dashboard', () => {
describe('With alerts data', () => {
before(() => {
createCustomRuleEnabled(getNewRule());
+ });
+
+ beforeEach(() => {
visit(ALERTS_URL);
waitForAlertsToPopulate();
visit(ENTITY_ANALYTICS_URL);
@@ -161,6 +171,9 @@ describe('Entity Analytics Dashboard', () => {
describe('With user risk data', () => {
before(() => {
esArchiverLoad('risk_users');
+ });
+
+ beforeEach(() => {
visit(ENTITY_ANALYTICS_URL);
});
@@ -191,6 +204,9 @@ describe('Entity Analytics Dashboard', () => {
describe('With alerts data', () => {
before(() => {
createCustomRuleEnabled(getNewRule());
+ });
+
+ beforeEach(() => {
visit(ALERTS_URL);
waitForAlertsToPopulate();
visit(ENTITY_ANALYTICS_URL);
@@ -213,7 +229,7 @@ describe('Entity Analytics Dashboard', () => {
});
describe('With anomalies data', () => {
- before(() => {
+ beforeEach(() => {
visit(ENTITY_ANALYTICS_URL);
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_alert_details/navigation.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_alert_details/navigation.cy.ts
index 4e9953b88e495..32a582cbbeac7 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/detection_alert_details/navigation.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/detection_alert_details/navigation.cy.ts
@@ -17,6 +17,7 @@ import { ALERTS_URL } from '../../urls/navigation';
import {
OPEN_ALERT_DETAILS_PAGE_CONTEXT_MENU_BTN,
TIMELINE_CONTEXT_MENU_BTN,
+ ALERTS_REFRESH_BTN,
} from '../../screens/alerts';
import { PAGE_TITLE } from '../../screens/common/page';
import { OPEN_ALERT_DETAILS_PAGE } from '../../screens/alerts_details';
@@ -29,12 +30,21 @@ describe('Alert Details Page Navigation', () => {
cleanKibana();
login();
createCustomRuleEnabled(rule, 'rule1');
- visit(ALERTS_URL);
- waitForAlertsPanelToBeLoaded();
});
describe('context menu', () => {
+ beforeEach(() => {
+ visit(ALERTS_URL);
+ waitForAlertsPanelToBeLoaded();
+ });
+
it('should navigate to the details page from the alert context menu', () => {
+ // Sometimes the alerts are not loaded yet, so we need to refresh the page
+ cy.get(TIMELINE_CONTEXT_MENU_BTN).then(($btns) => {
+ if ($btns.length === 0) {
+ cy.get(ALERTS_REFRESH_BTN).click();
+ }
+ });
cy.get(TIMELINE_CONTEXT_MENU_BTN).first().click({ force: true });
cy.get(OPEN_ALERT_DETAILS_PAGE_CONTEXT_MENU_BTN).click({ force: true });
cy.get(PAGE_TITLE).should('contain.text', rule.name);
diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alert_flyout.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alert_flyout.cy.ts
index 7f3eef4015ba2..d2b5f88994658 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alert_flyout.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alert_flyout.cy.ts
@@ -34,6 +34,9 @@ describe('Alert Flyout', () => {
cleanKibana();
login();
createCustomRuleEnabled(getNewRule(), 'rule1');
+ });
+
+ beforeEach(() => {
visitWithoutDateRange(ALERTS_URL);
const dateContainingAllEvents = 'Jul 27, 2015 @ 00:00:00.000';
setStartDate(dateContainingAllEvents);
diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alerts_details.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alerts_details.cy.ts
index 31af8147b1940..6471fbb98e81f 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alerts_details.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/alerts_details.cy.ts
@@ -36,6 +36,13 @@ describe('Alert details with unmapped fields', () => {
waitForAlertsToPopulate();
expandFirstAlert();
});
+
+ beforeEach(() => {
+ visitWithoutDateRange(ALERTS_URL);
+ waitForAlertsToPopulate();
+ expandFirstAlert();
+ });
+
after(() => {
esArchiverUnload('unmapped_fields');
});
@@ -52,7 +59,7 @@ describe('Alert details with unmapped fields', () => {
});
it('Displays the unmapped field on the table', () => {
- const expectedUnmmappedField = {
+ const expectedUnmappedField = {
field: 'unmapped',
text: 'This is the unmapped field',
};
@@ -61,9 +68,10 @@ describe('Alert details with unmapped fields', () => {
cy.get(ALERT_FLYOUT).find(pageSelector(4)).click({ force: true });
cy.get(ALERT_FLYOUT)
.find(TABLE_ROWS)
+ .last()
.within(() => {
- cy.get(CELL_TEXT).should('contain', expectedUnmmappedField.field);
- cy.get(CELL_TEXT).should('contain', expectedUnmmappedField.text);
+ cy.get(CELL_TEXT).should('contain', expectedUnmappedField.field);
+ cy.get(CELL_TEXT).should('contain', expectedUnmappedField.text);
});
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/detection_page_filters.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/detection_page_filters.cy.ts
index c246f28ac09b3..f3ff1569a4cb7 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/detection_page_filters.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/detection_alerts/detection_page_filters.cy.ts
@@ -5,6 +5,7 @@
* 2.0.
*/
+import { encode } from '@kbn/rison';
import { getNewRule } from '../../objects/rule';
import {
CONTROL_FRAMES,
@@ -58,6 +59,10 @@ describe('Detections : Page Filters', () => {
cleanKibana();
login();
createCustomRuleEnabled(getNewRule(), 'custom_rule_filters');
+ });
+
+ beforeEach(() => {
+ login();
visit(ALERTS_URL);
waitForAlerts();
waitForPageFilters();
@@ -83,7 +88,7 @@ describe('Detections : Page Filters', () => {
cy.url().then((url) => {
const currURL = new URL(url);
- currURL.searchParams.set('pageFilters', formatPageFilterSearchParam(NEW_FILTERS));
+ currURL.searchParams.set('pageFilters', encode(formatPageFilterSearchParam(NEW_FILTERS)));
cy.visit(currURL.toString());
waitForAlerts();
assertFilterControlsWithFilterObject(NEW_FILTERS);
@@ -104,7 +109,7 @@ describe('Detections : Page Filters', () => {
cy.url().then((url) => {
const currURL = new URL(url);
- currURL.searchParams.set('pageFilters', pageFilterUrlString);
+ currURL.searchParams.set('pageFilters', encode(pageFilterUrlString));
cy.visit(currURL.toString());
waitForAlerts();
diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/all_rules_read_only.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/all_rules_read_only.cy.ts
index ad2222d54fb3b..b0915305e23ba 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/all_rules_read_only.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/all_rules_read_only.cy.ts
@@ -27,6 +27,9 @@ describe('All rules - read only', () => {
cleanKibana();
createCustomRule(getNewRule(), '1');
login(ROLES.reader);
+ });
+
+ beforeEach(() => {
visitWithoutDateRange(SECURITY_DETECTIONS_RULES_URL, ROLES.reader);
waitForRulesTableToBeLoaded();
cy.get(RULE_NAME).should('have.text', getNewRule().name);
diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/indicator_match_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/indicator_match_rule.cy.ts
index 23e27dff84b3f..2114dd3b1fe63 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/indicator_match_rule.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/detection_rules/indicator_match_rule.cy.ts
@@ -123,18 +123,19 @@ describe('indicator match', () => {
esArchiverLoad('suspicious_source_event');
login();
});
+
after(() => {
esArchiverUnload('threat_indicator');
esArchiverUnload('suspicious_source_event');
});
describe('Creating new indicator match rules', () => {
- before(() => {
- visitWithoutDateRange(RULE_CREATION);
- selectIndicatorMatchType();
- });
-
describe('Index patterns', () => {
+ beforeEach(() => {
+ visitWithoutDateRange(RULE_CREATION);
+ selectIndicatorMatchType();
+ });
+
it('Contains a predefined index pattern', () => {
getIndicatorIndex().should('have.text', getIndexPatterns().join(''));
});
@@ -153,7 +154,7 @@ describe('indicator match', () => {
});
describe('Indicator index patterns', () => {
- before(() => {
+ beforeEach(() => {
visitWithoutDateRange(RULE_CREATION);
selectIndicatorMatchType();
});
@@ -174,7 +175,7 @@ describe('indicator match', () => {
});
describe('custom query input', () => {
- before(() => {
+ beforeEach(() => {
visitWithoutDateRange(RULE_CREATION);
selectIndicatorMatchType();
});
@@ -190,10 +191,11 @@ describe('indicator match', () => {
});
describe('custom indicator query input', () => {
- before(() => {
+ beforeEach(() => {
visitWithoutDateRange(RULE_CREATION);
selectIndicatorMatchType();
});
+
it(`Has a default set of ${DEFAULT_THREAT_MATCH_QUERY}`, () => {
getCustomIndicatorQueryInput().should('have.text', DEFAULT_THREAT_MATCH_QUERY);
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/exceptions/add_edit_flyout/flyout_validation.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/exceptions/add_edit_flyout/flyout_validation.cy.ts
index fcde59d0bd79a..f96af6b5f2572 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/exceptions/add_edit_flyout/flyout_validation.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/exceptions/add_edit_flyout/flyout_validation.cy.ts
@@ -85,6 +85,9 @@ describe('Exceptions flyout', () => {
],
})
);
+ });
+
+ beforeEach(() => {
visitWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL);
goToRuleDetails();
cy.get(RULE_STATUS).should('have.text', '—');
diff --git a/x-pack/plugins/security_solution/cypress/e2e/exceptions/exceptions_management_flow/exceptions_table.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/exceptions/exceptions_management_flow/exceptions_table.cy.ts
index 42ad3c20962aa..d571d7cd4fae8 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/exceptions/exceptions_management_flow/exceptions_table.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/exceptions/exceptions_management_flow/exceptions_table.cy.ts
@@ -65,7 +65,9 @@ describe('Exceptions Table', () => {
createExceptionList(getExceptionList1(), getExceptionList1().list_id).as(
'exceptionListResponse'
);
+ });
+ beforeEach(() => {
visitWithoutDateRange(EXCEPTIONS_URL);
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts
index da975710c7f39..9e5ee8b393282 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts
@@ -56,9 +56,6 @@ describe('Add endpoint exception from rule details', () => {
esArchiverResetKibana();
esArchiverLoad('auditbeat');
login();
- });
-
- before(() => {
deleteAlertsAndRules();
// create rule with exception
createEndpointExceptionList().then((response) => {
@@ -79,7 +76,9 @@ describe('Add endpoint exception from rule details', () => {
'2'
);
});
+ });
+ beforeEach(() => {
visitWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL);
goToRuleDetails();
goToEndpointExceptionsTab();
diff --git a/x-pack/plugins/security_solution/cypress/e2e/exceptions/rule_details_flow/read_only_view.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/exceptions/rule_details_flow/read_only_view.cy.ts
index b11c688520b1a..9bc7d19eb44f7 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/exceptions/rule_details_flow/read_only_view.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/exceptions/rule_details_flow/read_only_view.cy.ts
@@ -54,6 +54,9 @@ describe('Exceptions viewer read only', () => {
});
login(ROLES.reader);
+ });
+
+ beforeEach(() => {
visitWithoutDateRange(DETECTIONS_RULE_MANAGEMENT_URL, ROLES.reader);
goToRuleDetails();
goToExceptionsTab();
diff --git a/x-pack/plugins/security_solution/cypress/e2e/header/navigation.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/header/navigation.cy.ts
index ec48304c382cf..ee031142894aa 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/header/navigation.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/header/navigation.cy.ts
@@ -77,12 +77,12 @@ import {
THREAT_INTELLIGENCE_PAGE,
} from '../../screens/kibana_navigation';
-before(() => {
- login();
-});
-
describe('top-level navigation common to all pages in the Security app', () => {
before(() => {
+ login();
+ });
+
+ beforeEach(() => {
visit(TIMELINES_URL);
});
@@ -203,12 +203,11 @@ describe('top-level navigation common to all pages in the Security app', () => {
});
describe('Kibana navigation to all pages in the Security app ', () => {
- before(() => {
- visit(KIBANA_HOME);
- });
beforeEach(() => {
+ visit(KIBANA_HOME);
openKibanaNavigation();
});
+
it('navigates to the Dashboards page', () => {
navigateFromKibanaCollapsibleTo(DASHBOARDS_PAGE);
cy.url().should('include', DASHBOARDS_URL);
diff --git a/x-pack/plugins/security_solution/cypress/e2e/header/search_bar.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/header/search_bar.cy.ts
index e09dac46c04e7..073ee64a8212f 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/header/search_bar.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/header/search_bar.cy.ts
@@ -25,6 +25,9 @@ import { waitForAllHostsToBeLoaded } from '../../tasks/hosts/all_hosts';
describe('SearchBar', () => {
before(() => {
login();
+ });
+
+ beforeEach(() => {
visit(HOSTS_URL);
waitForAllHostsToBeLoaded();
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/hosts/events_viewer.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/hosts/events_viewer.cy.ts
index a45a95e6c68fa..0929a673828c1 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/hosts/events_viewer.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/hosts/events_viewer.cy.ts
@@ -60,12 +60,9 @@ describe('Events Viewer', () => {
});
context('Fields rendering', () => {
- before(() => {
+ beforeEach(() => {
visit(HOSTS_URL);
openEvents();
- });
-
- beforeEach(() => {
openEventsViewerFieldsBrowser();
});
@@ -92,7 +89,7 @@ describe('Events Viewer', () => {
});
context('Events viewer query modal', () => {
- before(() => {
+ beforeEach(() => {
visit(HOSTS_URL);
openEvents();
});
@@ -105,12 +102,9 @@ describe('Events Viewer', () => {
});
context('Events viewer fields behaviour', () => {
- before(() => {
+ beforeEach(() => {
visit(HOSTS_URL);
openEvents();
- });
-
- beforeEach(() => {
openEventsViewerFieldsBrowser();
});
@@ -135,7 +129,7 @@ describe('Events Viewer', () => {
});
context('Events behavior', () => {
- before(() => {
+ beforeEach(() => {
visit(HOSTS_URL);
openEvents();
waitsForEventsToBeLoaded();
diff --git a/x-pack/plugins/security_solution/cypress/e2e/hosts/host_risk_tab.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/hosts/host_risk_tab.cy.ts
index cf35a51e49865..bc8ccf8bcbe61 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/hosts/host_risk_tab.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/hosts/host_risk_tab.cy.ts
@@ -27,6 +27,9 @@ describe('risk tab', () => {
cleanKibana();
esArchiverLoad('risk_hosts');
login();
+ });
+
+ beforeEach(() => {
visit(HOSTS_URL);
navigateToHostRiskDetailTab();
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/hosts/inspect.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/hosts/inspect.cy.ts
index 8246222f5598d..d562db678e79b 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/hosts/inspect.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/hosts/inspect.cy.ts
@@ -18,10 +18,12 @@ describe('Inspect', () => {
before(() => {
login();
});
+
context('Hosts stats and tables', () => {
- before(() => {
+ beforeEach(() => {
visit(HOSTS_URL);
});
+
afterEach(() => {
closesModal();
});
@@ -35,7 +37,7 @@ describe('Inspect', () => {
});
context('Hosts details', () => {
- before(() => {
+ beforeEach(() => {
visitHostDetailsPage('test.local');
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/network/inspect.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/network/inspect.cy.ts
index c54072799b290..ff5054187f860 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/network/inspect.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/network/inspect.cy.ts
@@ -16,8 +16,12 @@ describe('Inspect', () => {
context('Network stats and tables', () => {
before(() => {
login();
+ });
+
+ beforeEach(() => {
visit(NETWORK_URL);
});
+
afterEach(() => {
closesModal();
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/network/overflow_items.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/network/overflow_items.cy.ts
index ed84a7855fe8e..961e86308e3e6 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/network/overflow_items.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/network/overflow_items.cy.ts
@@ -28,6 +28,9 @@ describe('Overflow items', () => {
before(() => {
esArchiverLoad('network');
login();
+ });
+
+ beforeEach(() => {
visit(NETWORK_URL);
cy.get(DESTINATION_DOMAIN).should('not.exist');
cy.get(FILTER_IN).should('not.exist');
diff --git a/x-pack/plugins/security_solution/cypress/e2e/overview/overview.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/overview/overview.cy.ts
index 97dd53c9b591b..0bfd1cc88cec7 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/overview/overview.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/overview/overview.cy.ts
@@ -25,6 +25,9 @@ describe('Overview Page', () => {
before(() => {
cleanKibana();
esArchiverLoad('overview');
+ });
+
+ beforeEach(() => {
visit(OVERVIEW_URL);
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/pagination/pagination.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/pagination/pagination.cy.ts
index fd63e2957f5fe..f0256a1b34b4b 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/pagination/pagination.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/pagination/pagination.cy.ts
@@ -15,7 +15,7 @@ import { waitsForEventsToBeLoaded } from '../../tasks/hosts/events';
import { openEvents, openUncommonProcesses } from '../../tasks/hosts/main';
import { waitForUncommonProcessesToBeLoaded } from '../../tasks/hosts/uncommon_processes';
import { login, visit } from '../../tasks/login';
-import { goToFirstPage, goToSecondPage, sortFirstColumn } from '../../tasks/pagination';
+import { goToSecondPage, sortFirstColumn } from '../../tasks/pagination';
import { refreshPage } from '../../tasks/security_header';
import { HOSTS_URL, USERS_URL, HOSTS_PAGE_TAB_URLS } from '../../urls/navigation';
import { ALL_HOSTS_TABLE } from '../../screens/hosts/all_hosts';
@@ -29,17 +29,17 @@ describe('Pagination', () => {
describe('Host uncommon processes table)', () => {
before(() => {
esArchiverLoad('host_uncommon_processes');
+ });
+
+ beforeEach(() => {
visit(HOSTS_PAGE_TAB_URLS.uncommonProcesses);
waitForUncommonProcessesToBeLoaded();
});
+
after(() => {
esArchiverUnload('host_uncommon_processes');
});
- afterEach(() => {
- goToFirstPage();
- });
-
it('pagination updates results and page number', () => {
cy.get(UNCOMMON_PROCESSES_TABLE)
.find(FIRST_PAGE_SELECTOR)
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/bulk_add_to_timeline.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/bulk_add_to_timeline.cy.ts
index 1d419c5bd75d4..d79569097a137 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/bulk_add_to_timeline.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/bulk_add_to_timeline.cy.ts
@@ -20,7 +20,6 @@ import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
import { waitsForEventsToBeLoaded } from '../../tasks/hosts/events';
import { openEvents, openSessions } from '../../tasks/hosts/main';
import { login, visit } from '../../tasks/login';
-import { closeTimelineUsingCloseButton } from '../../tasks/security_main';
import { ALERTS_URL, HOSTS_URL } from '../../urls/navigation';
const assertFirstPageEventsAddToTimeline = () => {
@@ -59,16 +58,13 @@ describe('Bulk Investigate in Timeline', () => {
context('Alerts', () => {
before(() => {
createCustomRuleEnabled(getNewRule());
- visit(ALERTS_URL);
});
+
beforeEach(() => {
+ visit(ALERTS_URL);
waitForAlertsToPopulate();
});
- afterEach(() => {
- closeTimelineUsingCloseButton();
- });
-
it('Adding multiple alerts to the timeline should be successful', () => {
assertFirstPageEventsAddToTimeline();
});
@@ -79,16 +75,12 @@ describe('Bulk Investigate in Timeline', () => {
});
context('Host -> Events Viewer', () => {
- before(() => {
+ beforeEach(() => {
visit(HOSTS_URL);
openEvents();
waitsForEventsToBeLoaded();
});
- afterEach(() => {
- closeTimelineUsingCloseButton();
- });
-
it('Adding multiple alerts to the timeline should be successful', () => {
assertFirstPageEventsAddToTimeline();
});
@@ -99,16 +91,12 @@ describe('Bulk Investigate in Timeline', () => {
});
context('Host -> Sessions Viewer', () => {
- before(() => {
+ beforeEach(() => {
visit(HOSTS_URL);
openSessions();
waitsForEventsToBeLoaded();
});
- afterEach(() => {
- closeTimelineUsingCloseButton();
- });
-
it('Adding multiple alerts to the timeline should be successful', () => {
assertFirstPageEventsAddToTimeline();
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/creation.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/creation.cy.ts
index d62e73b321d53..62d8fdb8f1b41 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/creation.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/creation.cy.ts
@@ -49,6 +49,9 @@ describe('Create a timeline from a template', () => {
before(() => {
deleteTimelines();
createTimelineTemplate(getTimeline());
+ });
+
+ beforeEach(() => {
visitWithoutDateRange(TIMELINE_TEMPLATES_URL);
});
@@ -67,15 +70,15 @@ describe('Create a timeline from a template', () => {
describe('Timelines', (): void => {
before(() => {
cleanKibana();
- login();
- visit(OVERVIEW_URL);
});
describe('Toggle create timeline from plus icon', () => {
- after(() => {
- closeTimeline();
- });
context('Privileges: CRUD', () => {
+ before(() => {
+ login();
+ visit(OVERVIEW_URL);
+ });
+
it('toggle create timeline ', () => {
createNewTimeline();
addNameAndDescriptionToTimeline(getTimeline());
@@ -88,6 +91,7 @@ describe('Timelines', (): void => {
login(ROLES.reader);
visit(OVERVIEW_URL, undefined, ROLES.reader);
});
+
it('should not be able to create/update timeline ', () => {
createNewTimeline();
cy.get(TIMELINE_PANEL).should('be.visible');
@@ -103,19 +107,15 @@ describe('Timelines', (): void => {
});
describe('Creates a timeline by clicking untitled timeline from bottom bar', () => {
- after(() => {
- closeTimeline();
- });
-
before(() => {
login();
+ });
+
+ beforeEach(() => {
visit(OVERVIEW_URL);
openTimelineUsingToggle();
addNameAndDescriptionToTimeline(getTimeline());
populateTimeline();
- });
-
- beforeEach(() => {
goToQueryTab();
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/data_providers.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/data_providers.cy.ts
index feb82397fe60c..68b646265d213 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/data_providers.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/data_providers.cy.ts
@@ -22,7 +22,6 @@ import {
addNameAndDescriptionToTimeline,
populateTimeline,
waitForTimelineChanges,
- closeTimeline,
createNewTimeline,
updateDataProviderByFieldHoverAction,
} from '../../tasks/timeline';
@@ -34,21 +33,17 @@ describe('timeline data providers', () => {
before(() => {
cleanKibana();
login();
- visit(HOSTS_URL);
- waitForAllHostsToBeLoaded();
- scrollToBottom();
});
beforeEach(() => {
+ visit(HOSTS_URL);
+ waitForAllHostsToBeLoaded();
+ scrollToBottom();
createNewTimeline();
addNameAndDescriptionToTimeline(getTimeline());
populateTimeline();
});
- afterEach(() => {
- closeTimeline();
- });
-
it('displays the data provider action menu when Enter is pressed', (done) => {
addDataProvider({ field: 'host.name', operator: 'exists' }).then(() => {
cy.get(TIMELINE_DATA_PROVIDERS_ACTION_MENU).should('not.exist');
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/fields_browser.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/fields_browser.cy.ts
index dd6d1b80507bc..963fca415b2fc 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/fields_browser.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/fields_browser.cy.ts
@@ -23,7 +23,6 @@ import { cleanKibana } from '../../tasks/common';
import {
addsHostGeoCityNameToTimeline,
addsHostGeoContinentNameToTimeline,
- clearFieldsBrowser,
closeFieldsBrowser,
filterFieldsBrowser,
toggleCategoryFilter,
@@ -56,17 +55,13 @@ describe('Fields Browser', () => {
login();
});
context('Fields Browser rendering', () => {
- before(() => {
+ beforeEach(() => {
visit(HOSTS_URL);
openTimelineUsingToggle();
populateTimeline();
openTimelineFieldsBrowser();
});
- afterEach(() => {
- clearFieldsBrowser();
- });
-
it('displays all categories (by default)', () => {
cy.get(FIELDS_BROWSER_SELECTED_CATEGORIES_BADGES).should('be.empty');
});
@@ -126,18 +121,13 @@ describe('Fields Browser', () => {
});
context('Editing the timeline', () => {
- before(() => {
+ beforeEach(() => {
visit(HOSTS_URL);
openTimelineUsingToggle();
populateTimeline();
openTimelineFieldsBrowser();
});
- afterEach(() => {
- openTimelineFieldsBrowser();
- clearFieldsBrowser();
- });
-
it('removes the message field from the timeline when the user un-checks the field', () => {
cy.get(FIELDS_BROWSER_MESSAGE_HEADER).should('exist');
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/flyout_button.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/flyout_button.cy.ts
index b4285ffe0f885..ba0ca01d203d5 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/flyout_button.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/flyout_button.cy.ts
@@ -27,6 +27,9 @@ describe('timeline flyout button', () => {
before(() => {
cleanKibana();
login();
+ });
+
+ beforeEach(() => {
visit(HOSTS_URL);
waitForAllHostsToBeLoaded();
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/full_screen.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/full_screen.cy.ts
index 819edfee5ffe5..1ea2e723bd1fb 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/full_screen.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/full_screen.cy.ts
@@ -22,6 +22,9 @@ describe('Toggle full screen', () => {
before(() => {
cleanKibana();
login();
+ });
+
+ beforeEach(() => {
visit(HOSTS_URL);
openTimelineUsingToggle();
populateTimeline();
@@ -35,6 +38,7 @@ describe('Toggle full screen', () => {
});
it('Should show timeline header and tab list area', () => {
+ enterFullScreenMode();
exitFullScreenMode();
cy.get(TIMELINE_TABS).should('exist');
cy.get(TIMELINE_HEADER).should('be.visible');
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/notes_tab.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/notes_tab.cy.ts
index a6691225808ef..c386abace9724 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/notes_tab.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/notes_tab.cy.ts
@@ -44,12 +44,17 @@ describe('Timeline notes tab', () => {
refreshTimelinesUntilTimeLinePresent(timelineId)
// This cy.wait is here because we cannot do a pipe on a timeline as that will introduce multiple URL
// request responses and indeterminism since on clicks to activates URL's.
- .then(() => cy.wait(1000))
- .then(() => openTimelineById(timelineId))
- .then(() => goToNotesTab())
+ .then(() => cy.wrap(timelineId).as('timelineId'))
);
});
+ beforeEach(function () {
+ visitWithoutDateRange(TIMELINES_URL);
+ openTimelineById(this?.timelineId as string)
+ .then(() => goToNotesTab())
+ .then(() => cy.wait(1000));
+ });
+
it('should render mockdown', () => {
addNotesToTimeline(getTimelineNonValidQuery().notes);
cy.get(NOTES_TEXT_AREA).should('exist');
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/open_timeline.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/open_timeline.cy.ts
index a84330df1b833..a392b83276cdd 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/open_timeline.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/open_timeline.cy.ts
@@ -22,7 +22,6 @@ import { cleanKibana } from '../../tasks/common';
import { login, visitWithoutDateRange } from '../../tasks/login';
import {
- closeOpenTimelineModal,
markAsFavorite,
openTimelineById,
openTimelineFromSettings,
@@ -44,6 +43,7 @@ describe('Open timeline', () => {
refreshTimelinesUntilTimeLinePresent(timelineId)
// This cy.wait is here because we cannot do a pipe on a timeline as that will introduce multiple URL
// request responses and indeterminism since on clicks to activates URL's.
+ .then(() => cy.wrap(timelineId).as('timelineId'))
.then(() => cy.wait(1000))
.then(() =>
addNoteToTimeline(getTimeline().notes, timelineId).should((response) =>
@@ -57,12 +57,10 @@ describe('Open timeline', () => {
});
describe('Open timeline modal', () => {
- before(() => {
+ beforeEach(function () {
+ visitWithoutDateRange(TIMELINES_URL);
openTimelineFromSettings();
- });
-
- after(() => {
- closeOpenTimelineModal();
+ openTimelineById(this.timelineId);
});
it('should open a modal', () => {
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/overview.cy.tsx b/x-pack/plugins/security_solution/cypress/e2e/timelines/overview.cy.tsx
index 3e87ee30e29b9..9683ee81903a5 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/overview.cy.tsx
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/overview.cy.tsx
@@ -34,10 +34,10 @@ describe('timeline overview search', () => {
createTimeline(getTimeline());
login();
- visitWithoutDateRange(TIMELINES_URL);
});
beforeEach(() => {
+ visitWithoutDateRange(TIMELINES_URL);
cy.get(TIMELINES_OVERVIEW_SEARCH).clear();
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/pagination.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/pagination.cy.ts
index bc8635a9a9116..a354fb8359f50 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/pagination.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/pagination.cy.ts
@@ -29,10 +29,14 @@ describe('Pagination', () => {
cleanKibana();
esArchiverLoad('timeline');
login();
+ });
+
+ beforeEach(() => {
visit(HOSTS_URL);
openTimelineUsingToggle();
populateTimeline();
});
+
after(() => {
esArchiverUnload('timeline');
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/query_tab.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/query_tab.cy.ts
index 2e5ec0576199f..07a06139e2866 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/query_tab.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/query_tab.cy.ts
@@ -22,7 +22,6 @@ import { cleanKibana } from '../../tasks/common';
import { login, visitWithoutDateRange } from '../../tasks/login';
import {
addFilter,
- closeTimeline,
openTimelineById,
persistNoteToFirstEvent,
pinFirstEvent,
@@ -42,6 +41,7 @@ describe('Timeline query tab', () => {
refreshTimelinesUntilTimeLinePresent(timelineId)
// This cy.wait is here because we cannot do a pipe on a timeline as that will introduce multiple URL
// request responses and indeterminism since on clicks to activates URL's.
+ .then(() => cy.wrap(timelineId).as('timelineId'))
.then(() => cy.wait(1000))
.then(() =>
addNoteToTimeline(getTimeline().notes, timelineId).should((response) =>
@@ -56,8 +56,9 @@ describe('Timeline query tab', () => {
});
describe('Query tab', () => {
- after(() => {
- closeTimeline();
+ beforeEach(function () {
+ visitWithoutDateRange(TIMELINES_URL);
+ openTimelineById(this.timelineId).then(() => addFilter(getTimeline().filter));
});
it('should contain the right query', () => {
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/search_or_filter.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/search_or_filter.cy.ts
index 39420b27e3866..4317365c1aaab 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/search_or_filter.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/search_or_filter.cy.ts
@@ -30,6 +30,7 @@ describe('Timeline search and filters', () => {
cleanKibana();
login();
});
+
describe('timeline search or filter KQL bar', () => {
beforeEach(() => {
visit(HOSTS_URL);
@@ -54,13 +55,10 @@ describe('Timeline search and filters', () => {
});
describe('Update kqlMode for timeline', () => {
- before(() => {
+ beforeEach(() => {
visitWithoutDateRange(TIMELINES_URL);
waitForTimelinesPanelToBeLoaded();
openTimelineUsingToggle();
- });
-
- beforeEach(() => {
cy.intercept('PATCH', '/api/timeline').as('update');
cy.get(TIMELINE_SEARCH_OR_FILTER)
.pipe(($el) => $el.trigger('click'))
diff --git a/x-pack/plugins/security_solution/cypress/e2e/timelines/toggle_column.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/timelines/toggle_column.cy.ts
index f531dcfc9fbdf..ee922d42b646c 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/timelines/toggle_column.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/timelines/toggle_column.cy.ts
@@ -26,10 +26,10 @@ describe('toggle column in timeline', () => {
cleanKibana();
cy.intercept('POST', '/api/timeline/_export?file_name=timelines_export.ndjson').as('export');
login();
- visit(HOSTS_URL);
});
beforeEach(() => {
+ visit(HOSTS_URL);
openTimelineUsingToggle();
populateTimeline();
});
diff --git a/x-pack/plugins/security_solution/cypress/e2e/users/inspect.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/users/inspect.cy.ts
index 41f421baab971..95c0c1f8fa680 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/users/inspect.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/users/inspect.cy.ts
@@ -10,7 +10,7 @@ import { INSPECT_MODAL } from '../../screens/inspect';
import { ALL_USERS_TABLE } from '../../screens/users/all_users';
import { AUTHENTICATIONS_TAB } from '../../screens/users/user_authentications';
-import { clickInspectButton, closesModal } from '../../tasks/inspect';
+import { clickInspectButton } from '../../tasks/inspect';
import { login, visit } from '../../tasks/login';
import { USERS_URL } from '../../urls/navigation';
@@ -19,10 +19,10 @@ describe('Inspect', () => {
context('Users stats and tables', () => {
before(() => {
login();
- visit(USERS_URL);
});
- afterEach(() => {
- closesModal();
+
+ beforeEach(() => {
+ visit(USERS_URL);
});
it(`inspects all users table`, () => {
diff --git a/x-pack/plugins/security_solution/cypress/e2e/users/users_tabs.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/users/users_tabs.cy.ts
index c345d5dc66872..3cfc225a4b7d2 100644
--- a/x-pack/plugins/security_solution/cypress/e2e/users/users_tabs.cy.ts
+++ b/x-pack/plugins/security_solution/cypress/e2e/users/users_tabs.cy.ts
@@ -27,8 +27,12 @@ describe('Users stats and tables', () => {
esArchiverLoad('risk_users');
login();
+ });
+
+ beforeEach(() => {
visit(USERS_URL);
});
+
after(() => {
esArchiverUnload('users');
esArchiverUnload('risk_users');
diff --git a/x-pack/plugins/security_solution/cypress/screens/alerts.ts b/x-pack/plugins/security_solution/cypress/screens/alerts.ts
index 4ab83c7ef69e2..24d8ad383b73f 100644
--- a/x-pack/plugins/security_solution/cypress/screens/alerts.ts
+++ b/x-pack/plugins/security_solution/cypress/screens/alerts.ts
@@ -64,6 +64,12 @@ export const MANAGE_ALERT_DETECTION_RULES_BTN = '[data-test-subj="manage-alert-d
export const MARK_ALERT_ACKNOWLEDGED_BTN = '[data-test-subj="acknowledged-alert-status"]';
+export const ALERTS_REFRESH_BTN = '[data-test-subj="querySubmitButton"]';
+
+export const ALERTS_HISTOGRAM_PANEL_LOADER = '[data-test-subj="loadingPanelAlertsHistogram"]';
+
+export const ALERTS_CONTAINER_LOADING_BAR = '[data-test-subj="events-container-loading-true"]';
+
export const NUMBER_OF_ALERTS =
'[data-test-subj="events-viewer-panel"] [data-test-subj="server-side-event-count"]';
diff --git a/x-pack/plugins/security_solution/cypress/support/e2e.js b/x-pack/plugins/security_solution/cypress/support/e2e.js
index 73a9f1503a47d..8e2ba386125b2 100644
--- a/x-pack/plugins/security_solution/cypress/support/e2e.js
+++ b/x-pack/plugins/security_solution/cypress/support/e2e.js
@@ -24,10 +24,6 @@
import './commands';
import 'cypress-pipe';
-Cypress.Cookies.defaults({
- preserve: 'sid',
-});
-
Cypress.on('uncaught:exception', () => {
return false;
});
diff --git a/x-pack/plugins/security_solution/cypress/tasks/alerts.ts b/x-pack/plugins/security_solution/cypress/tasks/alerts.ts
index 715c071b9fb68..ee0b56ebd1660 100644
--- a/x-pack/plugins/security_solution/cypress/tasks/alerts.ts
+++ b/x-pack/plugins/security_solution/cypress/tasks/alerts.ts
@@ -26,6 +26,8 @@ import {
TAKE_ACTION_BTN,
TAKE_ACTION_MENU,
ADD_ENDPOINT_EXCEPTION_BTN,
+ ALERTS_HISTOGRAM_PANEL_LOADER,
+ ALERTS_CONTAINER_LOADING_BAR,
DATAGRID_CHANGES_IN_PROGRESS,
EVENT_CONTAINER_TABLE_NOT_LOADING,
CLOSED_ALERTS_FILTER_BTN,
@@ -288,6 +290,8 @@ export const waitForAlerts = () => {
export const waitForAlertsPanelToBeLoaded = () => {
cy.get(LOADING_ALERTS_PANEL).should('exist');
cy.get(LOADING_ALERTS_PANEL).should('not.exist');
+ cy.get(ALERTS_CONTAINER_LOADING_BAR).should('not.exist');
+ cy.get(ALERTS_HISTOGRAM_PANEL_LOADER).should('not.exist');
};
export const expandAlertTableCellValue = (columnSelector: string, row = 1) => {
diff --git a/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts
index db782538ee887..821b4c415fdd8 100644
--- a/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts
+++ b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts
@@ -368,11 +368,7 @@ export const expectNumberOfRules = (expectedNumber: number) => {
};
export const expectToContainRule = (ruleName: string) => {
- cy.get(RULES_TABLE).then(($table) => {
- const rulesRow = cy.wrap($table.find(RULES_ROW));
-
- rulesRow.should('include.text', ruleName);
- });
+ cy.get(RULES_TABLE).find(RULES_ROW).should('include.text', ruleName);
};
const selectOverwriteRulesImport = () => {
diff --git a/x-pack/plugins/security_solution/cypress/tasks/host_risk.ts b/x-pack/plugins/security_solution/cypress/tasks/host_risk.ts
index 8573ec1c642c4..c1817cbea8548 100644
--- a/x-pack/plugins/security_solution/cypress/tasks/host_risk.ts
+++ b/x-pack/plugins/security_solution/cypress/tasks/host_risk.ts
@@ -26,7 +26,7 @@ export const openRiskTableFilterAndSelectTheCriticalOption = () => {
};
export const openRiskTableFilterAndSelectTheLowOption = () => {
- cy.get(HOST_BY_RISK_TABLE_FILTER).click();
+ cy.get(HOST_BY_RISK_TABLE_FILTER).first().click();
cy.get(HOST_BY_RISK_TABLE_FILTER_LOW).click();
};
diff --git a/x-pack/plugins/security_solution/cypress/tasks/login.ts b/x-pack/plugins/security_solution/cypress/tasks/login.ts
index d7568d1c2e880..eb02d393a4764 100644
--- a/x-pack/plugins/security_solution/cypress/tasks/login.ts
+++ b/x-pack/plugins/security_solution/cypress/tasks/login.ts
@@ -136,19 +136,21 @@ export const deleteRoleAndUser = (role: ROLES) => {
};
export const loginWithUser = (user: User) => {
- cy.request({
- body: {
- providerType: 'basic',
- providerName: 'basic',
- currentURL: '/',
- params: {
- username: user.username,
- password: user.password,
+ cy.session(user, () => {
+ cy.request({
+ body: {
+ providerType: 'basic',
+ providerName: 'basic',
+ currentURL: '/',
+ params: {
+ username: user.username,
+ password: user.password,
+ },
},
- },
- headers: { 'kbn-xsrf': 'cypress-creds-via-config' },
- method: 'POST',
- url: constructUrlWithUser(user, LOGIN_API_ENDPOINT),
+ headers: { 'kbn-xsrf': 'cypress-creds-via-config' },
+ method: 'POST',
+ url: constructUrlWithUser(user, LOGIN_API_ENDPOINT),
+ });
});
};
@@ -163,19 +165,21 @@ const loginWithRole = async (role: ROLES) => {
port: Cypress.env('configport'),
} as UrlObject);
cy.log(`origin: ${theUrl}`);
- cy.request({
- body: {
- providerType: 'basic',
- providerName: 'basic',
- currentURL: '/',
- params: {
- username: role,
- password: 'changeme',
+ cy.session(role, () => {
+ cy.request({
+ body: {
+ providerType: 'basic',
+ providerName: 'basic',
+ currentURL: '/',
+ params: {
+ username: role,
+ password: 'changeme',
+ },
},
- },
- headers: { 'kbn-xsrf': 'cypress-creds-via-config' },
- method: 'POST',
- url: getUrlWithRoute(role, LOGIN_API_ENDPOINT),
+ headers: { 'kbn-xsrf': 'cypress-creds-via-config' },
+ method: 'POST',
+ url: getUrlWithRoute(role, LOGIN_API_ENDPOINT),
+ });
});
};
@@ -215,20 +219,25 @@ const loginViaEnvironmentCredentials = () => {
`Authenticating via environment credentials from the \`CYPRESS_${ELASTICSEARCH_USERNAME}\` and \`CYPRESS_${ELASTICSEARCH_PASSWORD}\` environment variables`
);
- // programmatically authenticate without interacting with the Kibana login page
- cy.request({
- body: {
- providerType: 'basic',
- providerName: 'basic',
- currentURL: '/',
- params: {
- username: Cypress.env(ELASTICSEARCH_USERNAME),
- password: Cypress.env(ELASTICSEARCH_PASSWORD),
+ const username = Cypress.env(ELASTICSEARCH_USERNAME);
+ const password = Cypress.env(ELASTICSEARCH_PASSWORD);
+
+ cy.session([username, password], () => {
+ // programmatically authenticate without interacting with the Kibana login page
+ cy.request({
+ body: {
+ providerType: 'basic',
+ providerName: 'basic',
+ currentURL: '/',
+ params: {
+ username,
+ password,
+ },
},
- },
- headers: { 'kbn-xsrf': 'cypress-creds-via-env' },
- method: 'POST',
- url: `${Cypress.config().baseUrl}${LOGIN_API_ENDPOINT}`,
+ headers: { 'kbn-xsrf': 'cypress-creds-via-env' },
+ method: 'POST',
+ url: `${Cypress.config().baseUrl}${LOGIN_API_ENDPOINT}`,
+ });
});
};
diff --git a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts
index 76a512a6fcb88..7cc90e06cb2e6 100644
--- a/x-pack/plugins/security_solution/cypress/tasks/timeline.ts
+++ b/x-pack/plugins/security_solution/cypress/tasks/timeline.ts
@@ -328,6 +328,7 @@ export const deleteTimeline = () => {
export const markAsFavorite = () => {
const click = ($el: Cypress.ObjectLike) => cy.wrap($el).click();
cy.get(STAR_ICON).should('be.visible').pipe(click);
+ cy.get(LOADING_INDICATOR).should('exist');
cy.get(LOADING_INDICATOR).should('not.exist');
};
diff --git a/x-pack/plugins/security_solution/cypress/tsconfig.json b/x-pack/plugins/security_solution/cypress/tsconfig.json
index 070f577c5c2fb..fdb6b295104b1 100644
--- a/x-pack/plugins/security_solution/cypress/tsconfig.json
+++ b/x-pack/plugins/security_solution/cypress/tsconfig.json
@@ -26,6 +26,7 @@
{
"path": "../tsconfig.json",
"force": true
- }
+ },
+ "@kbn/rison"
]
}
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx
index 2b8c0d534228d..40ad265849c0a 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx
@@ -26,7 +26,7 @@ import { mockAlertDetailsData } from './__mocks__';
import type { TimelineEventsDetailsItem } from '../../../../common/search_strategy';
import { TimelineTabs } from '../../../../common/types/timeline';
import { useInvestigationTimeEnrichment } from '../../containers/cti/event_enrichment';
-import { useGetUserCasesPermissions } from '../../lib/kibana';
+import { useGetUserCasesPermissions, useKibana } from '../../lib/kibana';
import { defaultRowRenderers } from '../../../timelines/components/timeline/body/renderers';
jest.mock('../../../timelines/components/timeline/body/renderers', () => {
@@ -43,6 +43,7 @@ jest.mock('../../../timelines/components/timeline/body/renderers', () => {
jest.mock('../../lib/kibana');
const originalKibanaLib = jest.requireActual('../../lib/kibana');
+const useKibanaMock = useKibana as jest.Mocked;
// Restore the useGetUserCasesPermissions so the calling functions can receive a valid permissions object
// The returned permissions object will indicate that the user does not have permissions by default
@@ -202,6 +203,30 @@ describe('EventDetails', () => {
});
it('render osquery tab', async () => {
+ const {
+ services: { osquery },
+ } = useKibanaMock();
+ if (osquery) {
+ jest.spyOn(osquery, 'fetchAllLiveQueries').mockReturnValue({
+ data: {
+ // @ts-expect-error - we don't need all the response details to test the functionality
+ data: {
+ items: [
+ {
+ _id: 'testId',
+ _index: 'testIndex',
+ fields: {
+ action_id: ['testActionId'],
+ 'queries.action_id': ['testQueryActionId'],
+ 'queries.query': ['select * from users'],
+ '@timestamp': ['2022-09-08T18:16:30.256Z'],
+ },
+ },
+ ],
+ },
+ },
+ });
+ }
const newProps = {
...defaultProps,
rawEventData: {
diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx
index a20f0b2701a29..b8c26c4884b47 100644
--- a/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx
@@ -5,24 +5,18 @@
* 2.0.
*/
-import {
- EuiCode,
- EuiEmptyPrompt,
- EuiFlexGroup,
- EuiFlexItem,
- EuiNotificationBadge,
-} from '@elastic/eui';
+import { EuiCode, EuiEmptyPrompt, EuiNotificationBadge, EuiSpacer } from '@elastic/eui';
import React, { useMemo } from 'react';
import styled from 'styled-components';
import { FormattedMessage } from '@kbn/i18n-react';
import type { Ecs } from '../../../../common/ecs';
import { PERMISSION_DENIED } from '../../../detection_engine/rule_response_actions/osquery/translations';
import { expandDottedObject } from '../../../../common/utils/expand_dotted';
-import { RESPONSE_ACTION_TYPES } from '../../../../common/detection_engine/rule_response_actions/schemas';
import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features';
import { useKibana } from '../../lib/kibana';
import { EventsViewType } from './event_details';
import * as i18n from './translations';
+import type { RESPONSE_ACTION_TYPES } from '../../../../common/detection_engine/rule_response_actions/schemas/response_actions';
const TabContentWrapper = styled.div`
height: 100%;
@@ -30,7 +24,7 @@ const TabContentWrapper = styled.div`
`;
type RuleParameters = Array<{
response_actions: Array<{
- action_type_id: string;
+ action_type_id: RESPONSE_ACTION_TYPES.OSQUERY;
params: Record;
}>;
}>;
@@ -98,45 +92,41 @@ export const useOsqueryTab = ({
return;
}
- const { OsqueryResults } = osquery;
const expandedEventFieldsObject = expandDottedObject(
rawEventData.fields
) as ExpandedEventFieldsObject;
- const parameters = expandedEventFieldsObject.kibana?.alert?.rule?.parameters;
- const responseActions = parameters?.[0].response_actions;
+ const responseActions =
+ expandedEventFieldsObject?.kibana?.alert?.rule?.parameters?.[0].response_actions;
- const osqueryActionsLength = responseActions?.filter(
- (action: { action_type_id: string }) => action.action_type_id === RESPONSE_ACTION_TYPES.OSQUERY
- )?.length;
-
- if (!osqueryActionsLength) {
+ if (!responseActions?.length) {
return;
}
- const ruleName = expandedEventFieldsObject.kibana?.alert?.rule?.name;
- const agentIds = expandedEventFieldsObject.agent?.id;
+
+ const { OsqueryResults, fetchAllLiveQueries } = osquery;
const alertId = rawEventData._id;
+ const { data: actionsData } = fetchAllLiveQueries({
+ filterQuery: { term: { alert_ids: alertId } },
+ activePage: 0,
+ limit: 100,
+ sortField: '@timestamp',
+ alertId,
+ });
+ const actionItems = actionsData?.data.items || [];
+
+ const ruleName = expandedEventFieldsObject.kibana?.alert?.rule?.name;
+ const agentIds = expandedEventFieldsObject.agent?.id;
+
return {
id: EventsViewType.osqueryView,
'data-test-subj': 'osqueryViewTab',
- name: (
-
-
- {i18n.OSQUERY_VIEW}
-
-
-
- {osqueryActionsLength}
-
-
-
+ name: i18n.OSQUERY_VIEW,
+ append: (
+
+ {actionItems.length}
+
),
content: (
<>
@@ -144,12 +134,15 @@ export const useOsqueryTab = ({
{!application?.capabilities?.osquery?.read ? (
emptyPrompt
) : (
-
+ <>
+
+
+ >
)}
>
diff --git a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx
index 5f36a30779ca3..a72e0aa35f3ad 100644
--- a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx
@@ -210,7 +210,7 @@ const useExternalAlertsInitialUrlState = () => {
const getInitialUrlParamValue = useGetInitialUrlParamValue(EXTERNAL_ALERTS_URL_PARAM);
- const { decodedParam: showExternalAlertsInitialUrlState } = useMemo(
+ const showExternalAlertsInitialUrlState = useMemo(
() => getInitialUrlParamValue(),
[getInitialUrlParamValue]
);
@@ -218,12 +218,9 @@ const useExternalAlertsInitialUrlState = () => {
useEffect(() => {
// Only called on component unmount
return () => {
- replaceUrlParams([
- {
- key: EXTERNAL_ALERTS_URL_PARAM,
- value: null,
- },
- ]);
+ replaceUrlParams({
+ [EXTERNAL_ALERTS_URL_PARAM]: null,
+ });
};
}, [replaceUrlParams]);
@@ -236,11 +233,8 @@ const useExternalAlertsInitialUrlState = () => {
const useSyncExternalAlertsUrlState = (showExternalAlerts: boolean) => {
const replaceUrlParams = useReplaceUrlParams();
useEffect(() => {
- replaceUrlParams([
- {
- key: EXTERNAL_ALERTS_URL_PARAM,
- value: showExternalAlerts ? 'true' : null,
- },
- ]);
+ replaceUrlParams({
+ [EXTERNAL_ALERTS_URL_PARAM]: showExternalAlerts ? true : null,
+ });
}, [showExternalAlerts, replaceUrlParams]);
};
diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/index.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/index.tsx
index d65405cd1c48f..595d9466bfcc7 100644
--- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/index.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/index.tsx
@@ -5,291 +5,8 @@
* 2.0.
*/
-import { pickBy, isEmpty } from 'lodash';
-import type { Plugin } from 'unified';
-import React, { useContext, useMemo, useState, useCallback } from 'react';
-import type { RemarkTokenizer } from '@elastic/eui';
-import {
- EuiSpacer,
- EuiCodeBlock,
- EuiModalHeader,
- EuiModalHeaderTitle,
- EuiModalBody,
- EuiModalFooter,
- EuiButton,
- EuiButtonEmpty,
-} from '@elastic/eui';
-import { useForm, FormProvider } from 'react-hook-form';
-import styled from 'styled-components';
-import type { EuiMarkdownEditorUiPluginEditorProps } from '@elastic/eui/src/components/markdown_editor/markdown_types';
-import { i18n } from '@kbn/i18n';
-import { FormattedMessage } from '@kbn/i18n-react';
-import { useKibana } from '../../../../lib/kibana';
-import { LabelField } from './label_field';
-import OsqueryLogo from './osquery_icon/osquery.svg';
-import { OsqueryFlyout } from '../../../../../detections/components/osquery/osquery_flyout';
-import { BasicAlertDataContext } from '../../../event_details/investigation_guide_view';
-import { OsqueryNotAvailablePrompt } from './not_available_prompt';
+import { plugin } from './plugin';
+import { OsqueryParser } from './parser';
+import { OsqueryRenderer } from './renderer';
-const StyledEuiButton = styled(EuiButton)`
- > span > img {
- margin-block-end: 0;
- }
-`;
-
-const OsqueryEditorComponent = ({
- node,
- onSave,
- onCancel,
-}: EuiMarkdownEditorUiPluginEditorProps<{
- configuration: {
- label?: string;
- query: string;
- ecs_mapping: { [key: string]: {} };
- };
-}>) => {
- const isEditMode = node != null;
- const {
- osquery,
- application: {
- capabilities: { osquery: osqueryPermissions },
- },
- } = useKibana().services;
- const formMethods = useForm<{
- label: string;
- query: string;
- ecs_mapping: Record;
- }>({
- defaultValues: {
- label: node?.configuration?.label,
- query: node?.configuration?.query,
- ecs_mapping: node?.configuration?.ecs_mapping,
- },
- });
-
- const onSubmit = useCallback(
- (data) => {
- onSave(
- `!{osquery${JSON.stringify(
- pickBy(
- {
- query: data.query,
- label: data.label,
- ecs_mapping: data.ecs_mapping,
- },
- (value) => !isEmpty(value)
- )
- )}}`,
- {
- block: true,
- }
- );
- },
- [onSave]
- );
-
- const noOsqueryPermissions = useMemo(
- () =>
- (!osqueryPermissions.runSavedQueries || !osqueryPermissions.readSavedQueries) &&
- !osqueryPermissions.writeLiveQueries,
- [
- osqueryPermissions.readSavedQueries,
- osqueryPermissions.runSavedQueries,
- osqueryPermissions.writeLiveQueries,
- ]
- );
-
- const OsqueryActionForm = useMemo(() => {
- if (osquery?.LiveQueryField) {
- const { LiveQueryField } = osquery;
-
- return (
-
-
-
-
-
- );
- }
- return null;
- }, [formMethods, osquery]);
-
- if (noOsqueryPermissions) {
- return ;
- }
-
- return (
- <>
-
-
- {isEditMode ? (
-
- ) : (
-
- )}
-
-
-
-
- <>{OsqueryActionForm}>
-
-
-
-
- {i18n.translate('xpack.securitySolution.markdown.osquery.modalCancelButtonLabel', {
- defaultMessage: 'Cancel',
- })}
-
-
- {isEditMode ? (
-
- ) : (
-
- )}
-
-
- >
- );
-};
-
-const OsqueryEditor = React.memo(OsqueryEditorComponent);
-
-export const plugin = {
- name: 'osquery',
- button: {
- label: 'Osquery',
- iconType: 'logoOsquery',
- },
- helpText: (
-
-
- {'!{osquery{options}}'}
-
-
-
- ),
- editor: OsqueryEditor,
-};
-
-export const parser: Plugin = function () {
- const Parser = this.Parser;
- const tokenizers = Parser.prototype.blockTokenizers;
- const methods = Parser.prototype.blockMethods;
-
- const tokenizeOsquery: RemarkTokenizer = function (eat, value, silent) {
- if (value.startsWith('!{osquery') === false) return false;
-
- const nextChar = value[9];
-
- if (nextChar !== '{' && nextChar !== '}') return false; // this isn't actually a osquery
-
- if (silent) {
- return true;
- }
-
- // is there a configuration?
- const hasConfiguration = nextChar === '{';
-
- let match = '!{osquery';
- let configuration = {};
-
- if (hasConfiguration) {
- let configurationString = '';
-
- let openObjects = 0;
-
- for (let i = 9; i < value.length; i++) {
- const char = value[i];
- if (char === '{') {
- openObjects++;
- configurationString += char;
- } else if (char === '}') {
- openObjects--;
- if (openObjects === -1) {
- break;
- }
- configurationString += char;
- } else {
- configurationString += char;
- }
- }
-
- match += configurationString;
- try {
- configuration = JSON.parse(configurationString);
- } catch (e) {
- const now = eat.now();
- this.file.fail(`Unable to parse osquery JSON configuration: ${e}`, {
- line: now.line,
- column: now.column + 9,
- });
- }
- }
-
- match += '}';
-
- return eat(match)({
- type: 'osquery',
- configuration,
- });
- };
-
- tokenizers.osquery = tokenizeOsquery;
- methods.splice(methods.indexOf('text'), 0, 'osquery');
-};
-
-// receives the configuration from the parser and renders
-const RunOsqueryButtonRenderer = ({
- configuration,
-}: {
- configuration: {
- label?: string;
- query: string;
- ecs_mapping: { [key: string]: {} };
- test: [];
- };
-}) => {
- const [showFlyout, setShowFlyout] = useState(false);
- const { agentId, alertId } = useContext(BasicAlertDataContext);
-
- const handleOpen = useCallback(() => setShowFlyout(true), [setShowFlyout]);
-
- const handleClose = useCallback(() => setShowFlyout(false), [setShowFlyout]);
-
- return (
- <>
-
- {configuration.label ??
- i18n.translate('xpack.securitySolution.markdown.osquery.runOsqueryButtonLabel', {
- defaultMessage: 'Run Osquery',
- })}
-
- {showFlyout && (
-
- )}
- >
- );
-};
-
-export { RunOsqueryButtonRenderer as renderer };
+export { plugin, OsqueryParser as parser, OsqueryRenderer as renderer };
diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/parser.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/parser.ts
new file mode 100644
index 0000000000000..2664c9b5c7c4c
--- /dev/null
+++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/parser.ts
@@ -0,0 +1,76 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { Plugin } from 'unified';
+import type { RemarkTokenizer } from '@elastic/eui';
+
+export const OsqueryParser: Plugin = function () {
+ const Parser = this.Parser;
+ const tokenizers = Parser.prototype.blockTokenizers;
+ const methods = Parser.prototype.blockMethods;
+
+ const tokenizeOsquery: RemarkTokenizer = function (eat, value, silent) {
+ if (value.startsWith('!{osquery') === false) return false;
+
+ const nextChar = value[9];
+
+ if (nextChar !== '{' && nextChar !== '}') return false; // this isn't actually a osquery
+
+ if (silent) {
+ return true;
+ }
+
+ // is there a configuration?
+ const hasConfiguration = nextChar === '{';
+
+ let match = '!{osquery';
+ let configuration = {};
+
+ if (hasConfiguration) {
+ let configurationString = '';
+
+ let openObjects = 0;
+
+ for (let i = 9; i < value.length; i++) {
+ const char = value[i];
+ if (char === '{') {
+ openObjects++;
+ configurationString += char;
+ } else if (char === '}') {
+ openObjects--;
+ if (openObjects === -1) {
+ break;
+ }
+ configurationString += char;
+ } else {
+ configurationString += char;
+ }
+ }
+
+ match += configurationString;
+ try {
+ configuration = JSON.parse(configurationString);
+ } catch (e) {
+ const now = eat.now();
+ this.file.fail(`Unable to parse osquery JSON configuration: ${e}`, {
+ line: now.line,
+ column: now.column + 9,
+ });
+ }
+ }
+
+ match += '}';
+
+ return eat(match)({
+ type: 'osquery',
+ configuration,
+ });
+ };
+
+ tokenizers.osquery = tokenizeOsquery;
+ methods.splice(methods.indexOf('text'), 0, 'osquery');
+};
diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.tsx
new file mode 100644
index 0000000000000..de433c3602831
--- /dev/null
+++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/plugin.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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import {
+ EuiButton,
+ EuiButtonEmpty,
+ EuiCodeBlock,
+ EuiModalBody,
+ EuiModalFooter,
+ EuiModalHeader,
+ EuiModalHeaderTitle,
+ EuiSpacer,
+} from '@elastic/eui';
+import type { EuiMarkdownEditorUiPluginEditorProps } from '@elastic/eui/src/components/markdown_editor/markdown_types';
+import { FormProvider, useForm } from 'react-hook-form';
+import React, { useCallback, useMemo } from 'react';
+import { isEmpty, pickBy } from 'lodash';
+import { FormattedMessage } from '@kbn/i18n-react';
+import { i18n } from '@kbn/i18n';
+import { LabelField } from './label_field';
+import { OsqueryNotAvailablePrompt } from './not_available_prompt';
+import { useKibana } from '../../../../lib/kibana';
+
+const OsqueryEditorComponent = ({
+ node,
+ onSave,
+ onCancel,
+}: EuiMarkdownEditorUiPluginEditorProps<{
+ configuration: {
+ label?: string;
+ query: string;
+ ecs_mapping: { [key: string]: {} };
+ };
+}>) => {
+ const isEditMode = node != null;
+ const {
+ osquery,
+ application: {
+ capabilities: { osquery: osqueryPermissions },
+ },
+ } = useKibana().services;
+ const formMethods = useForm<{
+ label: string;
+ query: string;
+ ecs_mapping: Record;
+ }>({
+ defaultValues: {
+ label: node?.configuration?.label,
+ query: node?.configuration?.query,
+ ecs_mapping: node?.configuration?.ecs_mapping,
+ },
+ });
+
+ const onSubmit = useCallback(
+ (data) => {
+ onSave(
+ `!{osquery${JSON.stringify(
+ pickBy(
+ {
+ query: data.query,
+ label: data.label,
+ ecs_mapping: data.ecs_mapping,
+ },
+ (value) => !isEmpty(value)
+ )
+ )}}`,
+ {
+ block: true,
+ }
+ );
+ },
+ [onSave]
+ );
+
+ const noOsqueryPermissions = useMemo(
+ () =>
+ (!osqueryPermissions.runSavedQueries || !osqueryPermissions.readSavedQueries) &&
+ !osqueryPermissions.writeLiveQueries,
+ [
+ osqueryPermissions.readSavedQueries,
+ osqueryPermissions.runSavedQueries,
+ osqueryPermissions.writeLiveQueries,
+ ]
+ );
+
+ const OsqueryActionForm = useMemo(() => {
+ if (osquery?.LiveQueryField) {
+ const { LiveQueryField } = osquery;
+
+ return (
+
+
+
+
+
+ );
+ }
+ return null;
+ }, [formMethods, osquery]);
+
+ if (noOsqueryPermissions) {
+ return ;
+ }
+
+ return (
+ <>
+
+
+ {isEditMode ? (
+
+ ) : (
+
+ )}
+
+
+
+
+ <>{OsqueryActionForm}>
+
+
+
+
+ {i18n.translate('xpack.securitySolution.markdown.osquery.modalCancelButtonLabel', {
+ defaultMessage: 'Cancel',
+ })}
+
+
+ {isEditMode ? (
+
+ ) : (
+
+ )}
+
+
+ >
+ );
+};
+
+const OsqueryEditor = React.memo(OsqueryEditorComponent);
+
+export const plugin = {
+ name: 'osquery',
+ button: {
+ label: 'Osquery',
+ iconType: 'logoOsquery',
+ },
+ helpText: (
+
+
+ {'!{osquery{options}}'}
+
+
+
+ ),
+ editor: OsqueryEditor,
+};
diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.tsx
new file mode 100644
index 0000000000000..f33dec63a6b18
--- /dev/null
+++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/osquery/renderer.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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+// receives the configuration from the parser and renders
+import React, { useCallback, useContext, useMemo, useState } from 'react';
+import { reduce } from 'lodash';
+import { i18n } from '@kbn/i18n';
+import styled from 'styled-components';
+import { EuiButton } from '@elastic/eui';
+import { BasicAlertDataContext } from '../../../event_details/investigation_guide_view';
+import { expandDottedObject } from '../../../../../../common/utils/expand_dotted';
+import type { Ecs } from '../../../../../../common/ecs';
+import OsqueryLogo from './osquery_icon/osquery.svg';
+import { OsqueryFlyout } from '../../../../../detections/components/osquery/osquery_flyout';
+
+const StyledEuiButton = styled(EuiButton)`
+ > span > img {
+ margin-block-end: 0;
+ }
+`;
+
+export const OsqueryRenderer = ({
+ configuration,
+}: {
+ configuration: {
+ label?: string;
+ query: string;
+ ecs_mapping: { [key: string]: {} };
+ test: [];
+ };
+}) => {
+ const [showFlyout, setShowFlyout] = useState(false);
+ const { agentId, alertId, data } = useContext(BasicAlertDataContext);
+
+ const handleOpen = useCallback(() => setShowFlyout(true), [setShowFlyout]);
+
+ const handleClose = useCallback(() => setShowFlyout(false), [setShowFlyout]);
+
+ const ecsData = useMemo(() => {
+ const fieldsMap: Record = reduce(
+ data,
+ (acc, eventDetailItem) => ({
+ ...acc,
+ [eventDetailItem.field]: eventDetailItem?.values?.[0],
+ }),
+ {}
+ );
+ return expandDottedObject(fieldsMap) as Ecs;
+ }, [data]);
+
+ return (
+ <>
+
+ {configuration.label ??
+ i18n.translate('xpack.securitySolution.markdown.osquery.runOsqueryButtonLabel', {
+ defaultMessage: 'Run Osquery',
+ })}
+
+ {showFlyout && (
+
+ )}
+ >
+ );
+};
diff --git a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts
index 1d48cc4d56dd8..a5499f06bddf2 100644
--- a/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts
+++ b/x-pack/plugins/security_solution/public/common/components/markdown_editor/plugins/timeline/parser.ts
@@ -7,8 +7,8 @@
import type { Plugin } from 'unified';
import type { RemarkTokenizer } from '@elastic/eui';
+import { safeDecode } from '@kbn/rison';
import { parse } from 'query-string';
-import { decodeRisonUrlState } from '../../../../utils/global_query_string/helpers';
import { ID, PREFIX } from './constants';
import * as i18n from './translations';
@@ -73,9 +73,14 @@ export const TimelineParser: Plugin = function () {
try {
const timelineSearch = timelineUrl.split('?');
const parseTimelineUrlSearch = parse(timelineSearch[1]) as { timeline: string };
- const { id: timelineId = '', graphEventId = '' } = decodeRisonUrlState(
- parseTimelineUrlSearch.timeline ?? ''
- ) ?? { id: null, graphEventId: '' };
+ const decodedTimeline = safeDecode(parseTimelineUrlSearch.timeline ?? '') as {
+ id?: string;
+ graphEventId?: string;
+ } | null;
+ const { id: timelineId = '', graphEventId = '' } = decodedTimeline ?? {
+ id: null,
+ graphEventId: '',
+ };
if (!timelineId) {
this.file.info(i18n.NO_TIMELINE_ID_FOUND, {
diff --git a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts
index 7cbf5789df7b4..9f66e4f25e7bd 100644
--- a/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts
+++ b/x-pack/plugins/security_solution/public/common/components/user_privileges/endpoint/use_endpoint_privileges.ts
@@ -19,7 +19,6 @@ import type {
import {
calculateEndpointAuthz,
getEndpointAuthzInitialState,
- calculatePermissionsFromCapabilities,
} from '../../../../../common/endpoint/service/authz';
import { useSecuritySolutionStartDependencies } from './security_solution_start_dependencies';
import { useIsExperimentalFeatureEnabled } from '../../../hooks/use_experimental_features';
@@ -57,11 +56,6 @@ export const useEndpointPrivileges = (): Immutable => {
const [hasHostIsolationExceptionsItems, setHasHostIsolationExceptionsItems] =
useState(false);
- const securitySolutionPermissions = useMemo(
- () => calculatePermissionsFromCapabilities(kibanaServices.application.capabilities),
- [kibanaServices.application.capabilities]
- );
-
const privileges = useMemo(() => {
const loading = !userRolesCheckDone || !user || !checkHostIsolationExceptionsDone;
@@ -73,7 +67,6 @@ export const useEndpointPrivileges = (): Immutable => {
fleetAuthz,
userRoles,
isEndpointRbacEnabled || isEndpointRbacV1Enabled,
- securitySolutionPermissions,
hasHostIsolationExceptionsItems
)
: getEndpointAuthzInitialState()),
@@ -89,7 +82,6 @@ export const useEndpointPrivileges = (): Immutable => {
userRoles,
isEndpointRbacEnabled,
isEndpointRbacV1Enabled,
- securitySolutionPermissions,
hasHostIsolationExceptionsItems,
]);
diff --git a/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.test.ts b/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.test.ts
index a2a3b51e6f036..3966ebc6697b2 100644
--- a/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.test.ts
+++ b/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.test.ts
@@ -7,7 +7,6 @@
import { queryTimelineById } from '../../../timelines/components/open_timeline/helpers';
import { useQueryTimelineByIdOnUrlChange } from './use_query_timeline_by_id_on_url_change';
-import * as urlHelpers from '../../utils/global_query_string/helpers';
import { renderHook } from '@testing-library/react-hooks';
import { timelineDefaults } from '../../../timelines/store/timeline/defaults';
@@ -91,15 +90,11 @@ describe('queryTimelineByIdOnUrlChange', () => {
describe('when decode rison fails', () => {
it('should not call queryTimelineById', () => {
- jest.spyOn(urlHelpers, 'decodeRisonUrlState').mockImplementationOnce(() => {
- throw new Error('Unable to decode');
- });
-
mockUseLocation.mockReturnValue({ search: oldTimelineRisonSearchString });
const { rerender } = renderHook(() => useQueryTimelineByIdOnUrlChange());
- mockUseLocation.mockReturnValue({ search: newTimelineRisonSearchString });
- jest.clearAllMocks();
+ mockUseLocation.mockReturnValue({ search: '?foo=bar' });
+
rerender();
expect(queryTimelineById).not.toBeCalled();
diff --git a/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.ts b/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.ts
index c307d634d77ee..e56131cd2603c 100644
--- a/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.ts
+++ b/x-pack/plugins/security_solution/public/common/hooks/timeline/use_query_timeline_by_id_on_url_change.ts
@@ -10,6 +10,7 @@ import { useEffect, useMemo } from 'react';
import { useLocation } from 'react-router-dom';
import usePrevious from 'react-use/lib/usePrevious';
import { useDispatch } from 'react-redux';
+import { safeDecode } from '@kbn/rison';
import type { TimelineUrl } from '../../../timelines/store/timeline/model';
import { timelineActions, timelineSelectors } from '../../../timelines/store/timeline';
import { TimelineId, TimelineTabs } from '../../../../common/types';
@@ -20,7 +21,6 @@ import {
queryTimelineById,
} from '../../../timelines/components/open_timeline/helpers';
import {
- decodeRisonUrlState,
getParamFromQueryString,
getQueryStringFromLocation,
} from '../../utils/global_query_string/helpers';
@@ -51,29 +51,14 @@ export const useQueryTimelineByIdOnUrlChange = () => {
urlKey: URL_PARAM_KEY.timeline,
search: oldSearch ?? '',
});
-
const newUrlStateString = getQueryStringKeyValue({ urlKey: URL_PARAM_KEY.timeline, search });
- if (oldUrlStateString != null && newUrlStateString != null) {
- let newTimeline = null;
- let oldTimeline = null;
-
- try {
- newTimeline = decodeRisonUrlState(newUrlStateString);
- } catch (error) {
- // do nothing as timeline is defaulted to null
- }
-
- try {
- oldTimeline = decodeRisonUrlState(oldUrlStateString);
- } catch (error) {
- // do nothing as timeline is defaulted to null
- }
-
- return [oldTimeline, newTimeline];
- }
-
- return [null, null];
+ return oldUrlStateString != null && newUrlStateString != null
+ ? [
+ safeDecode(oldUrlStateString) as TimelineUrl | null,
+ safeDecode(newUrlStateString) as TimelineUrl | null,
+ ]
+ : [null, null];
}, [oldSearch, search]);
const oldId = previousTimeline?.id;
diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.test.tsx
index ef4a26e52e968..d17b9c16f9d2a 100644
--- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.test.tsx
+++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.test.tsx
@@ -9,7 +9,6 @@ import { renderHook } from '@testing-library/react-hooks';
import { useDeepEqualSelector } from './use_selector';
import { useKibana } from '../lib/kibana';
import { useResolveConflict } from './use_resolve_conflict';
-import * as urlHelpers from '../utils/global_query_string/helpers';
jest.mock('react-router-dom', () => {
const original = jest.requireActual('react-router-dom');
@@ -127,9 +126,6 @@ describe('useResolveConflict', () => {
describe('rison is unable to be decoded', () => {
it('should use timeline values from redux to create the otherObjectPath', async () => {
- jest.spyOn(urlHelpers, 'decodeRisonUrlState').mockImplementation(() => {
- throw new Error('Unable to decode');
- });
(useLocation as jest.Mock).mockReturnValue({
pathname: 'my/cool/path',
search: '?foo=bar',
diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx
index 6bd55a9b70b36..d0082f858ca12 100644
--- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx
+++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx
@@ -8,12 +8,12 @@
import React, { useCallback, useMemo } from 'react';
import { useLocation } from 'react-router-dom';
import { EuiSpacer } from '@elastic/eui';
+import { safeDecode, encode } from '@kbn/rison';
import { useDeepEqualSelector } from './use_selector';
import { TimelineId } from '../../../common/types/timeline';
import { timelineSelectors } from '../../timelines/store/timeline';
import type { TimelineUrl } from '../../timelines/store/timeline/model';
import { timelineDefaults } from '../../timelines/store/timeline/defaults';
-import { decodeRisonUrlState, encodeRisonUrlState } from '../utils/global_query_string/helpers';
import { useKibana } from '../lib/kibana';
import { URL_PARAM_KEY } from './use_url_state';
@@ -53,12 +53,9 @@ export const useResolveConflict = () => {
activeTab,
graphEventId,
};
- let timelineSearch: TimelineUrl = currentTimelineState;
- try {
- timelineSearch = decodeRisonUrlState(timelineRison) ?? currentTimelineState;
- } catch (error) {
- // do nothing as it's already defaulted on line 77
- }
+ const timelineSearch =
+ (safeDecode(timelineRison ?? '') as TimelineUrl | null) ?? currentTimelineState;
+
// We have resolved to one object, but another object has a legacy URL alias associated with this ID/page. We should display a
// callout with a warning for the user, and provide a way for them to navigate to the other object.
const currentObjectId = timelineSearch?.id;
@@ -68,7 +65,7 @@ export const useResolveConflict = () => {
...timelineSearch,
id: newSavedObjectId,
};
- const newTimelineRison = encodeRisonUrlState(newTimelineSearch);
+ const newTimelineRison = encode(newTimelineSearch);
searchQuery.set(URL_PARAM_KEY.timeline, newTimelineRison);
const newPath = `${pathname}?${searchQuery.toString()}${window.location.hash}`;
diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.test.ts b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.test.ts
index 7e3b0f88780c4..c54259649448b 100644
--- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.test.ts
+++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.test.ts
@@ -10,7 +10,6 @@ import { renderHook } from '@testing-library/react-hooks';
import { useDeepEqualSelector } from './use_selector';
import { useKibana } from '../lib/kibana';
import { useResolveRedirect } from './use_resolve_redirect';
-import * as urlHelpers from '../utils/global_query_string/helpers';
jest.mock('react-router-dom', () => {
const original = jest.requireActual('react-router-dom');
@@ -101,9 +100,6 @@ describe('useResolveRedirect', () => {
describe('rison is unable to be decoded', () => {
it('should use timeline values from redux to create the redirect path', async () => {
- jest.spyOn(urlHelpers, 'decodeRisonUrlState').mockImplementation(() => {
- throw new Error('Unable to decode');
- });
(useLocation as jest.Mock).mockReturnValue({
pathname: 'my/cool/path',
search: '?foo=bar',
diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts
index 2f5bf211d8906..e771995e25031 100644
--- a/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts
+++ b/x-pack/plugins/security_solution/public/common/hooks/use_resolve_redirect.ts
@@ -7,11 +7,11 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useLocation } from 'react-router-dom';
+import { safeDecode, encode } from '@kbn/rison';
import { useDeepEqualSelector } from './use_selector';
import { TimelineId } from '../../../common/types/timeline';
import { timelineSelectors } from '../../timelines/store/timeline';
import { timelineDefaults } from '../../timelines/store/timeline/defaults';
-import { decodeRisonUrlState, encodeRisonUrlState } from '../utils/global_query_string/helpers';
import { useKibana } from '../lib/kibana';
import type { TimelineUrl } from '../../timelines/store/timeline/model';
import { URL_PARAM_KEY } from './use_url_state';
@@ -42,12 +42,8 @@ export const useResolveRedirect = () => {
activeTab,
graphEventId,
};
- let timelineSearch: TimelineUrl = currentTimelineState;
- try {
- timelineSearch = decodeRisonUrlState(timelineRison) ?? currentTimelineState;
- } catch (error) {
- // do nothing as it's already defaulted on line 77
- }
+ const timelineSearch =
+ (safeDecode(timelineRison ?? '') as TimelineUrl | null) ?? currentTimelineState;
if (
hasRedirected ||
@@ -64,7 +60,7 @@ export const useResolveRedirect = () => {
...timelineSearch,
id: newObjectId,
};
- const newTimelineRison = encodeRisonUrlState(newTimelineSearch);
+ const newTimelineRison = encode(newTimelineSearch);
searchQuery.set(URL_PARAM_KEY.timeline, newTimelineRison);
const newPath = `${pathname}?${searchQuery.toString()}`;
spaces.ui.redirectLegacyUrl({
diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts
index f7d94a994b919..6b736e3fbb503 100644
--- a/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts
+++ b/x-pack/plugins/security_solution/public/common/lib/kibana/__mocks__/index.ts
@@ -70,6 +70,7 @@ export const useKibana = jest.fn().mockReturnValue({
},
osquery: {
OsqueryResults: jest.fn().mockReturnValue(null),
+ fetchAllLiveQueries: jest.fn().mockReturnValue({ data: { data: { items: [] } } }),
},
timelines: createTGridMocks(),
savedObjectsTagging: {
diff --git a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx
index 196743d760bf7..2e2cdbdd3eda5 100644
--- a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx
+++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx
@@ -40,7 +40,7 @@ import type { ExperimentalFeatures } from '../../../../common/experimental_featu
import { APP_UI_ID, APP_PATH } from '../../../../common/constants';
import { KibanaContextProvider, KibanaServices } from '../../lib/kibana';
import { getDeepLinks } from '../../../app/deep_links';
-import { fleetGetPackageListHttpMock } from '../../../management/mocks';
+import { fleetGetPackageHttpMock } from '../../../management/mocks';
const REAL_REACT_DOM_CREATE_PORTAL = ReactDOM.createPortal;
@@ -373,5 +373,5 @@ const applyDefaultCoreHttpMocks = (http: AppContextTestRender['coreStart']['http
// Need to mock getting the endpoint package from the fleet API because it is used as soon
// as the store middleware for Endpoint list is initialized, thus mocking it here would avoid
// unnecessary errors being output to the console
- fleetGetPackageListHttpMock(http, { ignoreUnMockedApiRouteErrors: true });
+ fleetGetPackageHttpMock(http, { ignoreUnMockedApiRouteErrors: true });
};
diff --git a/x-pack/plugins/security_solution/public/common/store/global_url_param/actions.ts b/x-pack/plugins/security_solution/public/common/store/global_url_param/actions.ts
index 0b3c90e158151..bccb3418aa577 100644
--- a/x-pack/plugins/security_solution/public/common/store/global_url_param/actions.ts
+++ b/x-pack/plugins/security_solution/public/common/store/global_url_param/actions.ts
@@ -5,16 +5,17 @@
* 2.0.
*/
+import type { RisonValue } from '@kbn/rison';
import actionCreatorFactory from 'typescript-fsa';
const actionCreator = actionCreatorFactory('x-pack/security_solution/local/global_url_param');
-export const registerUrlParam = actionCreator<{ key: string; initialValue: string | null }>(
+export const registerUrlParam = actionCreator<{ key: string; initialValue: RisonValue | null }>(
'REGISTER_URL_PARAM'
);
export const deregisterUrlParam = actionCreator<{ key: string }>('DEREGISTER_URL_PARAM');
-export const updateUrlParam = actionCreator<{ key: string; value: string | null }>(
+export const updateUrlParam = actionCreator<{ key: string; value: RisonValue | null }>(
'UPDATE_URL_PARAM'
);
diff --git a/x-pack/plugins/security_solution/public/common/store/global_url_param/reducer.ts b/x-pack/plugins/security_solution/public/common/store/global_url_param/reducer.ts
index 5e7d91515e9b6..47b1ffbfea076 100644
--- a/x-pack/plugins/security_solution/public/common/store/global_url_param/reducer.ts
+++ b/x-pack/plugins/security_solution/public/common/store/global_url_param/reducer.ts
@@ -5,10 +5,12 @@
* 2.0.
*/
+import type { RisonValue } from '@kbn/rison';
+import deepEqual from 'fast-deep-equal';
import { reducerWithInitialState } from 'typescript-fsa-reducers';
import { registerUrlParam, updateUrlParam, deregisterUrlParam } from './actions';
-export type GlobalUrlParam = Record;
+export type GlobalUrlParam = Record;
export const initialGlobalUrlParam: GlobalUrlParam = {};
@@ -34,8 +36,7 @@ export const globalUrlParamReducer = reducerWithInitialState(initialGlobalUrlPar
return nextState;
})
.case(updateUrlParam, (state, { key, value }) => {
- // Only update the URL after the query param is registered and if the current value is different than the previous value
- if (state[key] === undefined || state[key] === value) {
+ if (state[key] === undefined || deepEqual(state[key], value)) {
return state;
}
diff --git a/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts b/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts
index 0f3c1ab413fd0..a8120cd0b99cc 100644
--- a/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts
+++ b/x-pack/plugins/security_solution/public/common/utils/global_query_string/helpers.ts
@@ -5,7 +5,8 @@
* 2.0.
*/
-import { decode, encode } from '@kbn/rison';
+import type { RisonValue } from '@kbn/rison';
+import { safeDecode, encode } from '@kbn/rison';
import type { ParsedQuery } from 'query-string';
import { parse, stringify } from 'query-string';
import { url } from '@kbn/kibana-utils-plugin/public';
@@ -19,20 +20,6 @@ export const isDetectionsPages = (pageName: string) =>
pageName === SecurityPageName.rulesCreate ||
pageName === SecurityPageName.exceptions;
-export const decodeRisonUrlState = (value: string | undefined): T | null => {
- try {
- return value ? (decode(value) as unknown as T) : null;
- } catch (error) {
- if (error instanceof Error && error.message.startsWith('rison decoder error')) {
- return null;
- }
- throw error;
- }
-};
-
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export const encodeRisonUrlState = (state: any) => encode(state);
-
export const getQueryStringFromLocation = (search: string) => search.substring(1);
export const getParamFromQueryString = (
@@ -51,18 +38,19 @@ export const getParamFromQueryString = (
* It doesn't update when the URL changes.
*
*/
-export const useGetInitialUrlParamValue = (urlParamKey: string) => {
+export const useGetInitialUrlParamValue = (
+ urlParamKey: string
+): (() => State | null) => {
// window.location.search provides the most updated representation of the url search.
// It also guarantees that we don't overwrite URL param managed outside react-router.
- const getInitialUrlParamValue = useCallback(() => {
- const param = getParamFromQueryString(
+ const getInitialUrlParamValue = useCallback((): State | null => {
+ const rawParamValue = getParamFromQueryString(
getQueryStringFromLocation(window.location.search),
urlParamKey
);
+ const paramValue = safeDecode(rawParamValue ?? '') as State | null;
- const decodedParam = decodeRisonUrlState(param ?? undefined);
-
- return { param, decodedParam };
+ return paramValue;
}, [urlParamKey]);
return getInitialUrlParamValue;
@@ -71,22 +59,30 @@ export const useGetInitialUrlParamValue = (urlParamKey: string) => {
export const encodeQueryString = (urlParams: ParsedQuery): string =>
stringify(url.encodeQuery(urlParams), { sort: false, encode: false });
-export const useReplaceUrlParams = () => {
+export const useReplaceUrlParams = (): ((params: Record) => void) => {
const history = useHistory();
const replaceUrlParams = useCallback(
- (params: Array<{ key: string; value: string | null }>) => {
+ (params: Record): void => {
// window.location.search provides the most updated representation of the url search.
// It prevents unnecessary re-renders which useLocation would create because 'replaceUrlParams' does update the location.
// window.location.search also guarantees that we don't overwrite URL param managed outside react-router.
const search = window.location.search;
const urlParams = parse(search, { sort: false });
- params.forEach(({ key, value }) => {
+ Object.keys(params).forEach((key) => {
+ const value = params[key];
+
if (value == null || value === '') {
delete urlParams[key];
- } else {
- urlParams[key] = value;
+ return;
+ }
+
+ try {
+ urlParams[key] = encode(value);
+ } catch {
+ // eslint-disable-next-line no-console
+ console.error('Unable to encode url param value');
}
});
diff --git a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx
index dede5125775c4..24fc87bf7bf61 100644
--- a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx
+++ b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.test.tsx
@@ -130,7 +130,7 @@ describe('global query string', () => {
expect(mockDispatch).toBeCalledWith(
globalUrlParamActions.registerUrlParam({
key: urlParamKey,
- initialValue: initialValue.toString(),
+ initialValue,
})
);
});
@@ -140,7 +140,6 @@ describe('global query string', () => {
it('dispatch updateUrlParam action', () => {
const urlParamKey = 'testKey';
const value = { test: 123 };
- const encodedVaue = '(test:123)';
const globalUrlParam = {
[urlParamKey]: 'oldValue',
@@ -156,7 +155,7 @@ describe('global query string', () => {
expect(mockDispatch).toBeCalledWith(
globalUrlParamActions.updateUrlParam({
key: urlParamKey,
- value: encodedVaue,
+ value,
})
);
});
@@ -186,10 +185,12 @@ describe('global query string', () => {
{
...mockGlobalState,
globalUrlParam: {
- testNumber: '123',
- testObject: '(test:321)',
+ testNumber: 123,
+ testObject: { testKey: 321 },
+ testEmptyObject: {},
+ testEmptyArray: [],
testNull: null,
- testEmpty: '',
+ testEmptyString: '',
},
},
SUB_PLUGINS_REDUCER,
@@ -202,7 +203,7 @@ describe('global query string', () => {
const { result } = renderHook(() => useGlobalQueryString(), { wrapper });
- expect(result.current).toEqual('testNumber=123&testObject=(test:321)');
+ expect(result.current).toEqual(`testNumber=123&testObject=(testKey:321)`);
});
});
@@ -218,7 +219,7 @@ describe('global query string', () => {
renderHook(() => useSyncGlobalQueryString(), { wrapper: makeWrapper(globalUrlParam) });
expect(mockHistory.replace).toHaveBeenCalledWith({
- search: `firstKey=111&${urlParamKey}=${value}&lastKey=999`,
+ search: `firstKey=111&${urlParamKey}='${value}'&lastKey=999`,
});
});
@@ -236,7 +237,7 @@ describe('global query string', () => {
renderHook(() => useSyncGlobalQueryString(), { wrapper: makeWrapper(globalUrlParam) });
expect(mockHistory.replace).toHaveBeenCalledWith({
- search: `${urlParamKey1}=${value1}&${urlParamKey2}=${value2}`,
+ search: `${urlParamKey1}='${value1}'&${urlParamKey2}='${value2}'`,
});
});
diff --git a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts
index 96834d39fd644..0d6f546a8b1d5 100644
--- a/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts
+++ b/x-pack/plugins/security_solution/public/common/utils/global_query_string/index.ts
@@ -9,12 +9,8 @@ import { useCallback, useEffect, useMemo } from 'react';
import { difference, isEmpty, pickBy } from 'lodash/fp';
import { useDispatch } from 'react-redux';
import usePrevious from 'react-use/lib/usePrevious';
-import {
- encodeQueryString,
- encodeRisonUrlState,
- useGetInitialUrlParamValue,
- useReplaceUrlParams,
-} from './helpers';
+import { encode } from '@kbn/rison';
+import { encodeQueryString, useGetInitialUrlParamValue, useReplaceUrlParams } from './helpers';
import { useShallowEqualSelector } from '../../hooks/use_selector';
import { globalUrlParamActions, globalUrlParamSelectors } from '../../store/global_url_param';
import { useRouteSpy } from '../route/use_route_spy';
@@ -29,7 +25,7 @@ import { getLinkInfo } from '../../links';
* @param urlParamKey Must not change.
* @param onInitialize Called once when initializing. It must not change.
*/
-export const useInitializeUrlParam = (
+export const useInitializeUrlParam = (
urlParamKey: string,
/**
* @param state Decoded URL param value.
@@ -38,20 +34,20 @@ export const useInitializeUrlParam = (
) => {
const dispatch = useDispatch();
- const getInitialUrlParamValue = useGetInitialUrlParamValue(urlParamKey);
+ const getInitialUrlParamValue = useGetInitialUrlParamValue(urlParamKey);
useEffect(() => {
- const { param: initialValue, decodedParam: decodedInitialValue } = getInitialUrlParamValue();
+ const value = getInitialUrlParamValue();
dispatch(
globalUrlParamActions.registerUrlParam({
key: urlParamKey,
- initialValue: initialValue ?? null,
+ initialValue: value,
})
);
// execute consumer initialization
- onInitialize(decodedInitialValue);
+ onInitialize(value as State);
return () => {
dispatch(globalUrlParamActions.deregisterUrlParam({ key: urlParamKey }));
@@ -65,13 +61,12 @@ export const useInitializeUrlParam = (
*
* Make sure to call `useInitializeUrlParam` before calling this function.
*/
-export const useUpdateUrlParam = (urlParamKey: string) => {
+export const useUpdateUrlParam = (urlParamKey: string) => {
const dispatch = useDispatch();
const updateUrlParam = useCallback(
(value: State | null) => {
- const encodedValue = value !== null ? encodeRisonUrlState(value) : null;
- dispatch(globalUrlParamActions.updateUrlParam({ key: urlParamKey, value: encodedValue }));
+ dispatch(globalUrlParamActions.updateUrlParam({ key: urlParamKey, value }));
},
[dispatch, urlParamKey]
);
@@ -81,11 +76,29 @@ export const useUpdateUrlParam = (urlParamKey: string) => {
export const useGlobalQueryString = (): string => {
const globalUrlParam = useShallowEqualSelector(globalUrlParamSelectors.selectGlobalUrlParam);
+ const globalQueryString = useMemo(() => {
+ const encodedGlobalUrlParam: Record = {};
- const globalQueryString = useMemo(
- () => encodeQueryString(pickBy((value) => !isEmpty(value), globalUrlParam)),
- [globalUrlParam]
- );
+ if (!globalUrlParam) {
+ return '';
+ }
+
+ Object.keys(globalUrlParam).forEach((paramName) => {
+ const value = globalUrlParam[paramName];
+
+ if (!value || (typeof value === 'object' && isEmpty(value))) {
+ return;
+ }
+
+ try {
+ encodedGlobalUrlParam[paramName] = encode(value);
+ } catch {
+ // Just ignore parameters which unable to encode
+ }
+ });
+
+ return encodeQueryString(pickBy((value) => !isEmpty(value), encodedGlobalUrlParam));
+ }, [globalUrlParam]);
return globalQueryString;
};
@@ -100,29 +113,29 @@ export const useSyncGlobalQueryString = () => {
const previousGlobalUrlParams = usePrevious(globalUrlParam);
const replaceUrlParams = useReplaceUrlParams();
- // Url params that got deleted from GlobalUrlParams
- const unregisteredKeys = useMemo(
- () => difference(Object.keys(previousGlobalUrlParams ?? {}), Object.keys(globalUrlParam)),
- [previousGlobalUrlParams, globalUrlParam]
- );
-
useEffect(() => {
const linkInfo = getLinkInfo(pageName) ?? { skipUrlState: true };
- const params = Object.entries(globalUrlParam).map(([key, value]) => ({
- key,
- value: linkInfo.skipUrlState ? null : value,
- }));
+ const paramsToUpdate = { ...globalUrlParam };
+
+ if (linkInfo.skipUrlState) {
+ Object.keys(paramsToUpdate).forEach((key) => {
+ paramsToUpdate[key] = null;
+ });
+ }
+
+ // Url params that got deleted from GlobalUrlParams
+ const unregisteredKeys = difference(
+ Object.keys(previousGlobalUrlParams ?? {}),
+ Object.keys(globalUrlParam)
+ );
// Delete unregistered Url params
unregisteredKeys.forEach((key) => {
- params.push({
- key,
- value: null,
- });
+ paramsToUpdate[key] = null;
});
- if (params.length > 0) {
- replaceUrlParams(params);
+ if (Object.keys(paramsToUpdate).length > 0) {
+ replaceUrlParams(paramsToUpdate);
}
- }, [globalUrlParam, pageName, unregisteredKeys, replaceUrlParams]);
+ }, [previousGlobalUrlParams, globalUrlParam, pageName, replaceUrlParams]);
};
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/__mocks__/mock_rules_table_persistent_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/__mocks__/mock_rules_table_persistent_state.ts
index 36c452b648853..2b5d6750e91fd 100644
--- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/__mocks__/mock_rules_table_persistent_state.ts
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/__mocks__/mock_rules_table_persistent_state.ts
@@ -19,9 +19,7 @@ export function mockRulesTablePersistedState({
urlState: RulesTableUrlSavedState | null;
storageState: RulesTableStorageSavedState | null;
}): void {
- (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(
- jest.fn().mockReturnValue({ decodedParam: urlState })
- );
+ (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(jest.fn().mockReturnValue(urlState));
(useKibana as jest.Mock).mockReturnValue({
services: { sessionStorage: { get: jest.fn().mockReturnValue(storageState) } },
});
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_initialize_rules_table_saved_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_initialize_rules_table_saved_state.ts
index b33908a3706b2..82ca541f8b9d5 100644
--- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_initialize_rules_table_saved_state.ts
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_initialize_rules_table_saved_state.ts
@@ -62,7 +62,7 @@ export function useInitializeRulesTableSavedState(): void {
} = useKibana();
useEffect(() => {
- const { decodedParam: urlState } = getUrlParam();
+ const urlState = getUrlParam();
const storageState = readStorageState(sessionStorage);
if (!urlState && !storageState) {
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.test.tsx
index afb6b462d8ed4..6d3484791a3af 100644
--- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.test.tsx
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.test.tsx
@@ -55,12 +55,9 @@ describe('useSyncRulesTableSavedState', () => {
renderHook(() => useSyncRulesTableSavedState());
- expect(replaceUrlParams).toHaveBeenCalledWith([
- {
- key: URL_PARAM_KEY.rulesTable,
- value: expectedUrlState,
- },
- ]);
+ expect(replaceUrlParams).toHaveBeenCalledWith({
+ [URL_PARAM_KEY.rulesTable]: expectedUrlState,
+ });
};
const expectStateToSyncWithStorage = (
@@ -96,7 +93,7 @@ describe('useSyncRulesTableSavedState', () => {
renderHook(() => useSyncRulesTableSavedState());
- expect(replaceUrlParams).toHaveBeenCalledWith([{ key: URL_PARAM_KEY.rulesTable, value: null }]);
+ expect(replaceUrlParams).toHaveBeenCalledWith({ [URL_PARAM_KEY.rulesTable]: null });
expect(setStorage).not.toHaveBeenCalled();
expect(removeStorage).toHaveBeenCalledWith(RULES_TABLE_STATE_STORAGE_KEY);
});
@@ -136,9 +133,7 @@ describe('useSyncRulesTableSavedState', () => {
renderHook(() => useSyncRulesTableSavedState());
- expect(replaceUrlParams).toHaveBeenCalledWith([
- { key: URL_PARAM_KEY.rulesTable, value: expectedUrlState },
- ]);
+ expect(replaceUrlParams).toHaveBeenCalledWith({ [URL_PARAM_KEY.rulesTable]: expectedUrlState });
expect(setStorage).toHaveBeenCalledWith(RULES_TABLE_STATE_STORAGE_KEY, expectedStorageState);
});
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.ts
index 97ee8e6f98115..b4c1b7fe2fff2 100644
--- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.ts
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_sync_rules_table_saved_state.ts
@@ -6,10 +6,7 @@
*/
import { useEffect } from 'react';
-import {
- encodeRisonUrlState,
- useReplaceUrlParams,
-} from '../../../../../common/utils/global_query_string/helpers';
+import { useReplaceUrlParams } from '../../../../../common/utils/global_query_string/helpers';
import { useKibana } from '../../../../../common/lib/kibana';
import { URL_PARAM_KEY } from '../../../../../common/hooks/use_url_state';
import { RULES_TABLE_STATE_STORAGE_KEY } from '../constants';
@@ -76,7 +73,7 @@ export function useSyncRulesTableSavedState(): void {
const hasStorageStateToSave = Object.keys(storageStateToSave).length > 0;
if (!hasUrlStateToSave) {
- replaceUrlParams([{ key: URL_PARAM_KEY.rulesTable, value: null }]);
+ replaceUrlParams({ [URL_PARAM_KEY.rulesTable]: null });
}
if (!hasStorageStateToSave) {
@@ -87,9 +84,7 @@ export function useSyncRulesTableSavedState(): void {
return;
}
- replaceUrlParams([
- { key: URL_PARAM_KEY.rulesTable, value: encodeRisonUrlState(urlStateToSave) },
- ]);
+ replaceUrlParams({ [URL_PARAM_KEY.rulesTable]: urlStateToSave });
sessionStorage.set(RULES_TABLE_STATE_STORAGE_KEY, storageStateToSave);
}, [replaceUrlParams, sessionStorage, state]);
}
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/osquery/osquery_investigation_guide_panel.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/osquery/osquery_investigation_guide_panel.tsx
new file mode 100644
index 0000000000000..697605dbc5e5a
--- /dev/null
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/osquery/osquery_investigation_guide_panel.tsx
@@ -0,0 +1,65 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiPanel, EuiText } from '@elastic/eui';
+import { FormattedMessage } from '@kbn/i18n-react';
+import React, { useCallback, useState } from 'react';
+
+interface OsqueryInvestigationGuidePanelProps {
+ onClick: () => void;
+}
+
+const panelCss = {
+ marginBottom: '16px',
+};
+const flexGroupCss = { padding: `0 24px` };
+
+export const OsqueryInvestigationGuidePanel = React.memo(
+ ({ onClick }) => {
+ const [hideInvestigationGuideSuggestion, setHideInvestigationGuideSuggestion] = useState(false);
+
+ const handleClick = useCallback(() => {
+ onClick();
+ setHideInvestigationGuideSuggestion(true);
+ }, [onClick]);
+
+ if (hideInvestigationGuideSuggestion) {
+ return null;
+ }
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+);
+
+OsqueryInvestigationGuidePanel.displayName = 'OsqueryInvestigationGuidePanel';
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.test.tsx
index 0b4c33892d569..05c886564e878 100644
--- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.test.tsx
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.test.tsx
@@ -15,6 +15,29 @@ import type { ArrayItem } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_
import { Form, useForm } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib';
import { getMockTheme } from '../../common/lib/kibana/kibana_react.mock';
+jest.mock('react-router-dom', () => ({
+ ...jest.requireActual('react-router-dom'), // use actual for all non-hook parts
+ useParams: () => ({
+ detailName: 'testId',
+ }),
+}));
+jest.mock('../../common/lib/kibana', () => {
+ const original = jest.requireActual('../../common/lib/kibana');
+ return {
+ ...original,
+ useToasts: jest.fn().mockReturnValue({
+ addError: jest.fn(),
+ addSuccess: jest.fn(),
+ addWarning: jest.fn(),
+ remove: jest.fn(),
+ }),
+ };
+});
+
+import * as rules from '../rule_management/logic/use_rule';
+// @ts-expect-error we don't really care about thr useRule return value
+jest.spyOn(rules, 'useRule').mockReturnValue({});
+
const renderWithContext = (Element: React.ReactElement) => {
const mockTheme = getMockTheme({ eui: { euiColorLightestShade: '#F5F7FA' } });
@@ -38,7 +61,8 @@ describe('ResponseActionsForm', () => {
const { getByTestId, queryByTestId } = renderWithContext();
expect(getByTestId('response-actions-form'));
expect(getByTestId('response-actions-header'));
- expect(getByTestId('response-actions-list'));
+ expect(getByTestId('response-actions-wrapper'));
+ expect(queryByTestId('response-actions-list'));
expect(queryByTestId('response-actions-list-item-0')).toEqual(null);
});
it('renders list of elements', async () => {
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx
index aa3c36d9079b6..38dc69f25af51 100644
--- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_form.tsx
@@ -10,9 +10,9 @@ import { EuiCallOut, EuiSpacer } from '@elastic/eui';
import { map, reduce, upperFirst } from 'lodash';
import ReactMarkdown from 'react-markdown';
import { css } from '@emotion/react';
+import { ResponseActionsWrapper } from './response_actions_wrapper';
import { FORM_ERRORS_TITLE } from '../../detections/components/rules/rule_actions_field/translations';
import { ResponseActionsHeader } from './response_actions_header';
-import { ResponseActionsList } from './response_actions_list';
import type { ArrayItem, FormHook } from '../../shared_imports';
import { useSupportedResponseActionTypes } from './use_supported_response_action_types';
@@ -44,7 +44,7 @@ export const ResponseActionsForm = ({
}
return (
- void;
- addItem: () => void;
- supportedResponseActionTypes: ResponseActionType[];
}
const GhostFormField = () => <>>;
-export const ResponseActionsList = React.memo(
- ({ items, removeItem, supportedResponseActionTypes, addItem }: ResponseActionsListProps) => {
- const actionTypeIdRef = useRef(null);
- const updateActionTypeId = useCallback((id) => {
- actionTypeIdRef.current = id;
- }, []);
-
- const context = useFormContext();
- const renderButton = useMemo(() => {
- return (
-
- );
- }, [addItem, updateActionTypeId, supportedResponseActionTypes]);
-
- useEffect(() => {
- if (actionTypeIdRef.current) {
- const index = items.length - 1;
- const path = `responseActions[${index}].actionTypeId`;
- context.setFieldValue(path, actionTypeIdRef.current);
- actionTypeIdRef.current = null;
- }
- }, [context, items.length]);
-
- return (
-
- {items.map((actionItem, index) => {
- return (
-
-
-
-
-
-
- );
- })}
-
- {renderButton}
-
- );
- }
-);
+export const ResponseActionsList = React.memo(({ items, removeItem }) => {
+ const { detailName: ruleId } = useParams<{ detailName: string }>();
+ const { data: rule } = useRule(ruleId);
+
+ const osqueryNoteQueries = useMemo(
+ () => (rule?.note ? getOsqueryQueriesFromNote(rule.note) : []),
+ [rule?.note]
+ );
+
+ const context = useFormContext();
+ const [formData] = useFormData();
+
+ const handleInvestigationGuideClick = useCallback(() => {
+ const values = getResponseActionsFromNote(osqueryNoteQueries, formData.responseActions);
+ context.updateFieldValues(values);
+ }, [context, formData?.responseActions, osqueryNoteQueries]);
+
+ return (
+
+ {items.map((actionItem, index) => {
+ return (
+
+
+
+
+
+
+ );
+ })}
+
+ {osqueryNoteQueries.length ? (
+
+ ) : null}
+
+ );
+});
ResponseActionsList.displayName = 'ResponseActionsList';
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_wrapper.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_wrapper.tsx
new file mode 100644
index 0000000000000..39f036a1b3322
--- /dev/null
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_actions_wrapper.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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React, { useCallback, useEffect, useRef, useMemo } from 'react';
+
+import { ResponseActionsList } from './response_actions_list';
+import type { ResponseActionType } from './get_supported_response_actions';
+import { ResponseActionAddButton } from './response_action_add_button';
+import type { ArrayItem } from '../../shared_imports';
+import { useFormContext } from '../../shared_imports';
+
+interface ResponseActionsWrapperProps {
+ items: ArrayItem[];
+ removeItem: (id: number) => void;
+ addItem: () => void;
+ supportedResponseActionTypes: ResponseActionType[];
+}
+
+export const ResponseActionsWrapper = React.memo(
+ ({ items, removeItem, supportedResponseActionTypes, addItem }) => {
+ const actionTypeIdRef = useRef(null);
+ const updateActionTypeId = useCallback((id) => {
+ actionTypeIdRef.current = id;
+ }, []);
+
+ const context = useFormContext();
+
+ const renderButton = useMemo(() => {
+ return (
+
+ );
+ }, [addItem, updateActionTypeId, supportedResponseActionTypes]);
+
+ useEffect(() => {
+ if (actionTypeIdRef.current) {
+ const index = items.length - 1;
+ const path = `responseActions[${index}].actionTypeId`;
+ context.setFieldValue(path, actionTypeIdRef.current);
+ actionTypeIdRef.current = null;
+ }
+ }, [context, items.length]);
+
+ return (
+
+
+ {renderButton}
+
+ );
+ }
+);
+
+ResponseActionsWrapper.displayName = 'ResponseActionsWrapper';
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.test.ts
new file mode 100644
index 0000000000000..0842cce48bdef
--- /dev/null
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.test.ts
@@ -0,0 +1,89 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { getOsqueryQueriesFromNote } from './utils';
+
+describe('getOsqueryQueriesFromNote', () => {
+ it('should transform investigation guide note into osquery queries', () => {
+ const note =
+ '!{osquery{"query":"SELECT * FROM processes where pid = {{ process.pid }};","label":"Get processes","ecs_mapping":{"process.pid":{"field":"pid"},"process.name":{"field":"name"},"process.executable":{"field":"path"},"process.args":{"field":"cmdline"},"process.working_directory":{"field":"cwd"},"user.id":{"field":"uid"},"group.id":{"field":"gid"},"process.parent.pid":{"field":"parent"},"process.pgid":{"field":"pgroup"}}}}\n\n!{osquery{"query":"select * from users;","label":"Get users"}}';
+ const queries = getOsqueryQueriesFromNote(note);
+ const expectedQueries = [
+ {
+ type: 'osquery',
+ configuration: {
+ query: 'SELECT * FROM processes where pid = {{ process.pid }};',
+ label: 'Get processes',
+ ecs_mapping: {
+ 'process.pid': {
+ field: 'pid',
+ },
+ 'process.name': {
+ field: 'name',
+ },
+ 'process.executable': {
+ field: 'path',
+ },
+ 'process.args': {
+ field: 'cmdline',
+ },
+ 'process.working_directory': {
+ field: 'cwd',
+ },
+ 'user.id': {
+ field: 'uid',
+ },
+ 'group.id': {
+ field: 'gid',
+ },
+ 'process.parent.pid': {
+ field: 'parent',
+ },
+ 'process.pgid': {
+ field: 'pgroup',
+ },
+ },
+ },
+ position: {
+ start: {
+ line: 1,
+ column: 1,
+ offset: 0,
+ },
+ end: {
+ line: 1,
+ column: 423,
+ offset: 422,
+ },
+ indent: [],
+ },
+ },
+ {
+ type: 'osquery',
+ configuration: {
+ query: 'select * from users;',
+ label: 'Get users',
+ },
+ position: {
+ start: {
+ line: 3,
+ column: 1,
+ offset: 424,
+ },
+ end: {
+ line: 3,
+ column: 63,
+ offset: 486,
+ },
+ indent: [],
+ },
+ },
+ ];
+
+ expect(queries).toEqual(expectedQueries);
+ });
+});
diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx
new file mode 100644
index 0000000000000..21beb2bf43a42
--- /dev/null
+++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx
@@ -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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import unified from 'unified';
+import markdown from 'remark-parse';
+import { filter, reduce } from 'lodash';
+
+import type { ECSMapping } from '@kbn/osquery-io-ts-types';
+import type { RuleResponseAction } from '../../../common/detection_engine/rule_response_actions/schemas';
+import { RESPONSE_ACTION_TYPES } from '../../../common/detection_engine/rule_response_actions/schemas';
+import { OsqueryParser } from '../../common/components/markdown_editor/plugins/osquery/parser';
+
+interface OsqueryNoteQuery {
+ configuration: {
+ label: string;
+ query: string;
+ ecs_mapping: ECSMapping;
+ };
+}
+
+export const getOsqueryQueriesFromNote = (note: string): OsqueryNoteQuery[] => {
+ const parsedAlertInvestigationGuide = unified()
+ .use([[markdown, {}], OsqueryParser])
+ .parse(note);
+ return filter(parsedAlertInvestigationGuide?.children as object, ['type', 'osquery']);
+};
+
+export const getResponseActionsFromNote = (
+ osqueryQueries: OsqueryNoteQuery[],
+ defaultResponseActions: RuleResponseAction[] = []
+) => {
+ return reduce(
+ osqueryQueries,
+ (acc: { responseActions: RuleResponseAction[] }, { configuration }: OsqueryNoteQuery) => {
+ const responseActionPath = 'responseActions';
+ acc[responseActionPath].push({
+ actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY,
+ params: {
+ savedQueryId: undefined,
+ packId: undefined,
+ queries: undefined,
+ query: configuration.query,
+ ecsMapping: configuration.ecs_mapping,
+ },
+ });
+
+ return acc;
+ },
+ { responseActions: defaultResponseActions }
+ );
+};
diff --git a/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx b/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx
index 00dbe210e7026..dc26a0b98499a 100644
--- a/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx
+++ b/x-pack/plugins/security_solution/public/detections/components/osquery/osquery_flyout.tsx
@@ -5,9 +5,10 @@
* 2.0.
*/
-import React from 'react';
+import React, { useCallback } from 'react';
import styled from 'styled-components';
import { EuiFlyout, EuiFlyoutFooter, EuiFlyoutBody, EuiFlyoutHeader, EuiTitle } from '@elastic/eui';
+import { useQueryClient } from '@tanstack/react-query';
import type { Ecs } from '../../../../common/ecs';
import { useKibana } from '../../../common/lib/kibana';
import { OsqueryEventDetailsFooter } from './osquery_flyout_footer';
@@ -19,11 +20,19 @@ const OsqueryActionWrapper = styled.div`
export interface OsqueryFlyoutProps {
agentId?: string;
- defaultValues?: {};
+ defaultValues?: {
+ alertIds?: string[];
+ query?: string;
+ ecs_mapping?: { [key: string]: {} };
+ queryField?: boolean;
+ };
onClose: () => void;
ecsData?: Ecs;
}
+// Make sure we keep this and ACTIONS_QUERY_KEY in use_all_live_queries.ts in sync.
+const ACTIONS_QUERY_KEY = 'actions';
+
const OsqueryFlyoutComponent: React.FC = ({
agentId,
defaultValues,
@@ -33,6 +42,13 @@ const OsqueryFlyoutComponent: React.FC = ({
const {
services: { osquery },
} = useKibana();
+ const queryClient = useQueryClient();
+
+ const invalidateQueries = useCallback(() => {
+ queryClient.invalidateQueries({
+ queryKey: [ACTIONS_QUERY_KEY, { alertId: defaultValues?.alertIds?.[0] }],
+ });
+ }, [defaultValues?.alertIds, queryClient]);
if (osquery?.OsqueryAction) {
return (
@@ -54,6 +70,7 @@ const OsqueryFlyoutComponent: React.FC = ({
formType="steps"
defaultValues={defaultValues}
ecsData={ecsData}
+ onSuccess={invalidateQueries}
/>
diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts
index 1ed56a518662a..475563a0518b0 100644
--- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts
+++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.test.ts
@@ -100,9 +100,7 @@ describe('useRuleFromTimeline', () => {
jest.clearAllMocks();
appToastsMock = useAppToastsMock.create();
(useAppToasts as jest.Mock).mockReturnValue(appToastsMock);
- (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => ({
- decodedParam: timelineId,
- }));
+ (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => timelineId);
(resolveTimeline as jest.Mock).mockResolvedValue(selectedTimeline);
});
@@ -139,9 +137,7 @@ describe('useRuleFromTimeline', () => {
});
});
it('if no timeline id in URL, loading: false and query not set', async () => {
- (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => ({
- decodedParam: undefined,
- }));
+ (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => undefined);
const { result } = renderHook(() => useRuleFromTimeline(setRuleQuery));
expect(result.current.loading).toEqual(false);
@@ -227,9 +223,7 @@ describe('useRuleFromTimeline', () => {
});
it('Sets rule from timeline query via callback', async () => {
- (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => ({
- decodedParam: undefined,
- }));
+ (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => undefined);
const { result } = renderHook(() => useRuleFromTimeline(setRuleQuery));
expect(result.current.loading).toEqual(false);
await act(async () => {
@@ -280,9 +274,7 @@ describe('useRuleFromTimeline', () => {
});
it('Handles error when query is malformed', async () => {
- (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => ({
- decodedParam: undefined,
- }));
+ (useGetInitialUrlParamValue as jest.Mock).mockReturnValue(() => undefined);
const { result } = renderHook(() => useRuleFromTimeline(setRuleQuery));
expect(result.current.loading).toEqual(false);
const tl = {
diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx
index e77fe4e92b7a3..f9793020b6f20 100644
--- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx
+++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/use_rule_from_timeline.tsx
@@ -181,9 +181,7 @@ export const useRuleFromTimeline = (setRuleQuery: SetRuleQuery): RuleFromTimelin
// start handle set rule from timeline id
const getInitialUrlParamValue = useGetInitialUrlParamValue(RULE_FROM_TIMELINE_URL_PARAM);
- const { decodedParam: timelineIdFromUrl } = useMemo(getInitialUrlParamValue, [
- getInitialUrlParamValue,
- ]);
+ const timelineIdFromUrl = useMemo(getInitialUrlParamValue, [getInitialUrlParamValue]);
const getTimelineById = useCallback(
(timelineId: string) => {
diff --git a/x-pack/plugins/security_solution/public/management/cypress.config.ts b/x-pack/plugins/security_solution/public/management/cypress.config.ts
index 0509fbf8cffdc..6ff919ea7effe 100644
--- a/x-pack/plugins/security_solution/public/management/cypress.config.ts
+++ b/x-pack/plugins/security_solution/public/management/cypress.config.ts
@@ -35,8 +35,6 @@ export default defineCypressConfig({
baseUrl: 'http://localhost:5620',
supportFile: 'public/management/cypress/support/e2e.ts',
specPattern: 'public/management/cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
- experimentalSessionAndOrigin: true,
- testIsolation: 'on',
experimentalRunAllSpecs: true,
},
});
diff --git a/x-pack/plugins/security_solution/public/management/links.test.ts b/x-pack/plugins/security_solution/public/management/links.test.ts
index b505c8a36e743..a00d03fff59d6 100644
--- a/x-pack/plugins/security_solution/public/management/links.test.ts
+++ b/x-pack/plugins/security_solution/public/management/links.test.ts
@@ -154,7 +154,6 @@ describe('links', () => {
expect.anything(),
expect.anything(),
expect.anything(),
- expect.anything(),
false
);
expect(filteredLinks).toEqual(getLinksWithout(SecurityPageName.hostIsolationExceptions));
@@ -196,7 +195,6 @@ describe('links', () => {
expect.anything(),
expect.anything(),
expect.anything(),
- expect.anything(),
true
);
expect(filteredLinks).toEqual(getLinksWithout());
diff --git a/x-pack/plugins/security_solution/public/management/links.ts b/x-pack/plugins/security_solution/public/management/links.ts
index 49432df00aaf3..1db32eae3d5f2 100644
--- a/x-pack/plugins/security_solution/public/management/links.ts
+++ b/x-pack/plugins/security_solution/public/management/links.ts
@@ -13,7 +13,6 @@ import { checkArtifactHasData } from './services/exceptions_list/check_artifact_
import {
calculateEndpointAuthz,
getEndpointAuthzInitialState,
- calculatePermissionsFromCapabilities,
} from '../../common/endpoint/service/authz';
import {
BLOCKLIST_PATH,
@@ -243,7 +242,6 @@ export const getManagementFilteredLinks = async (
const { endpointRbacEnabled, endpointRbacV1Enabled } = ExperimentalFeaturesService.get();
const isEndpointRbacEnabled = endpointRbacEnabled || endpointRbacV1Enabled;
- const endpointPermissions = calculatePermissionsFromCapabilities(core.application.capabilities);
const linksToExclude: SecurityPageName[] = [];
@@ -287,7 +285,6 @@ export const getManagementFilteredLinks = async (
fleetAuthz,
currentUser.roles,
isEndpointRbacEnabled,
- endpointPermissions,
hasHostIsolationExceptions
)
: getEndpointAuthzInitialState();
diff --git a/x-pack/plugins/security_solution/public/management/mocks/fleet_mocks.ts b/x-pack/plugins/security_solution/public/management/mocks/fleet_mocks.ts
index 1e5cc83bb0bcc..9a5274e2cdfab 100644
--- a/x-pack/plugins/security_solution/public/management/mocks/fleet_mocks.ts
+++ b/x-pack/plugins/security_solution/public/management/mocks/fleet_mocks.ts
@@ -12,6 +12,7 @@ import type {
GetAgentStatusResponse,
GetPackagePoliciesResponse,
GetPackagesResponse,
+ GetInfoResponse,
BulkGetPackagePoliciesResponse,
BulkGetAgentPoliciesResponse,
} from '@kbn/fleet-plugin/common';
@@ -139,6 +140,24 @@ export const fleetGetPackageListHttpMock =
},
]);
+export type FleetGetPackageHttpMockInterface = ResponseProvidersInterface<{
+ endpointPackage: () => GetInfoResponse;
+}>;
+export const fleetGetPackageHttpMock = httpHandlerMockFactory([
+ {
+ id: 'endpointPackage',
+ method: 'get',
+ path: EPM_API_ROUTES.INFO_PATTERN_DEPRECATED,
+ handler() {
+ const generator = new EndpointDocGenerator('seed');
+
+ return {
+ item: generator.generateEpmPackageInfo(),
+ };
+ },
+ },
+]);
+
export type FleetGetEndpointPackagePolicyHttpMockInterface = ResponseProvidersInterface<{
endpointPackagePolicy: () => GetPolicyResponse;
}>;
diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/mocks.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/mocks.ts
index 7dfd55664acc7..39bd07d071974 100644
--- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/mocks.ts
+++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/mocks.ts
@@ -32,12 +32,14 @@ import type {
FleetGetAgentStatusHttpMockInterface,
FleetGetCheckPermissionsInterface,
FleetGetEndpointPackagePolicyHttpMockInterface,
+ FleetGetPackageHttpMockInterface,
FleetGetPackageListHttpMockInterface,
} from '../../mocks';
import {
fleetGetAgentPolicyListHttpMock,
fleetGetCheckPermissionsHttpMock,
fleetGetPackageListHttpMock,
+ fleetGetPackageHttpMock,
fleetBulkGetPackagePoliciesListHttpMock,
fleetBulkGetAgentPolicyListHttpMock,
fleetGetPackagePoliciesListHttpMock,
@@ -125,6 +127,7 @@ export const transformsHttpMocks = httpHandlerMockFactory([
fleetGetPackageListHttpMock,
+ fleetGetPackageHttpMock,
fleetGetAgentPolicyListHttpMock,
fleetBulkGetPackagePoliciesListHttpMock,
fleetBulkGetAgentPolicyListHttpMock,
diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts
index 79c21360c3ab2..8d7e6b0c4d10b 100644
--- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts
+++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts
@@ -6,7 +6,7 @@
*/
import type { DataViewBase } from '@kbn/es-query';
-import type { GetPackagesResponse } from '@kbn/fleet-plugin/common';
+import type { GetInfoResponse } from '@kbn/fleet-plugin/common';
import type {
HostInfo,
Immutable,
@@ -60,7 +60,7 @@ export interface EndpointState {
/** the selected policy ID in the onboarding flow */
selectedPolicyId?: string;
/** Endpoint package info */
- endpointPackageInfo: AsyncResourceState;
+ endpointPackageInfo: AsyncResourceState;
/** Tracks the list of policies IDs used in Host metadata that may no longer exist */
nonExistingPolicies: PolicyIds['packagePolicy'];
/** List of Package Policy Ids mapped to an associated Fleet Parent Agent Policy Id*/
diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/store/test_mock_utils.ts b/x-pack/plugins/security_solution/public/management/pages/policy/store/test_mock_utils.ts
index 880afeb347361..e1a56417548f4 100644
--- a/x-pack/plugins/security_solution/public/management/pages/policy/store/test_mock_utils.ts
+++ b/x-pack/plugins/security_solution/public/management/pages/policy/store/test_mock_utils.ts
@@ -5,7 +5,8 @@
* 2.0.
*/
-import type { GetPackagesResponse } from '@kbn/fleet-plugin/common';
+import type { GetPackagesResponse, GetInfoResponse } from '@kbn/fleet-plugin/common';
+import { epmRouteService } from '@kbn/fleet-plugin/common';
import {
INGEST_API_EPM_PACKAGES,
INGEST_API_PACKAGE_POLICIES,
@@ -63,5 +64,10 @@ export const policyListApiPathHandlers = (totalPolicies: number = 1) => {
items: [generator.generateEpmPackage()],
};
},
+ [epmRouteService.getInfoPath('endpoint')]: (): GetInfoResponse => {
+ return {
+ item: generator.generateEpmPackageInfo(),
+ };
+ },
};
};
diff --git a/x-pack/plugins/security_solution/public/management/services/policies/hooks.test.ts b/x-pack/plugins/security_solution/public/management/services/policies/hooks.test.ts
index 8bd8c4c72efea..e2aa5e8cd8c93 100644
--- a/x-pack/plugins/security_solution/public/management/services/policies/hooks.test.ts
+++ b/x-pack/plugins/security_solution/public/management/services/policies/hooks.test.ts
@@ -7,7 +7,7 @@
import type { UseQueryOptions } from '@tanstack/react-query';
import type { IHttpFetchError, HttpSetup } from '@kbn/core-http-browser';
-import type { GetPackagesResponse } from '@kbn/fleet-plugin/common';
+import type { GetInfoResponse } from '@kbn/fleet-plugin/common';
import { useGetEndpointSecurityPackage } from './hooks';
import { getFakeHttpService, renderQuery } from '../../hooks/test_utils';
import { EndpointDocGenerator } from '../../../../common/endpoint/generate_data';
@@ -19,7 +19,7 @@ describe('useGetEndpointSecurityPackage hook', () => {
let result: ReturnType;
let fakeHttpServices: jest.Mocked;
let generator: EndpointDocGenerator;
- let options: UseQueryOptions | undefined;
+ let options: UseQueryOptions | undefined;
beforeEach(() => {
fakeHttpServices = getFakeHttpService();
@@ -33,7 +33,7 @@ describe('useGetEndpointSecurityPackage hook', () => {
it('retrieves the endpoint package', async () => {
const apiResponse = {
- items: [generator.generateEpmPackage()],
+ item: [generator.generateEpmPackageInfo()],
};
fakeHttpServices.get.mockResolvedValue(apiResponse);
const onSuccessMock: jest.Mock = jest.fn();
@@ -47,7 +47,7 @@ describe('useGetEndpointSecurityPackage hook', () => {
() => useGetEndpointSecurityPackage({ customQueryOptions: options }),
'isSuccess'
);
- expect(result.data).toBe(apiResponse.items[0]);
+ expect(result.data).toBe(apiResponse.item);
expect(fakeHttpServices.get).toHaveBeenCalledTimes(1);
expect(onSuccessMock).toHaveBeenCalledTimes(1);
});
diff --git a/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts b/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts
index 6254120445e43..a979d79db5663 100644
--- a/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts
+++ b/x-pack/plugins/security_solution/public/management/services/policies/hooks.ts
@@ -7,7 +7,7 @@
import type { QueryObserverResult, UseQueryOptions } from '@tanstack/react-query';
import { useQuery } from '@tanstack/react-query';
import type { IHttpFetchError } from '@kbn/core-http-browser';
-import type { GetPackagesResponse } from '@kbn/fleet-plugin/common';
+import type { GetInfoResponse } from '@kbn/fleet-plugin/common';
import { useHttp } from '../../../common/lib/kibana';
import { MANAGEMENT_DEFAULT_PAGE_SIZE } from '../../common/constants';
import { sendGetEndpointSecurityPackage } from './ingest';
@@ -52,10 +52,10 @@ export function useGetEndpointSpecificPolicies(
export function useGetEndpointSecurityPackage({
customQueryOptions,
}: {
- customQueryOptions?: UseQueryOptions;
-}): QueryObserverResult {
+ customQueryOptions?: UseQueryOptions;
+}): QueryObserverResult {
const http = useHttp();
- return useQuery(
+ return useQuery(
['endpointPackageVersion', customQueryOptions],
() => {
return sendGetEndpointSecurityPackage(http);
diff --git a/x-pack/plugins/security_solution/public/management/services/policies/ingest.test.ts b/x-pack/plugins/security_solution/public/management/services/policies/ingest.test.ts
index d29eedd06f765..a3644ce691478 100644
--- a/x-pack/plugins/security_solution/public/management/services/policies/ingest.test.ts
+++ b/x-pack/plugins/security_solution/public/management/services/policies/ingest.test.ts
@@ -5,13 +5,9 @@
* 2.0.
*/
-import {
- INGEST_API_EPM_PACKAGES,
- sendGetPackagePolicy,
- sendGetEndpointSecurityPackage,
-} from './ingest';
+import { sendGetPackagePolicy, sendGetEndpointSecurityPackage } from './ingest';
import { httpServiceMock } from '@kbn/core/public/mocks';
-import { EPM_API_ROUTES, PACKAGE_POLICY_API_ROOT } from '@kbn/fleet-plugin/common';
+import { PACKAGE_POLICY_API_ROOT, epmRouteService } from '@kbn/fleet-plugin/common';
import { policyListApiPathHandlers } from '../../pages/policy/store/test_mock_utils';
describe('ingest service', () => {
@@ -37,14 +33,11 @@ describe('ingest service', () => {
});
describe('sendGetEndpointSecurityPackage()', () => {
- it('should query EPM with category=security', async () => {
- http.get.mockReturnValue(
- Promise.resolve(policyListApiPathHandlers()[INGEST_API_EPM_PACKAGES]())
- );
+ it('should query for endpoint package', async () => {
+ const path = epmRouteService.getInfoPath('endpoint');
+ http.get.mockReturnValue(Promise.resolve(policyListApiPathHandlers()[path]()));
await sendGetEndpointSecurityPackage(http);
- expect(http.get).toHaveBeenCalledWith(`${EPM_API_ROUTES.LIST_PATTERN}`, {
- query: { category: 'security' },
- });
+ expect(http.get).toHaveBeenCalledWith(path);
});
it('should throw if package is not found', async () => {
diff --git a/x-pack/plugins/security_solution/public/management/services/policies/ingest.ts b/x-pack/plugins/security_solution/public/management/services/policies/ingest.ts
index adfdcf3ca62a0..c6240c934ec8f 100644
--- a/x-pack/plugins/security_solution/public/management/services/policies/ingest.ts
+++ b/x-pack/plugins/security_solution/public/management/services/policies/ingest.ts
@@ -8,11 +8,13 @@
import type { HttpFetchOptions, HttpStart } from '@kbn/core/public';
import type {
GetAgentStatusResponse,
- GetPackagesResponse,
GetAgentPoliciesRequest,
GetAgentPoliciesResponse,
GetPackagePoliciesResponse,
+ GetInfoResponse,
} from '@kbn/fleet-plugin/common';
+import { epmRouteService } from '@kbn/fleet-plugin/common';
+
import type { NewPolicyData } from '../../../../common/endpoint/types';
import type { GetPolicyResponse, UpdatePolicyResponse } from '../../pages/policy/types';
@@ -135,12 +137,10 @@ export const sendGetFleetAgentStatusForPolicy = (
*/
export const sendGetEndpointSecurityPackage = async (
http: HttpStart
-): Promise => {
- const options = { query: { category: 'security' } };
- const securityPackages = await http.get(INGEST_API_EPM_PACKAGES, options);
- const endpointPackageInfo = securityPackages.items.find(
- (epmPackage) => epmPackage.name === 'endpoint'
- );
+): Promise