From 2bfbddbd1dde19492965ec8f496fda3f4f66e1da Mon Sep 17 00:00:00 2001 From: christineweng <18648970+christineweng@users.noreply.github.com> Date: Mon, 13 Feb 2023 16:25:24 -0600 Subject: [PATCH 01/31] [Security Solution]Alert page chart selection default to summary (#151073) ## Summary This PR addresses a visual bug mentioned in https://github.com/elastic/kibana/issues/151044. Before implementing the `Summary` option, the charts defaults to `Trend`, this PR changes the default to `Summary` when `isAlertsPageCharts` is enabled. **Before** ![image](https://user-images.githubusercontent.com/18648970/218564106-fba96942-cb11-4f57-97ba-a06afccd2d15.png) **After** ![image](https://user-images.githubusercontent.com/18648970/218564231-3103f39f-7d33-43f9-b435-92470491b7ef.png) ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### Note for desk testing Desk testing can be tricky because the selection is stored in local storage. The fastest way I found to test is to use a browser you don't use often (like Safari), clear all browsing data, cache etc., and then open kibana. --- .../alerts_local_storage/index.test.tsx | 27 ++++++++++++++++++- .../alerts_local_storage/index.tsx | 6 +++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.test.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.test.tsx index 1787955fb1b5..8145fcf69870 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.test.tsx @@ -10,13 +10,18 @@ import React from 'react'; import { useAlertsLocalStorage } from '.'; import { TestProviders } from '../../../../../common/mock'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; + +const mockUseIsExperimentalFeatureEnabled = useIsExperimentalFeatureEnabled as jest.Mock; +jest.mock('../../../../../common/hooks/use_experimental_features'); describe('useAlertsLocalStorage', () => { const wrapper = ({ children }: { children: React.ReactNode }) => ( {children} ); - test('it returns the expected defaults', () => { + test('it returns the expected defaults when isAlertsPageCharts is disabled', () => { + mockUseIsExperimentalFeatureEnabled.mockReturnValue(false); const { result } = renderHook(() => useAlertsLocalStorage(), { wrapper }); const defaults = Object.fromEntries( @@ -34,4 +39,24 @@ describe('useAlertsLocalStorage', () => { trendChartStackBy: 'kibana.alert.rule.name', }); }); + + test('it returns the expected defaults when isAlertsPageCharts is enaabled', () => { + mockUseIsExperimentalFeatureEnabled.mockReturnValue(true); + const { result } = renderHook(() => useAlertsLocalStorage(), { wrapper }); + + const defaults = Object.fromEntries( + Object.entries(result.current).filter((x) => typeof x[1] !== 'function') + ); + + expect(defaults).toEqual({ + alertViewSelection: 'charts', // default to the summary + countTableStackBy0: 'kibana.alert.rule.name', + countTableStackBy1: 'host.name', + groupBySelection: 'host.name', + isTreemapPanelExpanded: true, + riskChartStackBy0: 'kibana.alert.rule.name', + riskChartStackBy1: 'host.name', + trendChartStackBy: 'kibana.alert.rule.name', + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.tsx index 4af424c0ead8..468edd14575c 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.tsx @@ -30,12 +30,14 @@ import { } from '../../../../components/alerts_kpis/common/config'; import type { AlertsSettings } from './types'; import type { AlertViewSelection } from '../chart_select/helpers'; -import { TREND_ID } from '../chart_select/helpers'; +import { CHARTS_ID, TREND_ID } from '../chart_select/helpers'; import type { GroupBySelection } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/types'; +import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; export const useAlertsLocalStorage = (): AlertsSettings => { + const isAlertsPageChartsEnabled = useIsExperimentalFeatureEnabled('alertsPageChartsEnabled'); const [alertViewSelection, setAlertViewSelection] = useLocalStorage({ - defaultValue: TREND_ID, + defaultValue: isAlertsPageChartsEnabled ? CHARTS_ID : TREND_ID, key: getSettingKey({ category: VIEW_CATEGORY, page: ALERTS_PAGE, From 9d7e1095365483ad9bc083829f3f291c478e7cf6 Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Mon, 13 Feb 2023 15:49:52 -0700 Subject: [PATCH 02/31] [maps] include vector tile layers in geoShapeAggLayersCount telemetry (#151072) While investigating https://github.com/elastic/kibana/issues/151064, I found a problem with IndexPatternStatsCollector where geo_shape aggregation usage with vector tile layers are not counted. Steps to view problem: * Download [world countries geojson](https://vector.maps.elastic.co/files/world_countries_v7.geo.json?elastic_tile_service_tos=agree&my_app_name=ems-landing-page&my_app_version=8.6.0&license=643c1faf-80fc-4ab0-9323-4d9bd11f4bbc) * use file upload to upload world countries into your Elastic stack * add a new cluster layer to your map. * Select world countries index * Select **Hexagons** * Click **Add layer** * Save map * Open borwser dev tools and switch to network tab * Open Kibana dev tools and run ``` POST kbn:api/telemetry/v2/clusters/_stats { "unencrypted": true } ``` * Copy response for `_stats` request. Search for `geoShapeAggLayersCount`. Notice how the value is zero but it should be one since you have one map using geo shape aggregation Screen Shot 2023-02-13 at 1 14 34 PM PR resolves the problem by removing layer type guard. The guard is error prone and easy to not update with new layer types. The guard does not provide any value, since the logic is really concerned with source types and the source type guards provide the correct protections. Steps to test: Follow steps above and verify `geoShapeAggLayersCount` is one --- .../index_pattern_stats_collector.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/x-pack/plugins/maps/server/maps_telemetry/index_pattern_stats/index_pattern_stats_collector.ts b/x-pack/plugins/maps/server/maps_telemetry/index_pattern_stats/index_pattern_stats_collector.ts index dcbc9c884275..2b8047cdaf41 100644 --- a/x-pack/plugins/maps/server/maps_telemetry/index_pattern_stats/index_pattern_stats_collector.ts +++ b/x-pack/plugins/maps/server/maps_telemetry/index_pattern_stats/index_pattern_stats_collector.ts @@ -9,7 +9,7 @@ import type { SavedObject } from '@kbn/core/server'; import { asyncForEach } from '@kbn/std'; import { KBN_FIELD_TYPES } from '@kbn/field-types'; import { DataViewsService } from '@kbn/data-views-plugin/common'; -import { LAYER_TYPE, SCALING_TYPES, SOURCE_TYPES } from '../../../common/constants'; +import { SCALING_TYPES, SOURCE_TYPES } from '../../../common/constants'; import { injectReferences } from '../../../common/migrations/references'; import { ESGeoGridSourceDescriptor, @@ -107,14 +107,6 @@ export class IndexPatternStatsCollector { return false; } - if ( - layer.type !== LAYER_TYPE.GEOJSON_VECTOR && - layer.type !== LAYER_TYPE.BLENDED_VECTOR && - layer.type !== LAYER_TYPE.HEATMAP - ) { - return false; - } - const sourceDescriptor = layer.sourceDescriptor; if (sourceDescriptor.type === SOURCE_TYPES.ES_GEO_GRID) { return await this._isFieldGeoShape( From 5e3056f4a0db5b28d87bcf4446a60539383db032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Gr=C3=A9au?= Date: Mon, 13 Feb 2023 17:50:05 -0500 Subject: [PATCH 03/31] Set commit msg when updating gitops repo to publish new image (#151083) ## Summary This update sets the commit message to push to the gitops repository when a new Kibana image is published. Also to align with the other services the `IMAGE_TAG` is prefixed by `git-` and uses a 12 characters short commit value. ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .buildkite/scripts/steps/artifacts/docker_image.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.buildkite/scripts/steps/artifacts/docker_image.sh b/.buildkite/scripts/steps/artifacts/docker_image.sh index badc8f4ea4e9..f263812932a2 100755 --- a/.buildkite/scripts/steps/artifacts/docker_image.sh +++ b/.buildkite/scripts/steps/artifacts/docker_image.sh @@ -6,8 +6,8 @@ set -euo pipefail source .buildkite/scripts/steps/artifacts/env.sh -GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:7} -KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana:$GIT_ABBREV_COMMIT" +GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12} +KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana:git-$GIT_ABBREV_COMMIT" echo "--- Verify manifest does not already exist" echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co @@ -82,16 +82,17 @@ if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]]; then cat << EOF | buildkite-agent pipeline upload steps: - trigger: k8s-gitops-update-image-tag - label: ":argo: Update image tag for deployment-api" + label: ":argo: Update image tag for Kibana" branches: main build: env: MODE: sed TARGET_FILE: kibana-controller.yaml - IMAGE_TAG: "$GIT_ABBREV_COMMIT" + IMAGE_TAG: "git-$GIT_ABBREV_COMMIT" SERVICE: kibana-controller NAMESPACE: kibana-ci IMAGE_NAME: kibana + COMMIT_MESSAGE: "gitops: update kibana tag to elastic/kibana@$BUILDKITE_COMMIT" EOF else From e8c18a121e8e5fda9fbea92ddf85937cbe816fde Mon Sep 17 00:00:00 2001 From: Ying Mao Date: Mon, 13 Feb 2023 18:31:02 -0500 Subject: [PATCH 04/31] [Response Ops][Alerting] Update alerts-as-data ILM policy name to be consistent between framework & rule registry (#150334) Resolves https://github.com/elastic/kibana/issues/150331 ## Summary In a previous [PR](https://github.com/elastic/kibana/pull/145581) we started installing an ILM policy for framework alerts as data when the `xpack.alerting.enableFrameworkAlerts` config flag is set to true. In that PR we used a different name than what is used by the rule registry even though the policy bodies were the same. In this PR, we are consolidating the naming of the two ILM policies so that we are only ever installing 1 policy. The `xpack.alerting.enableFrameworkAlerts` config is used to determine which plugin is responsible for installing the policy. When set to true, the alerting plugin installs the policy. When set the false, the rule registry installs the policy. This is an incremental step toward the alerting framework absorbing all of the resource installation functionality of the rule registry ## To Verify A few things to verify: 1. Verify that the alerting plugin installs the policy when `xpack.alerting.enableFrameworkAlerts=true` * Set `xpack.alerting.enableFrameworkAlerts: true` in your Kibana config * Start a fresh ES and Kibana instance * Verify that an ILM policy with name `.alerts-ilm-policy` is installed * Create a metric threshold rule that creates an alert * Verify that there is an index template called `.alerts-observability.metrics.alerts-default-index-template` that uses the `.alerts-ilm-policy` policy 2. Verify that the rule registry installs the policy when `xpack.alerting.enableFrameworkAlerts=false` * Set `xpack.alerting.enableFrameworkAlerts: false` in your Kibana config * Start a fresh ES and Kibana instance * Verify that an ILM policy with name `.alerts-ilm-policy` is installed * Create a metric threshold rule that creates an alert * Verify that there is an index template called `.alerts-observability.metrics.alerts-default-index-template` that uses the `.alerts-ilm-policy` policy 3. Verify that we can switch between configurations * Set `xpack.alerting.enableFrameworkAlerts: false` in your Kibana config * Start a fresh ES and Kibana instance * Verify that an ILM policy with name `.alerts-ilm-policy` is installed * Create a metric threshold rule that creates an alert * Verify that there is an index template called `.alerts-observability.metrics.alerts-default-index-template` that uses the `.alerts-ilm-policy` policy * Change `xpack.alerting.enableFrameworkAlerts: true` * Restart Kibana * Verify there are no errors, and the rule can still write alerts --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../alerts_service/alerts_service.test.ts | 8 ++-- .../server/alerts_service/alerts_service.ts | 17 +++++--- .../default_lifecycle_policy.ts | 4 +- x-pack/plugins/alerting/server/index.ts | 4 ++ x-pack/plugins/alerting/server/mocks.ts | 1 + x-pack/plugins/alerting/server/plugin.test.ts | 6 ++- x-pack/plugins/alerting/server/plugin.ts | 2 + x-pack/plugins/rule_registry/common/assets.ts | 1 - .../default_lifecycle_policy.ts | 24 ------------ x-pack/plugins/rule_registry/server/plugin.ts | 7 +++- .../resource_installer.test.ts | 39 ++++++++++++++++++- .../resource_installer.ts | 28 +++++++------ .../rule_data_plugin_service.test.ts | 4 ++ .../rule_data_plugin_service.ts | 2 + .../tests/alerting/group4/alerts_as_data.ts | 6 +-- .../tests/trial/get_summarized_alerts.ts | 1 + .../tests/trial/lifecycle_executor.ts | 1 + 17 files changed, 100 insertions(+), 55 deletions(-) delete mode 100644 x-pack/plugins/rule_registry/common/assets/lifecycle_policies/default_lifecycle_policy.ts diff --git a/x-pack/plugins/alerting/server/alerts_service/alerts_service.test.ts b/x-pack/plugins/alerting/server/alerts_service/alerts_service.test.ts index ba3623526591..82716f935c6b 100644 --- a/x-pack/plugins/alerting/server/alerts_service/alerts_service.test.ts +++ b/x-pack/plugins/alerting/server/alerts_service/alerts_service.test.ts @@ -72,7 +72,7 @@ const IlmPutBody = { }, }, }, - name: 'alerts-default-ilm-policy', + name: '.alerts-ilm-policy', }; const getIndexTemplatePutBody = (context?: string) => ({ @@ -88,7 +88,7 @@ const getIndexTemplatePutBody = (context?: string) => ({ auto_expand_replicas: '0-1', hidden: true, 'index.lifecycle': { - name: 'alerts-default-ilm-policy', + name: '.alerts-ilm-policy', rollover_alias: `.alerts-${context ? context : 'test'}-default`, }, 'index.mapping.total_fields.limit': 2500, @@ -165,7 +165,7 @@ describe('Alerts Service', () => { expect(alertsService.isInitialized()).toEqual(false); expect(logger.error).toHaveBeenCalledWith( - `Error installing ILM policy alerts-default-ilm-policy - fail` + `Error installing ILM policy .alerts-ilm-policy - fail` ); expect(clusterClient.ilm.putLifecycle).toHaveBeenCalled(); @@ -342,7 +342,7 @@ describe('Alerts Service', () => { auto_expand_replicas: '0-1', hidden: true, 'index.lifecycle': { - name: 'alerts-default-ilm-policy', + name: '.alerts-ilm-policy', rollover_alias: `.alerts-empty-default`, }, 'index.mapping.total_fields.limit': 2500, diff --git a/x-pack/plugins/alerting/server/alerts_service/alerts_service.ts b/x-pack/plugins/alerting/server/alerts_service/alerts_service.ts index 0742be50c4fa..08643caf862f 100644 --- a/x-pack/plugins/alerting/server/alerts_service/alerts_service.ts +++ b/x-pack/plugins/alerting/server/alerts_service/alerts_service.ts @@ -15,7 +15,10 @@ import { Logger, ElasticsearchClient } from '@kbn/core/server'; import { firstValueFrom, Observable } from 'rxjs'; import { FieldMap } from '../../common/alert_schema/field_maps/types'; import { alertFieldMap } from '../../common/alert_schema'; -import { ILM_POLICY_NAME, DEFAULT_ILM_POLICY } from './default_lifecycle_policy'; +import { + DEFAULT_ALERTS_ILM_POLICY_NAME, + DEFAULT_ALERTS_ILM_POLICY, +} from './default_lifecycle_policy'; import { getComponentTemplate, getComponentTemplateName, @@ -178,19 +181,21 @@ export class AlertsService implements IAlertsService { * Creates ILM policy if it doesn't already exist, updates it if it does */ private async createOrUpdateIlmPolicy(esClient: ElasticsearchClient) { - this.options.logger.info(`Installing ILM policy ${ILM_POLICY_NAME}`); + this.options.logger.info(`Installing ILM policy ${DEFAULT_ALERTS_ILM_POLICY_NAME}`); try { await retryTransientEsErrors( () => esClient.ilm.putLifecycle({ - name: ILM_POLICY_NAME, - body: DEFAULT_ILM_POLICY, + name: DEFAULT_ALERTS_ILM_POLICY_NAME, + body: DEFAULT_ALERTS_ILM_POLICY, }), { logger: this.options.logger } ); } catch (err) { - this.options.logger.error(`Error installing ILM policy ${ILM_POLICY_NAME} - ${err.message}`); + this.options.logger.error( + `Error installing ILM policy ${DEFAULT_ALERTS_ILM_POLICY_NAME} - ${err.message}` + ); throw err; } } @@ -236,7 +241,7 @@ export class AlertsService implements IAlertsService { auto_expand_replicas: '0-1', hidden: true, 'index.lifecycle': { - name: ILM_POLICY_NAME, + name: DEFAULT_ALERTS_ILM_POLICY_NAME, rollover_alias: indexPatterns.alias, }, 'index.mapping.total_fields.limit': TOTAL_FIELDS_LIMIT, diff --git a/x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts b/x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts index f5d11c6214ee..5e8c40cf6f6a 100644 --- a/x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts +++ b/x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts @@ -14,8 +14,8 @@ * This should be used by all alerts-as-data indices */ -export const ILM_POLICY_NAME = 'alerts-default-ilm-policy'; -export const DEFAULT_ILM_POLICY = { +export const DEFAULT_ALERTS_ILM_POLICY_NAME = '.alerts-ilm-policy'; +export const DEFAULT_ALERTS_ILM_POLICY = { policy: { _meta: { managed: true, diff --git a/x-pack/plugins/alerting/server/index.ts b/x-pack/plugins/alerting/server/index.ts index 8d42aa47091f..a13b06596f55 100644 --- a/x-pack/plugins/alerting/server/index.ts +++ b/x-pack/plugins/alerting/server/index.ts @@ -53,6 +53,10 @@ export { WriteOperations, AlertingAuthorizationEntity, } from './authorization'; +export { + DEFAULT_ALERTS_ILM_POLICY, + DEFAULT_ALERTS_ILM_POLICY_NAME, +} from './alerts_service/default_lifecycle_policy'; export const plugin = (initContext: PluginInitializerContext) => new AlertingPlugin(initContext); diff --git a/x-pack/plugins/alerting/server/mocks.ts b/x-pack/plugins/alerting/server/mocks.ts index d997b709c096..787ab3e9c856 100644 --- a/x-pack/plugins/alerting/server/mocks.ts +++ b/x-pack/plugins/alerting/server/mocks.ts @@ -30,6 +30,7 @@ const createSetupMock = () => { registerType: jest.fn(), getSecurityHealth: jest.fn(), getConfig: jest.fn(), + getFrameworkAlertsEnabled: jest.fn(), }; return mock; }; diff --git a/x-pack/plugins/alerting/server/plugin.test.ts b/x-pack/plugins/alerting/server/plugin.test.ts index 4e48c0db01ae..f0dd5ce64315 100644 --- a/x-pack/plugins/alerting/server/plugin.test.ts +++ b/x-pack/plugins/alerting/server/plugin.test.ts @@ -132,10 +132,12 @@ describe('Alerting Plugin', () => { plugin = new AlertingPlugin(context); // need await to test number of calls of setupMocks.status.set, because it is under async function which awaiting core.getStartServices() - await plugin.setup(setupMocks, mockPlugins); + const setupContract = await plugin.setup(setupMocks, mockPlugins); expect(AlertsService).toHaveBeenCalled(); expect(mockAlertService.initialize).toHaveBeenCalled(); + + expect(setupContract.getFrameworkAlertsEnabled()).toEqual(true); }); it(`exposes configured minimumScheduleInterval()`, async () => { @@ -150,6 +152,8 @@ describe('Alerting Plugin', () => { isUsingSecurity: false, minimumScheduleInterval: { value: '1m', enforce: false }, }); + + expect(setupContract.getFrameworkAlertsEnabled()).toEqual(false); }); describe('registerType()', () => { diff --git a/x-pack/plugins/alerting/server/plugin.ts b/x-pack/plugins/alerting/server/plugin.ts index 6070b5cee56f..414d4f4e01b9 100644 --- a/x-pack/plugins/alerting/server/plugin.ts +++ b/x-pack/plugins/alerting/server/plugin.ts @@ -126,6 +126,7 @@ export interface PluginSetupContract { ): void; getSecurityHealth: () => Promise; getConfig: () => AlertingRulesConfig; + getFrameworkAlertsEnabled: () => boolean; } export interface PluginStartContract { @@ -385,6 +386,7 @@ export class AlertingPlugin { isUsingSecurity: this.licenseState ? !!this.licenseState.getIsSecurityEnabled() : false, }; }, + getFrameworkAlertsEnabled: () => this.config.enableFrameworkAlerts, }; } diff --git a/x-pack/plugins/rule_registry/common/assets.ts b/x-pack/plugins/rule_registry/common/assets.ts index 1a5b14c605ea..a1df09df18a8 100644 --- a/x-pack/plugins/rule_registry/common/assets.ts +++ b/x-pack/plugins/rule_registry/common/assets.ts @@ -7,4 +7,3 @@ export const TECHNICAL_COMPONENT_TEMPLATE_NAME = `technical-mappings`; export const ECS_COMPONENT_TEMPLATE_NAME = `ecs-mappings`; -export const DEFAULT_ILM_POLICY_ID = 'ilm-policy'; diff --git a/x-pack/plugins/rule_registry/common/assets/lifecycle_policies/default_lifecycle_policy.ts b/x-pack/plugins/rule_registry/common/assets/lifecycle_policies/default_lifecycle_policy.ts deleted file mode 100644 index 449a425ad3aa..000000000000 --- a/x-pack/plugins/rule_registry/common/assets/lifecycle_policies/default_lifecycle_policy.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -export const defaultLifecyclePolicy = { - policy: { - _meta: { - managed: true, - }, - phases: { - hot: { - actions: { - rollover: { - max_age: '30d', - max_primary_shard_size: '50gb', - }, - }, - }, - }, - }, -}; diff --git a/x-pack/plugins/rule_registry/server/plugin.ts b/x-pack/plugins/rule_registry/server/plugin.ts index 68b2df122406..8b5c754e5b90 100644 --- a/x-pack/plugins/rule_registry/server/plugin.ts +++ b/x-pack/plugins/rule_registry/server/plugin.ts @@ -16,7 +16,10 @@ import type { IContextProvider, } from '@kbn/core/server'; -import type { PluginStartContract as AlertingStart } from '@kbn/alerting-plugin/server'; +import type { + PluginSetupContract as AlertingSetup, + PluginStartContract as AlertingStart, +} from '@kbn/alerting-plugin/server'; import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import type { SpacesPluginStart } from '@kbn/spaces-plugin/server'; import type { @@ -36,6 +39,7 @@ import { ruleRegistrySearchStrategyProvider, RULE_SEARCH_STRATEGY_NAME } from '. export interface RuleRegistryPluginSetupDependencies { security?: SecurityPluginSetup; data: DataPluginSetup; + alerting: AlertingSetup; } export interface RuleRegistryPluginStartDependencies { @@ -106,6 +110,7 @@ export class RuleRegistryPlugin const deps = await startDependencies; return deps.core.elasticsearch.client.asInternalUser; }, + areFrameworkAlertsEnabled: plugins.alerting.getFrameworkAlertsEnabled(), pluginStop$: this.pluginStop$, }); diff --git a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.test.ts b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.test.ts index d73b1898671b..b63fb2aae83d 100644 --- a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.test.ts +++ b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.test.ts @@ -14,7 +14,6 @@ import { Dataset } from './index_options'; import { IndexInfo } from './index_info'; import { elasticsearchServiceMock, ElasticsearchClientMock } from '@kbn/core/server/mocks'; import { - DEFAULT_ILM_POLICY_ID, ECS_COMPONENT_TEMPLATE_NAME, TECHNICAL_COMPONENT_TEMPLATE_NAME, } from '../../common/assets'; @@ -41,6 +40,7 @@ describe('resourceInstaller', () => { disabledRegistrationContexts: [], getResourceName: jest.fn(), getClusterClient, + areFrameworkAlertsEnabled: false, pluginStop$, }); installer.installCommonResources(); @@ -57,6 +57,7 @@ describe('resourceInstaller', () => { disabledRegistrationContexts: [], getResourceName: jest.fn(), getClusterClient, + areFrameworkAlertsEnabled: false, pluginStop$, }); const indexOptions = { @@ -83,7 +84,6 @@ describe('resourceInstaller', () => { const getClusterClient = jest.fn(() => Promise.resolve(mockClusterClient)); const getResourceNameMock = jest .fn() - .mockReturnValueOnce(DEFAULT_ILM_POLICY_ID) .mockReturnValueOnce(TECHNICAL_COMPONENT_TEMPLATE_NAME) .mockReturnValueOnce(ECS_COMPONENT_TEMPLATE_NAME); const installer = new ResourceInstaller({ @@ -92,6 +92,7 @@ describe('resourceInstaller', () => { disabledRegistrationContexts: [], getResourceName: getResourceNameMock, getClusterClient, + areFrameworkAlertsEnabled: false, pluginStop$, }); @@ -108,6 +109,38 @@ describe('resourceInstaller', () => { expect.objectContaining({ name: ECS_COMPONENT_TEMPLATE_NAME }) ); }); + + it('should install common resources when framework alerts are enabled', async () => { + const mockClusterClient = elasticsearchServiceMock.createElasticsearchClient(); + const getClusterClient = jest.fn(() => Promise.resolve(mockClusterClient)); + const getResourceNameMock = jest + .fn() + .mockReturnValueOnce(TECHNICAL_COMPONENT_TEMPLATE_NAME) + .mockReturnValueOnce(ECS_COMPONENT_TEMPLATE_NAME); + const installer = new ResourceInstaller({ + logger: loggerMock.create(), + isWriteEnabled: true, + disabledRegistrationContexts: [], + getResourceName: getResourceNameMock, + getClusterClient, + areFrameworkAlertsEnabled: true, + pluginStop$, + }); + + await installer.installCommonResources(); + + // ILM policy should be handled by framework + expect(mockClusterClient.ilm.putLifecycle).not.toHaveBeenCalled(); + expect(mockClusterClient.cluster.putComponentTemplate).toHaveBeenCalledTimes(2); + expect(mockClusterClient.cluster.putComponentTemplate).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ name: TECHNICAL_COMPONENT_TEMPLATE_NAME }) + ); + expect(mockClusterClient.cluster.putComponentTemplate).toHaveBeenNthCalledWith( + 2, + expect.objectContaining({ name: ECS_COMPONENT_TEMPLATE_NAME }) + ); + }); it('should install index level resources', async () => { const mockClusterClient = elasticsearchServiceMock.createElasticsearchClient(); const getClusterClient = jest.fn(() => Promise.resolve(mockClusterClient)); @@ -117,6 +150,7 @@ describe('resourceInstaller', () => { disabledRegistrationContexts: [], getResourceName: jest.fn(), getClusterClient, + areFrameworkAlertsEnabled: false, pluginStop$, }); @@ -188,6 +222,7 @@ describe('resourceInstaller', () => { disabledRegistrationContexts: [], getResourceName: jest.fn(), getClusterClient: async () => mockClusterClient, + areFrameworkAlertsEnabled: false, pluginStop$, }; const indexOptions = { diff --git a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.ts b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.ts index 30b867d11444..6af288e57a4a 100644 --- a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.ts +++ b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/resource_installer.ts @@ -13,13 +13,15 @@ import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import type { PublicMethodsOf } from '@kbn/utility-types'; import { - DEFAULT_ILM_POLICY_ID, + DEFAULT_ALERTS_ILM_POLICY, + DEFAULT_ALERTS_ILM_POLICY_NAME, +} from '@kbn/alerting-plugin/server'; +import { ECS_COMPONENT_TEMPLATE_NAME, TECHNICAL_COMPONENT_TEMPLATE_NAME, } from '../../common/assets'; import { technicalComponentTemplate } from '../../common/assets/component_templates/technical_component_template'; import { ecsComponentTemplate } from '../../common/assets/component_templates/ecs_component_template'; -import { defaultLifecyclePolicy } from '../../common/assets/lifecycle_policies/default_lifecycle_policy'; import type { IndexInfo } from './index_info'; @@ -31,6 +33,7 @@ interface ConstructorOptions { logger: Logger; isWriteEnabled: boolean; disabledRegistrationContexts: string[]; + areFrameworkAlertsEnabled: boolean; pluginStop$: Observable; } @@ -95,16 +98,21 @@ export class ResourceInstaller { */ public async installCommonResources(): Promise { await this.installWithTimeout('common resources shared between all indices', async () => { - const { getResourceName, logger } = this.options; + const { getResourceName, logger, areFrameworkAlertsEnabled } = this.options; try { // We can install them in parallel await Promise.all([ - this.createOrUpdateLifecyclePolicy({ - name: getResourceName(DEFAULT_ILM_POLICY_ID), - body: defaultLifecyclePolicy, - }), - + // Install ILM policy only if framework alerts are not enabled + // If framework alerts are enabled, the alerting framework will install this ILM policy + ...(areFrameworkAlertsEnabled + ? [] + : [ + this.createOrUpdateLifecyclePolicy({ + name: DEFAULT_ALERTS_ILM_POLICY_NAME, + body: DEFAULT_ALERTS_ILM_POLICY, + }), + ]), this.createOrUpdateComponentTemplate({ name: getResourceName(TECHNICAL_COMPONENT_TEMPLATE_NAME), body: technicalComponentTemplate, @@ -326,9 +334,7 @@ export class ResourceInstaller { const ownComponentNames = componentTemplates.map((template) => indexInfo.getComponentTemplateName(template.name) ); - const ilmPolicyName = ilmPolicy - ? indexInfo.getIlmPolicyName() - : getResourceName(DEFAULT_ILM_POLICY_ID); + const ilmPolicyName = ilmPolicy ? indexInfo.getIlmPolicyName() : DEFAULT_ALERTS_ILM_POLICY_NAME; const indexMetadata: estypes.Metadata = { ...indexTemplate._meta, diff --git a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.test.ts b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.test.ts index 997137877bc9..1022ea038bc3 100644 --- a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.test.ts +++ b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.test.ts @@ -43,6 +43,7 @@ describe('ruleDataPluginService', () => { isWriteEnabled: true, disabledRegistrationContexts: ['observability.logs'], isWriterCacheEnabled: true, + areFrameworkAlertsEnabled: false, pluginStop$, }); expect(ruleDataService.isRegistrationContextDisabled('observability.logs')).toBe(true); @@ -59,6 +60,7 @@ describe('ruleDataPluginService', () => { isWriteEnabled: true, disabledRegistrationContexts: ['observability.logs'], isWriterCacheEnabled: true, + areFrameworkAlertsEnabled: false, pluginStop$, }); expect(ruleDataService.isRegistrationContextDisabled('observability.apm')).toBe(false); @@ -77,6 +79,7 @@ describe('ruleDataPluginService', () => { isWriteEnabled: true, disabledRegistrationContexts: ['observability.logs'], isWriterCacheEnabled: true, + areFrameworkAlertsEnabled: false, pluginStop$, }); @@ -96,6 +99,7 @@ describe('ruleDataPluginService', () => { isWriteEnabled: true, disabledRegistrationContexts: ['observability.logs'], isWriterCacheEnabled: true, + areFrameworkAlertsEnabled: false, pluginStop$, }); const indexOptions = { diff --git a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts index 459e4bacf9a6..b3f54a1d3794 100644 --- a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts +++ b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts @@ -91,6 +91,7 @@ interface ConstructorOptions { isWriteEnabled: boolean; isWriterCacheEnabled: boolean; disabledRegistrationContexts: string[]; + areFrameworkAlertsEnabled: boolean; pluginStop$: Observable; } @@ -112,6 +113,7 @@ export class RuleDataService implements IRuleDataService { logger: options.logger, disabledRegistrationContexts: options.disabledRegistrationContexts, isWriteEnabled: options.isWriteEnabled, + areFrameworkAlertsEnabled: options.areFrameworkAlertsEnabled, pluginStop$: options.pluginStop$, }); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data.ts index 49ec03fc6d8d..3ac2fdb93add 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/alerts_as_data.ts @@ -17,7 +17,7 @@ export default function createAlertsAsDataTest({ getService }: FtrProviderContex describe('alerts as data', () => { it('should install common alerts as data resources on startup', async () => { - const ilmPolicyName = 'alerts-default-ilm-policy'; + const ilmPolicyName = '.alerts-ilm-policy'; const componentTemplateName = 'alerts-common-component-template'; const commonIlmPolicy = await es.ilm.getLifecycle({ @@ -123,7 +123,7 @@ export default function createAlertsAsDataTest({ getService }: FtrProviderContex expect(contextIndexTemplate.index_template.template!.settings).to.eql({ index: { lifecycle: { - name: 'alerts-default-ilm-policy', + name: '.alerts-ilm-policy', rollover_alias: '.alerts-test.always-firing-default', }, mapping: { @@ -155,7 +155,7 @@ export default function createAlertsAsDataTest({ getService }: FtrProviderContex }); expect(contextIndex[indexName].settings?.index?.lifecycle).to.eql({ - name: 'alerts-default-ilm-policy', + name: '.alerts-ilm-policy', rollover_alias: '.alerts-test.always-firing-default', }); diff --git a/x-pack/test/rule_registry/spaces_only/tests/trial/get_summarized_alerts.ts b/x-pack/test/rule_registry/spaces_only/tests/trial/get_summarized_alerts.ts index b62d744503fc..02765aa8c2a7 100644 --- a/x-pack/test/rule_registry/spaces_only/tests/trial/get_summarized_alerts.ts +++ b/x-pack/test/rule_registry/spaces_only/tests/trial/get_summarized_alerts.ts @@ -80,6 +80,7 @@ export default function createGetSummarizedAlertsTest({ getService }: FtrProvide isWriteEnabled: true, isWriterCacheEnabled: false, disabledRegistrationContexts: [] as string[], + areFrameworkAlertsEnabled: false, pluginStop$, }); diff --git a/x-pack/test/rule_registry/spaces_only/tests/trial/lifecycle_executor.ts b/x-pack/test/rule_registry/spaces_only/tests/trial/lifecycle_executor.ts index 2fbba4478e92..dc5752417bfb 100644 --- a/x-pack/test/rule_registry/spaces_only/tests/trial/lifecycle_executor.ts +++ b/x-pack/test/rule_registry/spaces_only/tests/trial/lifecycle_executor.ts @@ -74,6 +74,7 @@ export default function createLifecycleExecutorApiTest({ getService }: FtrProvid isWriteEnabled: true, isWriterCacheEnabled: false, disabledRegistrationContexts: [] as string[], + areFrameworkAlertsEnabled: false, pluginStop$, }); From e8994b831ef773b133f9d6f34c0726e1840fe315 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 Feb 2023 17:58:54 -0600 Subject: [PATCH 05/31] Update dependency @babel/parser to ^7.20.15 (main) (#150825) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@babel/parser](https://babel.dev/docs/en/next/babel-parser) ([source](https://togithub.com/babel/babel)) | [`^7.20.13` -> `^7.20.15`](https://renovatebot.com/diffs/npm/@babel%2fparser/7.20.13/7.20.15) | [![age](https://badges.renovateapi.com/packages/npm/@babel%2fparser/7.20.15/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@babel%2fparser/7.20.15/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@babel%2fparser/7.20.15/compatibility-slim/7.20.13)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@babel%2fparser/7.20.15/confidence-slim/7.20.13)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
babel/babel ### [`v7.20.15`](https://togithub.com/babel/babel/releases/tag/v7.20.15) [Compare Source](https://togithub.com/babel/babel/compare/v7.20.13...v7.20.15) #### v7.20.15 (2023-02-02) ##### :eyeglasses: Spec Compliance - `babel-parser` - [#​15391](https://togithub.com/babel/babel/pull/15391) Disallow await as bound name in using declaration ([@​JLHwung](https://togithub.com/JLHwung)) - `babel-generator`, `babel-parser`, `babel-plugin-proposal-export-namespace-from` - [#​15385](https://togithub.com/babel/babel/pull/15385) Disallows specifiers after export \* as ns ([@​JLHwung](https://togithub.com/JLHwung)) ##### :bug: Bug Fix - `babel-plugin-transform-block-scoping` - [#​15398](https://togithub.com/babel/babel/pull/15398) fix: Loop was converted wrong ([@​liuxingbaoyu](https://togithub.com/liuxingbaoyu)) - `babel-parser` - [#​15377](https://togithub.com/babel/babel/pull/15377) fix: `new (foo?.bar)()` incorrectly throws exception `OptionalChainingNoNew` ([@​liuxingbaoyu](https://togithub.com/liuxingbaoyu)) ##### Committers: 2 - Huáng Jùnliàng ([@​JLHwung](https://togithub.com/JLHwung)) - [@​liuxingbaoyu](https://togithub.com/liuxingbaoyu)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/elastic/kibana). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Budzenski --- package.json | 2 +- yarn.lock | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 4f4ce4cdf4c6..a3e5a3b5f6e3 100644 --- a/package.json +++ b/package.json @@ -948,7 +948,7 @@ "@babel/eslint-plugin": "^7.19.1", "@babel/generator": "^7.20.14", "@babel/helper-plugin-utils": "^7.20.2", - "@babel/parser": "^7.20.13", + "@babel/parser": "^7.20.15", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-export-namespace-from": "^7.18.9", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", diff --git a/yarn.lock b/yarn.lock index 9be012444338..405c3ad9bf18 100644 --- a/yarn.lock +++ b/yarn.lock @@ -389,10 +389,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.10.3", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.20.13", "@babel/parser@^7.20.7": - version "7.20.13" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.13.tgz#ddf1eb5a813588d2fb1692b70c6fce75b945c088" - integrity sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw== +"@babel/parser@^7.1.0", "@babel/parser@^7.10.3", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.20.13", "@babel/parser@^7.20.15", "@babel/parser@^7.20.7": + version "7.20.15" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.15.tgz#eec9f36d8eaf0948bb88c87a46784b5ee9fd0c89" + integrity sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -25337,14 +25337,7 @@ rimraf@3.0.2, rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - -rimraf@^2.6.2: +rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== From c2476d240e5a5a979af215057bb7f2bd40b9f6fe Mon Sep 17 00:00:00 2001 From: "Quynh Nguyen (Quinn)" <43350163+qn895@users.noreply.github.com> Date: Mon, 13 Feb 2023 20:43:46 -0600 Subject: [PATCH 06/31] [ML] Fixes incorrect feature importance visualization for Data Frame Analytics classification (#150816) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../components/data_grid/data_grid.tsx | 2 +- .../decision_path_classification.tsx | 11 +- .../use_classification_path_data.test.tsx | 325 ++++++++++++------ .../use_classification_path_data.tsx | 4 + .../results_view_content.ts | 7 + .../services/ml/common_data_grid.ts | 15 + .../ml/data_frame_analytics_results.ts | 4 + 7 files changed, 268 insertions(+), 100 deletions(-) diff --git a/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx b/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx index b2fceb58edfa..95a7955ec9a3 100644 --- a/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx +++ b/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx @@ -124,7 +124,7 @@ export const DataGrid: FC = memo( analysisType === ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION ) { if (schema === 'featureImportance') { - const row = data[rowIndex]; + const row = data[rowIndex - pagination.pageIndex * pagination.pageSize]; if (!row) return
; // if resultsField for some reason is not available then use ml const mlResultsField = resultsField ?? DEFAULT_RESULTS_FIELD; diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/decision_path_classification.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/decision_path_classification.tsx index d10755b32d7a..45f19ad7b76f 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/decision_path_classification.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/decision_path_classification.tsx @@ -21,6 +21,7 @@ import type { } from '../../../../../../../common/types/feature_importance'; import { DecisionPathChart } from './decision_path_chart'; import { MissingDecisionPathCallout } from './missing_decision_path_callout'; +import { TopClass } from '../../../../../../../common/types/feature_importance'; interface ClassificationDecisionPathProps { predictedValue: string | boolean; @@ -42,12 +43,20 @@ export const ClassificationDecisionPath: FC = ( const [currentClass, setCurrentClass] = useState( getStringBasedClassName(topClasses[0].class_name) ); + const selectedClass = topClasses.find( + (t) => getStringBasedClassName(t.class_name) === getStringBasedClassName(currentClass) + ) as TopClass; + const predictedProbabilityForCurrentClass = selectedClass + ? selectedClass.class_probability + : undefined; + const { decisionPathData } = useDecisionPathData({ baseline, featureImportance, predictedValue: currentClass, - predictedProbability, + predictedProbability: predictedProbabilityForCurrentClass, }); + const options = useMemo(() => { const predictionValueStr = getStringBasedClassName(predictedValue); diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/use_classification_path_data.test.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/use_classification_path_data.test.tsx index 70c62294cae0..53ae0daff084 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/use_classification_path_data.test.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/use_classification_path_data.test.tsx @@ -10,9 +10,10 @@ import { buildRegressionDecisionPathData, } from './use_classification_path_data'; import type { FeatureImportance } from '../../../../../../../common/types/feature_importance'; +import { roundToDecimalPlace } from '../../../../../formatters/round_to_decimal_place'; describe('buildClassificationDecisionPathData()', () => { - test('should return correct prediction probability for binary classification', () => { + test('returns correct prediction probability for binary classification', () => { const expectedResults = [ { className: 'yes', probability: 0.28564605871278403 }, { className: 'no', probability: 1 - 0.28564605871278403 }, @@ -71,139 +72,170 @@ describe('buildClassificationDecisionPathData()', () => { expect(result).toHaveLength(featureNames.length); expect(featureNames).toContain(result![0][0]); expect(result![0]).toHaveLength(3); + // Top shown result should equal expected probability expect(result![0][2]).toEqual(probability); + // Make sure probability (result[0]) is always less than 1 + expect(result?.every((r) => r[2] <= 1)).toEqual(true); } }); - test('should return correct prediction probability for multiclass classification', () => { - const expectedResults = [{ className: 1, probability: 0.3551929251919077 }]; + test('returns correct prediction probability & accounts for "other" residual probability for binary classification (boolean)', () => { + const expectedResults = [ + { + class_score: 0.1940750725280285, + class_probability: 0.9034630008985833, + // boolean class name should be converted to string 'True'/'False' + class_name: false, + }, + { + class_score: 0.09653699910141661, + class_probability: 0.09653699910141661, + class_name: true, + }, + ]; const baselinesData = { classes: [ { - class_name: 0, - baseline: 0.1845274610161167, + class_name: false, + baseline: 2.418789842558993, }, { - class_name: 1, - baseline: 0.1331813646384272, - }, - { - class_name: 2, - baseline: 0.1603600353308416, + class_name: true, + baseline: -2.418789842558993, }, ], }; const featureImportanceData: FeatureImportance[] = [ { - feature_name: 'AvgTicketPrice', + feature_name: 'DestWeather', classes: [ - { importance: 0.34413545865934353, class_name: 0 }, - { importance: 0.4781222770431657, class_name: 1 }, - { importance: 0.31847802693610877, class_name: 2 }, + { + importance: 0.5555510565764721, + // string class names 'true'/'false' should be converted to string 'True'/'False' + class_name: 'false', + }, + { + importance: -0.5555510565764721, + class_name: 'true', + }, ], }, { - feature_name: 'Cancelled', + feature_name: 'OriginWeather', classes: [ - { importance: 0.0002822015809810556, class_name: 0 }, - { importance: -0.0033337017702255597, class_name: 1 }, - { importance: 0.0020744732163668696, class_name: 2 }, + { + importance: 0.31139248413258486, + class_name: 'false', + }, + { + importance: -0.31139248413258486, + class_name: 'true', + }, ], }, { - feature_name: 'DistanceKilometers', + feature_name: 'OriginAirportID', classes: [ - { importance: 0.028472232240294063, class_name: 0 }, - { importance: 0.04119838646840895, class_name: 1 }, - { importance: 0.0662663363977551, class_name: 2 }, + { + importance: 0.2895740692218651, + class_name: 'false', + }, + { + importance: -0.2895740692218651, + class_name: 'true', + }, + ], + }, + { + feature_name: 'DestAirportID', + classes: [ + { + importance: 0.1297619730881764, + class_name: 'false', + }, + { + importance: -0.1297619730881764, + class_name: 'true', + }, + ], + }, + { + feature_name: 'hour_of_day', + classes: [ + { + importance: -0.10596307272294636, + class_name: 'false', + }, + { + importance: 0.10596307272294636, + class_name: 'true', + }, ], }, ]; const featureNames = featureImportanceData.map((d) => d.feature_name); - for (const { className, probability } of expectedResults) { + for (const { class_name: className, class_probability: probability } of expectedResults) { const result = buildClassificationDecisionPathData({ baselines: baselinesData.classes, featureImportance: featureImportanceData, currentClass: className, + predictedProbability: probability, }); + expect(result).toBeDefined(); - expect(result).toHaveLength(featureNames.length); + // Should add an 'other' field + expect(result).toHaveLength(featureNames.length + 1); expect(featureNames).toContain(result![0][0]); expect(result![0]).toHaveLength(3); + // Top shown result should equal expected probability expect(result![0][2]).toEqual(probability); + // Make sure probability (result[0]) is always less than 1 + expect(result?.every((r) => r[2] <= 1)).toEqual(true); } }); -}); -describe('buildRegressionDecisionPathData()', () => { - test('should return correct decision path', () => { - const predictedValue = 0.008000000000000005; - const baseline = 0.01570748450465414; - const featureImportanceData: FeatureImportance[] = [ - { feature_name: 'g1', importance: -0.01171550599313763 }, - { feature_name: 'tau4', importance: -0.01190799086101345 }, - ]; - const expectedFeatures = [ - ...featureImportanceData.map((d) => d.feature_name), - 'other', - 'baseline', - ]; - const result = buildRegressionDecisionPathData({ - baseline, - featureImportance: featureImportanceData, - predictedValue: 0.008, - }); - expect(result).toBeDefined(); - expect(result).toHaveLength(expectedFeatures.length); - expect(result![0]).toHaveLength(3); - expect(result![0][2]).toEqual(predictedValue); - }); - - test('buildClassificationDecisionPathData() should return correct prediction probability for binary classification', () => { - const expectedResults = [ - { className: 'yes', probability: 0.28564605871278403 }, - { className: 'no', probability: 1 - 0.28564605871278403 }, - ]; + test('returns correct prediction probability for multiclass classification', () => { + const expectedResults = [{ className: 1, probability: 0.3551929251919077 }]; const baselinesData = { classes: [ { - class_name: 'no', - baseline: 3.228256450715653, + class_name: 0, + baseline: 0.1845274610161167, }, { - class_name: 'yes', - baseline: -3.228256450715653, + class_name: 1, + baseline: 0.1331813646384272, + }, + { + class_name: 2, + baseline: 0.1603600353308416, }, ], }; const featureImportanceData: FeatureImportance[] = [ { - feature_name: 'duration', - classes: [ - { importance: 2.9932577725789455, class_name: 'yes' }, - { importance: -2.9932577725789455, class_name: 'no' }, - ], - }, - { - feature_name: 'job', + feature_name: 'AvgTicketPrice', classes: [ - { importance: -0.8023759403354496, class_name: 'yes' }, - { importance: 0.8023759403354496, class_name: 'no' }, + { importance: 0.34413545865934353, class_name: 0 }, + { importance: 0.4781222770431657, class_name: 1 }, + { importance: 0.31847802693610877, class_name: 2 }, ], }, { - feature_name: 'poutcome', + feature_name: 'Cancelled', classes: [ - { importance: 0.43319318839128396, class_name: 'yes' }, - { importance: -0.43319318839128396, class_name: 'no' }, + { importance: 0.0002822015809810556, class_name: 0 }, + { importance: -0.0033337017702255597, class_name: 1 }, + { importance: 0.0020744732163668696, class_name: 2 }, ], }, { - feature_name: 'housing', + feature_name: 'DistanceKilometers', classes: [ - { importance: -0.3124436380550531, class_name: 'yes' }, - { importance: 0.3124436380550531, class_name: 'no' }, + { importance: 0.028472232240294063, class_name: 0 }, + { importance: 0.04119838646840895, class_name: 1 }, + { importance: 0.0662663363977551, class_name: 2 }, ], }, ]; @@ -219,67 +251,164 @@ describe('buildRegressionDecisionPathData()', () => { expect(result).toHaveLength(featureNames.length); expect(featureNames).toContain(result![0][0]); expect(result![0]).toHaveLength(3); + // Top shown result should equal expected probability expect(result![0][2]).toEqual(probability); + // Make sure probability (result[0]) is always less than 1 + expect(result?.every((r) => r[2] <= 1)).toEqual(true); } }); - test('buildClassificationDecisionPathData() should return correct prediction probability for multiclass classification', () => { - const expectedResults = [{ className: 1, probability: 0.3551929251919077 }]; + test('returns correct prediction probability for multiclass classification with "other"', () => { + const expectedResults = [ + { + class_score: 0.2653792729907741, + class_probability: 0.995901728296372, + class_name: 'Iris-setosa', + }, + { + class_score: 0.002499393297421585, + class_probability: 0.002499393297421585, + class_name: 'Iris-versicolor', + }, + { + class_score: 0.0015399995493349922, + class_probability: 0.0015988784062062893, + class_name: 'Iris-virginica', + }, + ]; const baselinesData = { classes: [ { - class_name: 0, - baseline: 0.1845274610161167, + class_name: 'Iris-setosa', + baseline: -0.25145851617108084, }, { - class_name: 1, - baseline: 0.1331813646384272, + class_name: 'Iris-versicolor', + baseline: 0.46014588263093625, }, { - class_name: 2, - baseline: 0.1603600353308416, + class_name: 'Iris-virginica', + baseline: -0.20868736645984168, }, ], }; const featureImportanceData: FeatureImportance[] = [ { - feature_name: 'AvgTicketPrice', + feature_name: 'petal_length', classes: [ - { importance: 0.34413545865934353, class_name: 0 }, - { importance: 0.4781222770431657, class_name: 1 }, - { importance: 0.31847802693610877, class_name: 2 }, + { + importance: 2.4826228835057464, + class_name: 'Iris-setosa', + }, + { + importance: -0.5861671310095675, + class_name: 'Iris-versicolor', + }, + { + importance: -1.8964557524961734, + class_name: 'Iris-virginica', + }, ], }, { - feature_name: 'Cancelled', + feature_name: 'petal_width', classes: [ - { importance: 0.0002822015809810556, class_name: 0 }, - { importance: -0.0033337017702255597, class_name: 1 }, - { importance: 0.0020744732163668696, class_name: 2 }, + { + importance: 1.4568820749127243, + class_name: 'Iris-setosa', + }, + { + importance: -0.9431104132306853, + class_name: 'Iris-versicolor', + }, + { + importance: -0.5137716616820365, + class_name: 'Iris-virginica', + }, ], }, { - feature_name: 'DistanceKilometers', + feature_name: 'sepal_width', classes: [ - { importance: 0.028472232240294063, class_name: 0 }, - { importance: 0.04119838646840895, class_name: 1 }, - { importance: 0.0662663363977551, class_name: 2 }, + { + importance: 0.3508206289936615, + class_name: 'Iris-setosa', + }, + { + importance: 0.023074695691663594, + class_name: 'Iris-versicolor', + }, + { + importance: -0.3738953246853245, + class_name: 'Iris-virginica', + }, + ], + }, + { + feature_name: 'sepal_length', + classes: [ + { + importance: -0.027900272907686156, + class_name: 'Iris-setosa', + }, + { + importance: 0.13376776004064217, + class_name: 'Iris-versicolor', + }, + { + importance: -0.1058674871329558, + class_name: 'Iris-virginica', + }, ], }, ]; const featureNames = featureImportanceData.map((d) => d.feature_name); - for (const { className, probability } of expectedResults) { + for (const { + class_name: className, + class_probability: classPredictedProbability, + } of expectedResults) { const result = buildClassificationDecisionPathData({ baselines: baselinesData.classes, featureImportance: featureImportanceData, currentClass: className, + predictedProbability: classPredictedProbability, }); expect(result).toBeDefined(); - expect(result).toHaveLength(featureNames.length); + // Result accounts for 'other' or residual importance + expect(result).toHaveLength(featureNames.length + 1); expect(featureNames).toContain(result![0][0]); expect(result![0]).toHaveLength(3); - expect(result![0][2]).toEqual(probability); + expect(roundToDecimalPlace(result![0][2], 3)).toEqual( + roundToDecimalPlace(classPredictedProbability, 3) + ); + // Make sure probability (result[0]) is always less than 1 + expect(result?.every((r) => r[2] <= 1)).toEqual(true); } }); }); +describe('buildRegressionDecisionPathData()', () => { + test('returns correct decision path', () => { + const predictedValue = 0.008000000000000005; + const baseline = 0.01570748450465414; + const featureImportanceData: FeatureImportance[] = [ + { feature_name: 'g1', importance: -0.01171550599313763 }, + { feature_name: 'tau4', importance: -0.01190799086101345 }, + ]; + const expectedFeatures = [ + ...featureImportanceData.map((d) => d.feature_name), + 'other', + 'baseline', + ]; + + const result = buildRegressionDecisionPathData({ + baseline, + featureImportance: featureImportanceData, + predictedValue: 0.008, + }); + expect(result).toBeDefined(); + expect(result).toHaveLength(expectedFeatures.length); + expect(result![0]).toHaveLength(3); + expect(result![0][2]).toEqual(predictedValue); + }); +}); diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/use_classification_path_data.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/use_classification_path_data.tsx index ad9f0b3d0bb7..65954578db6e 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/use_classification_path_data.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/feature_importance/use_classification_path_data.tsx @@ -58,6 +58,10 @@ export const getStringBasedClassName = (v: string | boolean | undefined | number if (typeof v === 'boolean') { return v ? 'True' : 'False'; } + + if (v === 'true') return 'True'; + if (v === 'false') return 'False'; + if (typeof v === 'number') { return v.toString(); } diff --git a/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts b/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts index f3e6eac011b7..308ec43593c0 100644 --- a/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts +++ b/x-pack/test/functional/apps/ml/data_frame_analytics/results_view_content.ts @@ -294,6 +294,13 @@ export default function ({ getService }: FtrProviderContext) { await ml.dataFrameAnalyticsResults.assertFeatureImportancePopoverContent(); }); + it('should display the feature importance decision path after changing page', async () => { + await ml.dataFrameAnalyticsResults.selectResultsTablePage(3); + await ml.dataFrameAnalyticsResults.assertResultsTableNotEmpty(); + await ml.dataFrameAnalyticsResults.openFeatureImportancePopover(); + await ml.dataFrameAnalyticsResults.assertFeatureImportancePopoverContent(); + }); + it('should display the histogram charts', async () => { await ml.testExecution.logTestStep( 'displays the histogram charts when option is enabled' diff --git a/x-pack/test/functional/services/ml/common_data_grid.ts b/x-pack/test/functional/services/ml/common_data_grid.ts index f118af7090b4..9950d6b8f720 100644 --- a/x-pack/test/functional/services/ml/common_data_grid.ts +++ b/x-pack/test/functional/services/ml/common_data_grid.ts @@ -219,5 +219,20 @@ export function MachineLearningCommonDataGridProvider({ getService }: FtrProvide await browser.pressKeys(browser.keys.ESCAPE); }); }, + + async assertActivePage(tableSubj: string, expectedPage: number) { + const table = await testSubjects.find(tableSubj); + const pagination = await table.findByClassName('euiPagination__list'); + const activePage = await pagination.findByCssSelector( + '.euiPaginationButton[aria-current] .euiButtonEmpty__text' + ); + const text = await activePage.getVisibleText(); + expect(text).to.eql(expectedPage); + }, + + async selectPage(tableSubj: string, page: number) { + await testSubjects.click(`${tableSubj} > pagination-button-${page - 1}`); + await this.assertActivePage(tableSubj, page); + }, }; } diff --git a/x-pack/test/functional/services/ml/data_frame_analytics_results.ts b/x-pack/test/functional/services/ml/data_frame_analytics_results.ts index a4378636673d..0fc99e1e032a 100644 --- a/x-pack/test/functional/services/ml/data_frame_analytics_results.ts +++ b/x-pack/test/functional/services/ml/data_frame_analytics_results.ts @@ -57,6 +57,10 @@ export function MachineLearningDataFrameAnalyticsResultsProvider( await testSubjects.existOrFail('mlExplorationDataGrid loaded', { timeout: 5000 }); }, + async selectResultsTablePage(page: number) { + await commonDataGrid.selectPage('mlExplorationDataGrid loaded', page); + }, + async assertResultsTableTrainingFiltersExist() { await testSubjects.existOrFail('mlDFAnalyticsExplorationQueryBarFilterButtons', { timeout: 5000, From 288054ddc0359feffaf5c7d982c52ea375f4850d Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Tue, 14 Feb 2023 06:36:37 +0100 Subject: [PATCH 07/31] [Discover] Refactor app state functionality to getDiscoverAppStateContainer (#149389) --- .../components/top_nav/get_top_nav_links.tsx | 2 +- .../top_nav/on_save_search.test.tsx | 71 ++--- .../components/top_nav/on_save_search.tsx | 4 +- .../main/hooks/use_adhoc_data_views.ts | 2 +- .../main/hooks/use_discover_state.ts | 114 +------- .../use_test_based_query_language.test.ts | 97 +++---- .../hooks/use_text_based_query_language.ts | 2 +- .../hooks/utils/build_state_subscribe.test.ts | 134 +++++++++ .../main/hooks/utils/build_state_subscribe.ts | 83 ++++++ .../main/hooks/utils/change_data_view.test.ts | 48 ++++ .../main/hooks/utils/change_data_view.ts | 55 ++++ .../discover_app_state_container.test.ts | 51 ++++ .../services/discover_app_state_container.ts | 268 +++++++++++++++++- .../main/services/discover_state.test.ts | 32 ++- .../main/services/discover_state.ts | 260 +++-------------- .../main/utils/cleanup_url_state.test.ts | 2 +- .../main/utils/cleanup_url_state.ts | 3 +- .../hooks/use_confirm_persistence_prompt.ts | 2 +- src/plugins/discover/public/utils/add_log.ts | 21 ++ .../discover/public/utils/get_sharing_data.ts | 6 +- 20 files changed, 806 insertions(+), 451 deletions(-) create mode 100644 src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.test.ts create mode 100644 src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts create mode 100644 src/plugins/discover/public/application/main/hooks/utils/change_data_view.test.ts create mode 100644 src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts create mode 100644 src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts create mode 100644 src/plugins/discover/public/utils/add_log.ts diff --git a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx index 0036b517c0eb..59723e5b1225 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/get_top_nav_links.tsx @@ -181,7 +181,7 @@ export const getTopNavLinks = ({ defaultMessage: 'Untitled discover search', }), }, - isDirty: !savedSearch.id || state.isAppStateDirty(), + isDirty: !savedSearch.id || state.appState.hasChanged(), showPublicUrlSwitch, onClose: () => { anchorElement?.focus(); diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx index f8199fadd2e6..a7efab7d984a 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.test.tsx @@ -14,35 +14,35 @@ jest.mock('../../utils/persist_saved_search', () => ({ import { onSaveSearch } from './on_save_search'; import { dataViewMock } from '../../../../__mocks__/data_view'; import { savedSearchMock } from '../../../../__mocks__/saved_search'; -import { DiscoverServices } from '../../../../build_services'; -import { DiscoverStateContainer } from '../../services/discover_state'; -import { i18nServiceMock } from '@kbn/core/public/mocks'; +import { getDiscoverStateContainer } from '../../services/discover_state'; import { ReactElement } from 'react'; import { discoverServiceMock } from '../../../../__mocks__/services'; import * as persistSavedSearchUtils from '../../utils/persist_saved_search'; import { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { createBrowserHistory } from 'history'; + +function getStateContainer() { + const savedSearch = savedSearchMock; + const history = createBrowserHistory(); + const stateContainer = getDiscoverStateContainer({ + savedSearch, + services: discoverServiceMock, + history, + }); + stateContainer.appState.getState = jest.fn(() => ({ + rowsPerPage: 250, + })); + return stateContainer; +} describe('onSaveSearch', () => { it('should call showSaveModal', async () => { - const serviceMock = { - core: { - i18n: i18nServiceMock.create(), - }, - } as unknown as DiscoverServices; - const stateMock = { - appState: { - getState: () => ({ - rowsPerPage: 250, - }), - }, - } as unknown as DiscoverStateContainer; - await onSaveSearch({ dataView: dataViewMock, navigateTo: jest.fn(), savedSearch: savedSearchMock, - services: serviceMock, - state: stateMock, + services: discoverServiceMock, + state: getStateContainer(), updateAdHocDataViewId: jest.fn(), }); @@ -50,14 +50,6 @@ describe('onSaveSearch', () => { }); it('should pass tags to the save modal', async () => { - const serviceMock = discoverServiceMock; - const stateMock = { - appState: { - getState: () => ({ - rowsPerPage: 250, - }), - }, - } as unknown as DiscoverStateContainer; let saveModal: ReactElement | undefined; jest.spyOn(savedObjectsPlugin, 'showSaveModal').mockImplementationOnce((modal) => { saveModal = modal; @@ -69,23 +61,14 @@ describe('onSaveSearch', () => { ...savedSearchMock, tags: ['tag1', 'tag2'], }, - services: serviceMock, - state: stateMock, + services: discoverServiceMock, + state: getStateContainer(), updateAdHocDataViewId: jest.fn(), }); expect(saveModal?.props.tags).toEqual(['tag1', 'tag2']); }); it('should update the saved search tags', async () => { - const serviceMock = discoverServiceMock; - const stateMock = { - appState: { - getState: () => ({ - rowsPerPage: 250, - }), - }, - resetInitialAppState: jest.fn(), - } as unknown as DiscoverStateContainer; let saveModal: ReactElement | undefined; jest.spyOn(savedObjectsPlugin, 'showSaveModal').mockImplementationOnce((modal) => { saveModal = modal; @@ -98,8 +81,8 @@ describe('onSaveSearch', () => { dataView: dataViewMock, navigateTo: jest.fn(), savedSearch, - services: serviceMock, - state: stateMock, + services: discoverServiceMock, + state: getStateContainer(), updateAdHocDataViewId: jest.fn(), }); expect(savedSearch.tags).toEqual(['tag1', 'tag2']); @@ -122,14 +105,6 @@ describe('onSaveSearch', () => { it('should not update tags if savedObjectsTagging is undefined', async () => { const serviceMock = discoverServiceMock; - const stateMock = { - appState: { - getState: () => ({ - rowsPerPage: 250, - }), - }, - resetInitialAppState: jest.fn(), - } as unknown as DiscoverStateContainer; let saveModal: ReactElement | undefined; jest.spyOn(savedObjectsPlugin, 'showSaveModal').mockImplementationOnce((modal) => { saveModal = modal; @@ -146,7 +121,7 @@ describe('onSaveSearch', () => { ...serviceMock, savedObjectsTagging: undefined, }, - state: stateMock, + state: getStateContainer(), updateAdHocDataViewId: jest.fn(), }); expect(savedSearch.tags).toEqual(['tag1', 'tag2']); diff --git a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx index 237fc2b4ab57..4d88e48b8adf 100644 --- a/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx +++ b/src/plugins/discover/public/application/main/components/top_nav/on_save_search.tsx @@ -53,7 +53,7 @@ async function saveDataSource({ navigateTo(`/view/${encodeURIComponent(id)}`); } else { // Update defaults so that "reload saved query" functions correctly - state.resetAppState(savedSearch); + state.appState.resetWithSavedSearch(savedSearch); services.chrome.docTitle.change(savedSearch.title!); setBreadcrumbsTitle( @@ -169,7 +169,7 @@ export async function onSaveSearch({ savedSearch.tags = currentTags; } } else { - state.resetInitialAppState(); + state.appState.resetInitialState(); } onSaveCb?.(); return response; diff --git a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts index c87c13b0e9fb..31e96f01a2b7 100644 --- a/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts +++ b/src/plugins/discover/public/application/main/hooks/use_adhoc_data_views.ts @@ -63,7 +63,7 @@ export const useAdHocDataViews = ({ updateFiltersReferences(prevDataView, newDataView); stateContainer.actions.replaceAdHocDataViewWithId(prevDataView.id!, newDataView); - await stateContainer.replaceUrlAppState({ index: newDataView.id }); + await stateContainer.appState.update({ index: newDataView.id }, true); setUrlTracking(newDataView); return newDataView; diff --git a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts b/src/plugins/discover/public/application/main/hooks/use_discover_state.ts index f5b3949e103a..1170629142da 100644 --- a/src/plugins/discover/public/application/main/hooks/use_discover_state.ts +++ b/src/plugins/discover/public/application/main/hooks/use_discover_state.ts @@ -6,12 +6,12 @@ * Side Public License, v 1. */ import { useMemo, useEffect, useState, useCallback } from 'react'; -import { isEqual } from 'lodash'; import { History } from 'history'; import { isOfAggregateQueryType } from '@kbn/es-query'; import { type DataView, DataViewType } from '@kbn/data-views-plugin/public'; import { SavedSearch, getSavedSearch } from '@kbn/saved-search-plugin/public'; -import type { SortOrder } from '@kbn/saved-search-plugin/public'; +import { buildStateSubscribe } from './utils/build_state_subscribe'; +import { changeDataView } from './utils/change_data_view'; import { useSearchSession } from './use_search_session'; import { FetchStatus } from '../../types'; import { useTextBasedQueryLanguage } from './use_text_based_query_language'; @@ -19,9 +19,6 @@ import { useUrlTracking } from './use_url_tracking'; import { getDiscoverStateContainer } from '../services/discover_state'; import { getStateDefaults } from '../utils/get_state_defaults'; import { DiscoverServices } from '../../../build_services'; -import { loadDataView, resolveDataView } from '../utils/resolve_data_view'; -import { MODIFY_COLUMNS_ON_SWITCH, SORT_DEFAULT_ORDER_SETTING } from '../../../../common'; -import { getDataViewAppState } from '../utils/get_switch_data_view_app_state'; import { DataTableRecord } from '../../../types'; import { restoreStateFromSavedSearch } from '../../../services/saved_searches/restore_from_saved_search'; import { useAdHocDataViews } from './use_adhoc_data_views'; @@ -37,8 +34,7 @@ export function useDiscoverState({ history: History; setExpandedDoc: (doc?: DataTableRecord) => void; }) { - const { uiSettings, data, filterManager, dataViews, toastNotifications, trackUiMetric } = - services; + const { data, filterManager, dataViews, toastNotifications, trackUiMetric } = services; const dataView = savedSearch.searchSource.getField('index')!; @@ -63,7 +59,7 @@ export function useDiscoverState({ const { setUrlTracking } = useUrlTracking(savedSearch, dataView); - const { appState, replaceUrlAppState, searchSessionManager } = stateContainer; + const { appState, searchSessionManager } = stateContainer; const [state, setState] = useState(appState.getState()); @@ -142,109 +138,21 @@ export function useDiscoverState({ * Track state changes that should trigger a fetch */ useEffect(() => { - const unsubscribe = appState.subscribe(async (nextState) => { - const { hideChart, interval, breakdownField, sort, index } = state; - // Cast to boolean to avoid false positives when comparing - // undefined and false, which would trigger a refetch - const chartDisplayChanged = Boolean(nextState.hideChart) !== Boolean(hideChart); - const chartIntervalChanged = nextState.interval !== interval; - const breakdownFieldChanged = nextState.breakdownField !== breakdownField; - const docTableSortChanged = !isEqual(nextState.sort, sort); - const dataViewChanged = !isEqual(nextState.index, index); - // NOTE: this is also called when navigating from discover app to context app - if (nextState.index && dataViewChanged) { - /** - * Without resetting the fetch state, e.g. a time column would be displayed when switching - * from a data view without to a data view with time filter for a brief moment - * That's because appState is updated before savedSearchData$ - * The following line of code catches this, but should be improved - */ - const nextDataViewData = await loadDataView( - services.dataViews, - services.uiSettings, - nextState.index - ); - const nextDataView = resolveDataView( - nextDataViewData, - savedSearch.searchSource, - services.toastNotifications - ); - - // If the requested data view is not found, don't try to load it, - // and instead reset the app state to the fallback data view - if (!nextDataViewData.stateValFound) { - replaceUrlAppState({ index: nextDataView.id }); - return; - } - savedSearch.searchSource.setField('index', nextDataView); - reset(); - stateContainer.actions.setDataView(nextDataView); - } - - if ( - dataViewChanged && - stateContainer.dataState.initialFetchStatus === FetchStatus.UNINITIALIZED - ) { - // stop execution if given data view has changed, and it's not configured to initially start a search in Discover - return; - } - - if ( - chartDisplayChanged || - chartIntervalChanged || - breakdownFieldChanged || - docTableSortChanged - ) { - refetch$.next(undefined); - } - - setState(nextState); - }); + const unsubscribe = appState.subscribe( + buildStateSubscribe({ stateContainer, savedSearch, setState }) + ); return () => unsubscribe(); - }, [ - services, - appState, - state, - refetch$, - data$, - reset, - savedSearch, - replaceUrlAppState, - stateContainer, - ]); + }, [appState, savedSearch, services, stateContainer]); /** * Function triggered when user changes data view in the sidebar */ const onChangeDataView = useCallback( async (id: string) => { - const nextDataView = await dataViews.get(id); - if (nextDataView && dataView) { - const nextAppState = getDataViewAppState( - dataView, - nextDataView, - state.columns || [], - (state.sort || []) as SortOrder[], - uiSettings.get(MODIFY_COLUMNS_ON_SWITCH), - uiSettings.get(SORT_DEFAULT_ORDER_SETTING), - state.query - ); - setUrlTracking(nextDataView); - stateContainer.setAppState(nextAppState); - } + await changeDataView(id, { services, discoverState: stateContainer, setUrlTracking }); setExpandedDoc(undefined); }, - [ - setUrlTracking, - uiSettings, - dataView, - dataViews, - setExpandedDoc, - state.columns, - state.query, - state.sort, - stateContainer, - ] + [services, setExpandedDoc, setUrlTracking, stateContainer] ); /** @@ -271,7 +179,7 @@ export function useDiscoverState({ timefilter: services.timefilter, }); - await stateContainer.replaceUrlAppState(newAppState); + await stateContainer.appState.update(newAppState, true); setState(newAppState); }, [services, dataView, stateContainer] diff --git a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts index 0f1b6488f368..b596e2bc06c4 100644 --- a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts +++ b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.ts @@ -19,16 +19,15 @@ import { AggregateQuery, Query } from '@kbn/es-query'; import { dataViewMock } from '../../../__mocks__/data_view'; import { DataViewListItem } from '@kbn/data-views-plugin/common'; import { savedSearchMock } from '../../../__mocks__/saved_search'; -import { AppState } from '../services/discover_app_state_container'; import { getDiscoverStateMock } from '../../../__mocks__/discover_state.mock'; function getHookProps( - replaceUrlAppState: (newState: Partial) => Promise, query: AggregateQuery | Query | undefined, dataViewsService?: DataViewsContract ) { + const replaceUrlState = jest.fn(); const stateContainer = getDiscoverStateMock({ isTimeBased: true }); - stateContainer.replaceUrlAppState = replaceUrlAppState; + stateContainer.appState.replaceUrlState = replaceUrlState; stateContainer.setAppState({ columns: [] }); stateContainer.internalState.transitions.setSavedDataViews([dataViewMock as DataViewListItem]); @@ -45,6 +44,7 @@ function getHookProps( dataViews: dataViewsService ?? discoverServiceMock.dataViews, stateContainer, savedSearch: savedSearchMock, + replaceUrlState, }; } const query = { sql: 'SELECT * from the-data-view-title' }; @@ -63,37 +63,35 @@ const msgComplete = { describe('useTextBasedQueryLanguage', () => { test('a text based query should change state when loading and finished', async () => { - const replaceUrlAppState = jest.fn(); - const props = getHookProps(replaceUrlAppState, query); - const { documents$ } = props; + const props = getHookProps(query); + const { documents$, replaceUrlState } = props; renderHook(() => useTextBasedQueryLanguage(props)); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); - expect(replaceUrlAppState).toHaveBeenCalledWith({ index: 'the-data-view-id' }); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + expect(replaceUrlState).toHaveBeenCalledWith({ index: 'the-data-view-id' }); - replaceUrlAppState.mockReset(); + replaceUrlState.mockReset(); documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); await waitFor(() => { - expect(replaceUrlAppState).toHaveBeenCalledWith({ + expect(replaceUrlState).toHaveBeenCalledWith({ index: 'the-data-view-id', columns: ['field1', 'field2'], }); }); }); test('changing a text based query with different result columns should change state when loading and finished', async () => { - const replaceUrlAppState = jest.fn(); - const props = getHookProps(replaceUrlAppState, query); - const { documents$ } = props; + const props = getHookProps(query); + const { documents$, replaceUrlState } = props; renderHook(() => useTextBasedQueryLanguage(props)); documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(2)); - replaceUrlAppState.mockReset(); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(2)); + replaceUrlState.mockReset(); documents$.next({ recordRawType: RecordRawType.PLAIN, @@ -107,25 +105,24 @@ describe('useTextBasedQueryLanguage', () => { ], query: { sql: 'SELECT field1 from the-data-view-title' }, }); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); await waitFor(() => { - expect(replaceUrlAppState).toHaveBeenCalledWith({ + expect(replaceUrlState).toHaveBeenCalledWith({ index: 'the-data-view-id', columns: ['field1'], }); }); }); test('only changing a text based query with same result columns should not change columns', async () => { - const replaceUrlAppState = jest.fn(); - const props = getHookProps(replaceUrlAppState, query); - const { documents$ } = props; + const props = getHookProps(query); + const { documents$, replaceUrlState } = props; renderHook(() => useTextBasedQueryLanguage(props)); documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(2)); - replaceUrlAppState.mockReset(); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(2)); + replaceUrlState.mockReset(); documents$.next({ recordRawType: RecordRawType.PLAIN, @@ -139,8 +136,8 @@ describe('useTextBasedQueryLanguage', () => { ], query: { sql: 'SELECT field1 from the-data-view-title' }, }); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); - replaceUrlAppState.mockReset(); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + replaceUrlState.mockReset(); documents$.next({ recordRawType: RecordRawType.PLAIN, @@ -156,21 +153,20 @@ describe('useTextBasedQueryLanguage', () => { }); await waitFor(() => { - expect(replaceUrlAppState).toHaveBeenCalledWith({ + expect(replaceUrlState).toHaveBeenCalledWith({ index: 'the-data-view-id', }); }); }); test('if its not a text based query coming along, it should be ignored', async () => { - const replaceUrlAppState = jest.fn(); - const props = getHookProps(replaceUrlAppState, query); - const { documents$ } = props; + const props = getHookProps(query); + const { documents$, replaceUrlState } = props; renderHook(() => useTextBasedQueryLanguage(props)); documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(2)); - replaceUrlAppState.mockReset(); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(2)); + replaceUrlState.mockReset(); documents$.next({ recordRawType: RecordRawType.DOCUMENT, @@ -198,7 +194,7 @@ describe('useTextBasedQueryLanguage', () => { }); await waitFor(() => { - expect(replaceUrlAppState).toHaveBeenCalledWith({ + expect(replaceUrlState).toHaveBeenCalledWith({ index: 'the-data-view-id', columns: ['field1'], }); @@ -206,12 +202,11 @@ describe('useTextBasedQueryLanguage', () => { }); test('it should not overwrite existing state columns on initial fetch', async () => { - const replaceUrlAppState = jest.fn(); - const props = getHookProps(replaceUrlAppState, query); + const props = getHookProps(query); props.stateContainer.appState.getState = jest.fn(() => { return { columns: ['field1'], index: 'the-data-view-id' }; }); - const { documents$ } = props; + const { documents$, replaceUrlState } = props; renderHook(() => useTextBasedQueryLanguage(props)); documents$.next({ @@ -239,19 +234,18 @@ describe('useTextBasedQueryLanguage', () => { ], query: { sql: 'SELECT field1 from the-data-view-title' }, }); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); - expect(replaceUrlAppState).toHaveBeenCalledWith({ + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + expect(replaceUrlState).toHaveBeenCalledWith({ columns: ['field1'], }); }); test('it should not overwrite state column when successfully fetching after an error fetch', async () => { - const replaceUrlAppState = jest.fn(); - const props = getHookProps(replaceUrlAppState, query); + const props = getHookProps(query); props.stateContainer.appState.getState = jest.fn(() => { return { columns: [], index: 'the-data-view-id' }; }); - const { documents$ } = props; + const { documents$, replaceUrlState } = props; renderHook(() => useTextBasedQueryLanguage(props)); documents$.next({ @@ -259,7 +253,7 @@ describe('useTextBasedQueryLanguage', () => { fetchStatus: FetchStatus.LOADING, query: { sql: 'SELECT * from the-data-view-title WHERE field1=2' }, }); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(0)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); documents$.next({ recordRawType: RecordRawType.PLAIN, fetchStatus: FetchStatus.COMPLETE, @@ -272,11 +266,11 @@ describe('useTextBasedQueryLanguage', () => { ], query: { sql: 'SELECT * from the-data-view-title WHERE field1=2' }, }); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); props.stateContainer.appState.getState = jest.fn(() => { return { columns: ['field1', 'field2'], index: 'the-data-view-id' }; }); - replaceUrlAppState.mockReset(); + replaceUrlState.mockReset(); documents$.next({ recordRawType: RecordRawType.PLAIN, @@ -308,14 +302,13 @@ describe('useTextBasedQueryLanguage', () => { query: { sql: 'SELECT field1 from the-data-view-title' }, }); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); - expect(replaceUrlAppState).toHaveBeenCalledWith({ + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + expect(replaceUrlState).toHaveBeenCalledWith({ columns: ['field1'], }); }); test('changing a text based query with an index pattern that not corresponds to a dataview should return results', async () => { - const replaceUrlAppState = jest.fn(); const dataViewsCreateMock = discoverServiceMock.dataViews.create as jest.Mock; dataViewsCreateMock.mockImplementation(() => ({ ...dataViewMock, @@ -324,14 +317,14 @@ describe('useTextBasedQueryLanguage', () => { ...discoverServiceMock.dataViews, create: dataViewsCreateMock, }; - const props = getHookProps(replaceUrlAppState, query, dataViewsService); - const { documents$ } = props; + const props = getHookProps(query, dataViewsService); + const { documents$, replaceUrlState } = props; renderHook(() => useTextBasedQueryLanguage(props)); documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(2)); - replaceUrlAppState.mockReset(); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(2)); + replaceUrlState.mockReset(); documents$.next({ recordRawType: RecordRawType.PLAIN, @@ -345,10 +338,10 @@ describe('useTextBasedQueryLanguage', () => { ], query: { sql: 'SELECT field1 from the-data-view-*' }, }); - await waitFor(() => expect(replaceUrlAppState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); await waitFor(() => { - expect(replaceUrlAppState).toHaveBeenCalledWith({ + expect(replaceUrlState).toHaveBeenCalledWith({ index: 'the-data-view-id', columns: ['field1'], }); diff --git a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts index b47c7145904b..5e2eb33efdbe 100644 --- a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts +++ b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts @@ -116,7 +116,7 @@ export function useTextBasedQueryLanguage({ ...(addDataViewToState && { index: dataViewObj.id }), ...(addColumnsToState && { columns: nextColumns }), }; - stateContainer.replaceUrlAppState(nextState); + stateContainer.appState.replaceUrlState(nextState); } else { // cleanup for a "regular" query cleanup(); diff --git a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.test.ts b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.test.ts new file mode 100644 index 000000000000..2ea8275dea01 --- /dev/null +++ b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.test.ts @@ -0,0 +1,134 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { createBrowserHistory } from 'history'; +import { buildStateSubscribe } from './build_state_subscribe'; +import { savedSearchMock } from '../../../../__mocks__/saved_search'; +import { FetchStatus } from '../../../types'; +import { getDiscoverStateContainer } from '../../services/discover_state'; +import { discoverServiceMock } from '../../../../__mocks__/services'; +import { dataViewComplexMock } from '../../../../__mocks__/data_view_complex'; + +describe('buildStateSubscribe', () => { + const savedSearch = savedSearchMock; + const history = createBrowserHistory(); + const stateContainer = getDiscoverStateContainer({ + savedSearch, + services: discoverServiceMock, + history, + }); + stateContainer.dataState.refetch$.next = jest.fn(); + stateContainer.dataState.reset = jest.fn(); + stateContainer.actions.setDataView = jest.fn(); + stateContainer.actions.loadAndResolveDataView = jest.fn(() => + Promise.resolve({ fallback: false, dataView: dataViewComplexMock }) + ); + + const setState = jest.fn(); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should set the data view if the index has changed, but no refetch should be triggered', async () => { + await buildStateSubscribe({ + stateContainer, + savedSearch, + setState, + })({ index: dataViewComplexMock.id }); + + expect(stateContainer.actions.setDataView).toHaveBeenCalledWith(dataViewComplexMock); + expect(stateContainer.dataState.reset).toHaveBeenCalled(); + expect(stateContainer.dataState.refetch$.next).not.toHaveBeenCalled(); + expect(setState).toHaveBeenCalled(); + }); + + it('should not call refetch$ if nothing changes', async () => { + await buildStateSubscribe({ + stateContainer, + savedSearch, + setState, + })(stateContainer.appState.getState()); + + expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); + expect(setState).toHaveBeenCalled(); + }); + + it('should call refetch$ if the chart is hidden', async () => { + await buildStateSubscribe({ + stateContainer, + savedSearch, + setState, + })({ hideChart: true }); + + expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); + expect(setState).toHaveBeenCalled(); + }); + + it('should call refetch$ if the chart interval has changed', async () => { + await buildStateSubscribe({ + stateContainer, + savedSearch, + setState, + })({ interval: 's' }); + + expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); + expect(setState).toHaveBeenCalled(); + }); + + it('should call refetch$ if breakdownField has changed', async () => { + await buildStateSubscribe({ + stateContainer, + savedSearch, + setState, + })({ breakdownField: '💣' }); + + expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); + expect(setState).toHaveBeenCalled(); + }); + + it('should call refetch$ if sort has changed', async () => { + await buildStateSubscribe({ + stateContainer, + savedSearch, + setState, + })({ sort: [['field', 'test']] }); + + expect(stateContainer.dataState.refetch$.next).toHaveBeenCalled(); + expect(setState).toHaveBeenCalled(); + }); + + it('should not execute setState function if initialFetchStatus is UNINITIALIZED', async () => { + const stateSubscribeFn = await buildStateSubscribe({ + stateContainer, + savedSearch, + setState, + }); + stateContainer.dataState.initialFetchStatus = FetchStatus.UNINITIALIZED; + await stateSubscribeFn({ index: dataViewComplexMock.id }); + + expect(stateContainer.dataState.reset).toHaveBeenCalled(); + expect(setState).not.toHaveBeenCalled(); + }); + it('should not execute setState twice if the identical data view change is propagated twice', async () => { + const stateSubscribeFn = await buildStateSubscribe({ + stateContainer, + savedSearch, + setState, + }); + await stateSubscribeFn({ index: dataViewComplexMock.id }); + + expect(setState).toBeCalledTimes(0); + expect(stateContainer.dataState.reset).toBeCalledTimes(1); + + stateContainer.appState.getPrevious = jest.fn(() => ({ index: dataViewComplexMock.id })); + + await stateSubscribeFn({ index: dataViewComplexMock.id }); + expect(setState).toBeCalledTimes(0); + expect(stateContainer.dataState.reset).toBeCalledTimes(1); + }); +}); diff --git a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts new file mode 100644 index 000000000000..2f923a62a6d7 --- /dev/null +++ b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts @@ -0,0 +1,83 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { isEqual } from 'lodash'; +import { DiscoverStateContainer } from '../../services/discover_state'; +import { AppState, isEqualState } from '../../services/discover_app_state_container'; +import { addLog } from '../../../../utils/add_log'; +import { FetchStatus } from '../../../types'; + +/** + * Builds a subscribe function for the AppStateContainer, that is executed when the AppState changes in URL + * or programmatically. It's main purpose is to detect which changes should trigger a refetch of the data. + * @param stateContainer + * @param savedSearch + * @param setState + */ +export const buildStateSubscribe = + ({ + stateContainer, + savedSearch, + setState, + }: { + stateContainer: DiscoverStateContainer; + savedSearch: SavedSearch; + setState: (state: AppState) => void; + }) => + async (nextState: AppState) => { + const prevState = stateContainer.appState.getPrevious(); + if (isEqualState(prevState, nextState)) { + addLog('[appstate] subscribe update ignored due to no changes'); + return; + } + addLog('[appstate] subscribe triggered', nextState); + const { hideChart, interval, breakdownField, sort, index } = + stateContainer.appState.getPrevious(); + // Cast to boolean to avoid false positives when comparing + // undefined and false, which would trigger a refetch + const chartDisplayChanged = Boolean(nextState.hideChart) !== Boolean(hideChart); + const chartIntervalChanged = nextState.interval !== interval; + const breakdownFieldChanged = nextState.breakdownField !== breakdownField; + const docTableSortChanged = !isEqual(nextState.sort, sort); + const dataViewChanged = !isEqual(nextState.index, index); + // NOTE: this is also called when navigating from discover app to context app + if (nextState.index && dataViewChanged) { + const { dataView: nextDataView, fallback } = + await stateContainer.actions.loadAndResolveDataView(nextState.index, savedSearch); + + // If the requested data view is not found, don't try to load it, + // and instead reset the app state to the fallback data view + if (fallback) { + stateContainer.appState.update({ index: nextDataView.id }, true); + return; + } + savedSearch.searchSource.setField('index', nextDataView); + stateContainer.dataState.reset(); + stateContainer.actions.setDataView(nextDataView); + } + + if ( + dataViewChanged && + stateContainer.dataState.initialFetchStatus === FetchStatus.UNINITIALIZED + ) { + // stop execution if given data view has changed, and it's not configured to initially start a search in Discover + return; + } + + if ( + chartDisplayChanged || + chartIntervalChanged || + breakdownFieldChanged || + docTableSortChanged + ) { + addLog('[appstate] subscribe triggers data fetching'); + stateContainer.dataState.refetch$.next(undefined); + } + + setState(nextState); + }; diff --git a/src/plugins/discover/public/application/main/hooks/utils/change_data_view.test.ts b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.test.ts new file mode 100644 index 000000000000..04afdac829f9 --- /dev/null +++ b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.test.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { changeDataView } from './change_data_view'; +import { savedSearchMock } from '../../../../__mocks__/saved_search'; +import { createBrowserHistory } from 'history'; +import { getDiscoverStateContainer } from '../../services/discover_state'; +import { discoverServiceMock } from '../../../../__mocks__/services'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import { dataViewComplexMock } from '../../../../__mocks__/data_view_complex'; + +const setupTestParams = (dataView: DataView | undefined) => { + const savedSearch = savedSearchMock; + const services = discoverServiceMock; + const history = createBrowserHistory(); + const discoverState = getDiscoverStateContainer({ + savedSearch, + services: discoverServiceMock, + history, + }); + discoverState.internalState.transitions.setDataView(savedSearch.searchSource.getField('index')!); + services.dataViews.get = jest.fn(() => Promise.resolve(dataView as DataView)); + discoverState.appState.update = jest.fn(); + return { services, discoverState, setUrlTracking: jest.fn() }; +}; + +describe('changeDataView', () => { + it('should set the right app state when a valid data view to switch to is given', async () => { + const params = setupTestParams(dataViewComplexMock as DataView); + await changeDataView('data-view-with-various-field-types', params); + expect(params.discoverState.appState.update).toHaveBeenCalledWith({ + columns: ['default_column'], + index: 'data-view-with-various-field-types-id', + sort: [['data', 'desc']], + }); + }); + + it('should not set the app state when an invalid data view to switch to is given', async () => { + const params = setupTestParams(undefined); + await changeDataView('data-view-with-various-field-types', params); + expect(params.discoverState.appState.update).not.toHaveBeenCalled(); + }); +}); diff --git a/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts new file mode 100644 index 000000000000..0ceb3c984a16 --- /dev/null +++ b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { SortOrder } from '@kbn/saved-search-plugin/public'; +import { DataView } from '@kbn/data-views-plugin/common'; +import { addLog } from '../../../../utils/add_log'; +import { DiscoverServices } from '../../../../build_services'; +import { DiscoverStateContainer } from '../../services/discover_state'; +import { getDataViewAppState } from '../../utils/get_switch_data_view_app_state'; +import { MODIFY_COLUMNS_ON_SWITCH, SORT_DEFAULT_ORDER_SETTING } from '../../../../../common'; + +/** + * Function executed when switching data view in the UI + * @param id + * @param services + * @param discoverState + * @param setUrlTracking + */ +export async function changeDataView( + id: string, + { + services, + discoverState, + setUrlTracking, + }: { + services: DiscoverServices; + discoverState: DiscoverStateContainer; + setUrlTracking: (dataView: DataView) => void; + } +) { + addLog('[ui] changeDataView', { id }); + const { dataViews, uiSettings } = services; + const dataView = discoverState.internalState.getState().dataView; + const state = discoverState.appState.getState(); + const nextDataView = await dataViews.get(id); + if (nextDataView && dataView) { + const nextAppState = getDataViewAppState( + dataView, + nextDataView, + state.columns || [], + (state.sort || []) as SortOrder[], + uiSettings.get(MODIFY_COLUMNS_ON_SWITCH), + uiSettings.get(SORT_DEFAULT_ORDER_SETTING), + state.query + ); + + setUrlTracking(nextDataView); + discoverState.appState.update(nextAppState); + } +} diff --git a/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts b/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts new file mode 100644 index 000000000000..80fb6c241b2f --- /dev/null +++ b/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { createKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; +import { History } from 'history'; + +import { savedSearchMock } from '../../../__mocks__/saved_search'; +import { discoverServiceMock } from '../../../__mocks__/services'; +import { + DiscoverAppStateContainer, + getDiscoverAppStateContainer, +} from './discover_app_state_container'; + +let history: History; +let state: DiscoverAppStateContainer; + +describe('Test discover app state container', () => { + beforeEach(async () => { + const storeInSessionStorage = discoverServiceMock.uiSettings.get('state:storeInSessionStorage'); + const toasts = discoverServiceMock.core.notifications.toasts; + const stateStorage = createKbnUrlStateStorage({ + useHash: storeInSessionStorage, + history, + ...(toasts && withNotifyOnErrors(toasts)), + }); + state = getDiscoverAppStateContainer({ + stateStorage, + savedSearch: savedSearchMock, + services: discoverServiceMock, + }); + }); + + test('hasChanged returns whether the current state has changed', async () => { + state.set({ index: 'modified' }); + expect(state.hasChanged()).toBeTruthy(); + state.resetInitialState(); + expect(state.hasChanged()).toBeFalsy(); + }); + + test('getPrevious returns the state before the current', async () => { + state.set({ index: 'first' }); + const stateA = state.getState(); + state.set({ index: 'second' }); + expect(state.getPrevious()).toEqual(stateA); + }); +}); diff --git a/src/plugins/discover/public/application/main/services/discover_app_state_container.ts b/src/plugins/discover/public/application/main/services/discover_app_state_container.ts index 0c1c94f72eb9..2b30e179a2f6 100644 --- a/src/plugins/discover/public/application/main/services/discover_app_state_container.ts +++ b/src/plugins/discover/public/application/main/services/discover_app_state_container.ts @@ -7,13 +7,72 @@ */ import { + createStateContainer, createStateContainerReactHelpers, ReduxLikeStateContainer, } from '@kbn/kibana-utils-plugin/common'; -import { AggregateQuery, Filter, Query } from '@kbn/es-query'; -import { VIEW_MODE } from '@kbn/saved-search-plugin/public'; +import { + AggregateQuery, + COMPARE_ALL_OPTIONS, + compareFilters, + Filter, + FilterStateStore, + Query, +} from '@kbn/es-query'; +import { SavedSearch, VIEW_MODE } from '@kbn/saved-search-plugin/public'; +import { IKbnUrlStateStorage, ISyncStateRef, syncState } from '@kbn/kibana-utils-plugin/public'; +import { cloneDeep, isEqual } from 'lodash'; +import { connectToQueryState, syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public'; +import { DiscoverServices } from '../../../build_services'; +import { addLog } from '../../../utils/add_log'; +import { getValidFilters } from '../../../utils/get_valid_filters'; +import { cleanupUrlState } from '../utils/cleanup_url_state'; +import { getStateDefaults } from '../utils/get_state_defaults'; +import { handleSourceColumnState } from '../../../utils/state_helpers'; import { DiscoverGridSettings } from '../../../components/discover_grid/types'; +export const APP_STATE_URL_KEY = '_a'; +export interface DiscoverAppStateContainer extends ReduxLikeStateContainer { + /** + * Returns the previous state, used for diffing e.g. if fetching new data is necessary + */ + getPrevious: () => AppState; + /** + * Determines if the current state is different from the initial state + */ + hasChanged: () => boolean; + /** + * Initializes the state by the given saved search and starts syncing the state with the URL + * @param currentSavedSearch + */ + initAndSync: (currentSavedSearch: SavedSearch) => () => void; + /** + * Replaces the current state in URL with the given state + * @param newState + * @param merge if true, the given state is merged with the current state + */ + replaceUrlState: (newPartial: AppState, merge?: boolean) => void; + /** + * Resets the state by the given saved search + * @param savedSearch + */ + resetWithSavedSearch: (savedSearch: SavedSearch) => void; + /** + * Resets the current state to the initial state + */ + resetInitialState: () => void; + /** + * Start syncing the state with the URL + */ + syncState: () => ISyncStateRef; + /** + * Updates the state, if replace is true, a history.replace is performed instead of history.push + * @param newPartial + * @param replace + */ + update: (newPartial: AppState, replace?: boolean) => void; +} + export interface AppState { /** * Columns displayed in the table @@ -75,3 +134,208 @@ export interface AppState { export const { Provider: DiscoverAppStateProvider, useSelector: useAppStateSelector } = createStateContainerReactHelpers>(); + +/** + * This is the app state container for Discover main, it's responsible for syncing state with the URL + * @param stateStorage + * @param savedSearch + * @param services + */ +export const getDiscoverAppStateContainer = ({ + stateStorage, + savedSearch, + services, +}: { + stateStorage: IKbnUrlStateStorage; + savedSearch: SavedSearch; + services: DiscoverServices; +}): DiscoverAppStateContainer => { + let previousState: AppState = {}; + let initialState = getInitialState(stateStorage, savedSearch, services); + const appStateContainer = createStateContainer(initialState); + + const enhancedAppContainer = { + ...appStateContainer, + set: (value: AppState | null) => { + if (value) { + previousState = appStateContainer.getState(); + appStateContainer.set(value); + } + }, + }; + + const hasChanged = () => { + return !isEqualState(initialState, appStateContainer.getState()); + }; + + const resetInitialState = () => { + addLog('[appState] reset initial state to the current state'); + initialState = appStateContainer.getState(); + }; + + const replaceUrlState = async (newPartial: AppState = {}, merge = true) => { + addLog('[appState] replaceUrlState', { newPartial, merge }); + const state = merge ? { ...appStateContainer.getState(), ...newPartial } : newPartial; + await stateStorage.set(APP_STATE_URL_KEY, state, { replace: true }); + }; + + const startAppStateUrlSync = () => { + addLog('[appState] startAppStateUrlSync'); + return syncState({ + storageKey: APP_STATE_URL_KEY, + stateContainer: enhancedAppContainer, + stateStorage, + }); + }; + + const initializeAndSync = (currentSavedSearch: SavedSearch) => { + addLog('[appState] initializeAndSync', currentSavedSearch); + const dataView = currentSavedSearch.searchSource.getField('index')!; + if (appStateContainer.getState().index !== dataView.id) { + // used data view is different from the given by url/state which is invalid + setState(appStateContainer, { index: dataView.id }); + } + // sync initial app filters from state to filterManager + const filters = appStateContainer.getState().filters || []; + if (filters) { + services.filterManager.setAppFilters(cloneDeep(filters)); + } + const query = appStateContainer.getState().query; + if (query) { + services.data.query.queryString.setQuery(query); + } + + const stopSyncingQueryAppStateWithStateContainer = connectToQueryState( + services.data.query, + appStateContainer, + { + filters: FilterStateStore.APP_STATE, + query: true, + } + ); + + // syncs `_g` portion of url with query services + const { stop: stopSyncingGlobalStateWithUrl } = syncGlobalQueryStateWithUrl( + services.data.query, + stateStorage + ); + + // some filters may not be valid for this context, so update + // the filter manager with a modified list of valid filters + const currentFilters = services.filterManager.getFilters(); + const validFilters = getValidFilters(dataView, currentFilters); + if (!isEqual(currentFilters, validFilters)) { + services.filterManager.setFilters(validFilters); + } + + const { start, stop } = startAppStateUrlSync(); + + replaceUrlState({}).then(() => { + start(); + }); + + return () => { + stopSyncingQueryAppStateWithStateContainer(); + stopSyncingGlobalStateWithUrl(); + stop(); + }; + }; + + const resetWithSavedSearch = (nextSavedSearch: SavedSearch) => { + addLog('[appState] reset to saved search', { nextSavedSearch }); + const nextAppState = getInitialState(stateStorage, nextSavedSearch, services); + appStateContainer.set(nextAppState); + }; + + const update = (newPartial: AppState, replace = false) => { + addLog('[appState] update', { newPartial, replace }); + if (replace) { + return replaceUrlState(newPartial); + } else { + previousState = { ...appStateContainer.getState() }; + setState(appStateContainer, newPartial); + } + }; + + const getPrevious = () => previousState; + + return { + ...enhancedAppContainer, + getPrevious, + hasChanged, + initAndSync: initializeAndSync, + resetWithSavedSearch, + resetInitialState, + replaceUrlState, + syncState: startAppStateUrlSync, + update, + }; +}; + +export interface AppStateUrl extends Omit { + /** + * Necessary to take care of legacy links [fieldName,direction] + */ + sort?: string[][] | [string, string]; +} + +export const GLOBAL_STATE_URL_KEY = '_g'; + +function getInitialState( + stateStorage: IKbnUrlStateStorage, + savedSearch: SavedSearch, + services: DiscoverServices +) { + const appStateFromUrl = cleanupUrlState(stateStorage.get(APP_STATE_URL_KEY) as AppStateUrl); + const defaultAppState = getStateDefaults({ + savedSearch, + services, + }); + return handleSourceColumnState( + { + ...defaultAppState, + ...appStateFromUrl, + }, + services.uiSettings + ); +} + +/** + * Helper function to merge a given new state with the existing state and to set the given state + * container + */ +export function setState(stateContainer: ReduxLikeStateContainer, newState: AppState) { + addLog('[appstate] setState', { newState }); + const oldState = stateContainer.getState(); + const mergedState = { ...oldState, ...newState }; + if (!isEqualState(oldState, mergedState)) { + stateContainer.set(mergedState); + } +} + +/** + * Helper function to compare 2 different filter states + */ +export function isEqualFilters(filtersA?: Filter[] | Filter, filtersB?: Filter[] | Filter) { + if (!filtersA && !filtersB) { + return true; + } else if (!filtersA || !filtersB) { + return false; + } + return compareFilters(filtersA, filtersB, COMPARE_ALL_OPTIONS); +} + +/** + * Helper function to compare 2 different state, is needed since comparing filters + * works differently + */ +export function isEqualState(stateA: AppState, stateB: AppState) { + if (!stateA && !stateB) { + return true; + } else if (!stateA || !stateB) { + return false; + } + const { filters: stateAFilters = [], ...stateAPartial } = stateA; + const { filters: stateBFilters = [], ...stateBPartial } = stateB; + return isEqual(stateAPartial, stateBPartial) && isEqualFilters(stateAFilters, stateBFilters); +} diff --git a/src/plugins/discover/public/application/main/services/discover_state.test.ts b/src/plugins/discover/public/application/main/services/discover_state.test.ts index f3ed93a3394d..a61808d433b5 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.test.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.test.ts @@ -18,10 +18,16 @@ import { savedSearchMock, savedSearchMockWithTimeField } from '../../../__mocks_ import { discoverServiceMock } from '../../../__mocks__/services'; import { dataViewMock } from '../../../__mocks__/data_view'; import { dataViewComplexMock } from '../../../__mocks__/data_view_complex'; +import { DiscoverAppStateContainer } from './discover_app_state_container'; let history: History; let state: DiscoverStateContainer; const getCurrentUrl = () => history.createHref(history.location); +const startSync = (appState: DiscoverAppStateContainer) => { + const { start, stop } = appState.syncState(); + start(); + return stop; +}; describe('Test discover state', () => { let stopSync = () => {}; @@ -34,8 +40,8 @@ describe('Test discover state', () => { services: discoverServiceMock, history, }); - await state.replaceUrlAppState({}); - stopSync = state.startSync(); + await state.appState.update({}, true); + stopSync = startSync(state.appState); }); afterEach(() => { stopSync(); @@ -43,7 +49,7 @@ describe('Test discover state', () => { }); test('setting app state and syncing to URL', async () => { state.setAppState({ index: 'modified' }); - state.flushToUrl(); + state.kbnUrlStateStorage.kbnUrlControls.flush(); expect(getCurrentUrl()).toMatchInlineSnapshot( `"/#?_a=(columns:!(default_column),index:modified,interval:auto,sort:!())"` ); @@ -67,16 +73,16 @@ describe('Test discover state', () => { test('isAppStateDirty returns whether the current state has changed', async () => { state.setAppState({ index: 'modified' }); - expect(state.isAppStateDirty()).toBeTruthy(); - state.resetInitialAppState(); - expect(state.isAppStateDirty()).toBeFalsy(); + expect(state.appState.hasChanged()).toBeTruthy(); + state.appState.resetInitialState(); + expect(state.appState.hasChanged()).toBeFalsy(); }); test('getPreviousAppState returns the state before the current', async () => { state.setAppState({ index: 'first' }); const stateA = state.appState.getState(); state.setAppState({ index: 'second' }); - expect(state.getPreviousAppState()).toEqual(stateA); + expect(state.appState.getPrevious()).toEqual(stateA); }); test('pauseAutoRefreshInterval sets refreshInterval.pause to true', async () => { @@ -96,8 +102,8 @@ describe('Test discover initial state sort handling', () => { services: discoverServiceMock, history, }); - await state.replaceUrlAppState({}); - const stopSync = state.startSync(); + await state.appState.update({}, true); + const stopSync = startSync(state.appState); expect(state.appState.getState().sort).toEqual([['order_date', 'desc']]); stopSync(); }); @@ -110,8 +116,8 @@ describe('Test discover initial state sort handling', () => { services: discoverServiceMock, history, }); - await state.replaceUrlAppState({}); - const stopSync = state.startSync(); + await state.appState.update({}, true); + const stopSync = startSync(state.appState); expect(state.appState.getState().sort).toEqual([['bytes', 'desc']]); stopSync(); }); @@ -123,8 +129,8 @@ describe('Test discover initial state sort handling', () => { services: discoverServiceMock, history, }); - await state.replaceUrlAppState({}); - const stopSync = state.startSync(); + await state.appState.update({}, true); + const stopSync = startSync(state.appState); expect(state.appState.getState().sort).toEqual([['timestamp', 'desc']]); stopSync(); }); diff --git a/src/plugins/discover/public/application/main/services/discover_state.ts b/src/plugins/discover/public/application/main/services/discover_state.ts index 7a8493c87c1f..934c599be785 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.ts @@ -6,50 +6,37 @@ * Side Public License, v 1. */ -import { cloneDeep, isEqual } from 'lodash'; import { i18n } from '@kbn/i18n'; import { History } from 'history'; -import { COMPARE_ALL_OPTIONS, compareFilters, Filter, FilterStateStore } from '@kbn/es-query'; import { createKbnUrlStateStorage, - createStateContainer, IKbnUrlStateStorage, - ReduxLikeStateContainer, StateContainer, - syncState, withNotifyOnErrors, } from '@kbn/kibana-utils-plugin/public'; import { - connectToQueryState, DataPublicPluginStart, FilterManager, QueryState, SearchSessionInfoProvider, - syncQueryStateWithUrl, } from '@kbn/data-plugin/public'; import { DataView } from '@kbn/data-views-plugin/public'; import { SavedSearch } from '@kbn/saved-search-plugin/public'; +import { loadDataView, resolveDataView } from '../utils/resolve_data_view'; import { DataStateContainer, getDataStateContainer } from './discover_data_state_container'; import { DiscoverSearchSessionManager } from './discover_search_session'; -import { DiscoverAppLocatorParams, DISCOVER_APP_LOCATOR } from '../../../../common'; -import { AppState } from './discover_app_state_container'; +import { DISCOVER_APP_LOCATOR, DiscoverAppLocatorParams } from '../../../../common'; +import { + AppState, + DiscoverAppStateContainer, + getDiscoverAppStateContainer, + GLOBAL_STATE_URL_KEY, +} from './discover_app_state_container'; import { getInternalStateContainer, InternalStateContainer, } from './discover_internal_state_container'; -import { getStateDefaults } from '../utils/get_state_defaults'; import { DiscoverServices } from '../../../build_services'; -import { handleSourceColumnState } from '../../../utils/state_helpers'; -import { cleanupUrlState } from '../utils/cleanup_url_state'; -import { getValidFilters } from '../../../utils/get_valid_filters'; - -export interface AppStateUrl extends Omit { - /** - * Necessary to take care of legacy links [fieldName,direction] - */ - sort?: string[][] | [string, string]; -} - interface DiscoverStateContainerParams { /** * Browser history @@ -73,7 +60,7 @@ export interface DiscoverStateContainer { /** * App state, the _a part of the URL */ - appState: ReduxLikeStateContainer; + appState: DiscoverAppStateContainer; /** * Internal state that's used at several places in the UI */ @@ -94,38 +81,10 @@ export interface DiscoverStateContainer { filterManager: FilterManager, data: DataPublicPluginStart ) => () => void; - /** - * Start sync between state and URL -- only used for testing - */ - startSync: () => () => void; /** * Set app state to with a partial new app state */ setAppState: (newState: Partial) => void; - /** - * Set state in Url using history.replace - */ - replaceUrlAppState: (newState: Partial) => Promise; - /** - * Sync state to URL, used for testing - */ - flushToUrl: () => void; - /** - * Reset initial state to the current app state - */ - resetInitialAppState: () => void; - /** - * Return the Appstate before the current app state, useful for diffing changes - */ - getPreviousAppState: () => AppState; - /** - * Returns whether the current app state is different to the initial state - */ - isAppStateDirty: () => boolean; - /** - * Reset AppState by the given savedSearch discarding all changes - */ - resetAppState: (nextSavedSearch: SavedSearch) => void; /** * Pause the auto refresh interval without pushing an entry to history */ @@ -138,6 +97,17 @@ export interface DiscoverStateContainer { * Set the currently selected data view */ setDataView: (dataView: DataView) => void; + /** + * Load the data view of the given id + * A fallback data view is returned, given there's no match + * This is usually the default data view + * @param dataViewId + * @param savedSearch + */ + loadAndResolveDataView: ( + dataViewId: string, + savedSearch: SavedSearch + ) => Promise<{ fallback: boolean; dataView: DataView }>; /** * Load current list of data views, add them to internal state */ @@ -165,9 +135,6 @@ export interface DiscoverStateContainer { }; } -const APP_STATE_URL_KEY = '_a'; -const GLOBAL_STATE_URL_KEY = '_g'; - /** * Builds and returns appState and globalState containers and helper functions * Used to sync URL with UI state @@ -179,10 +146,6 @@ export function getDiscoverStateContainer({ }: DiscoverStateContainerParams): DiscoverStateContainer { const storeInSessionStorage = services.uiSettings.get('state:storeInSessionStorage'); const toasts = services.core.notifications.toasts; - const defaultAppState = getStateDefaults({ - savedSearch, - services, - }); const stateStorage = createKbnUrlStateStorage({ useHash: storeInSessionStorage, history, @@ -196,48 +159,10 @@ export function getDiscoverStateContainer({ history, session: services.data.search.session, }); - - const appStateFromUrl = cleanupUrlState(stateStorage.get(APP_STATE_URL_KEY) as AppStateUrl); - - let initialAppState = handleSourceColumnState( - { - ...defaultAppState, - ...appStateFromUrl, - }, - services.uiSettings - ); - - // todo filter source depending on fields fetching flag (if no columns remain and source fetching is enabled, use default columns) - let previousAppState: AppState; - const appStateContainer = createStateContainer(initialAppState); - - const appStateContainerModified = { - ...appStateContainer, - set: (value: AppState | null) => { - if (value) { - previousAppState = appStateContainer.getState(); - appStateContainer.set(value); - } - }, - }; - - // Calling syncState from within initializeAndSync causes state syncing issues. - // syncState takes a snapshot of the initial state when it's called to compare - // against before syncing state updates. When syncState is called from outside - // of initializeAndSync, the snapshot doesn't get reset when the data view is - // changed. Then when the user presses the back button, the new state appears - // to be the same as the initial state, so syncState ignores the update. - const syncAppState = () => - syncState({ - storageKey: APP_STATE_URL_KEY, - stateContainer: appStateContainerModified, - stateStorage, - }); - - const replaceUrlAppState = async (newPartial: AppState = {}) => { - const state = { ...appStateContainer.getState(), ...newPartial }; - await stateStorage.set(APP_STATE_URL_KEY, state, { replace: true }); - }; + /** + * App State Container, synced with URL + */ + const appStateContainer = getDiscoverAppStateContainer({ stateStorage, savedSearch, services }); const internalStateContainer = getInternalStateContainer(); @@ -280,89 +205,28 @@ export function getDiscoverStateContainer({ internalStateContainer.transitions.setSavedDataViews(dataViewList); }; + const loadAndResolveDataView = async (id: string, actualSavedSearch: SavedSearch) => { + const nextDataViewData = await loadDataView(services.dataViews, services.uiSettings, id); + const nextDataView = resolveDataView( + nextDataViewData, + actualSavedSearch.searchSource, + services.toastNotifications + ); + return { fallback: !nextDataViewData.stateValFound, dataView: nextDataView }; + }; + return { kbnUrlStateStorage: stateStorage, - appState: appStateContainerModified, + appState: appStateContainer, internalState: internalStateContainer, dataState: dataStateContainer, searchSessionManager, - startSync: () => { - const { start, stop } = syncAppState(); - start(); - return stop; - }, - setAppState: (newPartial: AppState) => setState(appStateContainerModified, newPartial), - replaceUrlAppState, - resetInitialAppState: () => { - initialAppState = appStateContainer.getState(); - }, - resetAppState: (nextSavedSearch: SavedSearch) => { - const defaultState = handleSourceColumnState( - getStateDefaults({ savedSearch: nextSavedSearch, services }), - services.uiSettings - ); - setState(appStateContainerModified, defaultState); - }, - getPreviousAppState: () => previousAppState, - flushToUrl: () => stateStorage.kbnUrlControls.flush(), - isAppStateDirty: () => !isEqualState(initialAppState, appStateContainer.getState()), + setAppState: (newPartial: AppState) => appStateContainer.update(newPartial), pauseAutoRefreshInterval, - initializeAndSync: ( - dataView: DataView, - filterManager: FilterManager, - data: DataPublicPluginStart - ) => { - if (appStateContainer.getState().index !== dataView.id) { - // used data view is different than the given by url/state which is invalid - setState(appStateContainerModified, { index: dataView.id }); - } - // sync initial app filters from state to filterManager - const filters = appStateContainer.getState().filters || []; - if (filters) { - filterManager.setAppFilters(cloneDeep(filters)); - } - const query = appStateContainer.getState().query; - if (query) { - data.query.queryString.setQuery(query); - } - - const stopSyncingQueryAppStateWithStateContainer = connectToQueryState( - data.query, - appStateContainer, - { - filters: FilterStateStore.APP_STATE, - query: true, - } - ); - - // syncs `_g` portion of url with query services - const { stop: stopSyncingGlobalStateWithUrl } = syncQueryStateWithUrl( - data.query, - stateStorage - ); - - // some filters may not be valid for this context, so update - // the filter manager with a modified list of valid filters - const currentFilters = filterManager.getFilters(); - const validFilters = getValidFilters(dataView, currentFilters); - if (!isEqual(currentFilters, validFilters)) { - filterManager.setFilters(validFilters); - } - - const { start, stop } = syncAppState(); - - replaceUrlAppState({}).then(() => { - start(); - }); - - return () => { - stopSyncingQueryAppStateWithStateContainer(); - stopSyncingGlobalStateWithUrl(); - stop(); - }; - }, + initializeAndSync: () => appStateContainer.initAndSync(savedSearch), actions: { setDataView, + loadAndResolveDataView, loadDataViewList, setAdHocDataViews, appendAdHocDataViews, @@ -372,54 +236,6 @@ export function getDiscoverStateContainer({ }; } -/** - * Helper function to merge a given new state with the existing state and to set the given state - * container - */ -export function setState(stateContainer: ReduxLikeStateContainer, newState: AppState) { - const oldState = stateContainer.getState(); - const mergedState = { ...oldState, ...newState }; - if (!isEqualState(oldState, mergedState)) { - stateContainer.set(mergedState); - } -} - -/** - * Helper function to compare 2 different filter states - */ -export function isEqualFilters(filtersA?: Filter[] | Filter, filtersB?: Filter[] | Filter) { - if (!filtersA && !filtersB) { - return true; - } else if (!filtersA || !filtersB) { - return false; - } - return compareFilters(filtersA, filtersB, COMPARE_ALL_OPTIONS); -} - -/** - * helper function to extract filters of the given state - * returns a state object without filters and an array of filters - */ -export function splitState(state: AppState = {}) { - const { filters = [], ...statePartial } = state; - return { filters, state: statePartial }; -} - -/** - * Helper function to compare 2 different state, is needed since comparing filters - * works differently - */ -export function isEqualState(stateA: AppState, stateB: AppState) { - if (!stateA && !stateB) { - return true; - } else if (!stateA || !stateB) { - return false; - } - const { filters: stateAFilters = [], ...stateAPartial } = stateA; - const { filters: stateBFilters = [], ...stateBPartial } = stateB; - return isEqual(stateAPartial, stateBPartial) && isEqualFilters(stateAFilters, stateBFilters); -} - export function createSearchSessionRestorationDataProvider(deps: { appStateContainer: StateContainer; data: DataPublicPluginStart; diff --git a/src/plugins/discover/public/application/main/utils/cleanup_url_state.test.ts b/src/plugins/discover/public/application/main/utils/cleanup_url_state.test.ts index b00d7720e38b..ea1af49f48e8 100644 --- a/src/plugins/discover/public/application/main/utils/cleanup_url_state.test.ts +++ b/src/plugins/discover/public/application/main/utils/cleanup_url_state.test.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ +import { AppStateUrl } from '../services/discover_app_state_container'; import { cleanupUrlState } from './cleanup_url_state'; -import { AppStateUrl } from '../services/discover_state'; describe('cleanupUrlState', () => { test('cleaning up legacy sort', async () => { diff --git a/src/plugins/discover/public/application/main/utils/cleanup_url_state.ts b/src/plugins/discover/public/application/main/utils/cleanup_url_state.ts index c0e5e4ed8198..3dab3ac525d8 100644 --- a/src/plugins/discover/public/application/main/utils/cleanup_url_state.ts +++ b/src/plugins/discover/public/application/main/utils/cleanup_url_state.ts @@ -6,9 +6,8 @@ * Side Public License, v 1. */ import { isOfAggregateQueryType } from '@kbn/es-query'; -import { AppState } from '../services/discover_app_state_container'; +import { AppState, AppStateUrl } from '../services/discover_app_state_container'; import { migrateLegacyQuery } from '../../../utils/migrate_legacy_query'; -import { AppStateUrl } from '../services/discover_state'; /** * Takes care of the given url state, migrates legacy props and cleans up empty props diff --git a/src/plugins/discover/public/hooks/use_confirm_persistence_prompt.ts b/src/plugins/discover/public/hooks/use_confirm_persistence_prompt.ts index 1f98837a8eb2..d5ea19c4316b 100644 --- a/src/plugins/discover/public/hooks/use_confirm_persistence_prompt.ts +++ b/src/plugins/discover/public/hooks/use_confirm_persistence_prompt.ts @@ -32,7 +32,7 @@ export const useConfirmPersistencePrompt = (stateContainer: DiscoverStateContain updateFiltersReferences(adHocDataView, persistedDataView); stateContainer.actions.removeAdHocDataViewById(adHocDataView.id!); - await stateContainer.replaceUrlAppState({ index: persistedDataView.id }); + await stateContainer.appState.update({ index: persistedDataView.id }, true); const message = i18n.translate('discover.dataViewPersist.message', { defaultMessage: "Saved '{dataViewName}'", diff --git a/src/plugins/discover/public/utils/add_log.ts b/src/plugins/discover/public/utils/add_log.ts new file mode 100644 index 000000000000..fd2de53ab4e6 --- /dev/null +++ b/src/plugins/discover/public/utils/add_log.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * Conditional (window.ELASTIC_DISCOVER_LOGGER needs to be set to true) logger function + * @param message - mandatory message to log + * @param payload - optional object to log + */ + +export const addLog = (message: string, payload?: unknown) => { + // @ts-expect-error + if (window?.ELASTIC_DISCOVER_LOGGER) { + // eslint-disable-next-line no-console + console.log(`[Discover] ${message}`, payload); + } +}; diff --git a/src/plugins/discover/public/utils/get_sharing_data.ts b/src/plugins/discover/public/utils/get_sharing_data.ts index 9a32a2431649..d1c07b0c13c6 100644 --- a/src/plugins/discover/public/utils/get_sharing_data.ts +++ b/src/plugins/discover/public/utils/get_sharing_data.ts @@ -15,14 +15,16 @@ import type { } from '@kbn/data-plugin/public'; import type { Filter } from '@kbn/es-query'; import type { SavedSearch, SortOrder } from '@kbn/saved-search-plugin/public'; -import { AppState } from '../application/main/services/discover_app_state_container'; +import { + AppState, + isEqualFilters, +} from '../application/main/services/discover_app_state_container'; import { getSortForSearchSource } from './sorting'; import { DOC_HIDE_TIME_COLUMN_SETTING, SEARCH_FIELDS_FROM_SOURCE, SORT_DEFAULT_ORDER_SETTING, } from '../../common'; -import { isEqualFilters } from '../application/main/services/discover_state'; /** * Preparing data to share the current state as link or CSV/Report From 8ec4b789884f8d919cae28c15eaf1ceb0f64bc63 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 14 Feb 2023 00:47:16 -0500 Subject: [PATCH 08/31] [api-docs] 2023-02-14 Daily api_docs build (#151096) Generated by https://buildkite.com/elastic/kibana-api-docs-daily/builds/248 --- api_docs/actions.mdx | 2 +- api_docs/advanced_settings.mdx | 4 +- api_docs/aiops.mdx | 2 +- api_docs/alerting.devdocs.json | 161 ++++- api_docs/alerting.mdx | 7 +- api_docs/apm.mdx | 2 +- api_docs/banners.mdx | 2 +- api_docs/bfetch.mdx | 2 +- api_docs/canvas.mdx | 2 +- api_docs/cases.mdx | 2 +- api_docs/charts.mdx | 2 +- api_docs/cloud.mdx | 2 +- api_docs/cloud_chat.mdx | 2 +- api_docs/cloud_data_migration.mdx | 2 +- api_docs/cloud_defend.mdx | 2 +- api_docs/cloud_experiments.mdx | 2 +- api_docs/cloud_security_posture.mdx | 2 +- api_docs/console.mdx | 2 +- api_docs/content_management.devdocs.json | 51 ++ api_docs/content_management.mdx | 7 +- api_docs/controls.mdx | 2 +- api_docs/custom_integrations.mdx | 2 +- api_docs/dashboard.mdx | 2 +- api_docs/dashboard_enhanced.mdx | 2 +- api_docs/data.mdx | 2 +- api_docs/data_query.mdx | 2 +- api_docs/data_search.mdx | 2 +- api_docs/data_view_editor.mdx | 2 +- api_docs/data_view_field_editor.mdx | 2 +- api_docs/data_view_management.mdx | 2 +- api_docs/data_views.mdx | 2 +- api_docs/data_visualizer.mdx | 2 +- api_docs/deprecations_by_api.mdx | 2 +- api_docs/deprecations_by_plugin.mdx | 2 +- api_docs/deprecations_by_team.mdx | 2 +- api_docs/dev_tools.mdx | 2 +- api_docs/discover.mdx | 2 +- api_docs/discover_enhanced.mdx | 2 +- api_docs/ecs_data_quality_dashboard.mdx | 2 +- api_docs/embeddable.mdx | 2 +- api_docs/embeddable_enhanced.mdx | 2 +- api_docs/encrypted_saved_objects.mdx | 2 +- api_docs/enterprise_search.mdx | 2 +- api_docs/es_ui_shared.mdx | 2 +- api_docs/event_annotation.mdx | 2 +- api_docs/event_log.mdx | 2 +- api_docs/expression_error.mdx | 2 +- api_docs/expression_gauge.mdx | 2 +- api_docs/expression_heatmap.mdx | 2 +- api_docs/expression_image.mdx | 2 +- api_docs/expression_legacy_metric_vis.mdx | 2 +- api_docs/expression_metric.mdx | 2 +- api_docs/expression_metric_vis.mdx | 2 +- api_docs/expression_partition_vis.mdx | 2 +- api_docs/expression_repeat_image.mdx | 2 +- api_docs/expression_reveal_image.mdx | 2 +- api_docs/expression_shape.mdx | 2 +- api_docs/expression_tagcloud.mdx | 2 +- api_docs/expression_x_y.mdx | 2 +- api_docs/expressions.mdx | 2 +- api_docs/features.mdx | 2 +- api_docs/field_formats.mdx | 2 +- api_docs/file_upload.mdx | 2 +- api_docs/files.mdx | 2 +- api_docs/files_management.mdx | 2 +- api_docs/fleet.devdocs.json | 133 +++- api_docs/fleet.mdx | 4 +- api_docs/global_search.mdx | 2 +- api_docs/guided_onboarding.mdx | 2 +- api_docs/home.mdx | 2 +- api_docs/image_embeddable.mdx | 2 +- api_docs/index_lifecycle_management.mdx | 2 +- api_docs/index_management.mdx | 2 +- api_docs/infra.mdx | 2 +- api_docs/inspector.mdx | 2 +- api_docs/interactive_setup.mdx | 2 +- api_docs/kbn_ace.mdx | 2 +- api_docs/kbn_aiops_components.mdx | 2 +- api_docs/kbn_aiops_utils.mdx | 2 +- api_docs/kbn_alerts.mdx | 2 +- api_docs/kbn_alerts_ui_shared.mdx | 2 +- api_docs/kbn_analytics.mdx | 2 +- api_docs/kbn_analytics_client.mdx | 2 +- ..._analytics_shippers_elastic_v3_browser.mdx | 2 +- ...n_analytics_shippers_elastic_v3_common.mdx | 2 +- ...n_analytics_shippers_elastic_v3_server.mdx | 2 +- api_docs/kbn_analytics_shippers_fullstory.mdx | 2 +- api_docs/kbn_analytics_shippers_gainsight.mdx | 2 +- api_docs/kbn_apm_config_loader.mdx | 2 +- api_docs/kbn_apm_synthtrace.mdx | 2 +- .../kbn_apm_synthtrace_client.devdocs.json | 6 +- api_docs/kbn_apm_synthtrace_client.mdx | 2 +- api_docs/kbn_apm_utils.mdx | 2 +- api_docs/kbn_axe_config.mdx | 2 +- api_docs/kbn_cases_components.mdx | 2 +- api_docs/kbn_cell_actions.devdocs.json | 36 +- api_docs/kbn_cell_actions.mdx | 4 +- api_docs/kbn_chart_expressions_common.mdx | 2 +- api_docs/kbn_chart_icons.mdx | 2 +- api_docs/kbn_ci_stats_core.mdx | 2 +- api_docs/kbn_ci_stats_performance_metrics.mdx | 2 +- api_docs/kbn_ci_stats_reporter.mdx | 2 +- api_docs/kbn_cli_dev_mode.mdx | 2 +- api_docs/kbn_code_editor.mdx | 2 +- api_docs/kbn_code_editor_mocks.mdx | 2 +- api_docs/kbn_coloring.mdx | 2 +- api_docs/kbn_config.mdx | 2 +- api_docs/kbn_config_mocks.mdx | 2 +- api_docs/kbn_config_schema.mdx | 2 +- .../kbn_content_management_content_editor.mdx | 2 +- .../kbn_content_management_table_list.mdx | 2 +- api_docs/kbn_core_analytics_browser.mdx | 2 +- .../kbn_core_analytics_browser_internal.mdx | 2 +- api_docs/kbn_core_analytics_browser_mocks.mdx | 2 +- api_docs/kbn_core_analytics_server.mdx | 2 +- .../kbn_core_analytics_server_internal.mdx | 2 +- api_docs/kbn_core_analytics_server_mocks.mdx | 2 +- api_docs/kbn_core_application_browser.mdx | 2 +- .../kbn_core_application_browser_internal.mdx | 2 +- .../kbn_core_application_browser_mocks.mdx | 2 +- api_docs/kbn_core_application_common.mdx | 2 +- api_docs/kbn_core_apps_browser_internal.mdx | 2 +- api_docs/kbn_core_apps_browser_mocks.mdx | 2 +- api_docs/kbn_core_apps_server_internal.mdx | 2 +- api_docs/kbn_core_base_browser_mocks.mdx | 2 +- api_docs/kbn_core_base_common.mdx | 2 +- api_docs/kbn_core_base_server_internal.mdx | 2 +- api_docs/kbn_core_base_server_mocks.mdx | 2 +- .../kbn_core_capabilities_browser_mocks.mdx | 2 +- api_docs/kbn_core_capabilities_common.mdx | 2 +- api_docs/kbn_core_capabilities_server.mdx | 2 +- .../kbn_core_capabilities_server_mocks.mdx | 2 +- api_docs/kbn_core_chrome_browser.mdx | 2 +- api_docs/kbn_core_chrome_browser_mocks.mdx | 2 +- api_docs/kbn_core_config_server_internal.mdx | 2 +- api_docs/kbn_core_custom_branding_browser.mdx | 2 +- ..._core_custom_branding_browser_internal.mdx | 2 +- ...kbn_core_custom_branding_browser_mocks.mdx | 2 +- api_docs/kbn_core_custom_branding_common.mdx | 2 +- api_docs/kbn_core_custom_branding_server.mdx | 2 +- ...n_core_custom_branding_server_internal.mdx | 2 +- .../kbn_core_custom_branding_server_mocks.mdx | 2 +- api_docs/kbn_core_deprecations_browser.mdx | 2 +- ...kbn_core_deprecations_browser_internal.mdx | 2 +- .../kbn_core_deprecations_browser_mocks.mdx | 2 +- api_docs/kbn_core_deprecations_common.mdx | 2 +- api_docs/kbn_core_deprecations_server.mdx | 2 +- .../kbn_core_deprecations_server_internal.mdx | 2 +- .../kbn_core_deprecations_server_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_browser.mdx | 2 +- api_docs/kbn_core_doc_links_browser_mocks.mdx | 2 +- api_docs/kbn_core_doc_links_server.mdx | 2 +- api_docs/kbn_core_doc_links_server_mocks.mdx | 2 +- ...e_elasticsearch_client_server_internal.mdx | 2 +- ...core_elasticsearch_client_server_mocks.mdx | 2 +- api_docs/kbn_core_elasticsearch_server.mdx | 2 +- ...kbn_core_elasticsearch_server_internal.mdx | 2 +- .../kbn_core_elasticsearch_server_mocks.mdx | 2 +- .../kbn_core_environment_server_internal.mdx | 2 +- .../kbn_core_environment_server_mocks.mdx | 2 +- .../kbn_core_execution_context_browser.mdx | 2 +- ...ore_execution_context_browser_internal.mdx | 2 +- ...n_core_execution_context_browser_mocks.mdx | 2 +- .../kbn_core_execution_context_common.mdx | 2 +- .../kbn_core_execution_context_server.mdx | 2 +- ...core_execution_context_server_internal.mdx | 2 +- ...bn_core_execution_context_server_mocks.mdx | 2 +- api_docs/kbn_core_fatal_errors_browser.mdx | 2 +- .../kbn_core_fatal_errors_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_browser.mdx | 2 +- api_docs/kbn_core_http_browser_internal.mdx | 2 +- api_docs/kbn_core_http_browser_mocks.mdx | 2 +- api_docs/kbn_core_http_common.mdx | 2 +- .../kbn_core_http_context_server_mocks.mdx | 2 +- ...re_http_request_handler_context_server.mdx | 2 +- api_docs/kbn_core_http_resources_server.mdx | 2 +- ...bn_core_http_resources_server_internal.mdx | 2 +- .../kbn_core_http_resources_server_mocks.mdx | 2 +- .../kbn_core_http_router_server_internal.mdx | 2 +- .../kbn_core_http_router_server_mocks.mdx | 2 +- api_docs/kbn_core_http_server.mdx | 2 +- api_docs/kbn_core_http_server_internal.mdx | 2 +- api_docs/kbn_core_http_server_mocks.mdx | 2 +- api_docs/kbn_core_i18n_browser.mdx | 2 +- api_docs/kbn_core_i18n_browser_mocks.mdx | 2 +- api_docs/kbn_core_i18n_server.mdx | 2 +- api_docs/kbn_core_i18n_server_internal.mdx | 2 +- api_docs/kbn_core_i18n_server_mocks.mdx | 2 +- ...n_core_injected_metadata_browser_mocks.mdx | 2 +- ...kbn_core_integrations_browser_internal.mdx | 2 +- .../kbn_core_integrations_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_browser.mdx | 2 +- api_docs/kbn_core_lifecycle_browser_mocks.mdx | 2 +- api_docs/kbn_core_lifecycle_server.mdx | 2 +- api_docs/kbn_core_lifecycle_server_mocks.mdx | 2 +- api_docs/kbn_core_logging_browser_mocks.mdx | 2 +- api_docs/kbn_core_logging_common_internal.mdx | 2 +- api_docs/kbn_core_logging_server.mdx | 2 +- api_docs/kbn_core_logging_server_internal.mdx | 2 +- api_docs/kbn_core_logging_server_mocks.mdx | 2 +- ...ore_metrics_collectors_server_internal.mdx | 2 +- ...n_core_metrics_collectors_server_mocks.mdx | 2 +- api_docs/kbn_core_metrics_server.mdx | 2 +- api_docs/kbn_core_metrics_server_internal.mdx | 2 +- api_docs/kbn_core_metrics_server_mocks.mdx | 2 +- api_docs/kbn_core_mount_utils_browser.mdx | 2 +- api_docs/kbn_core_node_server.mdx | 2 +- api_docs/kbn_core_node_server_internal.mdx | 2 +- api_docs/kbn_core_node_server_mocks.mdx | 2 +- api_docs/kbn_core_notifications_browser.mdx | 2 +- ...bn_core_notifications_browser_internal.mdx | 2 +- .../kbn_core_notifications_browser_mocks.mdx | 2 +- api_docs/kbn_core_overlays_browser.mdx | 2 +- .../kbn_core_overlays_browser_internal.mdx | 2 +- api_docs/kbn_core_overlays_browser_mocks.mdx | 2 +- api_docs/kbn_core_plugins_browser.mdx | 2 +- api_docs/kbn_core_plugins_browser_mocks.mdx | 2 +- api_docs/kbn_core_plugins_server.mdx | 2 +- api_docs/kbn_core_plugins_server_mocks.mdx | 2 +- api_docs/kbn_core_preboot_server.mdx | 2 +- api_docs/kbn_core_preboot_server_mocks.mdx | 2 +- api_docs/kbn_core_rendering_browser_mocks.mdx | 2 +- .../kbn_core_rendering_server_internal.mdx | 2 +- api_docs/kbn_core_rendering_server_mocks.mdx | 2 +- api_docs/kbn_core_root_server_internal.mdx | 2 +- .../kbn_core_saved_objects_api_browser.mdx | 2 +- .../kbn_core_saved_objects_api_server.mdx | 2 +- ...core_saved_objects_api_server_internal.mdx | 2 +- ...bn_core_saved_objects_api_server_mocks.mdx | 2 +- ...ore_saved_objects_base_server_internal.mdx | 2 +- ...n_core_saved_objects_base_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_browser.mdx | 2 +- ...bn_core_saved_objects_browser_internal.mdx | 2 +- .../kbn_core_saved_objects_browser_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_common.mdx | 2 +- ..._objects_import_export_server_internal.mdx | 2 +- ...ved_objects_import_export_server_mocks.mdx | 2 +- ...aved_objects_migration_server_internal.mdx | 2 +- ...e_saved_objects_migration_server_mocks.mdx | 2 +- api_docs/kbn_core_saved_objects_server.mdx | 2 +- ...saved_objects_server_internal.devdocs.json | 44 +- ...kbn_core_saved_objects_server_internal.mdx | 2 +- .../kbn_core_saved_objects_server_mocks.mdx | 2 +- .../kbn_core_saved_objects_utils_server.mdx | 2 +- api_docs/kbn_core_status_common.mdx | 2 +- api_docs/kbn_core_status_common_internal.mdx | 2 +- api_docs/kbn_core_status_server.mdx | 2 +- api_docs/kbn_core_status_server_internal.mdx | 2 +- api_docs/kbn_core_status_server_mocks.mdx | 2 +- ...core_test_helpers_deprecations_getters.mdx | 2 +- ...n_core_test_helpers_http_setup_browser.mdx | 2 +- api_docs/kbn_core_test_helpers_kbn_server.mdx | 2 +- ...n_core_test_helpers_so_type_serializer.mdx | 2 +- api_docs/kbn_core_test_helpers_test_utils.mdx | 2 +- api_docs/kbn_core_theme_browser.mdx | 2 +- api_docs/kbn_core_theme_browser_internal.mdx | 2 +- api_docs/kbn_core_theme_browser_mocks.mdx | 2 +- api_docs/kbn_core_ui_settings_browser.mdx | 4 +- .../kbn_core_ui_settings_browser_internal.mdx | 4 +- .../kbn_core_ui_settings_browser_mocks.mdx | 4 +- api_docs/kbn_core_ui_settings_common.mdx | 4 +- api_docs/kbn_core_ui_settings_server.mdx | 4 +- .../kbn_core_ui_settings_server_internal.mdx | 4 +- .../kbn_core_ui_settings_server_mocks.mdx | 4 +- api_docs/kbn_core_usage_data_server.mdx | 2 +- .../kbn_core_usage_data_server_internal.mdx | 2 +- api_docs/kbn_core_usage_data_server_mocks.mdx | 2 +- api_docs/kbn_crypto.mdx | 2 +- api_docs/kbn_crypto_browser.mdx | 2 +- api_docs/kbn_cypress_config.mdx | 2 +- api_docs/kbn_datemath.mdx | 2 +- api_docs/kbn_dev_cli_errors.mdx | 2 +- api_docs/kbn_dev_cli_runner.mdx | 2 +- api_docs/kbn_dev_proc_runner.mdx | 2 +- api_docs/kbn_dev_utils.mdx | 2 +- api_docs/kbn_doc_links.mdx | 2 +- api_docs/kbn_docs_utils.mdx | 2 +- api_docs/kbn_ebt_tools.mdx | 2 +- api_docs/kbn_ecs.mdx | 2 +- api_docs/kbn_ecs_data_quality_dashboard.mdx | 2 +- api_docs/kbn_es.mdx | 2 +- api_docs/kbn_es_archiver.mdx | 2 +- api_docs/kbn_es_errors.mdx | 2 +- api_docs/kbn_es_query.mdx | 2 +- api_docs/kbn_es_types.mdx | 2 +- api_docs/kbn_eslint_plugin_imports.mdx | 2 +- api_docs/kbn_field_types.mdx | 2 +- api_docs/kbn_find_used_node_modules.mdx | 2 +- .../kbn_ftr_common_functional_services.mdx | 2 +- api_docs/kbn_generate.mdx | 2 +- api_docs/kbn_guided_onboarding.mdx | 2 +- api_docs/kbn_handlebars.mdx | 2 +- api_docs/kbn_hapi_mocks.mdx | 2 +- api_docs/kbn_health_gateway_server.mdx | 2 +- api_docs/kbn_home_sample_data_card.mdx | 2 +- api_docs/kbn_home_sample_data_tab.mdx | 2 +- api_docs/kbn_i18n.mdx | 2 +- api_docs/kbn_i18n_react.mdx | 2 +- api_docs/kbn_import_resolver.mdx | 2 +- api_docs/kbn_interpreter.mdx | 2 +- api_docs/kbn_io_ts_utils.mdx | 2 +- api_docs/kbn_jest_serializers.mdx | 2 +- api_docs/kbn_journeys.mdx | 2 +- api_docs/kbn_json_ast.mdx | 2 +- api_docs/kbn_kibana_manifest_schema.mdx | 2 +- .../kbn_language_documentation_popover.mdx | 2 +- api_docs/kbn_logging.mdx | 2 +- api_docs/kbn_logging_mocks.mdx | 2 +- api_docs/kbn_managed_vscode_config.mdx | 2 +- api_docs/kbn_mapbox_gl.mdx | 2 +- api_docs/kbn_ml_agg_utils.mdx | 2 +- api_docs/kbn_ml_date_picker.mdx | 2 +- api_docs/kbn_ml_is_defined.mdx | 2 +- api_docs/kbn_ml_is_populated_object.mdx | 2 +- api_docs/kbn_ml_local_storage.mdx | 2 +- api_docs/kbn_ml_nested_property.mdx | 2 +- api_docs/kbn_ml_query_utils.mdx | 2 +- api_docs/kbn_ml_string_hash.mdx | 2 +- api_docs/kbn_ml_url_state.mdx | 2 +- api_docs/kbn_monaco.mdx | 2 +- api_docs/kbn_optimizer.mdx | 2 +- api_docs/kbn_optimizer_webpack_helpers.mdx | 2 +- api_docs/kbn_osquery_io_ts_types.mdx | 2 +- ..._performance_testing_dataset_extractor.mdx | 2 +- api_docs/kbn_plugin_generator.mdx | 2 +- api_docs/kbn_plugin_helpers.mdx | 2 +- api_docs/kbn_react_field.mdx | 2 +- api_docs/kbn_repo_file_maps.mdx | 2 +- api_docs/kbn_repo_linter.mdx | 2 +- api_docs/kbn_repo_path.mdx | 2 +- api_docs/kbn_repo_source_classifier.mdx | 2 +- api_docs/kbn_rison.mdx | 2 +- api_docs/kbn_rule_data_utils.mdx | 2 +- .../kbn_securitysolution_autocomplete.mdx | 2 +- api_docs/kbn_securitysolution_ecs.mdx | 2 +- api_docs/kbn_securitysolution_es_utils.mdx | 2 +- ...ritysolution_exception_list_components.mdx | 2 +- api_docs/kbn_securitysolution_hook_utils.mdx | 2 +- ..._securitysolution_io_ts_alerting_types.mdx | 2 +- .../kbn_securitysolution_io_ts_list_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_types.mdx | 2 +- api_docs/kbn_securitysolution_io_ts_utils.mdx | 2 +- api_docs/kbn_securitysolution_list_api.mdx | 2 +- .../kbn_securitysolution_list_constants.mdx | 2 +- api_docs/kbn_securitysolution_list_hooks.mdx | 2 +- api_docs/kbn_securitysolution_list_utils.mdx | 2 +- api_docs/kbn_securitysolution_rules.mdx | 2 +- api_docs/kbn_securitysolution_t_grid.mdx | 2 +- api_docs/kbn_securitysolution_utils.mdx | 2 +- api_docs/kbn_server_http_tools.mdx | 2 +- api_docs/kbn_server_route_repository.mdx | 2 +- api_docs/kbn_shared_svg.mdx | 2 +- api_docs/kbn_shared_ux_avatar_solution.mdx | 2 +- ...ared_ux_avatar_user_profile_components.mdx | 2 +- .../kbn_shared_ux_button_exit_full_screen.mdx | 2 +- ...hared_ux_button_exit_full_screen_mocks.mdx | 2 +- api_docs/kbn_shared_ux_button_toolbar.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data.mdx | 2 +- api_docs/kbn_shared_ux_card_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_context.mdx | 2 +- api_docs/kbn_shared_ux_file_image.mdx | 2 +- api_docs/kbn_shared_ux_file_image_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_mocks.mdx | 2 +- api_docs/kbn_shared_ux_file_picker.mdx | 2 +- api_docs/kbn_shared_ux_file_upload.mdx | 2 +- api_docs/kbn_shared_ux_file_util.mdx | 2 +- api_docs/kbn_shared_ux_link_redirect_app.mdx | 2 +- .../kbn_shared_ux_link_redirect_app_mocks.mdx | 2 +- api_docs/kbn_shared_ux_markdown.mdx | 2 +- api_docs/kbn_shared_ux_markdown_mocks.mdx | 2 +- .../kbn_shared_ux_page_analytics_no_data.mdx | 2 +- ...shared_ux_page_analytics_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_no_data.mdx | 2 +- ...bn_shared_ux_page_kibana_no_data_mocks.mdx | 2 +- .../kbn_shared_ux_page_kibana_template.mdx | 2 +- ...n_shared_ux_page_kibana_template_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data.mdx | 2 +- .../kbn_shared_ux_page_no_data_config.mdx | 2 +- ...bn_shared_ux_page_no_data_config_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_no_data_mocks.mdx | 2 +- api_docs/kbn_shared_ux_page_solution_nav.mdx | 2 +- .../kbn_shared_ux_prompt_no_data_views.mdx | 2 +- ...n_shared_ux_prompt_no_data_views_mocks.mdx | 2 +- api_docs/kbn_shared_ux_prompt_not_found.mdx | 2 +- api_docs/kbn_shared_ux_router.mdx | 2 +- api_docs/kbn_shared_ux_router_mocks.mdx | 2 +- api_docs/kbn_shared_ux_storybook_config.mdx | 2 +- api_docs/kbn_shared_ux_storybook_mock.mdx | 2 +- api_docs/kbn_shared_ux_utility.mdx | 2 +- api_docs/kbn_slo_schema.devdocs.json | 10 +- api_docs/kbn_slo_schema.mdx | 2 +- api_docs/kbn_some_dev_log.mdx | 2 +- api_docs/kbn_std.mdx | 2 +- api_docs/kbn_stdio_dev_helpers.mdx | 2 +- api_docs/kbn_storybook.mdx | 2 +- api_docs/kbn_telemetry_tools.mdx | 2 +- api_docs/kbn_test.mdx | 2 +- api_docs/kbn_test_jest_helpers.mdx | 2 +- api_docs/kbn_test_subj_selector.mdx | 2 +- api_docs/kbn_tooling_log.mdx | 2 +- api_docs/kbn_ts_projects.mdx | 2 +- api_docs/kbn_typed_react_router_config.mdx | 2 +- api_docs/kbn_ui_actions_browser.mdx | 2 +- api_docs/kbn_ui_shared_deps_src.mdx | 2 +- api_docs/kbn_ui_theme.mdx | 2 +- api_docs/kbn_user_profile_components.mdx | 2 +- api_docs/kbn_utility_types.mdx | 2 +- api_docs/kbn_utility_types_jest.mdx | 2 +- api_docs/kbn_utils.mdx | 2 +- api_docs/kbn_yarn_lock_validator.mdx | 2 +- api_docs/kibana_overview.mdx | 2 +- api_docs/kibana_react.mdx | 2 +- api_docs/kibana_utils.mdx | 2 +- api_docs/kubernetes_security.mdx | 2 +- api_docs/lens.mdx | 2 +- api_docs/license_api_guard.mdx | 2 +- api_docs/license_management.mdx | 2 +- api_docs/licensing.mdx | 2 +- api_docs/lists.mdx | 2 +- api_docs/management.mdx | 2 +- api_docs/maps.mdx | 2 +- api_docs/maps_ems.mdx | 2 +- api_docs/ml.devdocs.json | 17 +- api_docs/ml.mdx | 4 +- api_docs/monitoring.mdx | 2 +- api_docs/monitoring_collection.mdx | 2 +- api_docs/navigation.mdx | 2 +- api_docs/newsfeed.mdx | 2 +- api_docs/notifications.mdx | 2 +- api_docs/observability.devdocs.json | 12 +- api_docs/observability.mdx | 2 +- api_docs/osquery.mdx | 2 +- api_docs/plugin_directory.mdx | 32 +- api_docs/presentation_util.mdx | 2 +- api_docs/profiling.mdx | 2 +- api_docs/remote_clusters.mdx | 2 +- api_docs/reporting.mdx | 2 +- api_docs/rollup.mdx | 2 +- api_docs/rule_registry.devdocs.json | 4 +- api_docs/rule_registry.mdx | 2 +- api_docs/runtime_fields.mdx | 2 +- api_docs/saved_objects.mdx | 2 +- api_docs/saved_objects_finder.mdx | 2 +- api_docs/saved_objects_management.mdx | 2 +- api_docs/saved_objects_tagging.mdx | 2 +- api_docs/saved_objects_tagging_oss.mdx | 2 +- api_docs/saved_search.mdx | 2 +- api_docs/screenshot_mode.mdx | 2 +- api_docs/screenshotting.mdx | 2 +- api_docs/security.mdx | 2 +- api_docs/security_solution.mdx | 2 +- api_docs/session_view.mdx | 2 +- api_docs/share.mdx | 2 +- api_docs/snapshot_restore.mdx | 2 +- api_docs/spaces.mdx | 2 +- api_docs/stack_alerts.mdx | 2 +- api_docs/stack_connectors.mdx | 2 +- api_docs/task_manager.mdx | 2 +- api_docs/telemetry.mdx | 2 +- api_docs/telemetry_collection_manager.mdx | 2 +- api_docs/telemetry_collection_xpack.mdx | 2 +- api_docs/telemetry_management_section.mdx | 2 +- api_docs/threat_intelligence.mdx | 2 +- api_docs/timelines.mdx | 2 +- api_docs/transform.mdx | 2 +- api_docs/triggers_actions_ui.devdocs.json | 684 +----------------- api_docs/triggers_actions_ui.mdx | 4 +- api_docs/ui_actions.mdx | 2 +- api_docs/ui_actions_enhanced.mdx | 2 +- api_docs/unified_field_list.mdx | 2 +- api_docs/unified_histogram.mdx | 2 +- api_docs/unified_search.mdx | 2 +- api_docs/unified_search_autocomplete.mdx | 2 +- api_docs/url_forwarding.mdx | 2 +- api_docs/usage_collection.mdx | 2 +- api_docs/ux.mdx | 2 +- api_docs/vis_default_editor.mdx | 2 +- api_docs/vis_type_gauge.mdx | 2 +- api_docs/vis_type_heatmap.mdx | 2 +- api_docs/vis_type_pie.mdx | 2 +- api_docs/vis_type_table.mdx | 2 +- api_docs/vis_type_timelion.mdx | 2 +- api_docs/vis_type_timeseries.mdx | 2 +- api_docs/vis_type_vega.mdx | 2 +- api_docs/vis_type_vislib.mdx | 2 +- api_docs/vis_type_xy.mdx | 2 +- api_docs/visualizations.mdx | 2 +- 487 files changed, 929 insertions(+), 1245 deletions(-) diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index b9be91ce21ae..8081780e1ea0 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-02-13 +date: 2023-02-14 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 2aad7fea352b..611a57d44acb 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; -Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 5709065f00ce..05dc6e5afd7c 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-02-13 +date: 2023-02-14 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 3841ad035843..0c55e3fbddf4 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -1711,6 +1711,22 @@ "trackAdoption": false, "children": [], "returnComment": [] + }, + { + "parentPluginId": "alerting", + "id": "def-server.PluginSetupContract.getFrameworkAlertsEnabled", + "type": "Function", + "tags": [], + "label": "getFrameworkAlertsEnabled", + "description": [], + "signature": [ + "() => boolean" + ], + "path": "x-pack/plugins/alerting/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] } ], "initialIsOpen": false @@ -3177,6 +3193,23 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY_NAME", + "type": "string", + "tags": [], + "label": "DEFAULT_ALERTS_ILM_POLICY_NAME", + "description": [ + "\nDefault alert index ILM policy\n- _meta.managed: notify users this is a managed policy and should be modified\n at their own risk\n- no delete phase as we want to keep these indices around indefinitely\n\nThis should be used by all alerts-as-data indices" + ], + "signature": [ + "\".alerts-ilm-policy\"" + ], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "alerting", "id": "def-server.DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT", @@ -3648,7 +3681,133 @@ "initialIsOpen": false } ], - "objects": [] + "objects": [ + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY", + "type": "Object", + "tags": [], + "label": "DEFAULT_ALERTS_ILM_POLICY", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY.policy", + "type": "Object", + "tags": [], + "label": "policy", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY.policy._meta", + "type": "Object", + "tags": [], + "label": "_meta", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY.policy._meta.managed", + "type": "boolean", + "tags": [], + "label": "managed", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY.policy.phases", + "type": "Object", + "tags": [], + "label": "phases", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY.policy.phases.hot", + "type": "Object", + "tags": [], + "label": "hot", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY.policy.phases.hot.actions", + "type": "Object", + "tags": [], + "label": "actions", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY.policy.phases.hot.actions.rollover", + "type": "Object", + "tags": [], + "label": "rollover", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY.policy.phases.hot.actions.rollover.max_age", + "type": "string", + "tags": [], + "label": "max_age", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.DEFAULT_ALERTS_ILM_POLICY.policy.phases.hot.actions.rollover.max_primary_shard_size", + "type": "string", + "tags": [], + "label": "max_primary_shard_size", + "description": [], + "path": "x-pack/plugins/alerting/server/alerts_service/default_lifecycle_policy.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "initialIsOpen": false + } + ] }, "common": { "classes": [], diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 375da7aabf00..3b9b6704f78b 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 476 | 1 | 466 | 39 | +| 488 | 1 | 477 | 39 | ## Client @@ -36,6 +36,9 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o ## Server +### Objects + + ### Functions diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 2274cfb6f758..0641e7936a08 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 573a7276b969..e57536e8708c 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index ae8d802eb9bb..85473c285f16 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index d3c44ad29fbe..e4fc87e19b29 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index b57d875ca98f..6d355aa7b186 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 208035ee0e51..53fc1e7251f0 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 3dd05b4caa69..e73ce3a08318 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_chat.mdx b/api_docs/cloud_chat.mdx index 8348bc64b0c5..11590e43c484 100644 --- a/api_docs/cloud_chat.mdx +++ b/api_docs/cloud_chat.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudChat title: "cloudChat" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudChat plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudChat'] --- import cloudChatObj from './cloud_chat.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index e59aaa8f4662..6fe3cbd675fb 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index 4d1771e9abed..a95b0365b8a7 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index c9ba0c13625b..947805cae74e 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 1f26d30425d2..84532c797d8b 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 1e72619a9d2d..40c95cb431af 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.devdocs.json b/api_docs/content_management.devdocs.json index e745837e88bc..cd44c8835e20 100644 --- a/api_docs/content_management.devdocs.json +++ b/api_docs/content_management.devdocs.json @@ -31,10 +31,61 @@ "path": "src/plugins/content_management/public/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "contentManagement", + "id": "def-public.ContentManagementPublicStart.registry", + "type": "Object", + "tags": [], + "label": "registry", + "description": [], + "signature": [ + "{ get: (id: string) => ", + "ContentType", + " | undefined; getAll: () => ", + "ContentType", + "[]; }" + ], + "path": "src/plugins/content_management/public/types.ts", + "deprecated": false, + "trackAdoption": false } ], "lifecycle": "start", "initialIsOpen": true + }, + "setup": { + "parentPluginId": "contentManagement", + "id": "def-public.ContentManagementPublicSetup", + "type": "Interface", + "tags": [], + "label": "ContentManagementPublicSetup", + "description": [], + "path": "src/plugins/content_management/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "contentManagement", + "id": "def-public.ContentManagementPublicSetup.registry", + "type": "Object", + "tags": [], + "label": "registry", + "description": [], + "signature": [ + "{ register: (definition: ", + "ContentTypeDefinition", + ") => ", + "ContentType", + "; }" + ], + "path": "src/plugins/content_management/public/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "lifecycle": "setup", + "initialIsOpen": true } }, "server": { diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index 4d2b9e6e5351..ac9a30392db9 100644 --- a/api_docs/content_management.mdx +++ b/api_docs/content_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement title: "contentManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the contentManagement plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; @@ -21,10 +21,13 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 22 | 0 | 22 | 1 | +| 25 | 0 | 25 | 3 | ## Client +### Setup + + ### Start diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 71cd2e5f65cd..67cd5ac67afc 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index 8bdd11f8b69b..508a37683a8e 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 6e387484de43..c51b0138a8dd 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 09a6d90b76b8..068e3153c338 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 190d0276f2e2..03a33ea3ad68 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index ab079f19bf2d..917b2f1450b3 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index bbb7a415a99e..cc0012f6531e 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index cf8efde83624..c24951b3827a 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 6e12552b4a43..7e1f931c115c 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index c4a0c8822f00..b611bafdd9e6 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index e6492a967fb7..eb42fba4b9ee 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 8381a9127796..ec3b49422310 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 37268da64d6f..090f291a24f2 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 4bcdb9a901e1..eabbfad5bed7 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 50f8afa08c80..997514f33bf7 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 41d539f12123..d4d6f60e325b 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 7ae9672c4493..8eb7c1066e9a 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 10b4c487e8fd..29889770155d 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 8ab9a88d3a59..35d7f7461133 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index a42c12b9cf58..1ebab619b4a6 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-02-13 +date: 2023-02-14 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 28e675627e8e..a1630d4a1da7 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-02-13 +date: 2023-02-14 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 1b99d881f352..3b9785ee471b 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-02-13 +date: 2023-02-14 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 0415fed32838..a82ccaf66060 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-02-13 +date: 2023-02-14 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 434c2bd5ea78..90a3577de385 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-02-13 +date: 2023-02-14 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 b7b0b6b76eb4..d164db625637 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-02-13 +date: 2023-02-14 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 166b99f16fca..d2270b0d3220 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-02-13 +date: 2023-02-14 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 06e9cec3bc98..d9afef81e588 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-02-13 +date: 2023-02-14 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 c8d1013f8c1d..d653c57a7cc0 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-02-13 +date: 2023-02-14 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 cd9983cefeb3..203f42c0e0dc 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-02-13 +date: 2023-02-14 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 6602fc473f8b..137d86ba7456 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-02-13 +date: 2023-02-14 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 4d812d11b4bf..2b036b95e470 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-02-13 +date: 2023-02-14 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 a8ba54652620..5ccbe20ce0df 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-02-13 +date: 2023-02-14 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 7fd4da9966fd..107f0ba24604 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-02-13 +date: 2023-02-14 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 64c80e93089f..5978e57d2c54 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-02-13 +date: 2023-02-14 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 7a6ad29dfc08..096b2e79b235 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-02-13 +date: 2023-02-14 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 51d9a7b54a37..28b2429a71aa 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-02-13 +date: 2023-02-14 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 ad6746552118..b966fb8190da 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-02-13 +date: 2023-02-14 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 af19b56f0b27..692ecd0d33d8 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-02-13 +date: 2023-02-14 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 122fce6eb9c2..0e9067daa991 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-02-13 +date: 2023-02-14 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 fdf04289d9dc..f22be28c0686 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-02-13 +date: 2023-02-14 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 c7cf28c806c0..9acfd8cc9ecf 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-02-13 +date: 2023-02-14 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 ec7a134ceda1..fff83c3c4e30 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-02-13 +date: 2023-02-14 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 57c4d6a70bdb..dee0043b492e 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-02-13 +date: 2023-02-14 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 14ccd3730ff4..d22bbb90e6ea 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-02-13 +date: 2023-02-14 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 792cafaeee9b..36e1399bb18d 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-02-13 +date: 2023-02-14 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 1a95d073f190..eb4d759b1983 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -5470,6 +5470,100 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-server.MessageSigningServiceInterface", + "type": "Interface", + "tags": [], + "label": "MessageSigningServiceInterface", + "description": [], + "path": "x-pack/plugins/fleet/server/services/security/message_signing_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-server.MessageSigningServiceInterface.generateKeyPair", + "type": "Function", + "tags": [], + "label": "generateKeyPair", + "description": [], + "signature": [ + "(providedPassphrase?: string | undefined) => Promise" + ], + "path": "x-pack/plugins/fleet/server/services/security/message_signing_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-server.MessageSigningServiceInterface.generateKeyPair.$1", + "type": "string", + "tags": [], + "label": "providedPassphrase", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/fleet/server/services/security/message_signing_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-server.MessageSigningServiceInterface.sign", + "type": "Function", + "tags": [], + "label": "sign", + "description": [], + "signature": [ + "(serializedMessage: object | Buffer) => Promise<{ data: Buffer; signature: string; }>" + ], + "path": "x-pack/plugins/fleet/server/services/security/message_signing_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-server.MessageSigningServiceInterface.sign.$1", + "type": "CompoundType", + "tags": [], + "label": "serializedMessage", + "description": [], + "signature": [ + "object | Buffer" + ], + "path": "x-pack/plugins/fleet/server/services/security/message_signing_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-server.MessageSigningServiceInterface.getPublicKey", + "type": "Function", + "tags": [], + "label": "getPublicKey", + "description": [], + "signature": [ + "() => Promise" + ], + "path": "x-pack/plugins/fleet/server/services/security/message_signing_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-server.PackageClient", @@ -15630,6 +15724,26 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-server.FleetStartContract.messageSigningService", + "type": "Object", + "tags": [], + "label": "messageSigningService", + "description": [], + "signature": [ + { + "pluginId": "fleet", + "scope": "server", + "docId": "kibFleetPluginApi", + "section": "def-server.MessageSigningServiceInterface", + "text": "MessageSigningServiceInterface" + } + ], + "path": "x-pack/plugins/fleet/server/plugin.ts", + "deprecated": false, + "trackAdoption": false } ], "lifecycle": "start", @@ -22357,7 +22471,7 @@ "label": "FleetServerAgentComponentStatus", "description": [], "signature": [ - "\"failed\" | \"degraded\" | \"starting\" | \"configuring\" | \"healthy\" | \"stopping\" | \"stopped\"" + "\"STARTING\" | \"CONFIGURING\" | \"HEALTHY\" | \"DEGRADED\" | \"FAILED\" | \"STOPPING\" | \"STOPPED\"" ], "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false, @@ -22831,6 +22945,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.MESSAGE_SIGNING_KEYS_SAVED_OBJECT_TYPE", + "type": "string", + "tags": [], + "label": "MESSAGE_SIGNING_KEYS_SAVED_OBJECT_TYPE", + "description": [], + "signature": [ + "\"fleet-message-signing-keys\"" + ], + "path": "x-pack/plugins/fleet/common/constants/message_signing_keys.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.NotInstalled", @@ -25206,7 +25335,7 @@ "label": "FleetServerAgentComponentStatuses", "description": [], "signature": [ - "readonly [\"starting\", \"configuring\", \"healthy\", \"degraded\", \"failed\", \"stopping\", \"stopped\"]" + "readonly [\"STARTING\", \"CONFIGURING\", \"HEALTHY\", \"DEGRADED\", \"FAILED\", \"STOPPING\", \"STOPPED\"]" ], "path": "x-pack/plugins/fleet/common/constants/agent.ts", "deprecated": false, diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index a1e6bfd8c7af..19e6e335302a 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1069 | 3 | 964 | 26 | +| 1077 | 3 | 972 | 26 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 905c4673901c..f9387f371098 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-02-13 +date: 2023-02-14 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 ad0f92923933..e171196eba9a 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-02-13 +date: 2023-02-14 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 6284487517ed..34b8bfcf3e71 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index 5749a8873dff..c29b43cc5985 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 1152691ad7e2..0205ba667c08 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-02-13 +date: 2023-02-14 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 e719e5935fa9..683632756e20 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-02-13 +date: 2023-02-14 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 5ee14e5b9834..838e6ef53036 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-02-13 +date: 2023-02-14 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 a7a08e977cbe..413e04890be5 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-02-13 +date: 2023-02-14 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 991447d3f14b..185cf6d18922 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-02-13 +date: 2023-02-14 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 64a742a86b13..64eed79df29a 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-02-13 +date: 2023-02-14 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 76e6fdd21d06..a01ad3e75580 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-02-13 +date: 2023-02-14 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 3d416f3e7ada..5233c4b69a34 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-02-13 +date: 2023-02-14 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 d16cee698712..b44fa5e1dea4 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts'] --- import kbnAlertsObj from './kbn_alerts.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index f4e37973e794..f6c1aa15d515 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 45f1e8636073..5553996ae104 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-02-13 +date: 2023-02-14 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 17ce8a3a75c3..58c7f1e508c7 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-02-13 +date: 2023-02-14 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 026ca948a937..63f8e6cd196c 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-02-13 +date: 2023-02-14 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 a2c5c4aed409..25a273427412 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-02-13 +date: 2023-02-14 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 f97c7500ae69..f999730a845b 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-02-13 +date: 2023-02-14 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 c6a5d84adf8f..375a243bda7f 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-02-13 +date: 2023-02-14 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 88c4a26d520e..849801c0b813 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-02-13 +date: 2023-02-14 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 cf5438c67ca4..a314f43892c4 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 291ddaf5f2b8..4170ff5d5a81 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.devdocs.json b/api_docs/kbn_apm_synthtrace_client.devdocs.json index 73dc27fa40f9..ea59a115a467 100644 --- a/api_docs/kbn_apm_synthtrace_client.devdocs.json +++ b/api_docs/kbn_apm_synthtrace_client.devdocs.json @@ -1892,7 +1892,7 @@ "label": "timerange", "description": [], "signature": [ - "(from: number | Date | moment.Moment, to: number | Date | moment.Moment) => ", + "(from: DateLike, to: DateLike) => ", { "pluginId": "@kbn/apm-synthtrace-client", "scope": "common", @@ -1913,7 +1913,7 @@ "label": "from", "description": [], "signature": [ - "number | Date | moment.Moment" + "DateLike" ], "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", "deprecated": false, @@ -1928,7 +1928,7 @@ "label": "to", "description": [], "signature": [ - "number | Date | moment.Moment" + "DateLike" ], "path": "packages/kbn-apm-synthtrace-client/src/lib/timerange.ts", "deprecated": false, diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 02cabdd7fc37..bd37b0ea4f67 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index ea0f36189cff..2b2f89f705b2 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-02-13 +date: 2023-02-14 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 c26f6d441476..249169e37641 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-02-13 +date: 2023-02-14 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 e1f07f443dc3..b89919c36413 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.devdocs.json b/api_docs/kbn_cell_actions.devdocs.json index 60b3a153b663..4d6a0fd76d2d 100644 --- a/api_docs/kbn_cell_actions.devdocs.json +++ b/api_docs/kbn_cell_actions.devdocs.json @@ -101,7 +101,7 @@ "label": "useDataGridColumnsCellActions", "description": [], "signature": [ - "({ fields, triggerId, metadata, disabledActions, }: ", + "({ fields, triggerId, metadata, dataGridRef, disabledActions, }: ", { "pluginId": "@kbn/cell-actions", "scope": "common", @@ -122,7 +122,7 @@ "id": "def-common.useDataGridColumnsCellActions.$1", "type": "Object", "tags": [], - "label": "{\n fields,\n triggerId,\n metadata,\n disabledActions = [],\n}", + "label": "{\n fields,\n triggerId,\n metadata,\n dataGridRef,\n disabledActions = [],\n}", "description": [], "signature": [ { @@ -332,22 +332,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "@kbn/cell-actions", - "id": "def-common.CellActionExecutionContext.extraContentNodeRef", - "type": "Object", - "tags": [], - "label": "extraContentNodeRef", - "description": [ - "\nRef to a DOM node where the action can add custom HTML." - ], - "signature": [ - "React.MutableRefObject" - ], - "path": "packages/kbn-cell-actions/src/types.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/cell-actions", "id": "def-common.CellActionExecutionContext.nodeRef", @@ -419,6 +403,22 @@ "path": "packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.tsx", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/cell-actions", + "id": "def-common.UseDataGridColumnsCellActionsProps.dataGridRef", + "type": "Object", + "tags": [], + "label": "dataGridRef", + "description": [], + "signature": [ + "React.MutableRefObject<", + "EuiDataGridRefProps", + " | null>" + ], + "path": "packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.tsx", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index 51582d43a448..f79248b133cc 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-threat-hunting-explore](https://github.com/orgs/elast | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 20 | 0 | 14 | 3 | +| 20 | 0 | 15 | 3 | ## Common diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index 1702efaaa3cc..9c4a57148402 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index ed0c1570a7a6..5802355864cf 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-02-13 +date: 2023-02-14 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 31464a88598e..028f213b0a1b 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-02-13 +date: 2023-02-14 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 1ead9fc172d5..f0ad8a7c6384 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-02-13 +date: 2023-02-14 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 d5e2460a36e5..1dbf374da6d2 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-02-13 +date: 2023-02-14 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 f81eb5b01510..e7abbd3a02a4 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 49fcd04616f6..6e87faef86a4 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mocks.mdx b/api_docs/kbn_code_editor_mocks.mdx index 6cc31f555196..91ef416b041b 100644 --- a/api_docs/kbn_code_editor_mocks.mdx +++ b/api_docs/kbn_code_editor_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mocks title: "@kbn/code-editor-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mocks plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mocks'] --- import kbnCodeEditorMocksObj from './kbn_code_editor_mocks.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 456df6361506..6de0dea97e67 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-02-13 +date: 2023-02-14 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 cd9e09fb2a3b..aef1b36dd667 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-02-13 +date: 2023-02-14 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 4aa975df02e1..c54960fc5824 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-02-13 +date: 2023-02-14 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 c668492d6241..0b826b6527ab 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-02-13 +date: 2023-02-14 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 d9be82f46386..86df584f6447 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-02-13 +date: 2023-02-14 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 afdcd894c491..9d838570f51b 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-02-13 +date: 2023-02-14 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 591a368e2905..64c3f200d040 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-02-13 +date: 2023-02-14 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 14deacecb4c3..2b848e7a033d 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-02-13 +date: 2023-02-14 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 62b8135649c4..99d3913bff3d 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-02-13 +date: 2023-02-14 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 1b1edb325196..ed8382ce3e1b 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-02-13 +date: 2023-02-14 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 e340db4e7f5b..00d69d961c98 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-02-13 +date: 2023-02-14 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 1be403c6b459..e6186c1ba764 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-02-13 +date: 2023-02-14 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 f83439d5eb90..689cbcf62548 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-02-13 +date: 2023-02-14 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 1dfbf14f847c..2270d177f9a4 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-02-13 +date: 2023-02-14 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 1cde78fae358..755c5b0b1540 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-02-13 +date: 2023-02-14 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 53b4331aa5e1..d05e438c5bb9 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-02-13 +date: 2023-02-14 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 ddcab0894c48..8378b7e127a4 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-02-13 +date: 2023-02-14 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 c135a057c97b..1f55e187b630 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-02-13 +date: 2023-02-14 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 0dc95b9f29d1..27cc4c35835f 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-02-13 +date: 2023-02-14 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 487d2796b345..ac01dbdae801 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-02-13 +date: 2023-02-14 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 02b331420427..1881387f677d 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-02-13 +date: 2023-02-14 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 9b6f503f6bb4..e34a6a0beb8a 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-02-13 +date: 2023-02-14 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 ef74a650c5f1..15a02c4b9d8b 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-02-13 +date: 2023-02-14 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 9ce3a7cc4519..d235d833c853 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-02-13 +date: 2023-02-14 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 4355357f1a0c..d7bcf3633241 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-02-13 +date: 2023-02-14 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 cfb6264ba110..56b1e0ed347a 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-02-13 +date: 2023-02-14 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 4212631ed672..e0a1e9fe60df 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-02-13 +date: 2023-02-14 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 401d6435d688..a0ba226cc445 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-02-13 +date: 2023-02-14 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 f1cd7b3907cd..7689c8f461a1 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-02-13 +date: 2023-02-14 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 ced5e9431d34..484997ad7be6 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-02-13 +date: 2023-02-14 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_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index 3aa260c5a172..f7bb72ef4788 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index 899144dfc8a5..29df58b9b60d 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index 2ac6be9f87d4..70c9abd7b86d 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index 33b8c42f4f4f..18d5262e93e1 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index 1048717f2c67..ccbf88e52257 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index efbbfb42370d..28e288b491d4 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index 9e0057d91971..f3f60910d5e4 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 0e74a2626206..dfa339f6c8d0 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-02-13 +date: 2023-02-14 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 5142aa3a507a..1ddcfdc1c824 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-02-13 +date: 2023-02-14 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 c93c1d05ecf8..95948aaa4b57 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-02-13 +date: 2023-02-14 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 19d2fed2812e..5ced53014383 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-02-13 +date: 2023-02-14 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 711cca96375e..769dcb7b2c8c 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-02-13 +date: 2023-02-14 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 3782a3a2f2ab..d59192b27031 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-02-13 +date: 2023-02-14 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 106bea0abadd..4d332f34e6b3 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-02-13 +date: 2023-02-14 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 db14485f7a21..1abaa0f0eafe 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-02-13 +date: 2023-02-14 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 5071631cf2f1..c69d18819702 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-02-13 +date: 2023-02-14 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 9fb36df949fe..e884c6cbd149 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-02-13 +date: 2023-02-14 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 d91c8ef6fbcc..f09c5b6c5187 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-02-13 +date: 2023-02-14 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 5a81a0ed0844..7e66da811106 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-02-13 +date: 2023-02-14 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 237031883068..e2f268e77aa9 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-02-13 +date: 2023-02-14 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 83a609cb286b..f1f521a4766d 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-02-13 +date: 2023-02-14 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 8285d654c245..dcf999932ba0 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-02-13 +date: 2023-02-14 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 cbc198117529..c82de0ee4710 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-02-13 +date: 2023-02-14 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 ac8510ebf64a..2d396ce3130a 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-02-13 +date: 2023-02-14 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 b0dc8036d406..bd7d91d090a2 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-02-13 +date: 2023-02-14 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 28974492f3fc..ec82e2ce7684 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-02-13 +date: 2023-02-14 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 c0eb0111c76c..614d4b9578c9 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-02-13 +date: 2023-02-14 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 08e573409689..0c59dcfffd14 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-02-13 +date: 2023-02-14 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 a0e10bcdeaf9..7161f62f3686 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-02-13 +date: 2023-02-14 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 b098042680c5..d167d912f76a 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-02-13 +date: 2023-02-14 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 122d14760368..09c7f28d3073 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-02-13 +date: 2023-02-14 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 a748755f6713..5195bb4cf60b 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-02-13 +date: 2023-02-14 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 7bbc2f221dea..7ddd858b3139 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-02-13 +date: 2023-02-14 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 74c01aa514e2..869afff29a1f 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-02-13 +date: 2023-02-14 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 28f7097f8ad7..4016d613c0ed 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-02-13 +date: 2023-02-14 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 687b92558e61..b3dc05984337 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-02-13 +date: 2023-02-14 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 b2135ed5b621..15546280018f 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-02-13 +date: 2023-02-14 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 000deefbf8e0..7ddc5b61bc57 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-02-13 +date: 2023-02-14 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 455bb6d024f9..079beb348182 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-02-13 +date: 2023-02-14 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 5648e9c6de07..e1f2f81b91be 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-02-13 +date: 2023-02-14 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 2d999eda8f05..eda6e1a306b3 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-02-13 +date: 2023-02-14 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 b27c32bdd02c..06a0bd69afba 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-02-13 +date: 2023-02-14 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 701f651dc888..7bdfd693df6f 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-02-13 +date: 2023-02-14 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 a51d636f675d..376722151aea 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-02-13 +date: 2023-02-14 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 961663af494d..9ab455696f01 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-02-13 +date: 2023-02-14 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 00bc4e758594..31a2106f9cd5 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-02-13 +date: 2023-02-14 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 1a0a96d63c7b..ab52e8940cf0 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-02-13 +date: 2023-02-14 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 cc704b8f02f8..4a9e7912302c 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-02-13 +date: 2023-02-14 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 61bce5767465..50e9f3bb2fb7 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-02-13 +date: 2023-02-14 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 daf3cefc4df6..ae05fed929b2 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-02-13 +date: 2023-02-14 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 446f3a0574c6..8ea77d81030a 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-02-13 +date: 2023-02-14 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 b733326b6280..2a1d4291be58 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-02-13 +date: 2023-02-14 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 55f063983fb9..c233ab6394da 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-02-13 +date: 2023-02-14 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 2638692eb440..5609f1213e3a 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-02-13 +date: 2023-02-14 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 73960cf9d899..fa7f995b4278 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-02-13 +date: 2023-02-14 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 2a67cbc81cb5..ff7539fddae9 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-02-13 +date: 2023-02-14 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 558fa7aad170..e355a48b1ba2 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-02-13 +date: 2023-02-14 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 0b76f6e30963..0a32a81aadc9 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-02-13 +date: 2023-02-14 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 4c9eb5337795..5a154132836e 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-02-13 +date: 2023-02-14 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 2080026784a3..15ed314ea6d5 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-02-13 +date: 2023-02-14 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 463b730063e3..ee10a4fb0a69 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-02-13 +date: 2023-02-14 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 28486fecbb7a..7ba0e5d2d929 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-02-13 +date: 2023-02-14 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 1f6587b96ba2..4983258f5d6f 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-02-13 +date: 2023-02-14 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 f4c9c22ca119..433721cda5e5 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-02-13 +date: 2023-02-14 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 41ca1172ecab..e1ae4a76ae7e 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-02-13 +date: 2023-02-14 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 b0470f4d21d8..e906716c410f 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-02-13 +date: 2023-02-14 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 e610ff8c17fd..11cc8e6f3ef2 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-02-13 +date: 2023-02-14 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 1c7fbbdb11e1..6622df8657c3 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-02-13 +date: 2023-02-14 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 e306b1e55b3c..8bc2b9693511 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-02-13 +date: 2023-02-14 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 0c28f0ae37ff..3190e483476e 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-02-13 +date: 2023-02-14 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 31baac187b00..efbdbc165152 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-02-13 +date: 2023-02-14 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 941d30019470..042777b14f3d 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-02-13 +date: 2023-02-14 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 90b1aa8fceb0..3a8acb66e5ee 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-02-13 +date: 2023-02-14 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 12dbd00dabdb..9b3e259bdcfb 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-02-13 +date: 2023-02-14 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 af87e4732a5c..c035aa8c428a 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-02-13 +date: 2023-02-14 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 7908493e3bd8..710a431de484 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-02-13 +date: 2023-02-14 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 23d5e24a71db..1f16890da3e6 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-02-13 +date: 2023-02-14 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 49841dce2cf5..6dd80d136a61 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-02-13 +date: 2023-02-14 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 5a80429b2c35..6dae73c12294 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-02-13 +date: 2023-02-14 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 c12d0ceb9e47..589cb8c4b966 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-02-13 +date: 2023-02-14 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 8df2e2c56f68..9744ba19de10 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-02-13 +date: 2023-02-14 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 5cbd47140e5f..4e5e08574368 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-02-13 +date: 2023-02-14 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 dc1412daabfa..4ed6cd0f77b9 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-02-13 +date: 2023-02-14 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 96a2824bb4c1..f681a766b167 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-02-13 +date: 2023-02-14 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 b296c61e4b55..d14dca6b061f 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-02-13 +date: 2023-02-14 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 21887f2b0ce0..b523a30efd0a 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-02-13 +date: 2023-02-14 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 6d290cc27d10..35bc993c7877 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-02-13 +date: 2023-02-14 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 598972fe50f5..1281d2dd8b2f 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-02-13 +date: 2023-02-14 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 631dcb4e6a58..4dc81cf57fab 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-02-13 +date: 2023-02-14 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 f1855def884c..ee71b4568375 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-02-13 +date: 2023-02-14 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 38d0fa253061..a9e5d49cf683 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-02-13 +date: 2023-02-14 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 dccc1db9033f..b3f41ff7de15 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-02-13 +date: 2023-02-14 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 6cb17b31aa71..cbabb9eb4b8e 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-02-13 +date: 2023-02-14 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 6682dbccbc9a..160af4631b2e 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-02-13 +date: 2023-02-14 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 b18ebe9715ad..bf86ba55282b 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-02-13 +date: 2023-02-14 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 813c7a72804d..bbbd61653e09 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-02-13 +date: 2023-02-14 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 37d9a323ef48..5168d3bc3676 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-02-13 +date: 2023-02-14 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 9fbf5c4e2f0b..21214ea509bc 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-02-13 +date: 2023-02-14 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 d516398c4e61..9b188e133e6d 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-02-13 +date: 2023-02-14 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 aa5a5c71f6f0..592a9754547b 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-02-13 +date: 2023-02-14 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 fce451a8ed78..aa68d1469d7f 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-02-13 +date: 2023-02-14 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 2709a7ec3812..5d00445df76a 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-02-13 +date: 2023-02-14 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 31c26875fac9..8a708fbcd0bc 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-02-13 +date: 2023-02-14 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 5c5b2138835a..f4d178d7669e 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-02-13 +date: 2023-02-14 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 fc19e8a2c3c7..cd3a80264de0 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-02-13 +date: 2023-02-14 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.devdocs.json b/api_docs/kbn_core_saved_objects_server_internal.devdocs.json index 7be7397a6d77..9c40e61589f7 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.devdocs.json +++ b/api_docs/kbn_core_saved_objects_server_internal.devdocs.json @@ -192,7 +192,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts", "deprecated": false, @@ -218,7 +218,7 @@ "id": "def-common.registerBulkCreateRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -242,7 +242,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts", "deprecated": false, @@ -268,7 +268,7 @@ "id": "def-common.registerBulkDeleteRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -292,7 +292,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts", "deprecated": false, @@ -318,7 +318,7 @@ "id": "def-common.registerBulkGetRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -342,7 +342,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts", "deprecated": false, @@ -368,7 +368,7 @@ "id": "def-common.registerBulkResolveRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -392,7 +392,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts", "deprecated": false, @@ -418,7 +418,7 @@ "id": "def-common.registerBulkUpdateRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -442,7 +442,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts", "deprecated": false, @@ -468,7 +468,7 @@ "id": "def-common.registerCreateRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -492,7 +492,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts", "deprecated": false, @@ -518,7 +518,7 @@ "id": "def-common.registerDeleteRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -642,7 +642,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts", "deprecated": false, @@ -668,7 +668,7 @@ "id": "def-common.registerFindRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -692,7 +692,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts", "deprecated": false, @@ -718,7 +718,7 @@ "id": "def-common.registerGetRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -1102,7 +1102,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts", "deprecated": false, @@ -1128,7 +1128,7 @@ "id": "def-common.registerResolveRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" @@ -1152,7 +1152,7 @@ "signature": [ "(router: ", "InternalSavedObjectRouter", - ", { coreUsageData }: RouteDependencies) => void" + ", { coreUsageData, logger }: RouteDependencies) => void" ], "path": "packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts", "deprecated": false, @@ -1178,7 +1178,7 @@ "id": "def-common.registerUpdateRoute.$2", "type": "Object", "tags": [], - "label": "{ coreUsageData }", + "label": "{ coreUsageData, logger }", "description": [], "signature": [ "RouteDependencies" diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index fa39dd664399..ad614ec070e2 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-02-13 +date: 2023-02-14 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 c9da4e7dbeef..8a20b14d0fbb 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-02-13 +date: 2023-02-14 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 91a54063e729..19709fb7bd77 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-02-13 +date: 2023-02-14 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 56270b61a9e2..3760a4b4864c 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-02-13 +date: 2023-02-14 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 20c7da9de04a..fab984bef7f8 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-02-13 +date: 2023-02-14 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 705cbac300b0..0d6c40d2ba91 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-02-13 +date: 2023-02-14 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 935b60790e65..e14da38f7d07 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-02-13 +date: 2023-02-14 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 37a8075002b5..7d6aa936a5fb 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-02-13 +date: 2023-02-14 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 8b6361fc3333..e0ebd85e3617 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-02-13 +date: 2023-02-14 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 bfedd0af8d07..44a91a2e6f15 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-02-13 +date: 2023-02-14 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 cbc60f3076e4..e5a6a6f1e3db 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-02-13 +date: 2023-02-14 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 735f7a9f6043..27b7e3b9e8a0 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-02-13 +date: 2023-02-14 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 8300daab11e4..dee077b4565c 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-02-13 +date: 2023-02-14 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 7b5e1a1395bd..7fd5317aabe0 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-02-13 +date: 2023-02-14 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 254ae7ef1a96..bfd8b5f77afd 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-02-13 +date: 2023-02-14 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 d2da431f6842..59f768ab27a6 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-02-13 +date: 2023-02-14 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 7c10ceda5424..59b04799877f 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,14 +8,14 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; -Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 161c5c13714d..78deec6ad3d7 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,14 +8,14 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; -Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index b31db0971455..e0a214619cca 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,14 +8,14 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; -Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 1c795f112bab..6e359420604f 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,14 +8,14 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; -Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index ac8d45fdceff..d714edd40c04 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,14 +8,14 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; -Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 6e046c1344db..ec18cca3d342 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,14 +8,14 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; -Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index 74ead129e119..aef7a99b5b5f 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,14 +8,14 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; -Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index f9babf1a55f6..12229de5c5b6 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-02-13 +date: 2023-02-14 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 b2b85f7e37c4..b5ffcda85eff 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-02-13 +date: 2023-02-14 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 2521b52ce023..b516f98a3ee7 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-02-13 +date: 2023-02-14 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 22ee9b40be60..ee7af575381a 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-02-13 +date: 2023-02-14 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 aa77c11009b2..748a50530d64 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-02-13 +date: 2023-02-14 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 934dffcadb99..ef73b1eefd28 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-02-13 +date: 2023-02-14 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 728c88086d49..861511bf21b6 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-02-13 +date: 2023-02-14 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 543f5ef5b784..c095f9b9d0b6 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-02-13 +date: 2023-02-14 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 39b4f9282565..6d7e105718ae 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-02-13 +date: 2023-02-14 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 9510ef82c0c4..629c48981ab2 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-02-13 +date: 2023-02-14 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 7afa47434510..c47bc39db2e9 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-02-13 +date: 2023-02-14 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 e472fd409f0b..dad3299bea34 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-02-13 +date: 2023-02-14 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 e9e0730b6be1..22c829625d32 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-02-13 +date: 2023-02-14 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 35c1c22510ec..a9ee7172dac2 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-02-13 +date: 2023-02-14 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 041a6dcdb99c..b379d4decb8f 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs'] --- import kbnEcsObj from './kbn_ecs.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 0e2c2acfe927..dd11448b3851 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 64f78fe84dfa..f1294b97cb0e 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-02-13 +date: 2023-02-14 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 631ce9e67dde..81107462cfd3 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-02-13 +date: 2023-02-14 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 673dd37f2986..c4b7c17d2b7c 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-02-13 +date: 2023-02-14 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 f5c2b2af9855..dc42fff33c90 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-02-13 +date: 2023-02-14 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 77f31266d9ba..403f9369ebc3 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-02-13 +date: 2023-02-14 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 6a0fa8bfe3dd..ed047a12a0c7 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-02-13 +date: 2023-02-14 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 f5acaf43819a..349e02470c10 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-02-13 +date: 2023-02-14 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 2ee7b663a20c..478f9d79d4ec 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-02-13 +date: 2023-02-14 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 604213f9ab2f..85c12fd927b8 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-02-13 +date: 2023-02-14 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 049ba94a844b..47623d1f422b 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index cd8b4ca92de8..40a1fd85c74f 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-02-13 +date: 2023-02-14 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 405495dbada1..8a40c5885892 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-02-13 +date: 2023-02-14 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 bffa6c92c7ac..a7c8b3f81467 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-02-13 +date: 2023-02-14 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 31bbcdae249f..fffc9bdb47fd 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-02-13 +date: 2023-02-14 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 0b30a75c841a..be79ee0c7e61 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-02-13 +date: 2023-02-14 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 9e3330775119..ebc95d1b7ad0 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-02-13 +date: 2023-02-14 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 a19d44cd8107..de7e1cb6e004 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-02-13 +date: 2023-02-14 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 dd8ca1c9fbdb..eee70dc6bc3c 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-02-13 +date: 2023-02-14 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 e2f3eb6b2d8a..8f27466ec8cf 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-02-13 +date: 2023-02-14 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 9963f1ffc19f..daaddd6cf132 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-02-13 +date: 2023-02-14 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 51df3e0d4237..86d3ad6392b1 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-02-13 +date: 2023-02-14 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 92893a4cd7cc..54a9684bcb1a 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-02-13 +date: 2023-02-14 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 5de3a5f9fe63..46c3be46aa0a 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index 6adb002bba48..08e47bb798ce 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 3f34de19742c..7ca8d65b881e 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-02-13 +date: 2023-02-14 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 53c7207c0fbe..2a1cd7e5b1c7 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-02-13 +date: 2023-02-14 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 a820e75920c0..1391630ce113 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-02-13 +date: 2023-02-14 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 7ba7b0b6a1e0..d11938ea6d69 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-02-13 +date: 2023-02-14 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 ac07a7ea2f92..cad3a0775649 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-02-13 +date: 2023-02-14 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 62598444ca7c..08f4db782c01 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-02-13 +date: 2023-02-14 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 bc5d037ce428..54713eb9b8eb 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-02-13 +date: 2023-02-14 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_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 5a3405751c0d..c4badade7ef7 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index b571e6d90798..6953805317c0 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 98d507d21687..a064ea4ccc2f 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-02-13 +date: 2023-02-14 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.mdx b/api_docs/kbn_ml_local_storage.mdx index 58c0460ce917..87f5c2d4f212 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index c792afe50823..1976b1b6a945 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-02-13 +date: 2023-02-14 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_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 21d695fdcd47..e152611f7cac 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index c6f339a01a1e..4b56aa9ef013 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-02-13 +date: 2023-02-14 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 b157058d2446..2395d6468471 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-02-13 +date: 2023-02-14 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 621f886c51be..cab8b13b8d6e 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-02-13 +date: 2023-02-14 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 9386be13e253..4cc52a283cf8 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-02-13 +date: 2023-02-14 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 bc05ebfa6a28..98a6038eac61 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 4c11bde76d98..ea059235ab9d 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-02-13 +date: 2023-02-14 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 bf615de64694..39c2e88f9529 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-02-13 +date: 2023-02-14 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 b53754946ed0..4b889eaec00d 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-02-13 +date: 2023-02-14 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 084789658465..64353f110f72 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-02-13 +date: 2023-02-14 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 b6ddd0c5b13f..a85964afeb51 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index 4569cc6b94e0..1c2bf269d324 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index 2dd5b0a4ee29..635e9b64f4d8 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index f6bf1f58fa37..808aedcc49f8 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-02-13 +date: 2023-02-14 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 08531727639c..967e5b79fedc 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 453e61b91593..50349f527733 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index d08acd1edcc7..04c488619a39 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-02-13 +date: 2023-02-14 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 d43c78f7d910..bccb147c42ec 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index 3058573357be..225bb7b17553 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index c40592651df7..6401351cd21a 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-02-13 +date: 2023-02-14 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 b20a686fcd81..856854a3cb5e 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-02-13 +date: 2023-02-14 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 5970e9d1083d..677b759f2f42 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-02-13 +date: 2023-02-14 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 cb70e7eede04..31d35bc632f4 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-02-13 +date: 2023-02-14 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 1230c51fb244..3b3407e9ced9 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-02-13 +date: 2023-02-14 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 e82973502bc9..9e76b742e44b 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-02-13 +date: 2023-02-14 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 f8f39682e1fa..91c5c316a101 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-02-13 +date: 2023-02-14 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 16442d24b6ab..4136ca7336da 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-02-13 +date: 2023-02-14 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 3a17ab676906..f8630c337ba7 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-02-13 +date: 2023-02-14 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 87632efe414c..2b05296b162c 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-02-13 +date: 2023-02-14 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 0df26aabedc2..f63e62e9ab78 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-02-13 +date: 2023-02-14 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 b06a5a5c0b4a..e0560fd20663 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-02-13 +date: 2023-02-14 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 283414599762..07d42fd124cd 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-02-13 +date: 2023-02-14 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 e7254db2141a..b319ba66e82f 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-02-13 +date: 2023-02-14 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 bd44e4257cb5..a2fb111cc170 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-02-13 +date: 2023-02-14 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 2c0099ae8bbe..87b0e1ebb1ff 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-02-13 +date: 2023-02-14 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 7702e974410a..a815c5637a21 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-02-13 +date: 2023-02-14 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 dd00049143c2..bd31a9b0650b 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-02-13 +date: 2023-02-14 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 5c7292571880..e39417b40066 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-02-13 +date: 2023-02-14 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 2ecc8262beab..3782c6ed8cfd 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-02-13 +date: 2023-02-14 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 713dd67bc864..3f6710b1df1e 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-02-13 +date: 2023-02-14 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 800c621fbb43..b2552676b480 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-02-13 +date: 2023-02-14 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 96c34d593da0..95a22758dd38 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-02-13 +date: 2023-02-14 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 948bfb169e96..302d1f4b6ae2 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-02-13 +date: 2023-02-14 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 546e1c0906e0..c89052f4f2a8 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-02-13 +date: 2023-02-14 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 ed7e027fd51f..b9e69de0694b 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-02-13 +date: 2023-02-14 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 9ba0ed2ad095..e6697c1d0559 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-02-13 +date: 2023-02-14 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 689c4ccc4e82..438125daf752 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-02-13 +date: 2023-02-14 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 77e32631b9be..28dbdf8a3abf 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-02-13 +date: 2023-02-14 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 20838f81909a..886894a1beb6 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-02-13 +date: 2023-02-14 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 3feb6f3bbbe4..70ab47d681c6 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-02-13 +date: 2023-02-14 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 c4f8842d3423..80f6e66dd82d 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-02-13 +date: 2023-02-14 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 2502679faa79..84bf43097bf8 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-02-13 +date: 2023-02-14 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 6112b556e4a6..65a620b5af19 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-02-13 +date: 2023-02-14 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 2fb00d327180..bb3c77bb9c29 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-02-13 +date: 2023-02-14 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 5ae4843fe398..90678e7733ce 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-02-13 +date: 2023-02-14 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 1b4bc814a553..81db9d0a7bd0 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-02-13 +date: 2023-02-14 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 52cd48fdc6dd..7b11ee1c7ac3 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-02-13 +date: 2023-02-14 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 c4cc54de7d92..f09db83aaa81 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-02-13 +date: 2023-02-14 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 3275c06c40df..f059aba45623 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-02-13 +date: 2023-02-14 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 90d4e2a7adf0..6f9ed41bbf8a 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-02-13 +date: 2023-02-14 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 14929e8dd6d9..dba236647c2d 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-02-13 +date: 2023-02-14 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 37a46abdcebc..88a93ae2edde 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-02-13 +date: 2023-02-14 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 1f336e80066b..852f7a1cc305 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-02-13 +date: 2023-02-14 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 9f41a763a7f9..2572e5c26a26 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-02-13 +date: 2023-02-14 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 e79fb4d3c816..151b375e2da8 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-02-13 +date: 2023-02-14 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 6f2db9ad9c5f..9c0e1ef6036e 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-02-13 +date: 2023-02-14 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 7c6679869eff..0c0f800a4b78 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-02-13 +date: 2023-02-14 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 3e82007577f9..a0e9f3e1703d 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-02-13 +date: 2023-02-14 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 0d79c34e1a04..0447a4057ebe 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-02-13 +date: 2023-02-14 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 c8a053c8e61f..fffee1f5ad5b 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-02-13 +date: 2023-02-14 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 cf199168f5b2..faf77c58a21e 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-02-13 +date: 2023-02-14 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 988ef3033ca7..21516c199146 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-02-13 +date: 2023-02-14 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 af50394e9ae2..255a79ba28f6 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-02-13 +date: 2023-02-14 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 74ba51920277..b62b90bafb2a 100644 --- a/api_docs/kbn_slo_schema.devdocs.json +++ b/api_docs/kbn_slo_schema.devdocs.json @@ -490,7 +490,7 @@ "label": "FetchHistoricalSummaryResponse", "description": [], "signature": [ - "{ [x: string]: ({ date: string; } & { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; })[]; }" + "{ [x: string]: ({ date: string; } & { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; })[]; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -520,7 +520,7 @@ "label": "FindSLOResponse", "description": [], "signature": [ - "{ page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }" + "{ page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -535,7 +535,7 @@ "label": "GetSLOResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -550,7 +550,7 @@ "label": "HistoricalSummaryResponse", "description": [], "signature": [ - "{ date: string; } & { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }" + "{ date: string; } & { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -595,7 +595,7 @@ "label": "SLOWithSummaryResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }" ], "path": "packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index 67659171defb..f83de058f4a6 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 520cb4004d74..8a7a76df2fce 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 7b7cd37e84bd..d63837cde4f9 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-02-13 +date: 2023-02-14 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 bf7ad4ef7e82..eea60c75933c 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-02-13 +date: 2023-02-14 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 7997fc4557d7..147ae3b18f86 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-02-13 +date: 2023-02-14 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 a83de1ea918d..84335ee2505e 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-02-13 +date: 2023-02-14 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 283e00a9e1b2..e2374eb1db41 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-02-13 +date: 2023-02-14 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 290b9c56dc78..c6429cd9dbae 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-02-13 +date: 2023-02-14 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 f8b259b11f91..ff6c20037f93 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-02-13 +date: 2023-02-14 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 2481fa9f3b94..c23a00f36316 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index a46aa622abe9..ad0b92893283 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-02-13 +date: 2023-02-14 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 ddfd23a3a550..f3ab381a0f8a 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-02-13 +date: 2023-02-14 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_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 6a09f3fae55f..2ff224916477 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index 689b8bc2234a..948e90d93ce2 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-02-13 +date: 2023-02-14 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 f510d3490349..13e93c4352a5 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-02-13 +date: 2023-02-14 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 77fdb9ab2e14..d031ae591502 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-02-13 +date: 2023-02-14 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 44ba603c98c1..553bb149b691 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-02-13 +date: 2023-02-14 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 3c9ca5f688bc..0eb22e62f8b0 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-02-13 +date: 2023-02-14 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 b9263f393405..eb2abe69e74c 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-02-13 +date: 2023-02-14 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 bb542805a69f..570b2ecc6176 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-02-13 +date: 2023-02-14 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 2849788e17b0..b0eef1f539e8 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-02-13 +date: 2023-02-14 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 53890e0c5aed..d15b7b866bdf 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 01bbf1cc3692..f77c7bb04a7d 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index b707a04864ed..2da3cdc18b17 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-02-13 +date: 2023-02-14 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 9fa245e331cb..e16783303746 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-02-13 +date: 2023-02-14 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 0ea740f1706f..fa69e6abc430 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-02-13 +date: 2023-02-14 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 e8975328bdd6..cfacf1b52d5b 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-02-13 +date: 2023-02-14 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 9826f4f96dac..f49e0088eec2 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-02-13 +date: 2023-02-14 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 39e39d633381..6146bd691563 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-02-13 +date: 2023-02-14 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 b2824cb174e1..82e79240b9b6 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-02-13 +date: 2023-02-14 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 644623dca923..56e65108d60e 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-02-13 +date: 2023-02-14 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 8ed6069ab076..35b02eb19fa5 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/ml.devdocs.json b/api_docs/ml.devdocs.json index d58430fd0174..e74cc17d3cb8 100644 --- a/api_docs/ml.devdocs.json +++ b/api_docs/ml.devdocs.json @@ -310,7 +310,7 @@ "MlLocator", " | undefined; } | undefined, basePath: string | undefined, params: ", "MlLocatorParams", - ") => string" + ", dependencies?: React.DependencyList | undefined) => string" ], "path": "x-pack/plugins/ml/public/locator/use_ml_href.ts", "deprecated": false, @@ -362,6 +362,21 @@ "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "ml", + "id": "def-public.useMlHref.$4", + "type": "Object", + "tags": [], + "label": "dependencies", + "description": [], + "signature": [ + "React.DependencyList | undefined" + ], + "path": "x-pack/plugins/ml/public/locator/use_ml_href.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false } ], "returnComment": [], diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index c62094946f44..09cc61ce9162 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 255 | 9 | 79 | 40 | +| 256 | 9 | 80 | 40 | ## Client diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 9ad61bd757a6..be02aacb1b07 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-02-13 +date: 2023-02-14 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 ef64b46221a9..ed410652814b 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-02-13 +date: 2023-02-14 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 26e2a38fa6e0..b11c1d9fe651 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-02-13 +date: 2023-02-14 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 c219815c6150..55861842ce90 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-02-13 +date: 2023-02-14 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 9c175656ce6e..2c550dbf081f 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 26947d3989b1..81657e382430 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -10037,7 +10037,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }, ", + ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }, ", { "pluginId": "observability", "scope": "server", @@ -10085,7 +10085,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }, ", + ", { page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }, ", { "pluginId": "observability", "scope": "server", @@ -10117,7 +10117,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { [x: string]: ({ date: string; } & { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; })[]; }, ", + ", { [x: string]: ({ date: string; } & { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; })[]; }, ", { "pluginId": "observability", "scope": "server", @@ -10751,7 +10751,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }, ", + ", { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; }, ", { "pluginId": "observability", "scope": "server", @@ -10799,7 +10799,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }, ", + ", { page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; 'threshold.us': number; } & { index?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; } & { goodStatusCodes?: (\"2xx\" | \"3xx\" | \"4xx\" | \"5xx\")[] | undefined; index?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; filter: string; good: string; total: string; }; }; timeWindow: { duration: string; isRolling: boolean; } | { duration: string; calendar: { startTime: string; }; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; revision: number; settings: { timestampField: string; syncDelay: string; frequency: string; }; enabled: boolean; createdAt: string; updatedAt: string; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; }; })[]; }, ", { "pluginId": "observability", "scope": "server", @@ -10831,7 +10831,7 @@ "section": "def-server.ObservabilityRouteHandlerResources", "text": "ObservabilityRouteHandlerResources" }, - ", { [x: string]: ({ date: string; } & { status: \"NO_DATA\" | \"HEALTHY\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; })[]; }, ", + ", { [x: string]: ({ date: string; } & { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; })[]; }, ", { "pluginId": "observability", "scope": "server", diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 3fa43ac682ae..fcc9c5e5efdc 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-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 582736a831e2..2c546f80e175 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index a608234e314f..535ff70d31e9 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,16 +21,16 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 67468 | 512 | 58461 | 1225 | +| 67459 | 512 | 58452 | 1222 | ## Plugin Directory | Plugin name           | Maintaining team | Description | API Cnt | Any Cnt | Missing
comments | Missing
exports | |--------------|----------------|-----------|--------------|----------|---------------|--------| | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 256 | 8 | 251 | 24 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 36 | 1 | 32 | 2 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 36 | 1 | 32 | 2 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 12 | 0 | 1 | 2 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 476 | 1 | 466 | 39 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 488 | 1 | 477 | 39 | | | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 42 | 0 | 42 | 65 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 89 | 1 | 74 | 2 | @@ -47,7 +47,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | cloudLinks | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | Adds the links to the Elastic Cloud console | 0 | 0 | 0 | 0 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | The cloud security posture plugin | 17 | 0 | 2 | 2 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 13 | 0 | 13 | 1 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Content management app | 22 | 0 | 22 | 1 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Content management app | 25 | 0 | 25 | 3 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 270 | 0 | 266 | 9 | | crossClusterReplication | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | | customBranding | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Enables customization of Kibana | 0 | 0 | 0 | 0 | @@ -90,7 +90,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 62 | 0 | 62 | 2 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 254 | 1 | 45 | 5 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Simple UI for managing files in Kibana | 2 | 1 | 2 | 0 | -| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1069 | 3 | 964 | 26 | +| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1077 | 3 | 972 | 26 | | ftrApis | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 68 | 0 | 14 | 5 | | globalSearchBar | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | @@ -121,7 +121,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 41 | 0 | 41 | 6 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 267 | 0 | 266 | 27 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 67 | 0 | 67 | 0 | -| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 255 | 9 | 79 | 40 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 256 | 9 | 80 | 40 | | | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | - | 15 | 3 | 13 | 1 | | | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | - | 9 | 0 | 9 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 34 | 0 | 34 | 2 | @@ -164,7 +164,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 257 | 1 | 214 | 20 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [@elastic/kibana-localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 591 | 11 | 562 | 53 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 558 | 11 | 529 | 48 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds UI Actions service to Kibana | 134 | 2 | 92 | 9 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Extends UI Actions plugin with more functionality | 206 | 0 | 140 | 9 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list which can be integrated into apps | 267 | 0 | 242 | 7 | @@ -213,7 +213,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 11 | 0 | 11 | 0 | | | [@elastic/kibana-qa](https://github.com/orgs/elastic/teams/kibana-qa) | - | 10 | 0 | 10 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 19 | 0 | 17 | 0 | -| | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 20 | 0 | 14 | 3 | +| | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 20 | 0 | 15 | 3 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 4 | 0 | 4 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 76 | 0 | 76 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 7 | 0 | 2 | 0 | @@ -373,13 +373,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 4 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 30 | 1 | 18 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 11 | 1 | 11 | 3 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 24 | 0 | 3 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 32 | 1 | 16 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 1 | 17 | 3 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 30 | 1 | 18 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 11 | 1 | 11 | 3 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 24 | 0 | 3 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 32 | 1 | 16 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 18 | 1 | 17 | 3 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 6 | 0 | 6 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 153 | 0 | 142 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 72e33ef7a002..9dbd57f02eb9 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index ecdb36a0c35b..4d85f1b1c042 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index ab0f16134c3d..f1254b279ec3 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 3d2cfdd706a0..d7e0be1c9d74 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index d39a12e96c62..1280efe27300 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index 5e561b0adb09..b098acea5fb0 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -1538,7 +1538,7 @@ "section": "def-server.GetSummarizedAlertsFnOpts", "text": "GetSummarizedAlertsFnOpts" }, - ") => Promise<{ new: { count: number; data: {}[]; }; ongoing: { count: number; data: {}[]; }; recovered: { count: number; data: {}[]; }; }>" + ") => Promise<{ new: { count: number; data: { _id: string; _index: string; }[]; }; ongoing: { count: number; data: { _id: string; _index: string; }[]; }; recovered: { count: number; data: { _id: string; _index: string; }[]; }; }>" ], "path": "x-pack/plugins/rule_registry/server/utils/create_get_summarized_alerts_fn.ts", "deprecated": false, @@ -1883,7 +1883,7 @@ "section": "def-server.GetSummarizedAlertsFnOpts", "text": "GetSummarizedAlertsFnOpts" }, - ") => Promise<{ new: { count: number; data: {}[]; }; ongoing: { count: number; data: {}[]; }; recovered: { count: number; data: {}[]; }; }>; id: string; name: string; validate?: { params?: ", + ") => Promise<{ new: { count: number; data: { _id: string; _index: string; }[]; }; ongoing: { count: number; data: { _id: string; _index: string; }[]; }; recovered: { count: number; data: { _id: string; _index: string; }[]; }; }>; id: string; name: string; validate?: { params?: ", "RuleTypeParamsValidator", " | undefined; } | undefined; cancelAlertsOnRuleTimeout?: boolean | undefined; alerts?: ", "IRuleTypeAlerts", diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 05243f30e862..a72576e955b8 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index e5962fe15acb..ee6399da104b 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 83399d5aee83..8c1f3c10a410 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 75c20dcee612..ccbe4ed63f97 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index eb11161bd320..a2ef1edd172e 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 2892131464fd..fb2041e38544 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index ed859529d609..f0c3ef27790c 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index aa2ad1bb158f..373342f3bc7a 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index d1fb5659c692..0fac03f8c31b 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index edcc16163bfd..76ad6920d27a 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 2673c43acfe2..51635a0b7305 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index abc795f10a11..a8a5826af9f3 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index ee264c0490fd..cb43a2e94324 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 54172422e288..1661a83ab6d0 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 0d2c8b22fe32..d64484c8d75c 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 78a66e91d60a..29e555cd52aa 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index f3f8bac8ef05..f4a814e8cf85 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index cd780ce57cfa..ffd74545048f 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index ab837d198ef7..1f71856f5e7d 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 71454f14e598..46ecb3587913 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 4b1e480727ec..b4024288f601 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index 6976781c35cb..4a8a10c0fa56 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 7bff3462cb8a..5db82a98dddc 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index cb3915bb23bf..1f88c72a8493 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 9d55be5678b8..ed16da672748 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index ce28d89951f5..3a9f03aa9ebc 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index 4d406dbab526..8bc730bca168 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -931,66 +931,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadActionErrorLog", - "type": "Function", - "tags": [], - "label": "loadActionErrorLog", - "description": [], - "signature": [ - "({ id, http, dateStart, dateEnd, runId, message, perPage, page, sort, namespace, withAuth, }: ", - "LoadActionErrorLogProps", - " & { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise<", - { - "pluginId": "alerting", - "scope": "common", - "docId": "kibAlertingPluginApi", - "section": "def-common.IExecutionErrorsResult", - "text": "IExecutionErrorsResult" - }, - ">" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/load_action_error_log.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadActionErrorLog.$1", - "type": "CompoundType", - "tags": [], - "label": "{\n id,\n http,\n dateStart,\n dateEnd,\n runId,\n message,\n perPage = 10,\n page = 0,\n sort,\n namespace,\n withAuth = false,\n}", - "description": [], - "signature": [ - "LoadActionErrorLogProps", - " & { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/load_action_error_log.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.loadActionTypes", @@ -1072,133 +1012,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadAllActions", - "type": "Function", - "tags": [], - "label": "loadAllActions", - "description": [], - "signature": [ - "({ http }: { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise<", - { - "pluginId": "triggersActionsUi", - "scope": "public", - "docId": "kibTriggersActionsUiPluginApi", - "section": "def-public.ActionConnector", - "text": "ActionConnector" - }, - ", Record>[]>" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/action_connector_api/connectors.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadAllActions.$1", - "type": "Object", - "tags": [], - "label": "{ http }", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/action_connector_api/connectors.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadAllActions.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/action_connector_api/connectors.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadExecutionLogAggregations", - "type": "Function", - "tags": [], - "label": "loadExecutionLogAggregations", - "description": [], - "signature": [ - "({ id, http, dateStart, dateEnd, outcomeFilter, message, perPage, page, sort, }: ", - "LoadExecutionLogAggregationsProps", - " & { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise<", - { - "pluginId": "alerting", - "scope": "common", - "docId": "kibAlertingPluginApi", - "section": "def-common.IExecutionLogResult", - "text": "IExecutionLogResult" - }, - ">" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/load_execution_log_aggregations.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadExecutionLogAggregations.$1", - "type": "CompoundType", - "tags": [], - "label": "{\n id,\n http,\n dateStart,\n dateEnd,\n outcomeFilter,\n message,\n perPage = 10,\n page = 0,\n sort = [],\n}", - "description": [], - "signature": [ - "LoadExecutionLogAggregationsProps", - " & { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/load_execution_log_aggregations.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.loadRule", @@ -1322,57 +1135,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadRules", - "type": "Function", - "tags": [], - "label": "loadRules", - "description": [], - "signature": [ - "({\n http,\n page,\n searchText,\n typesFilter,\n actionTypesFilter,\n ruleExecutionStatusesFilter,\n ruleStatusesFilter,\n tagsFilter,\n sort = { field: 'name', direction: 'asc' },\n}: ", - "LoadRulesProps", - ") => Promise<{ page: number; perPage: number; total: number; data: ", - { - "pluginId": "triggersActionsUi", - "scope": "public", - "docId": "kibTriggersActionsUiPluginApi", - "section": "def-public.Rule", - "text": "Rule" - }, - "<", - { - "pluginId": "alerting", - "scope": "common", - "docId": "kibAlertingPluginApi", - "section": "def-common.RuleTypeParams", - "text": "RuleTypeParams" - }, - ">[]; }>" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadRules.$1", - "type": "Object", - "tags": [], - "label": "{\n http,\n page,\n searchText,\n typesFilter,\n actionTypesFilter,\n ruleExecutionStatusesFilter,\n ruleStatusesFilter,\n tagsFilter,\n sort = { field: 'name', direction: 'asc' },\n}", - "description": [], - "signature": [ - "LoadRulesProps" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.loadRuleSummary", @@ -1451,139 +1213,11 @@ "type": "number", "tags": [], "label": "numberOfExecutions", - "description": [], - "signature": [ - "number | undefined" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rule_summary.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadRuleTags", - "type": "Function", - "tags": [], - "label": "loadRuleTags", - "description": [], - "signature": [ - "({ http }: { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise<", - "RuleTagsAggregations", - ">" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadRuleTags.$1", - "type": "Object", - "tags": [], - "label": "{ http }", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadRuleTags.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadRuleTypes", - "type": "Function", - "tags": [], - "label": "loadRuleTypes", - "description": [], - "signature": [ - "({ http }: { http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise<", - { - "pluginId": "triggersActionsUi", - "scope": "public", - "docId": "kibTriggersActionsUiPluginApi", - "section": "def-public.RuleType", - "text": "RuleType" - }, - "[]>" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rule_types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadRuleTypes.$1", - "type": "Object", - "tags": [], - "label": "{ http }", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rule_types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.loadRuleTypes.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } + "description": [], + "signature": [ + "number | undefined" ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rule_types.ts", + "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rule_summary.ts", "deprecated": false, "trackAdoption": false } @@ -1626,76 +1260,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.muteRule", - "type": "Function", - "tags": [], - "label": "muteRule", - "description": [], - "signature": [ - "({ id, http }: { id: string; http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/mute.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.muteRule.$1", - "type": "Object", - "tags": [], - "label": "{ id, http }", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/mute.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.muteRule.$1.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/mute.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.muteRule.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/mute.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.OfExpression", @@ -1827,92 +1391,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.snoozeRule", - "type": "Function", - "tags": [], - "label": "snoozeRule", - "description": [], - "signature": [ - "({\n id,\n snoozeSchedule,\n http,\n}: { id: string; snoozeSchedule: ", - "SnoozeSchedule", - "; http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/snooze.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.snoozeRule.$1", - "type": "Object", - "tags": [], - "label": "{\n id,\n snoozeSchedule,\n http,\n}", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/snooze.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.snoozeRule.$1.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/snooze.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.snoozeRule.$1.snoozeSchedule", - "type": "Object", - "tags": [], - "label": "snoozeSchedule", - "description": [], - "signature": [ - "SnoozeSchedule" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/snooze.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.snoozeRule.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/snooze.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.suspendedComponentWithProps", @@ -2108,160 +1586,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.unmuteRule", - "type": "Function", - "tags": [], - "label": "unmuteRule", - "description": [], - "signature": [ - "({ id, http }: { id: string; http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; }) => Promise" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unmute.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.unmuteRule.$1", - "type": "Object", - "tags": [], - "label": "{ id, http }", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unmute.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.unmuteRule.$1.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unmute.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.unmuteRule.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unmute.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.unsnoozeRule", - "type": "Function", - "tags": [], - "label": "unsnoozeRule", - "description": [], - "signature": [ - "({\n id,\n http,\n scheduleIds,\n}: { id: string; http: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - }, - "; scheduleIds?: string[] | undefined; }) => Promise" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unsnooze.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.unsnoozeRule.$1", - "type": "Object", - "tags": [], - "label": "{\n id,\n http,\n scheduleIds,\n}", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unsnooze.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.unsnoozeRule.$1.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unsnooze.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.unsnoozeRule.$1.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unsnooze.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.unsnoozeRule.$1.scheduleIds", - "type": "Array", - "tags": [], - "label": "scheduleIds", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/unsnooze.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.updateActionConnector", diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 3502cbbd5077..e675491c490a 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 591 | 11 | 562 | 53 | +| 558 | 11 | 529 | 48 | ## Client diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index ae7f45fb857a..833664ef118c 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 3a230359dc24..8927a9d901ac 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_field_list.mdx b/api_docs/unified_field_list.mdx index 81459c6aa980..ce44a303c9b8 100644 --- a/api_docs/unified_field_list.mdx +++ b/api_docs/unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedFieldList title: "unifiedFieldList" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedFieldList plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedFieldList'] --- import unifiedFieldListObj from './unified_field_list.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index cee3f30609fb..707c9bc1caa4 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 1d749925972f..9cd42b146dbe 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index e4922e0fb12a..31b03898ef3c 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 49615f3bec49..0a2b86789f36 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 2bab1a92ced3..7a7f960493d5 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index 016807075646..16da9aa953ab 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 7751260fc8a2..fca55ee689d2 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index f47c85e4e8bd..1785433cf74a 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 50cabc3f8ac1..c6c8f6276ec3 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 27abcbd22751..cfade46a245b 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index dcb1c7358a00..2eb774981b79 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 67a8624c6879..ee914d59bc5e 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index f2a574b6f03d..7cfe89820e84 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 8768104eadb2..f133b2e6251c 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index b9844cb52d9b..87255c4d0e68 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 49b5463fd795..2eba4ed8d778 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 8c4c8d4fd1c4..d9f770b38e06 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2023-02-13 +date: 2023-02-14 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; From da89dde7acb58d2818fa0a5327a9f03c456287c4 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Tue, 14 Feb 2023 08:44:11 +0100 Subject: [PATCH 09/31] [codeql] Do not run GitHub CodeQL Action on forks (#150974) It turned out that the CodeQL action also runs on forks which generate a lot of noise in the form of security e-mails to the owners of those forks. --- .github/workflows/codeql.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f221a780c742..d7fd5af4266c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,6 +12,7 @@ jobs: actions: read contents: read security-events: write + if: github.repository == 'elastic/kibana' # Hack: Do not run on forks strategy: fail-fast: false From ace5c10c2c3ef8a594a637e59ae7f11169ce9b0c Mon Sep 17 00:00:00 2001 From: Ievgen Sorokopud Date: Tue, 14 Feb 2023 09:41:29 +0100 Subject: [PATCH 10/31] [Security Solution] When adding an Exception and Source value on the Severity override option, are not offering suggestions (#150701) ## Summary These changes fixes the issue with the broken field source value auto-suggestion which was caused by [this PR](https://github.com/elastic/kibana/pull/149149/files#diff-2b9142306df119b8c31e8a66c9b93b2a83f74239b1655919881165ac06398623R148). The problem is that the `stringifyIndices` variable is used to: 1. represent all indices down the road where we request suggestions for a field in `src/plugins/unified_search/public/autocomplete/providers/value_suggestion_provider.ts` 2. be a parameter to check whether we should memoize the results of `getIndexFields` and `getDataViewStateFromIndexFields` methods By modifying it to include the notion of whether we should include unmapped information, solves the second point but breaks the first one. Thus, suggestion request stopped working. The fix is to revert changes to `stringifyIndices` variable and add extra parameter to `getIndexFields` and `getDataViewStateFromIndexFields` methods, so that we can take into account `includeUnmapped` flag during memoization. Bug ticket #150663 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../add_edit_flyout/flyout_validation.cy.ts | 19 +++++++++++++++++- .../public/common/containers/source/index.tsx | 20 ++++++++++++------- .../containers/source/use_data_view.tsx | 7 +++++-- 3 files changed, 36 insertions(+), 10 deletions(-) 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 f96af6b5f257..dda1115979e2 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 @@ -74,7 +74,7 @@ describe('Exceptions flyout', () => { createExceptionList(getExceptionList(), getExceptionList().list_id).then((response) => createCustomRule({ ...getNewRule(), - dataSource: { index: ['exceptions-*'], type: 'indexPatterns' }, + dataSource: { index: ['auditbeat-*', 'exceptions-*'], type: 'indexPatterns' }, exceptionLists: [ { id: response.body.id, @@ -289,11 +289,28 @@ describe('Exceptions flyout', () => { openExceptionFlyoutFromEmptyViewerPrompt(); cy.get(FIELD_INPUT).eq(0).click({ force: true }); + cy.get(FIELD_INPUT).eq(0).type('unique'); cy.get(EXCEPTION_FIELD_LIST).contains('unique_value.test'); closeExceptionBuilderFlyout(); }); + it('Validates auto-suggested fields correctly', () => { + // open add exception modal + openExceptionFlyoutFromEmptyViewerPrompt(); + + // add exception item name + addExceptionFlyoutItemName('My item name'); + + // add an entry with a value and submit button should enable + addExceptionEntryFieldValue('agent.type', 0); + cy.get(VALUES_INPUT).eq(0).type(`{enter}`); + cy.get(VALUES_INPUT).eq(0).type(`{downarrow}{enter}`); + cy.get(CONFIRM_BTN).should('be.enabled'); + + closeExceptionBuilderFlyout(); + }); + // TODO - Add back in error states into modal describe.skip('flyout errors', () => { beforeEach(() => { diff --git a/x-pack/plugins/security_solution/public/common/containers/source/index.tsx b/x-pack/plugins/security_solution/public/common/containers/source/index.tsx index e154eb1f5edf..09eb4f7a4723 100644 --- a/x-pack/plugins/security_solution/public/common/containers/source/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/source/index.tsx @@ -43,7 +43,7 @@ export const getAllFieldsByName = ( keyBy('name', getAllBrowserFields(browserFields)); export const getIndexFields = memoizeOne( - (title: string, fields: IndexField[]): DataViewBase => + (title: string, fields: IndexField[], _includeUnmapped: boolean = false): DataViewBase => fields && fields.length > 0 ? { fields: fields.map((field) => @@ -63,7 +63,10 @@ export const getIndexFields = memoizeOne( title, } : { fields: [], title }, - (newArgs, lastArgs) => newArgs[0] === lastArgs[0] && newArgs[1].length === lastArgs[1].length + (newArgs, lastArgs) => + newArgs[0] === lastArgs[0] && + newArgs[1].length === lastArgs[1].length && + newArgs[2] === lastArgs[2] ); /** @@ -145,21 +148,24 @@ export const useFetchIndex = ( if (isCompleteResponse(response)) { Promise.resolve().then(() => { ReactDOM.unstable_batchedUpdates(() => { - const stringifyIndices = `${response.indicesExist - .sort() - .join()} (includeUnmapped: ${includeUnmapped})`; + const stringifyIndices = response.indicesExist.sort().join(); previousIndexesName.current = response.indicesExist; const { browserFields } = getDataViewStateFromIndexFields( stringifyIndices, - response.indexFields + response.indexFields, + includeUnmapped ); setLoading(false); setState({ browserFields, indexes: response.indicesExist, indexExists: response.indicesExist.length > 0, - indexPatterns: getIndexFields(stringifyIndices, response.indexFields), + indexPatterns: getIndexFields( + stringifyIndices, + response.indexFields, + includeUnmapped + ), }); searchSubscription$.current.unsubscribe(); diff --git a/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx b/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx index ef8eac73ba13..32533d2d7c57 100644 --- a/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx @@ -50,7 +50,7 @@ interface DataViewInfo { * VERY mutatious on purpose to improve the performance of the transform. */ export const getDataViewStateFromIndexFields = memoizeOne( - (_title: string, fields: IndexField[]): DataViewInfo => { + (_title: string, fields: IndexField[], _includeUnmapped: boolean = false): DataViewInfo => { // Adds two dangerous casts to allow for mutations within this function type DangerCastForMutation = Record; @@ -78,7 +78,10 @@ export const getDataViewStateFromIndexFields = memoizeOne( } ); }, - (newArgs, lastArgs) => newArgs[0] === lastArgs[0] && newArgs[1].length === lastArgs[1].length + (newArgs, lastArgs) => + newArgs[0] === lastArgs[0] && + newArgs[1].length === lastArgs[1].length && + newArgs[2] === lastArgs[2] ); export const useDataView = (): { From ea646dfe04799775de988dfb34248001e23e4437 Mon Sep 17 00:00:00 2001 From: Faisal Kanout Date: Tue, 14 Feb 2023 10:04:24 +0100 Subject: [PATCH 11/31] [BUG] [AO] - Fix alert evaluation value format in the alert flyout (#150720) ## Summary It closes #101945 It closes #150857 by using the formatter from the Observability plugin. ### Before ### ms Screenshot 2023-02-09 at 15 49 12 ### % Screenshot 2023-02-10 at 12 28 34 ### After ### ms Screenshot 2023-02-09 at 15 48 58 ### % Screenshot 2023-02-10 at 13 17 20 --- .../components/alerts_flyout/alerts_flyout_body.tsx | 12 ++++++++++-- .../apps/observability/pages/alerts/index.ts | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/observability/public/pages/alerts/components/alerts_flyout/alerts_flyout_body.tsx b/x-pack/plugins/observability/public/pages/alerts/components/alerts_flyout/alerts_flyout_body.tsx index ead2b83388f8..97343a11cd49 100644 --- a/x-pack/plugins/observability/public/pages/alerts/components/alerts_flyout/alerts_flyout_body.tsx +++ b/x-pack/plugins/observability/public/pages/alerts/components/alerts_flyout/alerts_flyout_body.tsx @@ -21,6 +21,7 @@ import { ALERT_EVALUATION_VALUE, ALERT_FLAPPING, ALERT_RULE_CATEGORY, + ALERT_RULE_TYPE_ID, ALERT_RULE_UUID, ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED, @@ -32,6 +33,7 @@ import { RULE_DETAILS_PAGE_ID } from '../../../rule_details/constants'; import { asDuration } from '../../../../../common/utils/formatters'; import { translations, paths } from '../../../../config'; import { FlyoutProps } from './types'; +import { formatAlertEvaluationValue } from '../../../../utils/format_alert_evaluation_value'; // eslint-disable-next-line import/no-default-export export default function AlertsFlyoutBody({ alert, id: pageId }: FlyoutProps) { @@ -74,11 +76,17 @@ export default function AlertsFlyoutBody({ alert, id: pageId }: FlyoutProps) { }, { title: translations.alertsFlyout.expectedValueLabel, - description: alert.fields[ALERT_EVALUATION_THRESHOLD] ?? '-', + description: formatAlertEvaluationValue( + alert.fields[ALERT_RULE_TYPE_ID], + alert.fields[ALERT_EVALUATION_THRESHOLD] + ), }, { title: translations.alertsFlyout.actualValueLabel, - description: alert.fields[ALERT_EVALUATION_VALUE] ?? '-', + description: formatAlertEvaluationValue( + alert.fields[ALERT_RULE_TYPE_ID], + alert.fields[ALERT_EVALUATION_VALUE] + ), }, { title: translations.alertsFlyout.ruleTypeLabel, diff --git a/x-pack/test/observability_functional/apps/observability/pages/alerts/index.ts b/x-pack/test/observability_functional/apps/observability/pages/alerts/index.ts index 8c386e99423c..99c41f250ab0 100644 --- a/x-pack/test/observability_functional/apps/observability/pages/alerts/index.ts +++ b/x-pack/test/observability_functional/apps/observability/pages/alerts/index.ts @@ -170,8 +170,8 @@ export default ({ getService }: FtrProviderContext) => { 'Oct 19, 2021 @ 15:00:41.555', 'Oct 19, 2021 @ 15:20:38.749', '20 minutes', - '5', - '30.73', + '5.0%', + '31%', 'Failed transaction rate threshold', ]; From 868fc247a944f55c15ac5a0a3ced1887dd9ac72e Mon Sep 17 00:00:00 2001 From: Maja Grubic Date: Tue, 14 Feb 2023 10:27:35 +0100 Subject: [PATCH 12/31] [SharedUX] Add custom branding to ExitFullScreenButton (#150620) ## Summary This PR replaces the Elastic logo with the custom logo in `ExitFullScreenButton` component. Without custom logo: Screenshot 2023-02-13 at 12 49 59 With custom logo: Screenshot 2023-02-13 at 12 53 16 ### Checklist Delete any items that are not applicable to this PR. ~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)~ ~- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [X] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [X] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) ~- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~ - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) ~- [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)~ ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../exit_full_screen_button.test.tsx.snap | 48 +++++++++++++++++++ .../src/exit_full_screen_button.component.tsx | 9 +++- .../impl/src/exit_full_screen_button.test.tsx | 11 +++++ .../impl/src/exit_full_screen_button.tsx | 7 ++- .../exit_full_screen/impl/src/services.tsx | 1 + .../button/exit_full_screen/mocks/src/jest.ts | 5 ++ .../exit_full_screen/mocks/src/storybook.ts | 2 + .../button/exit_full_screen/types/index.d.ts | 9 ++++ .../exit_full_screen/types/tsconfig.json | 3 ++ .../embeddable/dashboard_container.tsx | 6 ++- .../custom_branding/custom_branding.stub.ts | 1 + .../custom_branding_service.ts | 1 + .../public/services/custom_branding/types.ts | 1 + 13 files changed, 99 insertions(+), 5 deletions(-) diff --git a/packages/shared-ux/button/exit_full_screen/impl/src/__snapshots__/exit_full_screen_button.test.tsx.snap b/packages/shared-ux/button/exit_full_screen/impl/src/__snapshots__/exit_full_screen_button.test.tsx.snap index c3dbe9dc42bf..137956b648c2 100644 --- a/packages/shared-ux/button/exit_full_screen/impl/src/__snapshots__/exit_full_screen_button.test.tsx.snap +++ b/packages/shared-ux/button/exit_full_screen/impl/src/__snapshots__/exit_full_screen_button.test.tsx.snap @@ -41,6 +41,54 @@ exports[` with kibana services is rendered 1`] = `
`; +exports[` with kibana services renders custom logo 1`] = ` +
+

+ In full screen mode, press ESC to exit. +

+ +
+`; + exports[` with manual services is rendered 1`] = `

{ +export const ExitFullScreenButton = ({ onClick, className, customLogo }: Props) => { const { euiTheme } = useEuiTheme(); const { colors, size, border } = euiTheme; @@ -63,7 +64,11 @@ export const ExitFullScreenButton = ({ onClick, className }: Props) => { > - + {customLogo ? ( + + ) : ( + + )} {text} diff --git a/packages/shared-ux/button/exit_full_screen/impl/src/exit_full_screen_button.test.tsx b/packages/shared-ux/button/exit_full_screen/impl/src/exit_full_screen_button.test.tsx index 1d2bf1d9aaa5..016762e470f9 100644 --- a/packages/shared-ux/button/exit_full_screen/impl/src/exit_full_screen_button.test.tsx +++ b/packages/shared-ux/button/exit_full_screen/impl/src/exit_full_screen_button.test.tsx @@ -17,6 +17,7 @@ import { import { ExitFullScreenButton } from './exit_full_screen_button'; import { ExitFullScreenButtonKibanaProvider, ExitFullScreenButtonProvider } from './services'; +import { of } from 'rxjs'; const componentServices = getExitFullScreenButtonServicesMock(); const kibanaServices = getExitFullScreenButtonKibanaDependenciesMock(); @@ -103,6 +104,16 @@ describe('', () => { expect(kibanaServices.coreStart.chrome.setIsVisible).toHaveBeenCalledTimes(0); }); + test('renders custom logo', () => { + kibanaServices.coreStart.customBranding.customBranding$ = of({ + logo: 'imageSrcAsBase64encodedstring', + }); + const component = kibanaMount( + + ); + expect(component.render()).toMatchSnapshot(); + }); + describe('onExit', () => { const onExitHandler = jest.fn(); let component: ReactWrapper; diff --git a/packages/shared-ux/button/exit_full_screen/impl/src/exit_full_screen_button.tsx b/packages/shared-ux/button/exit_full_screen/impl/src/exit_full_screen_button.tsx index ada7075514e9..dc70d1de3e45 100644 --- a/packages/shared-ux/button/exit_full_screen/impl/src/exit_full_screen_button.tsx +++ b/packages/shared-ux/button/exit_full_screen/impl/src/exit_full_screen_button.tsx @@ -13,6 +13,7 @@ import useMountedState from 'react-use/lib/useMountedState'; import type { ExitFullScreenButtonProps as Props } from '@kbn/shared-ux-button-exit-full-screen-types'; +import useObservable from 'react-use/lib/useObservable'; import { ExitFullScreenButton as Component } from './exit_full_screen_button.component'; import { useServices } from './services'; @@ -22,8 +23,10 @@ import { useServices } from './services'; */ export const ExitFullScreenButton = ({ onExit = () => {}, toggleChrome = true }: Props) => { const { euiTheme } = useEuiTheme(); - const { setIsFullscreen } = useServices(); + const { setIsFullscreen, customBranding$ } = useServices(); const isMounted = useMountedState(); + const customBranding = useObservable(customBranding$); + const customLogo = customBranding?.logo; const onClick = useCallback(() => { if (toggleChrome) { @@ -70,5 +73,5 @@ export const ExitFullScreenButton = ({ onExit = () => {}, toggleChrome = true }: z-index: 5; `; - return ; + return ; }; diff --git a/packages/shared-ux/button/exit_full_screen/impl/src/services.tsx b/packages/shared-ux/button/exit_full_screen/impl/src/services.tsx index da6ce5cbcbc8..909b63e77ed6 100644 --- a/packages/shared-ux/button/exit_full_screen/impl/src/services.tsx +++ b/packages/shared-ux/button/exit_full_screen/impl/src/services.tsx @@ -43,6 +43,7 @@ export const ExitFullScreenButtonKibanaProvider: FC { services.coreStart.chrome.setIsVisible(!isFullscreen); }, + customBranding$: services.coreStart.customBranding.customBranding$, }} > {children} diff --git a/packages/shared-ux/button/exit_full_screen/mocks/src/jest.ts b/packages/shared-ux/button/exit_full_screen/mocks/src/jest.ts index f763c28c9015..917595d441d6 100644 --- a/packages/shared-ux/button/exit_full_screen/mocks/src/jest.ts +++ b/packages/shared-ux/button/exit_full_screen/mocks/src/jest.ts @@ -10,6 +10,7 @@ import { ExitFullScreenButtonKibanaDependencies, ExitFullScreenButtonServices, } from '@kbn/shared-ux-button-exit-full-screen-types'; +import { of } from 'rxjs'; /** * Return a Jest mock of the services for the `ExitFullScreenButton` component. @@ -17,6 +18,7 @@ import { export const getServicesMock = (): ExitFullScreenButtonServices => { return { setIsFullscreen: jest.fn(), + customBranding$: of({}), }; }; @@ -29,6 +31,9 @@ export const getKibanaDependenciesMock = (): ExitFullScreenButtonKibanaDependenc chrome: { setIsVisible: jest.fn(), }, + customBranding: { + customBranding$: of({}), + }, }, }; }; diff --git a/packages/shared-ux/button/exit_full_screen/mocks/src/storybook.ts b/packages/shared-ux/button/exit_full_screen/mocks/src/storybook.ts index a44e5425c6d8..5393b333a5f8 100644 --- a/packages/shared-ux/button/exit_full_screen/mocks/src/storybook.ts +++ b/packages/shared-ux/button/exit_full_screen/mocks/src/storybook.ts @@ -12,6 +12,7 @@ import type { ExitFullScreenButtonProps as Props, ExitFullScreenButtonServices, } from '@kbn/shared-ux-button-exit-full-screen-types'; +import { of } from 'rxjs'; type PropArguments = Pick; @@ -51,6 +52,7 @@ export class StorybookMock extends AbstractStorybookMock< setIsFullscreen: (isFullscreen: boolean) => { action('setIsFullscreen')(isFullscreen); }, + customBranding$: of({}), }; } } diff --git a/packages/shared-ux/button/exit_full_screen/types/index.d.ts b/packages/shared-ux/button/exit_full_screen/types/index.d.ts index e7a3c770e672..fe8d22880b18 100644 --- a/packages/shared-ux/button/exit_full_screen/types/index.d.ts +++ b/packages/shared-ux/button/exit_full_screen/types/index.d.ts @@ -7,6 +7,8 @@ */ import { MouseEventHandler, HTMLAttributes } from 'react'; +import { Observable } from 'rxjs'; +import { CustomBranding } from '@kbn/core-custom-branding-common'; /** * Abstract external services for this component. @@ -14,6 +16,8 @@ import { MouseEventHandler, HTMLAttributes } from 'react'; export interface Services { /** Function to invoke to set the application to full-screen mode */ setIsFullscreen: (isFullscreen: boolean) => void; + /** Observable that emits the value of custom branding, if set*/ + customBranding$: Observable; } /** @@ -29,6 +33,9 @@ export interface KibanaDependencies { chrome: { setIsVisible: (isVisible: boolean) => void; }; + customBranding: { + customBranding$: Observable; + }; }; } @@ -55,4 +62,6 @@ export interface ExitFullScreenButtonComponentProps extends Pick, 'className'> { /** Handler to invoke when one clicks the button. */ onClick: MouseEventHandler; + /** If set, custom logo is displayed instead of Elastic logo */ + customLogo?: string; } diff --git a/packages/shared-ux/button/exit_full_screen/types/tsconfig.json b/packages/shared-ux/button/exit_full_screen/types/tsconfig.json index 362cc9e727b9..9909bbb0564c 100644 --- a/packages/shared-ux/button/exit_full_screen/types/tsconfig.json +++ b/packages/shared-ux/button/exit_full_screen/types/tsconfig.json @@ -9,5 +9,8 @@ ], "exclude": [ "target/**/*", + ], + "kbn_references": [ + "@kbn/core-custom-branding-common", ] } diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx index 3e3addaac6ee..e370945d58f4 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx @@ -120,6 +120,7 @@ export class DashboardContainer extends Container - + diff --git a/src/plugins/dashboard/public/services/custom_branding/custom_branding.stub.ts b/src/plugins/dashboard/public/services/custom_branding/custom_branding.stub.ts index 5496c29b760f..5db0f72e2cd6 100644 --- a/src/plugins/dashboard/public/services/custom_branding/custom_branding.stub.ts +++ b/src/plugins/dashboard/public/services/custom_branding/custom_branding.stub.ts @@ -16,5 +16,6 @@ export const customBrandingServiceFactory: CustomBrandingServiceFactory = () => const pluginMock = coreMock.createStart(); return { hasCustomBranding$: pluginMock.customBranding.hasCustomBranding$, + customBranding$: pluginMock.customBranding.customBranding$, }; }; diff --git a/src/plugins/dashboard/public/services/custom_branding/custom_branding_service.ts b/src/plugins/dashboard/public/services/custom_branding/custom_branding_service.ts index 659a669a5bda..c02aeedde2ad 100644 --- a/src/plugins/dashboard/public/services/custom_branding/custom_branding_service.ts +++ b/src/plugins/dashboard/public/services/custom_branding/custom_branding_service.ts @@ -19,5 +19,6 @@ export const customBrandingServiceFactory: CustomBrandingServiceFactory = ({ cor const { customBranding } = coreStart; return { hasCustomBranding$: customBranding.hasCustomBranding$, + customBranding$: customBranding.customBranding$, }; }; diff --git a/src/plugins/dashboard/public/services/custom_branding/types.ts b/src/plugins/dashboard/public/services/custom_branding/types.ts index 7e7e88bb15a7..3f5536d21ddc 100644 --- a/src/plugins/dashboard/public/services/custom_branding/types.ts +++ b/src/plugins/dashboard/public/services/custom_branding/types.ts @@ -10,4 +10,5 @@ import type { CustomBrandingStart } from '@kbn/core-custom-branding-browser'; export interface DashboardCustomBrandingService { hasCustomBranding$: CustomBrandingStart['hasCustomBranding$']; + customBranding$: CustomBrandingStart['customBranding$']; } From 9ad7ebb4ea95599c73160691fd352c94350fcf76 Mon Sep 17 00:00:00 2001 From: Giorgos Bamparopoulos Date: Tue, 14 Feb 2023 09:45:39 +0000 Subject: [PATCH 13/31] [APM] Add more APM paths to paths-labeller.yml (#150915) ## Summary Add more APM paths so the `team:APM` label is added to the PRs --- .github/paths-labeller.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/paths-labeller.yml b/.github/paths-labeller.yml index efc03d8942b8..1c1b2742001b 100644 --- a/.github/paths-labeller.yml +++ b/.github/paths-labeller.yml @@ -10,6 +10,10 @@ - "src/plugins/bfetch/**/*.*" - "Team:apm": - "x-pack/plugins/apm/**/*.*" + - "x-pack/test/apm_api_integration/**/*.*" + - "packages/kbn-apm-synthtrace/**/*.*" + - "packages/kbn-apm-synthtrace-client/**/*.*" + - "packages/kbn-apm-utils/**/*.*" - "Team:Fleet": - "x-pack/plugins/fleet/**/*.*" - "x-pack/test/fleet_api_integration/**/*.*" From c308b9cbdc64ae21b922d99f3fc70fe47f386e93 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Tue, 14 Feb 2023 10:54:17 +0100 Subject: [PATCH 14/31] [codeql] Add Kibana Platform Security as CODEOWNER of CodeQL files (#150976) --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 24c1a523c5c0..4a810cbab7b3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -911,6 +911,8 @@ packages/kbn-yarn-lock-validator @elastic/kibana-operations #CC# /x-pack/plugins/translations/ @elastic/kibana-localization @elastic/kibana-core # Kibana Platform Security +/.github/codeql @elastic/kibana-security +/.github/workflows/codeql.yml @elastic/kibana-security /src/plugins/telemetry/server/config/telemetry_labels.ts @elastic/kibana-security /test/interactive_setup_api_integration/ @elastic/kibana-security /test/interactive_setup_functional/ @elastic/kibana-security From 3ae7d70c803dbc091cafc5d561625893ae1afacc Mon Sep 17 00:00:00 2001 From: Wafaa Nasr Date: Tue, 14 Feb 2023 10:00:15 +0000 Subject: [PATCH 15/31] [Security Solution] Fix all rules list is not present , when user manage rules from a shared exception list (#151079) ## Summary - Addresses https://github.com/elastic/kibana/issues/150989 - Pass pagination equals to `10000` to `fetchRules` api to get all user's rules as the old [use_find_rules_in_memory.ts](https://github.com/elastic/kibana/pull/149840/files#diff-c45bbe9560f22294e32a1c0a68fe374b1e360b3df01060efed93acb9153a6e72) was removed - Adding unit tests ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../add_to_rules_table/index.test.tsx | 52 ++-- .../add_to_rules_table/index.tsx | 2 +- .../link_rule_switch/index.test.tsx | 66 ++++++ .../use_add_to_rules_table.test.tsx | 222 ++++++++++++++++++ .../use_add_to_rules_table.tsx | 5 +- 5 files changed, 328 insertions(+), 19 deletions(-) create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/index.test.tsx create mode 100644 x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.test.tsx index 4be59efe2e92..a2d78c9282fe 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { mountWithIntl } from '@kbn/test-jest-helpers'; +import { fireEvent, render, within } from '@testing-library/react'; import { ExceptionsAddToRulesTable } from '.'; import { TestProviders } from '../../../../../common/mock'; @@ -17,23 +17,19 @@ import type { Rule } from '../../../../rule_management/logic/types'; jest.mock('../../../../rule_management/logic/use_find_rules'); describe('ExceptionsAddToRulesTable', () => { - it('it displays loading state while fetching rules', () => { + it('should display the loading state while fetching rules', () => { (useFindRules as jest.Mock).mockReturnValue({ data: { rules: [], total: 0 }, isFetched: false, }); - const wrapper = mountWithIntl( - - - + const wrapper = render( + ); - expect( - wrapper.find('[data-test-subj="exceptionItemViewerEmptyPrompts-loading"]').exists() - ).toBeTruthy(); + expect(wrapper.getByTestId('exceptionItemViewerEmptyPromptsLoading')).toBeInTheDocument(); }); - it.skip('it displays fetched rules', () => { + it('should display the fetched rule selected', () => { (useFindRules as jest.Mock).mockReturnValue({ data: { rules: [getRulesSchemaMock(), { ...getRulesSchemaMock(), id: '345', name: 'My rule' }], @@ -41,7 +37,7 @@ describe('ExceptionsAddToRulesTable', () => { }, isFetched: true, }); - const wrapper = mountWithIntl( + const wrapper = render( { /> ); + expect(wrapper.queryByTestId('exceptionItemViewerEmptyPromptsLoading')).toBeFalsy(); + const selectedRow = wrapper.getByText('My rule').closest('tr') as HTMLTableRowElement; + const selectedSwitch = within(selectedRow).getByRole('switch'); + expect(selectedSwitch).toBeChecked(); + }); - expect( - wrapper.find('[data-test-subj="exceptionItemViewerEmptyPrompts-loading"]').exists() - ).toBeFalsy(); - expect( - wrapper.find('.euiTableRow-isSelected td[data-test-subj="ruleNameCell"]').text() - ).toEqual('NameMy rule'); + it('should invoke the onRuleSelectionChange when link switch is clicked', () => { + (useFindRules as jest.Mock).mockReturnValue({ + data: { + rules: [getRulesSchemaMock(), { ...getRulesSchemaMock(), id: '345', name: 'My rule' }], + total: 0, + }, + isFetched: true, + }); + const onRuleSelectionChangeMock = jest.fn(); + const rule = { ...getRulesSchemaMock(), id: '345', name: 'My rule' }; + const { queryByTestId, getByText } = render( + + + + ); + expect(queryByTestId('exceptionItemViewerEmptyPromptsLoading')).toBeFalsy(); + const selectedRow = getByText('My rule').closest('tr') as HTMLTableRowElement; + const selectedSwitch = within(selectedRow).getByRole('switch'); + fireEvent.click(selectedSwitch); + expect(onRuleSelectionChangeMock).toBeCalledWith([rule]); }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.tsx index 18434bc69dfc..4760371ce5e8 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/index.tsx @@ -50,7 +50,7 @@ const ExceptionsAddToRulesTableComponent: React.FC ) : undefined } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/index.test.tsx new file mode 100644 index 000000000000..02b199faf0e0 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/link_rule_switch/index.test.tsx @@ -0,0 +1,66 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { fireEvent, render } from '@testing-library/react'; +import { getRulesSchemaMock } from '../../../../../../../common/detection_engine/rule_schema/mocks'; + +import { LinkRuleSwitch } from '.'; + +const mockedRule = getRulesSchemaMock(); +const linkedRules = Array(3).fill(mockedRule); +const onRuleLinkChangeMock = jest.fn(); +describe('LinkRuleSwitch', () => { + it('should render the switch checked if rule is linked', () => { + const { getByRole } = render( + + ); + const switchComponent = getByRole('switch'); + expect(switchComponent).toBeChecked(); + }); + it('should render the switch unchecked if rule is unlinked', () => { + const { getByRole } = render( + + ); + const switchComponent = getByRole('switch'); + expect(switchComponent).not.toBeChecked(); + }); + it('should link rule if not linked before', () => { + const { getByRole } = render( + + ); + const switchComponent = getByRole('switch'); + expect(switchComponent).not.toBeChecked(); + fireEvent.click(switchComponent); + expect(onRuleLinkChangeMock).toBeCalledWith([linkedRules[0]]); + }); + it('should unlink rule if it was linked before', () => { + const { getByRole } = render( + + ); + const switchComponent = getByRole('switch'); + expect(switchComponent).toBeChecked(); + fireEvent.click(switchComponent); + expect(onRuleLinkChangeMock).toBeCalledWith([]); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx new file mode 100644 index 000000000000..787b34857520 --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx @@ -0,0 +1,222 @@ +/* + * Copyright 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 { fireEvent, render as rTLRender } from '@testing-library/react'; +import { waitFor } from '@testing-library/dom'; +import { act, renderHook } from '@testing-library/react-hooks'; +import type { EuiTableFieldDataColumnType } from '@elastic/eui'; +import type { Rule } from '../../../../rule_management/logic/types'; +import { getRulesSchemaMock } from '../../../../../../common/detection_engine/rule_schema/mocks'; +import { useFindRules } from '../../../../rule_management/logic/use_find_rules'; +import { useAddToRulesTable } from './use_add_to_rules_table'; + +jest.mock('../../../../rule_management/logic/use_find_rules'); + +const mockedRule = getRulesSchemaMock(); +const onRuleSelectionChangeMock = jest.fn(); +const initiallySelectedRules = [{ ...mockedRule, id: '345', name: 'My rule' }] as Rule[]; + +describe('useAddToRulesTable', () => { + it('should call the useFindRules with the correct parameters', () => { + (useFindRules as jest.Mock).mockReturnValue({ + data: { + rules: [mockedRule], + total: 0, + }, + isFetched: true, + }); + renderHook(() => + useAddToRulesTable({ + initiallySelectedRules, + onRuleSelectionChange: onRuleSelectionChangeMock, + }) + ); + expect(useFindRules as jest.Mock).toBeCalledWith({ + filterOptions: { + filter: '', + showCustomRules: false, + showElasticRules: false, + tags: [], + }, + sortingOptions: undefined, + pagination: { + page: 1, + perPage: 10000, + }, + }); + }); + it('should return all stored rule if less than 10000 when calling the useFindRules', () => { + (useFindRules as jest.Mock).mockReturnValue({ + data: { + rules: Array(30).fill(mockedRule), + total: 0, + }, + isFetched: true, + }); + const { + result: { current }, + } = renderHook(() => + useAddToRulesTable({ + initiallySelectedRules, + onRuleSelectionChange: onRuleSelectionChangeMock, + }) + ); + const { sortedRulesByLinkedRulesOnTop, isLoading } = current; + expect(sortedRulesByLinkedRulesOnTop.length).toEqual(30); + expect(isLoading).toBeFalsy(); + }); + it('should return isLoading true and pagination as default if useFindRules is fetching', () => { + (useFindRules as jest.Mock).mockReturnValue({ + data: { + rules: [], + total: 0, + }, + isFetched: false, + }); + const { + result: { current }, + } = renderHook(() => + useAddToRulesTable({ + initiallySelectedRules, + onRuleSelectionChange: onRuleSelectionChangeMock, + }) + ); + const { + sortedRulesByLinkedRulesOnTop, + isLoading, + pagination, + searchOptions, + addToSelectedRulesDescription, + } = current; + expect(sortedRulesByLinkedRulesOnTop.length).toEqual(0); + expect(isLoading).toBeTruthy(); + expect(pagination).toEqual({ pageIndex: 0, initialPageSize: 5, showPerPageOptions: false }); + expect(searchOptions.filters[0].name).toEqual('Tags'); + expect(addToSelectedRulesDescription).toEqual( + 'After you create the exception, it is added to the rules you link. ' + ); + }); + it('should sort initially selected rules on top', () => { + (useFindRules as jest.Mock).mockReturnValue({ + data: { + rules: [mockedRule, { ...mockedRule, id: '345', name: 'My rule' }], + total: 0, + }, + isFetched: true, + }); + const { + result: { current }, + } = renderHook(() => + useAddToRulesTable({ + initiallySelectedRules, + onRuleSelectionChange: onRuleSelectionChangeMock, + }) + ); + const { sortedRulesByLinkedRulesOnTop } = current; + expect(sortedRulesByLinkedRulesOnTop[0]).toEqual( + expect.objectContaining({ id: '345', name: 'My rule' }) + ); + }); + it('should filter out duplicated tags from tag options', () => { + (useFindRules as jest.Mock).mockReturnValue({ + data: { + rules: [ + { ...mockedRule, tags: ['some fake tag 1'] }, + { ...mockedRule, tags: ['some fake tag 1'], id: '345', name: 'My rule' }, + ], + total: 0, + }, + isFetched: true, + }); + const { + result: { current }, + } = renderHook(() => + useAddToRulesTable({ + initiallySelectedRules, + onRuleSelectionChange: onRuleSelectionChangeMock, + }) + ); + const { searchOptions } = current; + const { filters } = searchOptions; + const { options } = filters[0]; + expect(options).toEqual([ + { + name: 'some fake tag 1', + value: 'some fake tag 1', + }, + ]); + }); + it('should call onRuleLinkChange when switch of a rule is clicked', () => { + (useFindRules as jest.Mock).mockReturnValue({ + data: { + rules: [ + mockedRule, + { ...mockedRule, tags: ['some fake tag 1'], id: '345', name: 'My rule' }, + ], + total: 0, + }, + isFetched: true, + }); + + const { + result: { current }, + } = renderHook(() => + useAddToRulesTable({ + initiallySelectedRules, + onRuleSelectionChange: onRuleSelectionChangeMock, + }) + ); + const { rulesTableColumnsWithLinkSwitch } = current; + const { name, render } = + rulesTableColumnsWithLinkSwitch[0] as EuiTableFieldDataColumnType; + expect(name).toEqual('Link'); + + const LinkColumn = (render ? render(null, mockedRule as Rule) : <>) as JSX.Element; + const { getByRole } = rTLRender(

{LinkColumn}
); + const selectedSwitch = getByRole('switch'); + fireEvent.click(selectedSwitch); + + expect(onRuleSelectionChangeMock).toBeCalledWith([ + expect.objectContaining({ id: '345', name: 'My rule' }), + ]); + }); + it('should change the pagination when onTableChange is called', () => { + (useFindRules as jest.Mock).mockReturnValue({ + data: { + rules: [ + mockedRule, + { ...mockedRule, tags: ['some fake tag 1'], id: '345', name: 'My rule' }, + ], + total: 0, + }, + isFetched: true, + }); + + const { + result: { current }, + } = renderHook(() => + useAddToRulesTable({ + initiallySelectedRules, + onRuleSelectionChange: onRuleSelectionChangeMock, + }) + ); + + const { onTableChange, pagination } = current; + act(() => { + onTableChange({ page: { index: 2, size: 10 } }); + }); + waitFor(() => + expect(pagination).toEqual({ + initialPageSize: 5, + pageIndex: 2, + size: 10, + showPerPageOptions: false, + }) + ); + }); +}); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.tsx index e18cc71802c3..529689e3cd34 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.tsx @@ -36,7 +36,10 @@ export const useAddToRulesTable = ({ tags: [], }, sortingOptions: undefined, - pagination: undefined, + pagination: { + page: 1, + perPage: 10000, + }, }); const [pagination, setPagination] = useState({ From 6e58c2dba5d2e09214ee84c11c2011d1a2b23092 Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Tue, 14 Feb 2023 12:20:09 +0100 Subject: [PATCH 16/31] [AO] Reuse overview bucket size in AlertSummaryWidget (#150453) Resolves #150290 ## Summary - Reuse the overview bucket size in AlertSummaryWidget. - Use `scaled date format` setting instead of `niceTimeFormatter` in observability overview charts Before ![image](https://user-images.githubusercontent.com/12370520/217490029-06fa183e-c2f2-4d86-a09d-bde77ac45e07.png) After ![image](https://user-images.githubusercontent.com/12370520/217492571-207c27eb-e7a0-4d90-998f-7f79beca4c02.png) --- .../components/app/section/apm/index.test.tsx | 8 ++- .../components/app/section/apm/index.tsx | 5 +- .../components/app/section/logs/index.tsx | 5 +- .../components/app/section/uptime/index.tsx | 5 +- .../components/app/section/ux/index.test.tsx | 10 ++-- .../containers/alerts_page/alerts_page.tsx | 21 ++++++- .../containers/overview_page/constants.ts | 3 + .../helpers/calculate_bucket_size.test.ts | 55 +++++++++++++++++++ .../helpers/calculate_bucket_size.ts | 29 +++++++++- .../overview_page/overview_page.tsx | 31 +++++++---- .../containers/overview_page/types.ts | 7 ++- .../get_alert_summary_time_range.test.tsx | 41 +++----------- .../get_alert_summary_time_range.tsx | 22 ++------ 13 files changed, 162 insertions(+), 80 deletions(-) create mode 100644 x-pack/plugins/observability/public/pages/overview/containers/overview_page/helpers/calculate_bucket_size.test.ts diff --git a/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx b/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx index 509d8726f2dd..0fc62d406660 100644 --- a/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx +++ b/x-pack/plugins/observability/public/components/app/section/apm/index.test.tsx @@ -28,6 +28,8 @@ jest.mock('react-router-dom', () => ({ })); describe('APMSection', () => { + const bucketSize = { intervalString: '60s', bucketSize: 60, dateFormat: 'YYYY-MM-DD HH:mm' }; + beforeAll(() => { jest.spyOn(hasDataHook, 'useHasData').mockReturnValue({ hasDataMap: { @@ -81,7 +83,7 @@ describe('APMSection', () => { refetch: jest.fn(), }); const { getByRole, getByText, queryAllByTestId } = render( - + ); expect(getByRole('heading')).toHaveTextContent('Services'); @@ -98,7 +100,7 @@ describe('APMSection', () => { refetch: jest.fn(), }); const { getByRole, getByText, queryAllByTestId } = render( - + ); expect(getByRole('heading')).toHaveTextContent('Services'); @@ -114,7 +116,7 @@ describe('APMSection', () => { refetch: jest.fn(), }); const { getByRole, queryAllByText, getByTestId } = render( - + ); expect(getByRole('heading')).toHaveTextContent('Services'); diff --git a/x-pack/plugins/observability/public/components/app/section/apm/index.tsx b/x-pack/plugins/observability/public/components/app/section/apm/index.tsx index 860e134442cc..a8d7aafcbaef 100644 --- a/x-pack/plugins/observability/public/components/app/section/apm/index.tsx +++ b/x-pack/plugins/observability/public/components/app/section/apm/index.tsx @@ -14,6 +14,7 @@ import { Settings, XYBrushEvent, } from '@elastic/charts'; +import { timeFormatter } from '@elastic/charts/dist/utils/data/formatters'; import { EuiFlexGroup, EuiFlexItem, EuiToolTip, EuiIcon } from '@elastic/eui'; import numeral from '@elastic/numeral'; import { i18n } from '@kbn/i18n'; @@ -85,7 +86,9 @@ export function APMSection({ bucketSize }: Props) { const min = moment.utc(absoluteStart).valueOf(); const max = moment.utc(absoluteEnd).valueOf(); - const formatter = niceTimeFormatter([min, max]); + const formatter = bucketSize?.dateFormat + ? timeFormatter(bucketSize?.dateFormat) + : niceTimeFormatter([min, max]); const isLoading = status === FETCH_STATUS.LOADING; diff --git a/x-pack/plugins/observability/public/components/app/section/logs/index.tsx b/x-pack/plugins/observability/public/components/app/section/logs/index.tsx index b047d5f7f892..c8538c558268 100644 --- a/x-pack/plugins/observability/public/components/app/section/logs/index.tsx +++ b/x-pack/plugins/observability/public/components/app/section/logs/index.tsx @@ -14,6 +14,7 @@ import { Settings, XYBrushEvent, } from '@elastic/charts'; +import { timeFormatter } from '@elastic/charts/dist/utils/data/formatters'; import { EuiFlexGroup, EuiFlexItem, euiPaletteColorBlind, EuiSpacer, EuiTitle } from '@elastic/eui'; import numeral from '@elastic/numeral'; import { i18n } from '@kbn/i18n'; @@ -83,7 +84,9 @@ export function LogsSection({ bucketSize }: Props) { const min = moment.utc(absoluteStart).valueOf(); const max = moment.utc(absoluteEnd).valueOf(); - const formatter = niceTimeFormatter([min, max]); + const formatter = bucketSize?.dateFormat + ? timeFormatter(bucketSize?.dateFormat) + : niceTimeFormatter([min, max]); const { appLink, stats, series } = data || {}; diff --git a/x-pack/plugins/observability/public/components/app/section/uptime/index.tsx b/x-pack/plugins/observability/public/components/app/section/uptime/index.tsx index 637f39eeedd6..04f23fd5a4ba 100644 --- a/x-pack/plugins/observability/public/components/app/section/uptime/index.tsx +++ b/x-pack/plugins/observability/public/components/app/section/uptime/index.tsx @@ -15,6 +15,7 @@ import { TickFormatter, XYBrushEvent, } from '@elastic/charts'; +import { timeFormatter } from '@elastic/charts/dist/utils/data/formatters'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import numeral from '@elastic/numeral'; import { i18n } from '@kbn/i18n'; @@ -81,7 +82,9 @@ export function UptimeSection({ bucketSize }: Props) { const min = moment.utc(absoluteStart).valueOf(); const max = moment.utc(absoluteEnd).valueOf(); - const formatter = niceTimeFormatter([min, max]); + const formatter = bucketSize?.dateFormat + ? timeFormatter(bucketSize?.dateFormat) + : niceTimeFormatter([min, max]); const isLoading = status === FETCH_STATUS.LOADING; diff --git a/x-pack/plugins/observability/public/components/app/section/ux/index.test.tsx b/x-pack/plugins/observability/public/components/app/section/ux/index.test.tsx index c8f508a366be..5d572f4f1620 100644 --- a/x-pack/plugins/observability/public/components/app/section/ux/index.test.tsx +++ b/x-pack/plugins/observability/public/components/app/section/ux/index.test.tsx @@ -21,6 +21,8 @@ jest.mock('react-router-dom', () => ({ })); describe('UXSection', () => { + const bucketSize = { intervalString: '60s', bucketSize: 60, dateFormat: 'YYYY-MM-DD HH:mm' }; + beforeAll(() => { jest.spyOn(hasDataHook, 'useHasData').mockReturnValue({ hasDataMap: { @@ -44,9 +46,7 @@ describe('UXSection', () => { status: fetcherHook.FETCH_STATUS.SUCCESS, refetch: jest.fn(), }); - const { getByText, getAllByText } = render( - - ); + const { getByText, getAllByText } = render(); expect(getByText('User Experience')).toBeInTheDocument(); expect(getByText('Show dashboard')).toBeInTheDocument(); @@ -79,7 +79,7 @@ describe('UXSection', () => { refetch: jest.fn(), }); const { getByText, queryAllByText, getAllByText } = render( - + ); expect(getByText('User Experience')).toBeInTheDocument(); @@ -94,7 +94,7 @@ describe('UXSection', () => { refetch: jest.fn(), }); const { getByText, queryAllByText, getAllByText } = render( - + ); expect(getByText('User Experience')).toBeInTheDocument(); diff --git a/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/alerts_page.tsx b/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/alerts_page.tsx index ece685f8ce68..4eb7aabc6620 100644 --- a/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/alerts_page.tsx +++ b/x-pack/plugins/observability/public/pages/alerts/containers/alerts_page/alerts_page.tsx @@ -12,6 +12,11 @@ import { i18n } from '@kbn/i18n'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { loadRuleAggregations } from '@kbn/triggers-actions-ui-plugin/public'; import { AlertConsumers } from '@kbn/rule-data-utils'; +import { calculateTimeRangeBucketSize } from '../../../overview/containers/overview_page/helpers/calculate_bucket_size'; +import { + DEFAULT_DATE_FORMAT, + DEFAULT_INTERVAL, +} from '../../../overview/containers/overview_page/constants'; import { useToasts } from '../../../../hooks/use_toast'; import { alertSearchBarStateContainer, @@ -77,9 +82,9 @@ function InternalAlertsPage() { const { hasAnyData, isAllRequestsComplete } = useHasData(); const [esQuery, setEsQuery] = useState<{ bool: BoolQuery }>(); const timeBuckets = useTimeBuckets(); - const alertSummaryTimeRange = useMemo( + const bucketSize = useMemo( () => - getAlertSummaryTimeRange( + calculateTimeRangeBucketSize( { from: alertSearchBarStateProps.rangeFrom, to: alertSearchBarStateProps.rangeTo, @@ -88,6 +93,18 @@ function InternalAlertsPage() { ), [alertSearchBarStateProps.rangeFrom, alertSearchBarStateProps.rangeTo, timeBuckets] ); + const alertSummaryTimeRange = useMemo( + () => + getAlertSummaryTimeRange( + { + from: alertSearchBarStateProps.rangeFrom, + to: alertSearchBarStateProps.rangeTo, + }, + bucketSize?.intervalString || DEFAULT_INTERVAL, + bucketSize?.dateFormat || DEFAULT_DATE_FORMAT + ), + [alertSearchBarStateProps.rangeFrom, alertSearchBarStateProps.rangeTo, bucketSize] + ); useBreadcrumbs([ { diff --git a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/constants.ts b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/constants.ts index cca2bb765e71..d394e5aa53b3 100644 --- a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/constants.ts +++ b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/constants.ts @@ -7,6 +7,9 @@ export const CAPABILITIES_KEYS = ['logs', 'infrastructure', 'apm', 'uptime']; +export const DEFAULT_INTERVAL = '60s'; +export const DEFAULT_DATE_FORMAT = 'YYYY-MM-DD HH:mm'; + export const ALERTS_TABLE_ID = 'xpack.observability.overview.alert.table'; export const ALERT_TABLE_STATE_STORAGE_KEY = 'xpack.observability.overview.alert.tableState'; export const ALERTS_PER_PAGE = 10; diff --git a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/helpers/calculate_bucket_size.test.ts b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/helpers/calculate_bucket_size.test.ts new file mode 100644 index 000000000000..1b936903ef13 --- /dev/null +++ b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/helpers/calculate_bucket_size.test.ts @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { TimeBuckets } from '@kbn/data-plugin/common'; +import { calculateTimeRangeBucketSize } from './calculate_bucket_size'; + +describe('calculateTimeRangeBucketSize', () => { + const timeBucketConfig = { + 'histogram:maxBars': 4, + 'histogram:barTarget': 3, + dateFormat: 'YYYY-MM-DD', + 'dateFormat:scaled': [ + ['', 'HH:mm:ss.SSS'], + ['PT1S', 'HH:mm:ss'], + ['PT1M', 'HH:mm'], + ['PT1H', 'YYYY-MM-DD HH:mm'], + ['P1DT', 'YYYY-MM-DD'], + ['P1YT', 'YYYY'], + ], + }; + const timeBuckets = new TimeBuckets(timeBucketConfig); + + it.each([ + // 15 minutes + ['2023-01-09T12:07:54.441Z', '2023-01-09T12:22:54.441Z', 60, '60s', 'HH:mm'], + ['now-15m', 'now', 60, '60s', 'HH:mm'], + // 30 minutes + ['2023-01-09T11:53:43.605Z', '2023-01-09T12:23:43.605Z', 60, '60s', 'HH:mm'], + // 1 hour + ['2023-01-09T11:22:05.728Z', '2023-01-09T12:22:05.728Z', 60, '60s', 'HH:mm'], + // 24 hours + ['2023-01-08T12:00:00.000Z', '2023-01-09T12:24:30.853Z', 600, '600s', 'HH:mm'], + // 7 days + ['2023-01-01T23:00:00.000Z', '2023-01-09T12:29:38.101Z', 3600, '3600s', 'YYYY-MM-DD HH:mm'], + // 30 days + ['2022-12-09T23:00:00.000Z', '2023-01-09T12:30:13.717Z', 43200, '43200s', 'YYYY-MM-DD HH:mm'], + // 90 days + ['2022-10-10T22:00:00.000Z', '2023-01-09T12:32:11.537Z', 43200, '43200s', 'YYYY-MM-DD HH:mm'], + // 1 year + ['2022-01-08T23:00:00.000Z', '2023-01-09T12:33:09.906Z', 86400, '86400s', 'YYYY-MM-DD'], + ])( + `Input: [%s, %s], Output: bucketSize: %s, intervalString: %s, dateFormat: %s `, + (from, to, bucketSize, intervalString, dateFormat) => { + expect(calculateTimeRangeBucketSize({ from, to }, timeBuckets)).toEqual({ + bucketSize, + intervalString, + dateFormat, + }); + } + ); +}); diff --git a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/helpers/calculate_bucket_size.ts b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/helpers/calculate_bucket_size.ts index 5a2f8650bacc..c188aab6160f 100644 --- a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/helpers/calculate_bucket_size.ts +++ b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/helpers/calculate_bucket_size.ts @@ -5,11 +5,36 @@ * 2.0. */ +import { TimeBuckets } from '@kbn/data-plugin/common'; +import { TimeRange } from '@kbn/es-query'; +import { getAbsoluteTime } from '../../../../../utils/date'; +import { DEFAULT_INTERVAL } from '../constants'; import { Bucket, BucketSize } from '../types'; import { getBucketSize } from '../../../../../utils/get_bucket_size'; -export function calculateBucketSize({ start, end }: Bucket): BucketSize { +export function calculateBucketSize({ start, end, timeBuckets }: Bucket): BucketSize { if (start && end) { - return getBucketSize({ start, end, minInterval: '60s' }); + const { bucketSize, intervalString } = getBucketSize({ + start, + end, + minInterval: DEFAULT_INTERVAL, + }); + timeBuckets.setInterval(intervalString); + + return { + bucketSize, + intervalString, + dateFormat: timeBuckets.getScaledDateFormat(), + }; } } + +export function calculateTimeRangeBucketSize( + { from, to }: TimeRange, + timeBuckets: TimeBuckets +): BucketSize { + const start = getAbsoluteTime(from); + const end = getAbsoluteTime(to, { roundUp: true }); + + return calculateBucketSize({ start, end, timeBuckets }); +} diff --git a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/overview_page.tsx b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/overview_page.tsx index b155c2927ee9..50d4befaefa5 100644 --- a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/overview_page.tsx +++ b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/overview_page.tsx @@ -39,7 +39,12 @@ import { getNewsFeed } from '../../../../services/get_news_feed'; import { buildEsQuery } from '../../../../utils/build_es_query'; import { getAlertSummaryTimeRange } from '../../../../utils/alert_summary_widget'; -import { ALERTS_PER_PAGE, ALERTS_TABLE_ID } from './constants'; +import { + ALERTS_PER_PAGE, + ALERTS_TABLE_ID, + DEFAULT_DATE_FORMAT, + DEFAULT_INTERVAL, +} from './constants'; import { calculateBucketSize, useOverviewMetrics } from './helpers'; export function OverviewPage() { @@ -91,7 +96,17 @@ export function OverviewPage() { to: relativeEnd, }) ); + const timeBuckets = useTimeBuckets(); + const bucketSize = useMemo( + () => + calculateBucketSize({ + start: absoluteStart, + end: absoluteEnd, + timeBuckets, + }), + [absoluteStart, absoluteEnd, timeBuckets] + ); const alertSummaryTimeRange = useMemo( () => getAlertSummaryTimeRange( @@ -99,9 +114,10 @@ export function OverviewPage() { from: relativeStart, to: relativeEnd, }, - timeBuckets + bucketSize?.intervalString || DEFAULT_INTERVAL, + bucketSize?.dateFormat || DEFAULT_DATE_FORMAT ), - [relativeEnd, relativeStart, timeBuckets] + [bucketSize, relativeEnd, relativeStart] ); const chartThemes = { @@ -109,15 +125,6 @@ export function OverviewPage() { baseTheme: charts.theme.useChartsBaseTheme(), }; - const bucketSize = useMemo( - () => - calculateBucketSize({ - start: absoluteStart, - end: absoluteEnd, - }), - [absoluteStart, absoluteEnd] - ); - useEffect(() => { setEsQuery( buildEsQuery({ diff --git a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/types.ts b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/types.ts index 95b0a4f1491a..7d6670902548 100644 --- a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/types.ts +++ b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/types.ts @@ -5,8 +5,13 @@ * 2.0. */ +import { TimeBuckets } from '@kbn/data-plugin/common'; + export interface Bucket { start?: number; end?: number; + timeBuckets: TimeBuckets; } -export type BucketSize = { bucketSize: number; intervalString: string } | undefined; +export type BucketSize = + | { bucketSize: number; intervalString: string; dateFormat: string } + | undefined; diff --git a/x-pack/plugins/observability/public/utils/alert_summary_widget/get_alert_summary_time_range.test.tsx b/x-pack/plugins/observability/public/utils/alert_summary_widget/get_alert_summary_time_range.test.tsx index d63cce34755c..f961d918632e 100644 --- a/x-pack/plugins/observability/public/utils/alert_summary_widget/get_alert_summary_time_range.test.tsx +++ b/x-pack/plugins/observability/public/utils/alert_summary_widget/get_alert_summary_time_range.test.tsx @@ -6,14 +6,13 @@ */ import moment from 'moment'; -import { TimeBuckets } from '@kbn/data-plugin/common'; import { getAlertSummaryTimeRange, getDefaultAlertSummaryTimeRange } from '.'; describe('AlertSummaryTimeRange', () => { describe('getDefaultAlertSummaryTimeRange', () => { it('should return default time in UTC format', () => { - const defaultTimeRange = getDefaultAlertSummaryTimeRange(); const utcFormat = 'YYYY-MM-DDTHH:mm:ss.SSSZ'; + const defaultTimeRange = getDefaultAlertSummaryTimeRange(); expect(moment(defaultTimeRange.utcFrom, utcFormat, true).isValid()).toBeTruthy(); expect(moment(defaultTimeRange.utcTo, utcFormat, true).isValid()).toBeTruthy(); @@ -21,44 +20,18 @@ describe('AlertSummaryTimeRange', () => { }); describe('getAlertSummaryTimeRange', () => { - const timeBucketConfig = { - 'histogram:maxBars': 4, - 'histogram:barTarget': 3, - dateFormat: 'YYYY-MM-DD', - 'dateFormat:scaled': [ - ['', 'HH:mm:ss.SSS'], - ['PT1S', 'HH:mm:ss'], - ['PT1M', 'HH:mm'], - ['PT1H', 'YYYY-MM-DD HH:mm'], - ['P1DT', 'YYYY-MM-DD'], - ['P1YT', 'YYYY'], - ], - }; - const timeBuckets = new TimeBuckets(timeBucketConfig); + const utcRegex = /^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z/; it.each([ // 15 minutes ['2023-01-09T12:07:54.441Z', '2023-01-09T12:22:54.441Z', '30s', 'HH:mm:ss'], - // 30 minutes - ['2023-01-09T11:53:43.605Z', '2023-01-09T12:23:43.605Z', '30s', 'HH:mm:ss'], - // 1 hour - ['2023-01-09T11:22:05.728Z', '2023-01-09T12:22:05.728Z', '60s', 'HH:mm'], - // 24 hours - ['2023-01-08T12:00:00.000Z', '2023-01-09T12:24:30.853Z', '1800s', 'HH:mm'], - // 7 days - ['2023-01-01T23:00:00.000Z', '2023-01-09T12:29:38.101Z', '10800s', 'YYYY-MM-DD HH:mm'], - // 30 days - ['2022-12-09T23:00:00.000Z', '2023-01-09T12:30:13.717Z', '43200s', 'YYYY-MM-DD HH:mm'], - // 90 days - ['2022-10-10T22:00:00.000Z', '2023-01-09T12:32:11.537Z', '86400s', 'YYYY-MM-DD'], - // 1 year - ['2022-01-08T23:00:00.000Z', '2023-01-09T12:33:09.906Z', '86400s', 'YYYY-MM-DD'], + ['now-15m', 'now', '30s', 'HH:mm:ss'], ])( - `Input: [%s, %s], Output: interval: %s, time format: %s `, + `Input: [%s, %s, %s, %s] should return dates in UTC format`, (from, to, fixedInterval, dateFormat) => { - expect(getAlertSummaryTimeRange({ from, to }, timeBuckets)).toEqual({ - utcFrom: from, - utcTo: to, + expect(getAlertSummaryTimeRange({ from, to }, fixedInterval, dateFormat)).toMatchObject({ + utcFrom: expect.stringMatching(new RegExp(utcRegex)), + utcTo: expect.stringMatching(new RegExp(utcRegex)), fixedInterval, dateFormat, }); diff --git a/x-pack/plugins/observability/public/utils/alert_summary_widget/get_alert_summary_time_range.tsx b/x-pack/plugins/observability/public/utils/alert_summary_widget/get_alert_summary_time_range.tsx index a39388391278..e0a95411a50a 100644 --- a/x-pack/plugins/observability/public/utils/alert_summary_widget/get_alert_summary_time_range.tsx +++ b/x-pack/plugins/observability/public/utils/alert_summary_widget/get_alert_summary_time_range.tsx @@ -6,12 +6,10 @@ */ import React from 'react'; -import { getAbsoluteTimeRange, TimeBuckets } from '@kbn/data-plugin/common'; +import { getAbsoluteTimeRange } from '@kbn/data-plugin/common'; import { TimeRange } from '@kbn/es-query'; import { FormattedMessage } from '@kbn/i18n-react'; import type { AlertSummaryTimeRange } from '@kbn/triggers-actions-ui-plugin/public'; -import { getAbsoluteTime } from '../date'; -import { getBucketSize } from '../get_bucket_size'; export const getDefaultAlertSummaryTimeRange = (): AlertSummaryTimeRange => { const { to, from } = getAbsoluteTimeRange({ @@ -34,27 +32,15 @@ export const getDefaultAlertSummaryTimeRange = (): AlertSummaryTimeRange => { export const getAlertSummaryTimeRange = ( timeRange: TimeRange, - timeBuckets: TimeBuckets + fixedInterval: string, + dateFormat: string ): AlertSummaryTimeRange => { const { to, from } = getAbsoluteTimeRange(timeRange); - const fixedInterval = getFixedInterval(timeRange); - timeBuckets.setInterval(fixedInterval); return { utcFrom: from, utcTo: to, fixedInterval, - dateFormat: timeBuckets.getScaledDateFormat(), + dateFormat, }; }; - -const getFixedInterval = ({ from, to }: TimeRange) => { - const start = getAbsoluteTime(from); - const end = getAbsoluteTime(to, { roundUp: true }); - - if (start && end) { - return getBucketSize({ start, end, minInterval: '30s', buckets: 60 }).intervalString; - } - - return '1m'; -}; From 668fe89e82db05fedb9a7b8c0b3bd4a61f91909b Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Tue, 14 Feb 2023 12:54:40 +0100 Subject: [PATCH 17/31] [Discover] Suppress "Missing index" toasts (#149625) Closes #129020 Screenshot 2023-01-27 at 16 56 16 --------- Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com> Co-authored-by: Matthew Kime --- .../common/data_views/data_views.test.ts | 41 ++++++++++++++++- .../common/data_views/data_views.ts | 45 +++++++++++++------ .../main/components/no_results/no_results.tsx | 4 +- .../no_results_suggestion_default.tsx | 35 ++++++++++++--- .../no_results_suggestions.tsx | 2 +- .../use_fetch_occurances_range.ts | 43 +++++++++--------- .../application/main/discover_main_route.tsx | 7 ++- .../main/hooks/utils/change_data_view.ts | 9 +++- .../main/utils/resolve_data_view.ts | 19 +++++--- .../public/hooks/use_existing_fields.ts | 10 +++-- .../public/hooks/use_grouped_fields.ts | 10 ++++- .../dataview_picker/change_dataview.tsx | 9 +++- .../translations/translations/fr-FR.json | 1 - .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - 15 files changed, 174 insertions(+), 63 deletions(-) diff --git a/src/plugins/data_views/common/data_views/data_views.test.ts b/src/plugins/data_views/common/data_views/data_views.test.ts index 6f54cac9041a..b382827d5d37 100644 --- a/src/plugins/data_views/common/data_views/data_views.test.ts +++ b/src/plugins/data_views/common/data_views/data_views.test.ts @@ -420,7 +420,7 @@ describe('IndexPatterns', () => { describe('getDefaultDataView', () => { beforeEach(() => { indexPatterns.clearCache(); - jest.resetAllMocks(); + jest.clearAllMocks(); }); test('gets default data view', async () => { @@ -434,6 +434,44 @@ describe('IndexPatterns', () => { expect(savedObjectsClient.find).toBeCalledTimes(1); }); + test('gets default data view and passes down defined arguments (refreshFields and displayErrors)', async () => { + uiSettings.get = jest.fn().mockResolvedValue(indexPatternObj.id); + savedObjectsClient.get = jest.fn().mockResolvedValue(indexPatternObj); + savedObjectsClient.find = jest.fn().mockResolvedValue([indexPatternObj]); + jest.spyOn(indexPatterns, 'get'); + jest.spyOn(indexPatterns, 'refreshFields'); + + const dataView = await indexPatterns.get(indexPatternObj.id); // and to cache the result + + const refreshFields = true; + const displayErrors = false; + expect( + await indexPatterns.getDefaultDataView({ refreshFields, displayErrors }) + ).toBeInstanceOf(DataView); + expect(savedObjectsClient.get).toBeCalledTimes(1); + expect(savedObjectsClient.find).toBeCalledTimes(1); + + expect(indexPatterns.get).toBeCalledWith(indexPatternObj.id, displayErrors, refreshFields); + expect(indexPatterns.refreshFields).toBeCalledWith(dataView, displayErrors); + }); + + test('gets default data view and passes down undefined arguments (refreshFields and displayErrors)', async () => { + uiSettings.get = jest.fn().mockResolvedValue(indexPatternObj.id); + savedObjectsClient.get = jest.fn().mockResolvedValue(indexPatternObj); + savedObjectsClient.find = jest.fn().mockResolvedValue([indexPatternObj]); + jest.spyOn(indexPatterns, 'get'); + jest.spyOn(indexPatterns, 'refreshFields'); + + await indexPatterns.get(indexPatternObj.id); // to cache the result + + expect(await indexPatterns.getDefaultDataView()).toBeInstanceOf(DataView); + expect(savedObjectsClient.get).toBeCalledTimes(1); + expect(savedObjectsClient.find).toBeCalledTimes(1); + + expect(indexPatterns.get).toBeCalledWith(indexPatternObj.id, true, undefined); + expect(indexPatterns.refreshFields).not.toBeCalled(); + }); + test('returns undefined if no data views exist', async () => { uiSettings.get = jest.fn().mockResolvedValue('foo'); savedObjectsClient.find = jest.fn().mockResolvedValue([]); @@ -487,6 +525,7 @@ describe('IndexPatterns', () => { }); test('dont set defaultIndex without capability allowing advancedSettings save', async () => { + uiSettings.get = jest.fn().mockResolvedValue(null); savedObjectsClient.find = jest.fn().mockResolvedValue([ { id: 'id1', diff --git a/src/plugins/data_views/common/data_views/data_views.ts b/src/plugins/data_views/common/data_views/data_views.ts index af40e4137f75..65d23292486f 100644 --- a/src/plugins/data_views/common/data_views/data_views.ts +++ b/src/plugins/data_views/common/data_views/data_views.ts @@ -214,9 +214,14 @@ export interface DataViewsServicePublicMethods { getDefaultId: () => Promise; /** * Get default data view, if it doesn't exist, choose and save new default data view and return it. - * @param refreshFields - refresh field list when true + * @param {Object} options + * @param {boolean} options.refreshFields - If true, will refresh the fields of the default data view + * @param {boolean} [options.displayErrors=true] - If set false, API consumer is responsible for displaying and handling errors. */ - getDefaultDataView: (refreshFields?: boolean) => Promise; + getDefaultDataView: (options?: { + refreshFields?: boolean; + displayErrors?: boolean; + }) => Promise; /** * Get fields for data view * @param dataView - Data view instance or spec @@ -259,7 +264,6 @@ export interface DataViewsServicePublicMethods { /** * Converts data view saved object to spec * @params savedObject - Data view saved object - * @params displayErrors - If set false, API consumer is responsible for displaying and handling errors. */ savedObjectToSpec: (savedObject: SavedObject) => DataViewSpec; /** @@ -610,7 +614,8 @@ export class DataViewsService { id: string, title: string, options: GetFieldsOptions, - fieldAttrs: FieldAttrs = {} + fieldAttrs: FieldAttrs = {}, + displayErrors: boolean = true ) => { const fieldsAsArr = Object.values(fields); const scriptedFields = fieldsAsArr.filter((field) => field.scripted); @@ -630,10 +635,12 @@ export class DataViewsService { return { fields: this.fieldArrayToMap(updatedFieldList, fieldAttrs), indices }; } catch (err) { if (err instanceof DataViewMissingIndices) { - this.onNotification( - { title: err.message, color: 'danger', iconType: 'alert' }, - `refreshFieldSpecMap:${title}` - ); + if (displayErrors) { + this.onNotification( + { title: err.message, color: 'danger', iconType: 'alert' }, + `refreshFieldSpecMap:${title}` + ); + } return {}; } @@ -739,9 +746,11 @@ export class DataViewsService { private initFromSavedObjectLoadFields = async ({ savedObjectId, spec, + displayErrors = true, }: { savedObjectId: string; spec: DataViewSpec; + displayErrors?: boolean; }) => { const { title, type, typeMeta, runtimeFieldMap } = spec; const { fields, indices } = await this.refreshFieldSpecMap( @@ -755,7 +764,8 @@ export class DataViewsService { rollupIndex: typeMeta?.params?.rollup_index, allowNoIndex: spec.allowNoIndex, }, - spec.fieldAttrs + spec.fieldAttrs, + displayErrors ); const runtimeFieldSpecs = this.getRuntimeFields(runtimeFieldMap, spec.fieldAttrs); @@ -779,6 +789,7 @@ export class DataViewsService { const fieldsAndIndices = await this.initFromSavedObjectLoadFields({ savedObjectId: savedObject.id, spec, + displayErrors, }); fields = fieldsAndIndices.fields; indices = fieldsAndIndices.indices; @@ -883,7 +894,7 @@ export class DataViewsService { ): Promise => { const dataViewFromCache = this.dataViewCache.get(id)?.then(async (dataView) => { if (dataView && refreshFields) { - await this.refreshFields(dataView); + await this.refreshFields(dataView, displayErrors); } return dataView; }); @@ -1144,10 +1155,18 @@ export class DataViewsService { * another data view is selected as default and returned. * If no possible data view found to become a default returns null. * - * @param {boolean} refreshFields - if true, will refresh the fields of the default data view + * @param {Object} options + * @param {boolean} options.refreshFields - If true, will refresh the fields of the default data view + * @param {boolean} [options.displayErrors=true] - If set false, API consumer is responsible for displaying and handling errors. * @returns default data view */ - async getDefaultDataView(refreshFields?: boolean): Promise { + async getDefaultDataView( + options: { + displayErrors?: boolean; + refreshFields?: boolean; + } = {} + ): Promise { + const { displayErrors = true, refreshFields } = options; const patterns = await this.getIdsWithTitle(); let defaultId: string | undefined = await this.config.get('defaultIndex'); const exists = defaultId ? patterns.some((pattern) => pattern.id === defaultId) : false; @@ -1168,7 +1187,7 @@ export class DataViewsService { } if (defaultId) { - return this.get(defaultId, undefined, refreshFields); + return this.get(defaultId, displayErrors, refreshFields); } else { return null; } diff --git a/src/plugins/discover/public/application/main/components/no_results/no_results.tsx b/src/plugins/discover/public/application/main/components/no_results/no_results.tsx index c24423693a62..3286dff4aa27 100644 --- a/src/plugins/discover/public/application/main/components/no_results/no_results.tsx +++ b/src/plugins/discover/public/application/main/components/no_results/no_results.tsx @@ -49,8 +49,8 @@ export function DiscoverNoResults({ } color="danger" diff --git a/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/no_results_suggestion_default.tsx b/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/no_results_suggestion_default.tsx index b90ca64c23e6..b920727782e7 100644 --- a/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/no_results_suggestion_default.tsx +++ b/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/no_results_suggestion_default.tsx @@ -8,15 +8,36 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiText } from '@elastic/eui'; +import { EuiText, EuiCode } from '@elastic/eui'; +import type { DataView } from '@kbn/data-views-plugin/common'; + +export interface NoResultsSuggestionDefaultProps { + dataView: DataView; +} + +export const NoResultsSuggestionDefault: React.FC = ({ + dataView, +}) => { + const dataViewName = dataView?.getName(); + const dataViewPattern = dataView?.getIndexPattern(); -export function NoResultsSuggestionDefault() { return ( - + {dataViewName && dataViewPattern ? ( + {dataViewName}, + dataViewPattern: {dataViewPattern}, + }} + /> + ) : ( + + )} ); -} +}; diff --git a/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/no_results_suggestions.tsx b/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/no_results_suggestions.tsx index e9cd75e022db..9fd939cc6acf 100644 --- a/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/no_results_suggestions.tsx +++ b/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/no_results_suggestions.tsx @@ -111,7 +111,7 @@ export const NoResultsSuggestions: React.FC = ({ ) : ( - + ); return ( diff --git a/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/use_fetch_occurances_range.ts b/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/use_fetch_occurances_range.ts index 8ae801fc9303..e58aee4cb5cf 100644 --- a/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/use_fetch_occurances_range.ts +++ b/src/plugins/discover/public/application/main/components/no_results/no_results_suggestions/use_fetch_occurances_range.ts @@ -46,28 +46,27 @@ export const useFetchOccurrencesRange = (params: Params): Result => { const fetchOccurrences = useCallback( async (dataView?: DataView, query?: Query | AggregateQuery, filters?: Filter[]) => { let occurrencesRange = null; - if (!dataView?.timeFieldName || !query || !mountedRef.current) { - return null; - } - abortControllerRef.current?.abort(); - abortControllerRef.current = new AbortController(); - - try { - const dslQuery = buildEsQuery( - dataView, - query ?? [], - filters ?? [], - getEsQueryConfig(uiSettings) - ); - occurrencesRange = await fetchDocumentsTimeRange({ - data, - dataView, - dslQuery, - abortSignal: abortControllerRef.current?.signal, - }); - } catch (error) { - // + if (dataView?.isTimeBased() && query && mountedRef.current) { + abortControllerRef.current?.abort(); + abortControllerRef.current = new AbortController(); + + try { + const dslQuery = buildEsQuery( + dataView, + query ?? [], + filters ?? [], + getEsQueryConfig(uiSettings) + ); + occurrencesRange = await fetchDocumentsTimeRange({ + data, + dataView, + dslQuery, + abortSignal: abortControllerRef.current?.signal, + }); + } catch (error) { + // + } } if (mountedRef.current) { @@ -115,7 +114,7 @@ async function fetchDocumentsTimeRange({ data.search.search( { params: { - index: dataView.title, + index: dataView.getIndexPattern(), size: 0, body: { query: dslQuery ?? { match_all: {} }, diff --git a/src/plugins/discover/public/application/main/discover_main_route.tsx b/src/plugins/discover/public/application/main/discover_main_route.tsx index 242f2ab95a5c..54e90c01b24f 100644 --- a/src/plugins/discover/public/application/main/discover_main_route.tsx +++ b/src/plugins/discover/public/application/main/discover_main_route.tsx @@ -102,7 +102,12 @@ export function DiscoverMainRoute(props: Props) { return; } - const defaultDataView = await data.dataViews.getDefaultDataView(); + let defaultDataView: DataView | null = null; + try { + defaultDataView = await data.dataViews.getDefaultDataView({ displayErrors: false }); + } catch (e) { + // + } if (!defaultDataView) { setShowNoDataPage(true); diff --git a/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts index 0ceb3c984a16..c53e0ec9da61 100644 --- a/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts +++ b/src/plugins/discover/public/application/main/hooks/utils/change_data_view.ts @@ -37,7 +37,14 @@ export async function changeDataView( const { dataViews, uiSettings } = services; const dataView = discoverState.internalState.getState().dataView; const state = discoverState.appState.getState(); - const nextDataView = await dataViews.get(id); + let nextDataView: DataView | null = null; + + try { + nextDataView = await dataViews.get(id, false); + } catch (e) { + // + } + if (nextDataView && dataView) { const nextAppState = getDataViewAppState( dataView, diff --git a/src/plugins/discover/public/application/main/utils/resolve_data_view.ts b/src/plugins/discover/public/application/main/utils/resolve_data_view.ts index fb9e182ab822..2584d9b7c827 100644 --- a/src/plugins/discover/public/application/main/utils/resolve_data_view.ts +++ b/src/plugins/discover/public/application/main/utils/resolve_data_view.ts @@ -64,10 +64,10 @@ export async function loadDataView( fetchId = dataViewSpec.id!; } - let fetchedDataView: DataView | undefined; + let fetchedDataView: DataView | null = null; // try to fetch adhoc data view first try { - fetchedDataView = fetchId ? await dataViews.get(fetchId) : undefined; + fetchedDataView = fetchId ? await dataViews.get(fetchId, false) : null; if (fetchedDataView && !fetchedDataView.isPersisted()) { return { list: dataViewList || [], @@ -82,13 +82,20 @@ export async function loadDataView( // eslint-disable-next-line no-empty } catch (e) {} + let defaultDataView: DataView | null = null; + if (!fetchedDataView) { + try { + defaultDataView = await dataViews.getDefaultDataView({ displayErrors: false }); + } catch (e) { + // + } + } + // fetch persisted data view return { list: dataViewList || [], - loaded: fetchedDataView - ? fetchedDataView - : // we can be certain that the data view exists due to an earlier hasData check - ((await dataViews.getDefaultDataView()) as DataView), + // we can be certain that the data view exists due to an earlier hasData check + loaded: fetchedDataView || defaultDataView!, stateVal: fetchId, stateValFound: !!fetchId && !!fetchedDataView, }; diff --git a/src/plugins/unified_field_list/public/hooks/use_existing_fields.ts b/src/plugins/unified_field_list/public/hooks/use_existing_fields.ts index 6b523d155393..2033c222764a 100644 --- a/src/plugins/unified_field_list/public/hooks/use_existing_fields.ts +++ b/src/plugins/unified_field_list/public/hooks/use_existing_fields.ts @@ -106,7 +106,13 @@ export const useExistingFieldsFetcher = ( } const numberOfFetches = (currentInfo?.numberOfFetches ?? 0) + 1; - const dataView = await dataViews.get(dataViewId); + let dataView: DataView | null = null; + + try { + dataView = await dataViews.get(dataViewId, false); + } catch (e) { + // + } if (!dataView?.title) { return; @@ -155,8 +161,6 @@ export const useExistingFieldsFetcher = ( info.existingFieldsByFieldNameMap = booleanMap(existingFieldNames); info.fetchStatus = ExistenceFetchStatus.succeeded; } catch (error) { - // eslint-disable-next-line no-console - console.error(error); info.fetchStatus = ExistenceFetchStatus.failed; } } diff --git a/src/plugins/unified_field_list/public/hooks/use_grouped_fields.ts b/src/plugins/unified_field_list/public/hooks/use_grouped_fields.ts index 1209ed64f1eb..45432fb9bba8 100644 --- a/src/plugins/unified_field_list/public/hooks/use_grouped_fields.ts +++ b/src/plugins/unified_field_list/public/hooks/use_grouped_fields.ts @@ -88,7 +88,15 @@ export function useGroupedFields({ useEffect(() => { const getDataView = async () => { if (dataViewId) { - setDataView(await services.dataViews.get(dataViewId)); + let nextDataView: DataView | null = null; + try { + nextDataView = await services.dataViews.get(dataViewId, false); + } catch (e) { + // + } + setDataView(nextDataView || null); + } else { + setDataView(null); } }; getDataView(); diff --git a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx index a7f473f95b37..e828e4d1a2bc 100644 --- a/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx +++ b/src/plugins/unified_search/public/dataview_picker/change_dataview.tsx @@ -303,8 +303,12 @@ export function ChangeDataView({ isTextBasedLangSelected={isTextBasedLangSelected} setPopoverIsOpen={setPopoverIsOpen} onChangeDataView={async (newId) => { - // refreshing the field list - await dataViews.get(newId, undefined, true); + try { + // refreshing the field list + await dataViews.get(newId, false, true); + } catch (e) { + // + } setSelectedDataViewId(newId); setPopoverIsOpen(false); if (isTextBasedLangSelected && !isTextLangTransitionModalDismissed) { @@ -355,6 +359,7 @@ export function ChangeDataView({ , { diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 02f08c61ce06..8182c753868a 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -2308,7 +2308,6 @@ "discover.localMenu.shareTitle": "Partager", "discover.noMatchRoute.bannerTitleText": "Page introuvable", "discover.noResults.noDocumentsOrCheckPermissionsDescription": "Assurez-vous de disposer de l'autorisation d'afficher les index et vérifiez qu'ils contiennent des documents.", - "discover.noResults.searchExamples.noResultsBecauseOfError": "Une erreur s’est produite lors de la récupération des résultats de recherche.", "discover.noResults.searchExamples.noResultsMatchSearchCriteriaTitle": "Aucun résultat ne correspond à vos critères de recherche.", "discover.noResultsFound": "Résultat introuvable", "discover.notifications.invalidTimeRangeText": "La plage temporelle spécifiée n'est pas valide (de : \"{from}\" à \"{to}\").", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index cb19db1d673e..ece6fbb1d5c3 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -2306,7 +2306,6 @@ "discover.localMenu.shareTitle": "共有", "discover.noMatchRoute.bannerTitleText": "ページが見つかりません", "discover.noResults.noDocumentsOrCheckPermissionsDescription": "インデックスと含まれるドキュメントを表示する権限がありません。", - "discover.noResults.searchExamples.noResultsBecauseOfError": "検索結果の取得中にエラーが発生しました", "discover.noResults.searchExamples.noResultsMatchSearchCriteriaTitle": "検索条件と一致する結果がありません。", "discover.noResultsFound": "結果が見つかりませんでした", "discover.notifications.invalidTimeRangeText": "指定された時間範囲が無効です。(開始:'{from}'、終了:'{to}')", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index d6ab67bb9095..a8acae9de733 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -2310,7 +2310,6 @@ "discover.localMenu.shareTitle": "共享", "discover.noMatchRoute.bannerTitleText": "未找到页面", "discover.noResults.noDocumentsOrCheckPermissionsDescription": "确保您有权查看索引并且它们包含文档。", - "discover.noResults.searchExamples.noResultsBecauseOfError": "检索搜索结果时遇到问题", "discover.noResults.searchExamples.noResultsMatchSearchCriteriaTitle": "没有任何结果匹配您的搜索条件", "discover.noResultsFound": "找不到结果", "discover.notifications.invalidTimeRangeText": "提供的时间范围无效。(自:“{from}”,至:“{to}”)", From ec4ebd958e849b7a0e2d4bcee7e07334bf6afc50 Mon Sep 17 00:00:00 2001 From: Pablo Machado Date: Tue, 14 Feb 2023 13:20:56 +0100 Subject: [PATCH 18/31] [Security Solutions] Fix update Entity Analytics Upgrade dialog text (#151104) issue: https://github.com/elastic/kibana/issues/148589 ## Summary Update `devices`=> `hosts` ### Before Change Screenshot 2023-02-14 at 10 56 06 ### After Change Screenshot 2023-02-14 at 10 54 23 ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) --- .../security_solution/public/overview/pages/translations.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugins/security_solution/public/overview/pages/translations.ts b/x-pack/plugins/security_solution/public/overview/pages/translations.ts index 474bb1db94fd..5f44e18b53cd 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/translations.ts +++ b/x-pack/plugins/security_solution/public/overview/pages/translations.ts @@ -107,8 +107,7 @@ export const DETECTION_RESPONSE_TITLE = i18n.translate( export const ENTITY_ANALYTICS_LICENSE_DESC = i18n.translate( 'xpack.securitySolution.entityAnalytics.pageDesc', { - defaultMessage: - 'Detect threats from users and devices within your network with Entity Analytics', + defaultMessage: 'Detect threats from users and hosts within your network with Entity Analytics', } ); From 4054d2744e2cd99094d1408f4125813098d8bb2f Mon Sep 17 00:00:00 2001 From: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com> Date: Tue, 14 Feb 2023 07:25:58 -0500 Subject: [PATCH 19/31] [Cases] Adding refreshes to fix failed test (#151068) Fixes: https://github.com/elastic/kibana/issues/150962 This PR adds some index refreshes to fix tests that were running into index conflicts. Flaky test run: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1907 --- .../security_and_spaces/tests/trial/cases/push_case.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/x-pack/test/cases_api_integration/security_and_spaces/tests/trial/cases/push_case.ts b/x-pack/test/cases_api_integration/security_and_spaces/tests/trial/cases/push_case.ts index d6d0919be8b4..a9d4382fc08b 100644 --- a/x-pack/test/cases_api_integration/security_and_spaces/tests/trial/cases/push_case.ts +++ b/x-pack/test/cases_api_integration/security_and_spaces/tests/trial/cases/push_case.ts @@ -616,8 +616,7 @@ export default ({ getService }: FtrProviderContext): void => { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/150962 - describe.skip('alerts', () => { + describe('alerts', () => { const defaultSignalsIndex = '.siem-signals-default-000001'; const signalID = '4679431ee0ba3209b6fcd60a255a696886fe0a7d18f5375de510ff5b68fa6b78'; const signalID2 = '1023bcfea939643c5e51fd8df53797e0ea693cee547db579ab56d96402365c1e'; @@ -656,6 +655,8 @@ export default ({ getService }: FtrProviderContext): void => { }, }); + await es.indices.refresh({ index: defaultSignalsIndex }); + await createComment({ supertest, caseId: postedCase.id, @@ -668,6 +669,8 @@ export default ({ getService }: FtrProviderContext): void => { }, }); + await es.indices.refresh({ index: defaultSignalsIndex }); + await pushCase({ supertest, caseId: postedCase.id, From 38f186fdf858291452e31495d4caac1534963bbb Mon Sep 17 00:00:00 2001 From: Shahzad Date: Tue, 14 Feb 2023 13:27:17 +0100 Subject: [PATCH 20/31] [Synthetics] Skip flaky test (#151118) --- x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts b/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts index bf4ecd526e91..b3dcd9aaa442 100644 --- a/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts +++ b/x-pack/plugins/synthetics/e2e/journeys/synthetics/index.ts @@ -17,7 +17,7 @@ export * from './private_locations.journey'; export * from './alerting_default.journey'; export * from './global_parameters.journey'; export * from './detail_flyout'; -export * from './alert_rules/default_status_alert.journey'; +// export * from './alert_rules/default_status_alert.journey'; export * from './test_now_mode.journey'; export * from './data_retention.journey'; export * from './monitor_details_page/monitor_summary.journey'; From cf94e1a288e07212dbf3403e7c01deec15c0ef6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loix?= Date: Tue, 14 Feb 2023 12:30:42 +0000 Subject: [PATCH 21/31] [Content management] Add base core services (#150692) --- .../public/registry/content_type.test.ts | 16 +- .../public/registry/content_type.ts | 12 +- .../public/registry/registry.test.ts | 8 +- .../public/registry/registry.ts | 2 +- .../server/core/content_type.ts | 39 ++ .../server/core/core.test.ts | 616 ++++++++++++++++++ .../content_management/server/core/core.ts | 56 ++ .../content_management/server/core/crud.ts | 241 +++++++ .../server/core/event_bus.ts | 136 ++++ .../server/core/event_types.ts | 139 ++++ .../content_management/server/core/index.ts | 17 + .../server/core/mocks/in_memory_storage.ts | 141 ++++ .../server/core/mocks/index.ts | 10 + .../server/core/registry.ts | 56 ++ .../content_management/server/core/types.ts | 38 ++ .../content_management/server/plugin.ts | 23 +- src/plugins/content_management/tsconfig.json | 1 + 17 files changed, 1529 insertions(+), 22 deletions(-) create mode 100644 src/plugins/content_management/server/core/content_type.ts create mode 100644 src/plugins/content_management/server/core/core.test.ts create mode 100644 src/plugins/content_management/server/core/core.ts create mode 100644 src/plugins/content_management/server/core/crud.ts create mode 100644 src/plugins/content_management/server/core/event_bus.ts create mode 100644 src/plugins/content_management/server/core/event_types.ts create mode 100644 src/plugins/content_management/server/core/index.ts create mode 100644 src/plugins/content_management/server/core/mocks/in_memory_storage.ts create mode 100644 src/plugins/content_management/server/core/mocks/index.ts create mode 100644 src/plugins/content_management/server/core/registry.ts create mode 100644 src/plugins/content_management/server/core/types.ts diff --git a/src/plugins/content_management/public/registry/content_type.test.ts b/src/plugins/content_management/public/registry/content_type.test.ts index c6a5e18fd6f6..dd06ea658676 100644 --- a/src/plugins/content_management/public/registry/content_type.test.ts +++ b/src/plugins/content_management/public/registry/content_type.test.ts @@ -12,10 +12,10 @@ import type { ContentTypeDefinition } from './content_type_definition'; test('create a content type with just an id', () => { const type = new ContentType({ id: 'test' }); - expect(type.id()).toBe('test'); - expect(type.name()).toBe('test'); - expect(type.icon()).toBe('questionInCircle'); - expect(type.description()).toBe(''); + expect(type.id).toBe('test'); + expect(type.name).toBe('test'); + expect(type.icon).toBe('questionInCircle'); + expect(type.description).toBe(''); }); test('create a content type with all the full definition', () => { @@ -27,9 +27,9 @@ test('create a content type with all the full definition', () => { }; const type = new ContentType(definition); - expect(type.id()).toBe(definition.id); - expect(type.name()).toBe(definition.name); - expect(type.icon()).toBe(definition.icon); - expect(type.description()).toBe(definition.description); + expect(type.id).toBe(definition.id); + expect(type.name).toBe(definition.name); + expect(type.icon).toBe(definition.icon); + expect(type.description).toBe(definition.description); expect(type.definition).toEqual(definition); }); diff --git a/src/plugins/content_management/public/registry/content_type.ts b/src/plugins/content_management/public/registry/content_type.ts index 213a1c5427e0..fa55b890689f 100644 --- a/src/plugins/content_management/public/registry/content_type.ts +++ b/src/plugins/content_management/public/registry/content_type.ts @@ -12,23 +12,23 @@ import type { CrudClient } from '../crud_client'; export class ContentType { constructor(public readonly definition: ContentTypeDefinition) {} - id(): string { + public get id(): string { return this.definition.id; } - name(): string { - return this.definition.name ?? this.id(); + public get name(): string { + return this.definition.name ?? this.id; } - description(): string { + public get description(): string { return this.definition.description ?? ''; } - icon(): string { + public get icon(): string { return this.definition.icon ?? 'questionInCircle'; } - crud(): CrudClient | undefined { + public get crud(): CrudClient | undefined { return this.definition.crud; } } diff --git a/src/plugins/content_management/public/registry/registry.test.ts b/src/plugins/content_management/public/registry/registry.test.ts index f6284ddd31f6..20c20c161bad 100644 --- a/src/plugins/content_management/public/registry/registry.test.ts +++ b/src/plugins/content_management/public/registry/registry.test.ts @@ -22,10 +22,10 @@ test('registering a content type', () => { description: 'Test description', }); - expect(type.id()).toBe('test'); - expect(type.name()).toBe('Test'); - expect(type.icon()).toBe('test'); - expect(type.description()).toBe('Test description'); + expect(type.id).toBe('test'); + expect(type.name).toBe('Test'); + expect(type.icon).toBe('test'); + expect(type.description).toBe('Test description'); }); test('registering already registered content type throws', () => { diff --git a/src/plugins/content_management/public/registry/registry.ts b/src/plugins/content_management/public/registry/registry.ts index 6648888122bc..7c96a0d79b25 100644 --- a/src/plugins/content_management/public/registry/registry.ts +++ b/src/plugins/content_management/public/registry/registry.ts @@ -17,7 +17,7 @@ export class ContentTypeRegistry { throw new Error(`Content type with id "${definition.id}" already registered.`); } const type = new ContentType(definition); - this.types.set(type.id(), type); + this.types.set(type.id, type); return type; } diff --git a/src/plugins/content_management/server/core/content_type.ts b/src/plugins/content_management/server/core/content_type.ts new file mode 100644 index 000000000000..5853cd3e7755 --- /dev/null +++ b/src/plugins/content_management/server/core/content_type.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ContentCrud } from './crud'; +import { EventBus } from './event_bus'; +import { ContentStorage, ContentTypeDefinition } from './types'; + +export class ContentType { + /** Content definition. */ + private readonly _definition: ContentTypeDefinition; + /** Content crud instance. */ + private readonly contentCrud: ContentCrud; + + constructor(definition: ContentTypeDefinition, eventBus: EventBus) { + this._definition = definition; + this.contentCrud = new ContentCrud(definition.id, definition.storage, { eventBus }); + } + + public get id() { + return this._definition.id; + } + + public get definition() { + return this._definition; + } + + public get storage() { + return this._definition.storage; + } + + public get crud() { + return this.contentCrud; + } +} diff --git a/src/plugins/content_management/server/core/core.test.ts b/src/plugins/content_management/server/core/core.test.ts new file mode 100644 index 000000000000..19670740290f --- /dev/null +++ b/src/plugins/content_management/server/core/core.test.ts @@ -0,0 +1,616 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { loggingSystemMock } from '@kbn/core/server/mocks'; +import { Core } from './core'; +import { createMemoryStorage, MockContent } from './mocks'; +import { ContentRegistry } from './registry'; +import { ContentCrud } from './crud'; +import type { + GetItemStart, + GetItemSuccess, + GetItemError, + CreateItemStart, + CreateItemSuccess, + CreateItemError, + UpdateItemStart, + UpdateItemSuccess, + UpdateItemError, + DeleteItemStart, + DeleteItemSuccess, + DeleteItemError, +} from './event_types'; + +const logger = loggingSystemMock.createLogger(); + +const FOO_CONTENT_ID = 'foo'; + +const setup = ({ registerFooType = false }: { registerFooType?: boolean } = {}) => { + const ctx = {}; + + const core = new Core({ logger }); + const coreSetup = core.setup(); + const contentDefinition = { + id: FOO_CONTENT_ID, + storage: createMemoryStorage(), + }; + const cleanUp = () => { + coreSetup.api.eventBus.stop(); + }; + + let fooContentCrud: ContentCrud | undefined; + + if (registerFooType) { + coreSetup.api.register(contentDefinition); + fooContentCrud = coreSetup.api.crud(FOO_CONTENT_ID); + } + + return { + core, + coreSetup, + contentDefinition, + ctx, + fooContentCrud, + cleanUp, + eventBus: coreSetup.api.eventBus, + }; +}; + +describe('Content Core', () => { + describe('setup()', () => { + test('should return the registry and the public api', () => { + const { coreSetup, cleanUp } = setup(); + + expect(coreSetup.contentRegistry).toBeInstanceOf(ContentRegistry); + expect(Object.keys(coreSetup.api).sort()).toEqual(['crud', 'eventBus', 'register']); + + cleanUp(); + }); + + describe('api', () => { + describe('register()', () => { + test('should expose the register handler from the registry instance', () => { + const { coreSetup, cleanUp, contentDefinition } = setup(); + + const { + contentRegistry, + api: { register }, + } = coreSetup; + + expect(contentRegistry.isContentRegistered(FOO_CONTENT_ID)).toBe(false); + + register(contentDefinition); + + // Make sure the "register" exposed by the api is indeed registring + // the content into our "contentRegistry" instance + expect(contentRegistry.isContentRegistered(FOO_CONTENT_ID)).toBe(true); + expect(contentRegistry.getDefinition(FOO_CONTENT_ID)).toBe(contentDefinition); + + cleanUp(); + }); + }); + + describe('crud()', () => { + test('get()', async () => { + const { fooContentCrud, ctx, cleanUp } = setup({ registerFooType: true }); + + const res = await fooContentCrud!.get(ctx, '1'); + expect(res.item).toBeUndefined(); + + cleanUp(); + }); + + test('get() - options are forwared to storage layer', async () => { + const { fooContentCrud, ctx, cleanUp } = setup({ registerFooType: true }); + + const res = await fooContentCrud!.get(ctx, '1', { forwardInResponse: { foo: 'bar' } }); + expect(res).toEqual({ + contentTypeId: FOO_CONTENT_ID, + item: { + // Options forwared in response + options: { foo: 'bar' }, + }, + }); + + cleanUp(); + }); + + test('create()', async () => { + const { fooContentCrud, ctx, cleanUp } = setup({ registerFooType: true }); + + const res = await fooContentCrud!.get(ctx, '1234'); + expect(res.item).toBeUndefined(); + await fooContentCrud!.create, { id: string }>( + ctx, + { title: 'Hello' }, + { id: '1234' } // We send this "id" option to specify the id of the content created + ); + expect(fooContentCrud!.get(ctx, '1234')).resolves.toEqual({ + contentTypeId: FOO_CONTENT_ID, + item: { + id: '1234', + title: 'Hello', + }, + }); + + cleanUp(); + }); + + test('update()', async () => { + const { fooContentCrud, ctx, cleanUp } = setup({ registerFooType: true }); + + await fooContentCrud!.create, { id: string }>( + ctx, + { title: 'Hello' }, + { id: '1234' } + ); + await fooContentCrud!.update>(ctx, '1234', { title: 'changed' }); + expect(fooContentCrud!.get(ctx, '1234')).resolves.toEqual({ + contentTypeId: FOO_CONTENT_ID, + item: { + id: '1234', + title: 'changed', + }, + }); + + cleanUp(); + }); + + test('update() - options are forwared to storage layer', async () => { + const { fooContentCrud, ctx, cleanUp } = setup({ registerFooType: true }); + + await fooContentCrud!.create, { id: string }>( + ctx, + { title: 'Hello' }, + { id: '1234' } + ); + const res = await fooContentCrud!.update>( + ctx, + '1234', + { title: 'changed' }, + { forwardInResponse: { foo: 'bar' } } + ); + + expect(res).toEqual({ + contentTypeId: FOO_CONTENT_ID, + result: { + id: '1234', + title: 'changed', + // Options forwared in response + options: { foo: 'bar' }, + }, + }); + + expect(fooContentCrud!.get(ctx, '1234')).resolves.toEqual({ + contentTypeId: FOO_CONTENT_ID, + item: { + id: '1234', + title: 'changed', + }, + }); + + cleanUp(); + }); + + test('delete()', async () => { + const { fooContentCrud, ctx, cleanUp } = setup({ registerFooType: true }); + + await fooContentCrud!.create, { id: string }>( + ctx, + { title: 'Hello' }, + { id: '1234' } + ); + expect(fooContentCrud!.get(ctx, '1234')).resolves.toEqual({ + contentTypeId: FOO_CONTENT_ID, + item: expect.any(Object), + }); + await fooContentCrud!.delete(ctx, '1234'); + expect(fooContentCrud!.get(ctx, '1234')).resolves.toEqual({ + contentTypeId: FOO_CONTENT_ID, + item: undefined, + }); + + cleanUp(); + }); + + test('delete() - options are forwared to storage layer', async () => { + const { fooContentCrud, ctx, cleanUp } = setup({ registerFooType: true }); + + await fooContentCrud!.create, { id: string }>( + ctx, + { title: 'Hello' }, + { id: '1234' } + ); + const res = await fooContentCrud!.delete(ctx, '1234', { + forwardInResponse: { foo: 'bar' }, + }); + expect(res).toMatchObject({ result: { options: { foo: 'bar' } } }); + + cleanUp(); + }); + }); + + describe('eventBus', () => { + test('should allow to emit and subscribe to events', () => { + const { coreSetup, cleanUp } = setup(); + + const { + api: { eventBus }, + } = coreSetup; + + const listener = jest.fn(); + const subscription = eventBus.events$.subscribe(listener); + + const event: GetItemStart = { + type: 'getItemStart', + contentId: '123', + contentTypeId: FOO_CONTENT_ID, + }; + eventBus.emit(event); + + expect(listener).toHaveBeenCalledWith(event); + subscription.unsubscribe(); + + cleanUp(); + }); + + test('should allow to subscribe to a single event', () => { + const { coreSetup, cleanUp } = setup(); + + const { + api: { eventBus }, + } = coreSetup; + + const listener = jest.fn(); + // Listen to all "getItemStart" events, regardless of the content type + const unsubscribe = eventBus.on('getItemStart', listener); + + const event: GetItemStart = { + type: 'getItemStart', + contentId: '123', + contentTypeId: FOO_CONTENT_ID, + }; + eventBus.emit(event); + + expect(listener).toHaveBeenCalledWith(event); + + // Test the returned unsubscribe() handler + listener.mockReset(); + unsubscribe(); + + eventBus.emit(event); + expect(listener).not.toHaveBeenCalledWith(event); + + cleanUp(); + }); + + test('should validate that the content type is registered when subscribing to single event with content type', () => { + const { coreSetup, cleanUp } = setup(); + + const { + api: { eventBus }, + } = coreSetup; + + expect(() => { + eventBus.on('getItemStart', FOO_CONTENT_ID, jest.fn()); + }).toThrow('Invalid content type [foo].'); + + cleanUp(); + }); + + test('should allow to subscribe to a single event for a single content type', async () => { + const { coreSetup, ctx, contentDefinition, cleanUp } = setup(); + + const { + api: { eventBus, register, crud }, + } = coreSetup; + + register(contentDefinition); + + await crud(FOO_CONTENT_ID).create, { id: string }>( + ctx, + { title: 'Hello' }, + { id: '1234' } + ); + + const listener = jest.fn(); + + // Listen to "getItemStart" events *only* on the "foo" content type + eventBus.on('getItemStart', FOO_CONTENT_ID, listener); + + let event: GetItemStart = { + type: 'getItemStart', + contentId: '123', + contentTypeId: 'other', // other type should not call listener + }; + eventBus.emit(event); + + expect(listener).not.toHaveBeenCalledWith(event); + + event = { + type: 'getItemStart', + contentId: '123', + contentTypeId: FOO_CONTENT_ID, + }; + eventBus.emit(event); + + expect(listener).toHaveBeenCalledWith(event); + + cleanUp(); + }); + + describe('crud operations should emit start|success|error events', () => { + test('get()', async () => { + const { fooContentCrud, eventBus, ctx, cleanUp } = setup({ + registerFooType: true, + }); + + const data = { title: 'Hello' }; + + await fooContentCrud!.create, { id: string }>(ctx, data, { + id: '1234', + }); + + const listener = jest.fn(); + const sub = eventBus.events$.subscribe(listener); + + const promise = fooContentCrud!.get(ctx, '1234', { someOption: 'baz' }); + + const getItemStart: GetItemStart = { + type: 'getItemStart', + contentId: '1234', + contentTypeId: FOO_CONTENT_ID, + options: { someOption: 'baz' }, + }; + + expect(listener).toHaveBeenCalledWith(getItemStart); + + await promise; + + const getItemSuccess: GetItemSuccess = { + type: 'getItemSuccess', + contentId: '1234', + data: { + id: '1234', + ...data, + }, + contentTypeId: FOO_CONTENT_ID, + }; + + expect(listener).toHaveBeenCalledWith(getItemSuccess); + + listener.mockReset(); + + const errorMessage = 'Ohhh no!'; + const reject = jest.fn(); + await fooContentCrud!.get(ctx, '1234', { errorToThrow: errorMessage }).catch(reject); + + const getItemError: GetItemError = { + type: 'getItemError', + contentId: '1234', + contentTypeId: FOO_CONTENT_ID, + error: errorMessage, + options: { errorToThrow: errorMessage }, + }; + + expect(listener).toHaveBeenLastCalledWith(getItemError); + + expect(reject).toHaveBeenCalledWith(new Error(errorMessage)); + + sub.unsubscribe(); + + cleanUp(); + }); + + test('create()', async () => { + const { fooContentCrud, ctx, eventBus, cleanUp } = setup({ + registerFooType: true, + }); + + const data = { title: 'Hello' }; + + const listener = jest.fn(); + const sub = eventBus.events$.subscribe(listener); + + const promise = fooContentCrud!.create, { id: string }>( + ctx, + data, + { + id: '1234', + } + ); + + const createItemStart: CreateItemStart = { + type: 'createItemStart', + contentTypeId: FOO_CONTENT_ID, + data, + options: { id: '1234' }, + }; + + expect(listener).toHaveBeenCalledWith(createItemStart); + + await promise; + + const createItemSuccess: CreateItemSuccess = { + type: 'createItemSuccess', + data: { + id: '1234', + ...data, + }, + contentTypeId: FOO_CONTENT_ID, + options: { id: '1234' }, + }; + + expect(listener).toHaveBeenCalledWith(createItemSuccess); + + listener.mockReset(); + + const errorMessage = 'Ohhh no!'; + const reject = jest.fn(); + await fooContentCrud! + .create, { id: string; errorToThrow: string }>(ctx, data, { + id: '1234', + errorToThrow: errorMessage, + }) + .catch(reject); + + const createItemError: CreateItemError = { + type: 'createItemError', + contentTypeId: FOO_CONTENT_ID, + data, + error: errorMessage, + options: { id: '1234', errorToThrow: errorMessage }, + }; + + expect(listener).toHaveBeenLastCalledWith(createItemError); + + expect(reject).toHaveBeenCalledWith(new Error(errorMessage)); + + sub.unsubscribe(); + cleanUp(); + }); + + test('update()', async () => { + const { fooContentCrud, ctx, eventBus, cleanUp } = setup({ + registerFooType: true, + }); + + await fooContentCrud!.create, { id: string }>( + ctx, + { title: 'Hello' }, + { + id: '1234', + } + ); + + const listener = jest.fn(); + const sub = eventBus.events$.subscribe(listener); + + const data = { title: 'Updated' }; + + const promise = await fooContentCrud!.update(ctx, '1234', data, { someOptions: 'baz' }); + + const updateItemStart: UpdateItemStart = { + type: 'updateItemStart', + contentId: '1234', + contentTypeId: FOO_CONTENT_ID, + data, + options: { someOptions: 'baz' }, + }; + + expect(listener).toHaveBeenCalledWith(updateItemStart); + + await promise; + + const updateItemSuccess: UpdateItemSuccess = { + type: 'updateItemSuccess', + contentId: '1234', + contentTypeId: FOO_CONTENT_ID, + data: { + id: '1234', + ...data, + }, + options: { someOptions: 'baz' }, + }; + + expect(listener).toHaveBeenCalledWith(updateItemSuccess); + + listener.mockReset(); + + const errorMessage = 'Ohhh no!'; + const reject = jest.fn(); + await fooContentCrud! + .update(ctx, '1234', data, { + errorToThrow: errorMessage, + }) + .catch(reject); + + const updateItemError: UpdateItemError = { + type: 'updateItemError', + contentTypeId: FOO_CONTENT_ID, + contentId: '1234', + data, + error: errorMessage, + options: { errorToThrow: errorMessage }, + }; + + expect(listener).toHaveBeenLastCalledWith(updateItemError); + + expect(reject).toHaveBeenCalledWith(new Error(errorMessage)); + + sub.unsubscribe(); + cleanUp(); + }); + + test('delete()', async () => { + const { fooContentCrud, ctx, eventBus, cleanUp } = setup({ + registerFooType: true, + }); + + await fooContentCrud!.create, { id: string }>( + ctx, + { title: 'Hello' }, + { + id: '1234', + } + ); + + const listener = jest.fn(); + const sub = eventBus.events$.subscribe(listener); + + const promise = await fooContentCrud!.delete(ctx, '1234', { someOptions: 'baz' }); + + const deleteItemStart: DeleteItemStart = { + type: 'deleteItemStart', + contentId: '1234', + contentTypeId: FOO_CONTENT_ID, + options: { someOptions: 'baz' }, + }; + + expect(listener).toHaveBeenCalledWith(deleteItemStart); + + await promise; + + const deleteItemSuccess: DeleteItemSuccess = { + type: 'deleteItemSuccess', + contentId: '1234', + contentTypeId: FOO_CONTENT_ID, + options: { someOptions: 'baz' }, + }; + + expect(listener).toHaveBeenCalledWith(deleteItemSuccess); + + listener.mockReset(); + + const errorMessage = 'Ohhh no!'; + const reject = jest.fn(); + await fooContentCrud! + .delete(ctx, '1234', { + errorToThrow: errorMessage, + }) + .catch(reject); + + const deleteItemError: DeleteItemError = { + type: 'deleteItemError', + contentTypeId: FOO_CONTENT_ID, + contentId: '1234', + error: errorMessage, + options: { errorToThrow: errorMessage }, + }; + + expect(listener).toHaveBeenLastCalledWith(deleteItemError); + + expect(reject).toHaveBeenCalledWith(new Error(errorMessage)); + + sub.unsubscribe(); + cleanUp(); + }); + }); + }); + }); + }); +}); diff --git a/src/plugins/content_management/server/core/core.ts b/src/plugins/content_management/server/core/core.ts new file mode 100644 index 000000000000..2efc6546fa64 --- /dev/null +++ b/src/plugins/content_management/server/core/core.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { Logger } from '@kbn/core/server'; + +import { ContentCrud } from './crud'; +import { EventBus } from './event_bus'; +import { ContentRegistry } from './registry'; + +export interface CoreApi { + /** + * Register a new content in the registry. + * + * @param contentType The content type to register + * @param config The content configuration + */ + register: ContentRegistry['register']; + /** Handler to retrieve a content crud instance */ + crud: (contentType: string) => ContentCrud; + /** Content management event bus */ + eventBus: EventBus; +} + +export interface CoreSetup { + /** Content registry instance */ + contentRegistry: ContentRegistry; + /** Api exposed to other plugins */ + api: CoreApi; +} + +export class Core { + private contentRegistry: ContentRegistry; + private eventBus: EventBus; + + constructor({ logger }: { logger: Logger }) { + const contentTypeValidator = (contentType: string) => + this.contentRegistry?.isContentRegistered(contentType) ?? false; + this.eventBus = new EventBus(contentTypeValidator); + this.contentRegistry = new ContentRegistry(this.eventBus); + } + + setup(): CoreSetup { + return { + contentRegistry: this.contentRegistry, + api: { + register: this.contentRegistry.register.bind(this.contentRegistry), + crud: this.contentRegistry.getCrud.bind(this.contentRegistry), + eventBus: this.eventBus, + }, + }; + } +} diff --git a/src/plugins/content_management/server/core/crud.ts b/src/plugins/content_management/server/core/crud.ts new file mode 100644 index 000000000000..e56d79e8f47b --- /dev/null +++ b/src/plugins/content_management/server/core/crud.ts @@ -0,0 +1,241 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import type { EventBus } from './event_bus'; +import type { ContentStorage, StorageContext } from './types'; + +export interface GetResponse { + contentTypeId: string; + item?: T; +} + +export interface BulkGetResponse { + contentTypeId: string; + items: T; +} + +export interface CreateItemResponse { + contentTypeId: string; + result: T; +} + +export interface UpdateItemResponse { + contentTypeId: string; + result: T; +} + +export interface DeleteItemResponse { + contentTypeId: string; + result: T; +} + +export class ContentCrud implements ContentStorage { + private storage: ContentStorage; + private eventBus: EventBus; + public contentTypeId: string; + + constructor( + contentTypeId: string, + contentStorage: ContentStorage, + { + eventBus, + }: { + eventBus: EventBus; + } + ) { + this.contentTypeId = contentTypeId; + this.storage = contentStorage; + this.eventBus = eventBus; + } + + public async get( + ctx: StorageContext, + contentId: string, + options?: Options + ): Promise> { + this.eventBus.emit({ + type: 'getItemStart', + contentId, + contentTypeId: this.contentTypeId, + options, + }); + + try { + const item = await this.storage.get(ctx, contentId, options); + + this.eventBus.emit({ + type: 'getItemSuccess', + contentId, + contentTypeId: this.contentTypeId, + data: item, + }); + + return { contentTypeId: this.contentTypeId, item }; + } catch (e) { + this.eventBus.emit({ + type: 'getItemError', + contentId, + contentTypeId: this.contentTypeId, + options, + error: e.message, + }); + + throw e; + } + } + + public async bulkGet( + ctx: StorageContext, + ids: string[], + options?: Options + ): Promise> { + this.eventBus.emit({ + type: 'bulkGetItemStart', + contentTypeId: this.contentTypeId, + ids, + options, + }); + + try { + const items = await this.storage.bulkGet(ctx, ids, options); + + this.eventBus.emit({ + type: 'bulkGetItemSuccess', + ids, + contentTypeId: this.contentTypeId, + data: items, + }); + + return { + contentTypeId: this.contentTypeId, + items, + }; + } catch (e) { + this.eventBus.emit({ + type: 'bulkGetItemError', + ids, + contentTypeId: this.contentTypeId, + options, + error: e, + }); + + throw e; + } + } + + public async create( + ctx: StorageContext, + data: Data, + options?: Options + ): Promise> { + this.eventBus.emit({ + type: 'createItemStart', + contentTypeId: this.contentTypeId, + data, + options, + }); + + try { + const result = await this.storage.create(ctx, data, options); + + this.eventBus.emit({ + type: 'createItemSuccess', + contentTypeId: this.contentTypeId, + data: result, + options, + }); + + return { contentTypeId: this.contentTypeId, result }; + } catch (e) { + this.eventBus.emit({ + type: 'createItemError', + contentTypeId: this.contentTypeId, + data, + options, + error: e.message, + }); + + throw e; + } + } + + public async update( + ctx: StorageContext, + id: string, + data: Data, + options?: Options + ): Promise> { + this.eventBus.emit({ + type: 'updateItemStart', + contentId: id, + contentTypeId: this.contentTypeId, + data, + options, + }); + + try { + const result = await this.storage.update(ctx, id, data, options); + + this.eventBus.emit({ + type: 'updateItemSuccess', + contentId: id, + contentTypeId: this.contentTypeId, + data: result, + options, + }); + + return { contentTypeId: this.contentTypeId, result }; + } catch (e) { + this.eventBus.emit({ + type: 'updateItemError', + contentId: id, + contentTypeId: this.contentTypeId, + data, + options, + error: e.message, + }); + + throw e; + } + } + + public async delete( + ctx: StorageContext, + id: string, + options?: Options + ): Promise> { + this.eventBus.emit({ + type: 'deleteItemStart', + contentId: id, + contentTypeId: this.contentTypeId, + options, + }); + + try { + const result = await this.storage.delete(ctx, id, options); + + this.eventBus.emit({ + type: 'deleteItemSuccess', + contentId: id, + contentTypeId: this.contentTypeId, + options, + }); + + return { contentTypeId: this.contentTypeId, result }; + } catch (e) { + this.eventBus.emit({ + type: 'deleteItemError', + contentId: id, + contentTypeId: this.contentTypeId, + options, + error: e.message, + }); + + throw e; + } + } +} diff --git a/src/plugins/content_management/server/core/event_bus.ts b/src/plugins/content_management/server/core/event_bus.ts new file mode 100644 index 000000000000..88245deb5df0 --- /dev/null +++ b/src/plugins/content_management/server/core/event_bus.ts @@ -0,0 +1,136 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { Subject } from 'rxjs'; +import type { Subscription } from 'rxjs'; + +import type { ContentEvent, ContentEventType } from './event_types'; + +/** Key used to represent all content types */ +const ALL_TYPES_KEY = '*'; + +/** + * Content event listener + */ +export type EventListener = (arg: ContentEvent) => void; + +/** + * Event bus for all content generated events + */ +export class EventBus { + /** The events Rxjs Subject */ + private _events$: Subject; + /** Map of listener for each content type */ + private eventListeners = new Map< + ContentEventType, + { [contentType: string]: Set } + >(); + /** Subscription to the _events$ Observable */ + private eventsSubscription: Subscription; + + /** + * @param contentTypeValidator Handler to validate if a content type is valid or not + */ + constructor(private contentTypeValidator?: (contentType: string) => boolean) { + this._events$ = new Subject(); + this.eventsSubscription = this._events$.subscribe((event) => { + const eventListeners = this.eventListeners.get(event.type); + + if (eventListeners) { + const listeners = [ + ...(eventListeners[event.contentTypeId] ?? []), + ...(eventListeners[ALL_TYPES_KEY] ?? []), + ]; + listeners.forEach((cb) => { + cb(event); + }); + } + }); + } + + /** + * + * + * @param type The event type e.g. "getItemSuccess") + * @param cb Callback to execute + * + * @example + * + * ```ts + * // Register an event for all content types + * eventBus.on('getItemSuccess', (event) => {}) + * + * // Register an event for the "dashboard" content type + * * eventBus.on('getItemSuccess', 'dashboard', (event) => {}) + * ``` + */ + + /** + * Register an event listener for specific events on specific content types + * + * @param eventType The event type to listen to + * @param contentType The content type to listen to (if not specified all content types will send the event type) + * @param cb Handler to call when the event occurs + * + * @returns Handler to unsubscribe + */ + on(eventType: ContentEventType, cb: EventListener): () => void; + on( + eventType: ContentEventType, + contentType: ContentType, + cb: EventListener + ): () => void; + on( + eventType: ContentEventType, + _contentType: ContentType | EventListener, + _cb?: EventListener + ): () => void { + const contentType = typeof _contentType === 'function' ? ALL_TYPES_KEY : _contentType; + const cb = typeof _contentType === 'function' ? _contentType : _cb!; + + if (contentType !== ALL_TYPES_KEY) { + const isContentTypeValid = this.contentTypeValidator?.(contentType) ?? true; + if (!isContentTypeValid) { + throw new Error(`Invalid content type [${contentType}].`); + } + } + + if (!this.eventListeners.has(eventType)) { + this.eventListeners.set(eventType, {}); + } + + const eventTypeListeners = this.eventListeners.get(eventType)!; + + if (eventTypeListeners[contentType] === undefined) { + eventTypeListeners[contentType] = new Set(); + } + + eventTypeListeners[contentType].add(cb); + + return () => { + eventTypeListeners[contentType].delete(cb); + }; + } + + /** + * Send an event to the CM event bus + * @param event The event to send + */ + emit(event: ContentEvent) { + this._events$.next(event); + } + + /** Content management events Observable */ + public get events$() { + return this._events$.asObservable(); + } + + stop() { + this.eventsSubscription.unsubscribe(); + } +} diff --git a/src/plugins/content_management/server/core/event_types.ts b/src/plugins/content_management/server/core/event_types.ts new file mode 100644 index 000000000000..815ea9a4f671 --- /dev/null +++ b/src/plugins/content_management/server/core/event_types.ts @@ -0,0 +1,139 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export interface GetItemStart { + type: 'getItemStart'; + contentId: string; + contentTypeId: string; + options?: object; +} + +export interface GetItemSuccess { + type: 'getItemSuccess'; + contentId: string; + contentTypeId: string; + data: unknown; +} + +export interface GetItemError { + type: 'getItemError'; + contentId: string; + contentTypeId: string; + error: unknown; + options?: object; +} + +export interface BulkGetItemStart { + type: 'bulkGetItemStart'; + ids: string[]; + contentTypeId: string; + options?: object; +} + +export interface BulkGetItemSuccess { + type: 'bulkGetItemSuccess'; + ids: string[]; + contentTypeId: string; + data: unknown; +} + +export interface BulkGetItemError { + type: 'bulkGetItemError'; + ids: string[]; + contentTypeId: string; + error: unknown; + options?: object; +} + +export interface CreateItemStart { + type: 'createItemStart'; + contentTypeId: string; + data: object; + options?: object; +} + +export interface CreateItemSuccess { + type: 'createItemSuccess'; + contentTypeId: string; + data: object; + options?: object; +} + +export interface CreateItemError { + type: 'createItemError'; + contentTypeId: string; + data: object; + error: unknown; + options?: object; +} + +export interface UpdateItemStart { + type: 'updateItemStart'; + contentId: string; + contentTypeId: string; + data: object; + options?: object; +} + +export interface UpdateItemSuccess { + type: 'updateItemSuccess'; + contentId: string; + contentTypeId: string; + data: object; + options?: object; +} + +export interface UpdateItemError { + type: 'updateItemError'; + contentId: string; + contentTypeId: string; + data: object; + error: unknown; + options?: object; +} + +export interface DeleteItemStart { + type: 'deleteItemStart'; + contentId: string; + contentTypeId: string; + options?: object; +} + +export interface DeleteItemSuccess { + type: 'deleteItemSuccess'; + contentId: string; + contentTypeId: string; + options?: object; +} + +export interface DeleteItemError { + type: 'deleteItemError'; + contentId: string; + contentTypeId: string; + error: unknown; + options?: object; +} + +export type ContentEvent = + | GetItemStart + | GetItemSuccess + | GetItemError + | BulkGetItemStart + | BulkGetItemSuccess + | BulkGetItemError + | CreateItemStart + | CreateItemSuccess + | CreateItemError + | UpdateItemStart + | UpdateItemSuccess + | UpdateItemError + | DeleteItemStart + | DeleteItemSuccess + | DeleteItemError; + +export type ContentEventType = ContentEvent['type']; diff --git a/src/plugins/content_management/server/core/index.ts b/src/plugins/content_management/server/core/index.ts new file mode 100644 index 000000000000..f292f5fa2df9 --- /dev/null +++ b/src/plugins/content_management/server/core/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { Core } from './core'; + +export type { CoreApi } from './core'; + +export type { ContentType } from './content_type'; + +export type { ContentStorage, ContentTypeDefinition, StorageContext } from './types'; + +export type { ContentRegistry } from './registry'; diff --git a/src/plugins/content_management/server/core/mocks/in_memory_storage.ts b/src/plugins/content_management/server/core/mocks/in_memory_storage.ts new file mode 100644 index 000000000000..a2297731198a --- /dev/null +++ b/src/plugins/content_management/server/core/mocks/in_memory_storage.ts @@ -0,0 +1,141 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { ContentStorage, StorageContext } from '../types'; + +export interface MockContent { + id: string; + title: string; +} + +let idx = 0; + +class InMemoryStorage implements ContentStorage { + private db: Map = new Map(); + + async get( + ctx: StorageContext, + id: string, + { forwardInResponse, errorToThrow }: { forwardInResponse?: object; errorToThrow?: string } = {} + ) { + // This allows us to test that proper error events are thrown when the storage layer op fails + if (errorToThrow) { + throw new Error(errorToThrow); + } + + if (forwardInResponse) { + // We add this so we can test that options are passed down to the storage layer + return { + ...(await this.db.get(id)), + options: forwardInResponse, + }; + } + return this.db.get(id); + } + + async bulkGet( + ctx: StorageContext, + ids: string[], + { forwardInResponse }: { forwardInResponse?: object } = {} + ) { + return ids.map((id) => this.db.get(id)); + } + + async create( + ctx: StorageContext, + data: Omit, + { id: _id, errorToThrow }: { id?: string; errorToThrow?: string } = {} + ): Promise { + // This allows us to test that proper error events are thrown when the storage layer op fails + if (errorToThrow) { + throw new Error(errorToThrow); + } + + const nextId = idx++; + const id = _id ?? nextId.toString(); + + const content: MockContent = { + ...data, + id, + }; + + this.db.set(id, content); + + return content; + } + + async update( + ctx: StorageContext, + id: string, + data: Partial>, + { forwardInResponse, errorToThrow }: { forwardInResponse?: object; errorToThrow?: string } = {} + ) { + // This allows us to test that proper error events are thrown when the storage layer op fails + if (errorToThrow) { + throw new Error(errorToThrow); + } + + const content = this.db.get(id); + if (!content) { + throw new Error(`Content to update not found [${id}].`); + } + + const updatedContent = { + ...content, + ...data, + }; + + this.db.set(id, updatedContent); + + if (forwardInResponse) { + // We add this so we can test that options are passed down to the storage layer + return { + ...updatedContent, + options: forwardInResponse, + }; + } + + return updatedContent; + } + + async delete( + ctx: StorageContext, + id: string, + { forwardInResponse, errorToThrow }: { forwardInResponse?: object; errorToThrow?: string } = {} + ) { + // This allows us to test that proper error events are thrown when the storage layer op fails + if (errorToThrow) { + throw new Error(errorToThrow); + } + + if (!this.db.has(id)) { + return { + status: 'error', + error: `Content do delete not found [${id}].`, + }; + } + + this.db.delete(id); + + if (forwardInResponse) { + // We add this so we can test that options are passed down to the storage layer + return { + status: 'success', + options: forwardInResponse, + }; + } + + return { + status: 'success', + }; + } +} + +export const createMemoryStorage = () => { + return new InMemoryStorage(); +}; diff --git a/src/plugins/content_management/server/core/mocks/index.ts b/src/plugins/content_management/server/core/mocks/index.ts new file mode 100644 index 000000000000..b7f9d8a2f258 --- /dev/null +++ b/src/plugins/content_management/server/core/mocks/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { createMemoryStorage } from './in_memory_storage'; +export type { MockContent } from './in_memory_storage'; diff --git a/src/plugins/content_management/server/core/registry.ts b/src/plugins/content_management/server/core/registry.ts new file mode 100644 index 000000000000..2845ab5f742b --- /dev/null +++ b/src/plugins/content_management/server/core/registry.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ContentType } from './content_type'; +import { EventBus } from './event_bus'; +import type { ContentStorage, ContentTypeDefinition } from './types'; + +export class ContentRegistry { + private types = new Map(); + + constructor(private eventBus: EventBus) {} + + /** + * Register a new content in the registry. + * + * @param contentType The content type to register + * @param config The content configuration + */ + register(definition: ContentTypeDefinition) { + if (this.types.has(definition.id)) { + throw new Error(`Content [${definition.id}] is already registered`); + } + + const contentType = new ContentType(definition, this.eventBus); + + this.types.set(contentType.id, contentType); + } + + getContentType(id: string): ContentType { + const contentType = this.types.get(id); + if (!contentType) { + throw new Error(`Content [${id}] is not registered.`); + } + return contentType; + } + + /** Get the definition for a specific content type */ + getDefinition(id: string) { + return this.getContentType(id).definition; + } + + /** Get the crud instance of a content type */ + getCrud(id: string) { + return this.getContentType(id).crud; + } + + /** Helper to validate if a content type has been registered */ + isContentRegistered(id: string): boolean { + return this.types.has(id); + } +} diff --git a/src/plugins/content_management/server/core/types.ts b/src/plugins/content_management/server/core/types.ts new file mode 100644 index 000000000000..4ebd79d60571 --- /dev/null +++ b/src/plugins/content_management/server/core/types.ts @@ -0,0 +1,38 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; + +/** Context that is sent to all storage instance methods */ +export interface StorageContext { + requestHandlerContext?: RequestHandlerContext; +} + +export interface ContentStorage { + /** Get a single item */ + get(ctx: StorageContext, id: string, options: unknown): Promise; + + /** Get multiple items */ + bulkGet(ctx: StorageContext, ids: string[], options: unknown): Promise; + + /** Create an item */ + create(ctx: StorageContext, fields: object, options: unknown): Promise; + + /** Update an item */ + update(ctx: StorageContext, id: string, fields: object, options: unknown): Promise; + + /** Delete an item */ + delete(ctx: StorageContext, id: string, options: unknown): Promise; +} + +export interface ContentTypeDefinition { + /** Unique id for the content type */ + id: string; + /** The storage layer for the content. It must implment the ContentStorage interface. */ + storage: S; +} diff --git a/src/plugins/content_management/server/plugin.ts b/src/plugins/content_management/server/plugin.ts index 54ed5ba7a7c2..5e3ba371a4e1 100755 --- a/src/plugins/content_management/server/plugin.ts +++ b/src/plugins/content_management/server/plugin.ts @@ -6,7 +6,14 @@ * Side Public License, v 1. */ -import type { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/server'; +import type { + CoreSetup, + CoreStart, + Plugin, + PluginInitializerContext, + Logger, +} from '@kbn/core/server'; +import { Core } from './core'; import { ContentManagementServerSetup, ContentManagementServerStart, @@ -16,10 +23,20 @@ import { export class ContentManagementPlugin implements Plugin { - constructor(initializerContext: PluginInitializerContext) {} + private readonly logger: Logger; + private readonly core: Core; + + constructor(initializerContext: PluginInitializerContext) { + this.logger = initializerContext.logger.get(); + this.core = new Core({ logger: this.logger }); + } public setup(core: CoreSetup) { - return {}; + const { api: coreApi } = this.core.setup(); + + return { + ...coreApi, + }; } public start(core: CoreStart) { diff --git a/src/plugins/content_management/tsconfig.json b/src/plugins/content_management/tsconfig.json index 8a207e0e42ca..f2cd5ce1b5e5 100644 --- a/src/plugins/content_management/tsconfig.json +++ b/src/plugins/content_management/tsconfig.json @@ -7,6 +7,7 @@ "kbn_references": [ "@kbn/core", "@kbn/config-schema", + "@kbn/core-http-request-handler-context-server", ], "exclude": [ "target/**/*", From 50b83014a3e2947e495c8b0f86aa57078573bd0c Mon Sep 17 00:00:00 2001 From: Maryam Saeidi Date: Tue, 14 Feb 2023 13:35:40 +0100 Subject: [PATCH 22/31] [AO] Fix overview alerts loading state (#150868) Fixes #140387 ## Summary Fix alerts table lazy loading state Before ![image](https://user-images.githubusercontent.com/12370520/218094792-24d00334-5414-4737-8f64-d619cbcc9f12.png) After ![image](https://user-images.githubusercontent.com/12370520/218094828-6b3559ce-1f7a-45a7-ae0d-96f5dad141a1.png) --- .../overview_page/overview_page.tsx | 3 ++- .../alert_summary_widget.tsx | 25 +++++------------ .../alert_summary_widget_compact.stories.tsx | 2 +- .../alert_summary_widget_compact.test.tsx | 12 ++++----- .../alert_summary_widget_compact.tsx | 6 ++--- ...alert_summary_widget_full_size.stories.tsx | 2 +- .../alert_summary_widget_full_size.test.tsx | 8 +++--- .../alert_summary_widget_full_size.tsx | 6 ++--- .../alert_summary_widget_loader.tsx | 27 +++++++++++++++++++ .../alert_summary_widget/components/index.ts | 5 ++-- .../public/application/sections/index.tsx | 3 --- .../public/common/get_alerts_table_state.tsx | 8 ++++-- .../public/common/get_rule_alerts_summary.tsx | 14 +++++++--- .../triggers_actions_ui/public/plugin.ts | 7 +++-- .../triggers_actions_ui/public/types.ts | 4 +++ 15 files changed, 83 insertions(+), 49 deletions(-) create mode 100644 x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_loader.tsx diff --git a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/overview_page.tsx b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/overview_page.tsx index 50d4befaefa5..0bad50a97abe 100644 --- a/x-pack/plugins/observability/public/pages/overview/containers/overview_page/overview_page.tsx +++ b/x-pack/plugins/observability/public/pages/overview/containers/overview_page/overview_page.tsx @@ -218,9 +218,10 @@ export function OverviewPage() { - -
- ); + if (isLoading) return ; + if (error) return ; return fullSize ? ( // Only show full size version if there is data activeAlertCount || recoveredAlertCount ? ( - ) : null ) : ( - { - const renderComponent = (props: Partial = {}) => +describe('AlertSummaryWidgetCompact', () => { + const renderComponent = (props: Partial = {}) => render( - { ); - it('should render AlertsSummaryWidgetCompact', async () => { + it('should render AlertSummaryWidgetCompact', async () => { const alertSummaryWidget = renderComponent(); expect(alertSummaryWidget.queryByTestId('alertSummaryWidgetCompact')).toBeTruthy(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_compact.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_compact.tsx index 88e8276f5567..84c47a14a302 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_compact.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_compact.tsx @@ -14,7 +14,7 @@ import { AlertCounts } from './alert_counts'; import { ALL_ALERT_COLOR, WIDGET_TITLE } from './constants'; import { Alert, ChartThemes } from '../types'; -export interface AlertsSummaryWidgetCompactProps { +export interface AlertSummaryWidgetCompactProps { activeAlertCount: number; activeAlerts: Alert[]; chartThemes: ChartThemes; @@ -23,14 +23,14 @@ export interface AlertsSummaryWidgetCompactProps { onClick: (status?: AlertStatus) => void; } -export const AlertsSummaryWidgetCompact = ({ +export const AlertSummaryWidgetCompact = ({ activeAlertCount, activeAlerts, chartThemes: { theme, baseTheme }, recoveredAlertCount, timeRangeTitle, onClick, -}: AlertsSummaryWidgetCompactProps) => { +}: AlertSummaryWidgetCompactProps) => { const chartTheme = [ theme, EUI_SPARKLINE_THEME_PARTIAL, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.stories.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.stories.tsx index d52bf7ff0a69..dfdc2d4a2636 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.stories.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.stories.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertsSummaryWidgetFullSize as Component } from './alert_summary_widget_full_size'; +import { AlertSummaryWidgetFullSize as Component } from './alert_summary_widget_full_size'; import { mockedAlertSummaryResponse, mockedChartThemes } from '../../../mock/alert_summary_widget'; export default { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.test.tsx index 9e7b13107cb0..544cd9c9e160 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_full_size.test.tsx @@ -8,17 +8,17 @@ import React from 'react'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; import { - AlertsSummaryWidgetFullSize, - AlertsSummaryWidgetFullSizeProps, + AlertSummaryWidgetFullSize, + AlertSummaryWidgetFullSizeProps, } from './alert_summary_widget_full_size'; import { render } from '@testing-library/react'; import { mockedAlertSummaryResponse, mockedChartThemes } from '../../../mock/alert_summary_widget'; describe('AlertSummaryWidgetFullSize', () => { - const renderComponent = (props: Partial = {}) => + const renderComponent = (props: Partial = {}) => render( - { +}: AlertSummaryWidgetFullSizeProps) => { const chartTheme = [ theme, { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_loader.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_loader.tsx new file mode 100644 index 000000000000..146e79173fd9 --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/alert_summary_widget_loader.tsx @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { EuiLoadingChart } from '@elastic/eui'; +import { AlertSummaryWidgetProps } from '..'; + +type Props = Pick; + +export const AlertSummaryWidgetLoader = ({ fullSize }: Props) => { + return ( +
+ +
+ ); +}; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/index.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/index.ts index 51f94c6915f4..8e7fe184a10e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/components/index.ts @@ -5,6 +5,7 @@ * 2.0. */ -export { AlertsSummaryWidgetCompact } from './alert_summary_widget_compact'; +export { AlertSummaryWidgetCompact } from './alert_summary_widget_compact'; export { AlertSummaryWidgetError } from './alert_summary_widget_error'; -export { AlertsSummaryWidgetFullSize } from './alert_summary_widget_full_size'; +export { AlertSummaryWidgetFullSize } from './alert_summary_widget_full_size'; +export { AlertSummaryWidgetLoader } from './alert_summary_widget_loader'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/index.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/index.tsx index 95ac26d58735..3cab90c72694 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/index.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/index.tsx @@ -58,9 +58,6 @@ export const RuleDefinition = suspendedComponentWithProps( export const RuleTagBadge = suspendedComponentWithProps( lazy(() => import('./rules_list/components/rule_tag_badge')) ); -export const AlertSummaryWidget = suspendedComponentWithProps( - lazy(() => import('./alert_summary_widget/alert_summary_widget')) -); export const RuleStatusPanel = suspendedComponentWithProps( lazy(() => import('./rule_details/components/rule_status_panel')) ); diff --git a/x-pack/plugins/triggers_actions_ui/public/common/get_alerts_table_state.tsx b/x-pack/plugins/triggers_actions_ui/public/common/get_alerts_table_state.tsx index d378f26b4c88..f9f6c37e273a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/get_alerts_table_state.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/get_alerts_table_state.tsx @@ -7,6 +7,7 @@ import { EuiLoadingSpinner } from '@elastic/eui'; import React, { lazy, Suspense } from 'react'; +import { LazyLoadProps } from '../types'; import type { AlertsTableStateProps } from '../application/sections/alerts_table/alerts_table_state'; @@ -14,8 +15,11 @@ const AlertsTableStateLazy: React.FC = lazy( () => import('../application/sections/alerts_table/alerts_table_state') ); -export const getAlertsTableStateLazy = (props: AlertsTableStateProps) => ( - }> +export const getAlertsTableStateLazy = ({ + hideLazyLoader, + ...props +}: AlertsTableStateProps & LazyLoadProps) => ( + }> ); diff --git a/x-pack/plugins/triggers_actions_ui/public/common/get_rule_alerts_summary.tsx b/x-pack/plugins/triggers_actions_ui/public/common/get_rule_alerts_summary.tsx index 3f1db7782c2b..ae7c8462320d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/common/get_rule_alerts_summary.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/common/get_rule_alerts_summary.tsx @@ -5,10 +5,18 @@ * 2.0. */ -import React from 'react'; -import { AlertSummaryWidget } from '../application/sections'; +import React, { lazy, Suspense } from 'react'; +import { AlertSummaryWidgetLoader } from '../application/sections/alert_summary_widget/components'; import { AlertSummaryWidgetProps } from '../application/sections/alert_summary_widget'; +const AlertSummaryWidgetLazy: React.FC = lazy( + () => import('../application/sections/alert_summary_widget/alert_summary_widget') +); + export const getAlertSummaryWidgetLazy = (props: AlertSummaryWidgetProps) => { - return ; + return ( + }> + + + ); }; diff --git a/x-pack/plugins/triggers_actions_ui/public/plugin.ts b/x-pack/plugins/triggers_actions_ui/public/plugin.ts index 514de57900cc..010a3e60c95f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/public/plugin.ts @@ -47,6 +47,7 @@ import { ExperimentalFeatures, parseExperimentalConfigValue, } from '../common/experimental_features'; +import { LazyLoadProps } from './types'; import type { ActionTypeModel, @@ -111,7 +112,9 @@ export interface TriggersAndActionsUIPublicPluginStart { props: Omit ) => ReactElement; getAlertsTable: (props: AlertsTableProps) => ReactElement; - getAlertsStateTable: (props: AlertsTableStateProps) => ReactElement; + getAlertsStateTable: ( + props: AlertsTableStateProps & LazyLoadProps + ) => ReactElement; getAlertsSearchBar: (props: AlertsSearchBarProps) => ReactElement; getFieldBrowser: (props: FieldBrowserProps) => ReactElement; getRuleStatusDropdown: (props: RuleStatusDropdownProps) => ReactElement; @@ -381,7 +384,7 @@ export class Plugin connectorServices: this.connectorServices!, }); }, - getAlertsStateTable: (props: AlertsTableStateProps) => { + getAlertsStateTable: (props: AlertsTableStateProps & LazyLoadProps) => { return getAlertsTableStateLazy(props); }, getAlertsSearchBar: (props: AlertsSearchBarProps) => { diff --git a/x-pack/plugins/triggers_actions_ui/public/types.ts b/x-pack/plugins/triggers_actions_ui/public/types.ts index b8157ee5af66..6622b35fa892 100644 --- a/x-pack/plugins/triggers_actions_ui/public/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/types.ts @@ -666,3 +666,7 @@ export interface UpdateRulesToBulkEditProps { rules?: RuleTableItem[]; filter?: KueryNode | null; } + +export interface LazyLoadProps { + hideLazyLoader?: boolean; +} From 77ed48a75aef947ae4a1a1bb3f58a71538804730 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Tue, 14 Feb 2023 13:37:41 +0100 Subject: [PATCH 23/31] [@kbn/handlebars] Refactor types (#150520) --- packages/kbn-handlebars/index.test.ts | 11 +- packages/kbn-handlebars/index.ts | 9 +- .../kbn-handlebars/src/__jest__/test_bench.ts | 50 ++-- packages/kbn-handlebars/src/handlebars.ts | 14 +- .../src/spec/index.blocks.test.ts | 14 +- .../src/spec/index.data.test.ts | 6 +- .../src/spec/index.helpers.test.ts | 71 +++--- .../src/spec/index.partials.test.ts | 4 +- .../src/spec/index.regressions.test.ts | 14 +- .../src/spec/index.subexpressions.test.ts | 6 +- packages/kbn-handlebars/src/types.ts | 233 ++++++++++++------ packages/kbn-handlebars/src/visitor.ts | 71 +++--- .../drilldowns/url_drilldown/handlebars.ts | 8 +- .../components/lib/replace_vars.ts | 13 +- 14 files changed, 306 insertions(+), 218 deletions(-) diff --git a/packages/kbn-handlebars/index.test.ts b/packages/kbn-handlebars/index.test.ts index d95c6a1c8304..ed607db1e0bf 100644 --- a/packages/kbn-handlebars/index.test.ts +++ b/packages/kbn-handlebars/index.test.ts @@ -11,6 +11,7 @@ */ import Handlebars from '.'; +import type { HelperOptions, TemplateDelegate } from './src/types'; import { expectTemplate, forEachCompileFunctionName } from './src/__jest__/test_bench'; it('Handlebars.create', () => { @@ -419,7 +420,7 @@ describe('blocks', () => { .withInput({ me: 'my' }) .withDecorator( 'decorator', - (fn): Handlebars.TemplateDelegate => + (fn): TemplateDelegate => (context, options) => { expect(context).toMatchInlineSnapshot(` Object { @@ -446,7 +447,7 @@ describe('blocks', () => { .withInput({ arr: ['my'] }) .withDecorator( 'decorator', - (fn): Handlebars.TemplateDelegate => + (fn): TemplateDelegate => (context, options) => { expect(context).toMatchInlineSnapshot(`"my"`); expect(options).toMatchInlineSnapshot(` @@ -483,12 +484,12 @@ describe('blocks', () => { it('decorator nested inside of custom helper', () => { expectTemplate('{{#helper}}{{*decorator}}world{{/helper}}') - .withHelper('helper', function (options: Handlebars.HelperOptions) { + .withHelper('helper', function (options: HelperOptions) { return options.fn('my', { foo: 'bar' } as any); }) .withDecorator( 'decorator', - (fn): Handlebars.TemplateDelegate => + (fn): TemplateDelegate => (context, options) => { expect(context).toMatchInlineSnapshot(`"my"`); expect(options).toMatchInlineSnapshot(` @@ -519,7 +520,7 @@ describe('blocks', () => { }) .withDecorator('decorator', (fn) => { const decoratorCallOrder = ++decoratorCall; - const ret: Handlebars.TemplateDelegate = () => { + const ret: TemplateDelegate = () => { const progCallOrder = ++progCall; return `(decorator: ${decoratorCallOrder}, prog: ${progCallOrder}, fn: "${fn()}")`; }; diff --git a/packages/kbn-handlebars/index.ts b/packages/kbn-handlebars/index.ts index a00dbdbb37a6..4e56d27fb438 100644 --- a/packages/kbn-handlebars/index.ts +++ b/packages/kbn-handlebars/index.ts @@ -24,7 +24,10 @@ export default Handlebars; export const compileFnName: 'compile' | 'compileAST' = allowUnsafeEval() ? 'compile' : 'compileAST'; export type { - DecoratorFunction, - ExtendedCompileOptions, - ExtendedRuntimeOptions, + CompileOptions, + RuntimeOptions, + HelperDelegate, + TemplateDelegate, + DecoratorDelegate, + HelperOptions, } from './src/types'; diff --git a/packages/kbn-handlebars/src/__jest__/test_bench.ts b/packages/kbn-handlebars/src/__jest__/test_bench.ts index fa2626d11fba..d17f7f128db2 100644 --- a/packages/kbn-handlebars/src/__jest__/test_bench.ts +++ b/packages/kbn-handlebars/src/__jest__/test_bench.ts @@ -3,13 +3,13 @@ * See `packages/kbn-handlebars/LICENSE` for more information. */ -import Handlebars from '../..'; -import type { - DecoratorFunction, - DecoratorsHash, - ExtendedCompileOptions, - ExtendedRuntimeOptions, -} from '../types'; +import Handlebars, { + type CompileOptions, + type DecoratorDelegate, + type HelperDelegate, + type RuntimeOptions, +} from '../..'; +import type { DecoratorsHash, HelpersHash, PartialsHash, Template } from '../types'; type CompileFns = 'compile' | 'compileAST'; const compileFns: CompileFns[] = ['compile', 'compileAST']; @@ -40,10 +40,10 @@ export function forEachCompileFunctionName( class HandlebarsTestBench { private template: string; private options: TestOptions; - private compileOptions?: ExtendedCompileOptions; - private runtimeOptions?: ExtendedRuntimeOptions; - private helpers: { [name: string]: Handlebars.HelperDelegate | undefined } = {}; - private partials: { [name: string]: Handlebars.Template } = {}; + private compileOptions?: CompileOptions; + private runtimeOptions?: RuntimeOptions; + private helpers: HelpersHash = {}; + private partials: PartialsHash = {}; private decorators: DecoratorsHash = {}; private input: any = {}; @@ -52,12 +52,12 @@ class HandlebarsTestBench { this.options = options; } - withCompileOptions(compileOptions?: ExtendedCompileOptions) { + withCompileOptions(compileOptions?: CompileOptions) { this.compileOptions = compileOptions; return this; } - withRuntimeOptions(runtimeOptions?: ExtendedRuntimeOptions) { + withRuntimeOptions(runtimeOptions?: RuntimeOptions) { this.runtimeOptions = runtimeOptions; return this; } @@ -67,36 +67,36 @@ class HandlebarsTestBench { return this; } - withHelper(name: string, helper?: F) { + withHelper(name: string, helper: F) { this.helpers[name] = helper; return this; } - withHelpers(helperFunctions: { [name: string]: F }) { + withHelpers(helperFunctions: Record) { for (const [name, helper] of Object.entries(helperFunctions)) { this.withHelper(name, helper); } return this; } - withPartial(name: string | number, partial: Handlebars.Template) { + withPartial(name: string | number, partial: Template) { this.partials[name] = partial; return this; } - withPartials(partials: { [name: string]: Handlebars.Template }) { + withPartials(partials: Record) { for (const [name, partial] of Object.entries(partials)) { this.withPartial(name, partial); } return this; } - withDecorator(name: string, decoratorFunction: DecoratorFunction) { + withDecorator(name: string, decoratorFunction: DecoratorDelegate) { this.decorators[name] = decoratorFunction; return this; } - withDecorators(decoratorFunctions: { [key: string]: DecoratorFunction }) { + withDecorators(decoratorFunctions: Record) { for (const [name, decoratorFunction] of Object.entries(decoratorFunctions)) { this.withDecorator(name, decoratorFunction); } @@ -154,9 +154,9 @@ class HandlebarsTestBench { private compileAndExecuteEval() { const renderEval = this.compileEval(); - const runtimeOptions: ExtendedRuntimeOptions = { - helpers: this.helpers as Record, - partials: this.partials as Record, + const runtimeOptions: RuntimeOptions = { + helpers: this.helpers, + partials: this.partials, decorators: this.decorators, ...this.runtimeOptions, }; @@ -169,9 +169,9 @@ class HandlebarsTestBench { private compileAndExecuteAST() { const renderAST = this.compileAST(); - const runtimeOptions: ExtendedRuntimeOptions = { - helpers: this.helpers as Record, - partials: this.partials as Record, + const runtimeOptions: RuntimeOptions = { + helpers: this.helpers, + partials: this.partials, decorators: this.decorators, ...this.runtimeOptions, }; diff --git a/packages/kbn-handlebars/src/handlebars.ts b/packages/kbn-handlebars/src/handlebars.ts index 91f6f33a6069..388b33136543 100644 --- a/packages/kbn-handlebars/src/handlebars.ts +++ b/packages/kbn-handlebars/src/handlebars.ts @@ -7,7 +7,7 @@ // https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require import Handlebars from 'handlebars'; -import type { ExtendedCompileOptions, ExtendedRuntimeOptions } from './types'; +import type { CompileOptions, RuntimeOptions, TemplateDelegate } from './types'; import { ElasticHandlebarsVisitor } from './visitor'; const originalCreate = Handlebars.create; @@ -30,15 +30,10 @@ Handlebars.create = function (): typeof Handlebars { return SandboxedHandlebars; }; -/** - * Compiles the given Handlbars template without the use of `eval`. - * - * @returns A render function with the same API as the return value from the regular Handlebars `compile` function. - */ Handlebars.compileAST = function ( input: string | hbs.AST.Program, - options?: ExtendedCompileOptions -) { + options?: CompileOptions +): TemplateDelegate { if (input == null || (typeof input !== 'string' && input.type !== 'Program')) { throw new Handlebars.Exception( `You must pass a string or Handlebars AST to Handlebars.compileAST. You passed ${input}` @@ -48,6 +43,5 @@ Handlebars.compileAST = function ( // If `Handlebars.compileAST` is reassigned, `this` will be undefined. const visitor = new ElasticHandlebarsVisitor(this ?? Handlebars, input, options); - return (context: any, runtimeOptions?: ExtendedRuntimeOptions) => - visitor.render(context, runtimeOptions); + return (context: any, runtimeOptions?: RuntimeOptions) => visitor.render(context, runtimeOptions); }; diff --git a/packages/kbn-handlebars/src/spec/index.blocks.test.ts b/packages/kbn-handlebars/src/spec/index.blocks.test.ts index 18db0a50b6c5..2d9a87078e34 100644 --- a/packages/kbn-handlebars/src/spec/index.blocks.test.ts +++ b/packages/kbn-handlebars/src/spec/index.blocks.test.ts @@ -5,7 +5,7 @@ * See `packages/kbn-handlebars/LICENSE` for more information. */ -import Handlebars from '../..'; +import Handlebars, { type HelperOptions } from '../..'; import { expectTemplate } from '../__jest__/test_bench'; describe('blocks', () => { @@ -200,7 +200,7 @@ describe('blocks', () => { describe('decorators', () => { it('should apply mustache decorators', () => { expectTemplate('{{#helper}}{{*decorator}}{{/helper}}') - .withHelper('helper', function (options: Handlebars.HelperOptions) { + .withHelper('helper', function (options: HelperOptions) { return (options.fn as any).run; }) .withDecorator('decorator', function (fn) { @@ -212,7 +212,7 @@ describe('blocks', () => { it('should apply allow undefined return', () => { expectTemplate('{{#helper}}{{*decorator}}suc{{/helper}}') - .withHelper('helper', function (options: Handlebars.HelperOptions) { + .withHelper('helper', function (options: HelperOptions) { return options.fn() + (options.fn as any).run; }) .withDecorator('decorator', function (fn) { @@ -223,7 +223,7 @@ describe('blocks', () => { it('should apply block decorators', () => { expectTemplate('{{#helper}}{{#*decorator}}success{{/decorator}}{{/helper}}') - .withHelper('helper', function (options: Handlebars.HelperOptions) { + .withHelper('helper', function (options: HelperOptions) { return (options.fn as any).run; }) .withDecorator('decorator', function (fn, props, container, options) { @@ -237,7 +237,7 @@ describe('blocks', () => { expectTemplate( '{{#helper}}{{#*decorator}}{{#*nested}}suc{{/nested}}cess{{/decorator}}{{/helper}}' ) - .withHelper('helper', function (options: Handlebars.HelperOptions) { + .withHelper('helper', function (options: HelperOptions) { return (options.fn as any).run; }) .withDecorators({ @@ -256,7 +256,7 @@ describe('blocks', () => { expectTemplate( '{{#helper}}{{#*decorator}}suc{{/decorator}}{{#*decorator}}cess{{/decorator}}{{/helper}}' ) - .withHelper('helper', function (options: Handlebars.HelperOptions) { + .withHelper('helper', function (options: HelperOptions) { return (options.fn as any).run; }) .withDecorator('decorator', function (fn, props, container, options) { @@ -268,7 +268,7 @@ describe('blocks', () => { it('should access parent variables', () => { expectTemplate('{{#helper}}{{*decorator foo}}{{/helper}}') - .withHelper('helper', function (options: Handlebars.HelperOptions) { + .withHelper('helper', function (options: HelperOptions) { return (options.fn as any).run; }) .withDecorator('decorator', function (fn, props, container, options) { diff --git a/packages/kbn-handlebars/src/spec/index.data.test.ts b/packages/kbn-handlebars/src/spec/index.data.test.ts index 09712223e503..94d3b51c008a 100644 --- a/packages/kbn-handlebars/src/spec/index.data.test.ts +++ b/packages/kbn-handlebars/src/spec/index.data.test.ts @@ -5,7 +5,7 @@ * See `packages/kbn-handlebars/LICENSE` for more information. */ -import Handlebars from '../..'; +import Handlebars, { type HelperOptions } from '../..'; import { expectTemplate } from '../__jest__/test_bench'; describe('data', () => { @@ -30,7 +30,7 @@ describe('data', () => { global.kbnHandlebarsEnv = Handlebars.create(); const helpers = Handlebars.createFrame(kbnHandlebarsEnv!.helpers); - helpers.let = function (options: Handlebars.HelperOptions) { + helpers.let = function (options: HelperOptions) { const frame = Handlebars.createFrame(options.data); for (const prop in options.hash) { @@ -138,7 +138,7 @@ describe('data', () => { expectTemplate('{{>myPartial}}') .withCompileOptions({ data: true }) .withPartial('myPartial', '{{hello}}') - .withHelper('hello', function (this: any, options: Handlebars.HelperOptions) { + .withHelper('hello', function (this: any, options: HelperOptions) { return options.data.adjective + ' ' + this.noun; }) .withInput({ noun: 'cat' }) diff --git a/packages/kbn-handlebars/src/spec/index.helpers.test.ts b/packages/kbn-handlebars/src/spec/index.helpers.test.ts index 65d01f72eb70..4cfa39bbb94a 100644 --- a/packages/kbn-handlebars/src/spec/index.helpers.test.ts +++ b/packages/kbn-handlebars/src/spec/index.helpers.test.ts @@ -5,7 +5,7 @@ * See `packages/kbn-handlebars/LICENSE` for more information. */ -import Handlebars from '../..'; +import Handlebars, { type HelperOptions } from '../..'; import { expectTemplate } from '../__jest__/test_bench'; beforeEach(() => { @@ -32,7 +32,7 @@ describe('helpers', () => { it('helper for raw block gets raw content', () => { expectTemplate('{{{{raw}}}} {{test}} {{{{/raw}}}}') .withInput({ test: 'hello' }) - .withHelper('raw', function (options: Handlebars.HelperOptions) { + .withHelper('raw', function (options: HelperOptions) { return options.fn(); }) .toCompileTo(' {{test}} '); @@ -41,7 +41,7 @@ describe('helpers', () => { it('helper for raw block gets parameters', () => { expectTemplate('{{{{raw 1 2 3}}}} {{test}} {{{{/raw}}}}') .withInput({ test: 'hello' }) - .withHelper('raw', function (a, b, c, options: Handlebars.HelperOptions) { + .withHelper('raw', function (a, b, c, options: HelperOptions) { const ret = options.fn() + a + b + c; return ret; }) @@ -51,7 +51,7 @@ describe('helpers', () => { describe('raw block parsing (with identity helper-function)', () => { function runWithIdentityHelper(template: string, expected: string) { expectTemplate(template) - .withHelper('identity', function (options: Handlebars.HelperOptions) { + .withHelper('identity', function (options: HelperOptions) { return options.fn(); }) .toCompileTo(expected); @@ -95,7 +95,7 @@ describe('helpers', () => { it('helper block with identical context', () => { expectTemplate('{{#goodbyes}}{{name}}{{/goodbyes}}') .withInput({ name: 'Alan' }) - .withHelper('goodbyes', function (this: any, options: Handlebars.HelperOptions) { + .withHelper('goodbyes', function (this: any, options: HelperOptions) { let out = ''; const byes = ['Goodbye', 'goodbye', 'GOODBYE']; for (let i = 0, j = byes.length; i < j; i++) { @@ -109,7 +109,7 @@ describe('helpers', () => { it('helper block with complex lookup expression', () => { expectTemplate('{{#goodbyes}}{{../name}}{{/goodbyes}}') .withInput({ name: 'Alan' }) - .withHelper('goodbyes', function (options: Handlebars.HelperOptions) { + .withHelper('goodbyes', function (options: HelperOptions) { let out = ''; const byes = ['Goodbye', 'goodbye', 'GOODBYE']; for (let i = 0, j = byes.length; i < j; i++) { @@ -126,7 +126,7 @@ describe('helpers', () => { prefix: '/root', goodbyes: [{ text: 'Goodbye', url: 'goodbye' }], }) - .withHelper('link', function (this: any, prefix, options: Handlebars.HelperOptions) { + .withHelper('link', function (this: any, prefix, options: HelperOptions) { return '' + options.fn(this) + ''; }) .toCompileTo('Goodbye'); @@ -138,7 +138,7 @@ describe('helpers', () => { prefix: '/root', goodbyes: [{ text: 'Goodbye', url: 'goodbye' }], }) - .withHelper('link', function (this: any, prefix, options: Handlebars.HelperOptions) { + .withHelper('link', function (this: any, prefix, options: HelperOptions) { return '' + options.fn(this) + ''; }) .toCompileTo('Goodbye'); @@ -161,7 +161,7 @@ describe('helpers', () => { it('block helper', () => { expectTemplate('{{#goodbyes}}{{text}}! {{/goodbyes}}cruel {{world}}!') .withInput({ world: 'world' }) - .withHelper('goodbyes', function (options: Handlebars.HelperOptions) { + .withHelper('goodbyes', function (options: HelperOptions) { return options.fn({ text: 'GOODBYE' }); }) .toCompileTo('GOODBYE! cruel world!'); @@ -170,14 +170,14 @@ describe('helpers', () => { it('block helper staying in the same context', () => { expectTemplate('{{#form}}

{{name}}

{{/form}}') .withInput({ name: 'Yehuda' }) - .withHelper('form', function (this: any, options: Handlebars.HelperOptions) { + .withHelper('form', function (this: any, options: HelperOptions) { return '
' + options.fn(this) + '
'; }) .toCompileTo('

Yehuda

'); }); it('block helper should have context in this', () => { - function link(this: any, options: Handlebars.HelperOptions) { + function link(this: any, options: HelperOptions) { return '' + options.fn(this) + ''; } @@ -201,7 +201,7 @@ describe('helpers', () => { it('block helper passing a new context', () => { expectTemplate('{{#form yehuda}}

{{name}}

{{/form}}') .withInput({ yehuda: { name: 'Yehuda' } }) - .withHelper('form', function (context, options: Handlebars.HelperOptions) { + .withHelper('form', function (context, options: HelperOptions) { return '
' + options.fn(context) + '
'; }) .toCompileTo('

Yehuda

'); @@ -210,7 +210,7 @@ describe('helpers', () => { it('block helper passing a complex path context', () => { expectTemplate('{{#form yehuda/cat}}

{{name}}

{{/form}}') .withInput({ yehuda: { name: 'Yehuda', cat: { name: 'Harold' } } }) - .withHelper('form', function (context, options: Handlebars.HelperOptions) { + .withHelper('form', function (context, options: HelperOptions) { return '
' + options.fn(context) + '
'; }) .toCompileTo('

Harold

'); @@ -221,10 +221,10 @@ describe('helpers', () => { .withInput({ yehuda: { name: 'Yehuda' }, }) - .withHelper('link', function (this: any, options: Handlebars.HelperOptions) { + .withHelper('link', function (this: any, options: HelperOptions) { return '' + options.fn(this) + ''; }) - .withHelper('form', function (context, options: Handlebars.HelperOptions) { + .withHelper('form', function (context, options: HelperOptions) { return '
' + options.fn(context) + '
'; }) .toCompileTo('

Yehuda

Hello
'); @@ -232,7 +232,7 @@ describe('helpers', () => { it('block helper inverted sections', () => { const string = "{{#list people}}{{name}}{{^}}Nobody's here{{/list}}"; - function list(this: any, context: any, options: Handlebars.HelperOptions) { + function list(this: any, context: any, options: HelperOptions) { if (context.length > 0) { let out = '
    '; for (let i = 0, j = context.length; i < j; i++) { @@ -477,7 +477,7 @@ describe('helpers', () => { it('block multi-params work', () => { expectTemplate('Message: {{#goodbye cruel world}}{{greeting}} {{adj}} {{noun}}{{/goodbye}}') .withInput({ cruel: 'cruel', world: 'world' }) - .withHelper('goodbye', function (cruel, world, options: Handlebars.HelperOptions) { + .withHelper('goodbye', function (cruel, world, options: HelperOptions) { return options.fn({ greeting: 'Goodbye', adj: cruel, noun: world }); }) .toCompileTo('Message: Goodbye cruel world'); @@ -487,7 +487,7 @@ describe('helpers', () => { describe('hash', () => { it('helpers can take an optional hash', () => { expectTemplate('{{goodbye cruel="CRUEL" world="WORLD" times=12}}') - .withHelper('goodbye', function (options: Handlebars.HelperOptions) { + .withHelper('goodbye', function (options: HelperOptions) { return ( 'GOODBYE ' + options.hash.cruel + @@ -502,7 +502,7 @@ describe('helpers', () => { }); it('helpers can take an optional hash with booleans', () => { - function goodbye(options: Handlebars.HelperOptions) { + function goodbye(options: HelperOptions) { if (options.hash.print === true) { return 'GOODBYE ' + options.hash.cruel + ' ' + options.hash.world; } else if (options.hash.print === false) { @@ -523,7 +523,7 @@ describe('helpers', () => { it('block helpers can take an optional hash', () => { expectTemplate('{{#goodbye cruel="CRUEL" times=12}}world{{/goodbye}}') - .withHelper('goodbye', function (this: any, options: Handlebars.HelperOptions) { + .withHelper('goodbye', function (this: any, options: HelperOptions) { return ( 'GOODBYE ' + options.hash.cruel + @@ -539,7 +539,7 @@ describe('helpers', () => { it('block helpers can take an optional hash with single quoted stings', () => { expectTemplate('{{#goodbye cruel="CRUEL" times=12}}world{{/goodbye}}') - .withHelper('goodbye', function (this: any, options: Handlebars.HelperOptions) { + .withHelper('goodbye', function (this: any, options: HelperOptions) { return ( 'GOODBYE ' + options.hash.cruel + @@ -554,7 +554,7 @@ describe('helpers', () => { }); it('block helpers can take an optional hash with booleans', () => { - function goodbye(this: any, options: Handlebars.HelperOptions) { + function goodbye(this: any, options: HelperOptions) { if (options.hash.print === true) { return 'GOODBYE ' + options.hash.cruel + ' ' + options.fn(this); } else if (options.hash.print === false) { @@ -582,7 +582,7 @@ describe('helpers', () => { it('if a context is not found, custom helperMissing is used', () => { expectTemplate('{{hello}} {{link_to world}}') .withInput({ hello: 'Hello', world: 'world' }) - .withHelper('helperMissing', function (mesg, options: Handlebars.HelperOptions) { + .withHelper('helperMissing', function (mesg, options: HelperOptions) { if (options.name === 'link_to') { return new Handlebars.SafeString('' + mesg + ''); } @@ -593,7 +593,7 @@ describe('helpers', () => { it('if a value is not found, custom helperMissing is used', () => { expectTemplate('{{hello}} {{link_to}}') .withInput({ hello: 'Hello', world: 'world' }) - .withHelper('helperMissing', function (options: Handlebars.HelperOptions) { + .withHelper('helperMissing', function (options: HelperOptions) { if (options.name === 'link_to') { return new Handlebars.SafeString('winning'); } @@ -788,7 +788,7 @@ describe('helpers', () => { it('helpers take precedence over same-named context properties$', () => { expectTemplate('{{#goodbye}} {{cruel world}}{{/goodbye}}') - .withHelper('goodbye', function (this: any, options: Handlebars.HelperOptions) { + .withHelper('goodbye', function (this: any, options: HelperOptions) { return this.goodbye.toUpperCase() + options.fn(this); }) .withHelper('cruel', function (world) { @@ -818,7 +818,7 @@ describe('helpers', () => { it('Scoped names take precedence over block helpers', () => { expectTemplate('{{#goodbye}} {{cruel world}}{{/goodbye}} {{this.goodbye}}') - .withHelper('goodbye', function (this: any, options: Handlebars.HelperOptions) { + .withHelper('goodbye', function (this: any, options: HelperOptions) { return this.goodbye.toUpperCase() + options.fn(this); }) .withHelper('cruel', function (world) { @@ -836,7 +836,7 @@ describe('helpers', () => { it('should take presedence over context values', () => { expectTemplate('{{#goodbyes as |value|}}{{value}}{{/goodbyes}}{{value}}') .withInput({ value: 'foo' }) - .withHelper('goodbyes', function (options: Handlebars.HelperOptions) { + .withHelper('goodbyes', function (options: HelperOptions) { expect(options.fn.blockParams).toEqual(1); return options.fn({ value: 'bar' }, { blockParams: [1, 2] }); }) @@ -848,7 +848,7 @@ describe('helpers', () => { .withHelper('value', function () { return 'foo'; }) - .withHelper('goodbyes', function (options: Handlebars.HelperOptions) { + .withHelper('goodbyes', function (options: HelperOptions) { expect(options.fn.blockParams).toEqual(1); return options.fn({}, { blockParams: [1, 2] }); }) @@ -861,7 +861,7 @@ describe('helpers', () => { .withHelper('value', function () { return 'foo'; }) - .withHelper('goodbyes', function (this: any, options: Handlebars.HelperOptions) { + .withHelper('goodbyes', function (this: any, options: HelperOptions) { expect(options.fn.blockParams).toEqual(1); return options.fn(this, { blockParams: [1, 2] }); }) @@ -879,7 +879,7 @@ describe('helpers', () => { } ) .withInput({ value: 'foo' }) - .withHelper('goodbyes', function (options: Handlebars.HelperOptions) { + .withHelper('goodbyes', function (options: HelperOptions) { return options.fn( { value: 'bar' }, { @@ -893,7 +893,7 @@ describe('helpers', () => { it('should allow block params on chained helpers', () => { expectTemplate('{{#if bar}}{{else goodbyes as |value|}}{{value}}{{/if}}{{value}}') .withInput({ value: 'foo' }) - .withHelper('goodbyes', function (options: Handlebars.HelperOptions) { + .withHelper('goodbyes', function (options: HelperOptions) { expect(options.fn.blockParams).toEqual(1); return options.fn({ value: 'bar' }, { blockParams: [1, 2] }); }) @@ -942,12 +942,9 @@ describe('helpers', () => { describe('the lookupProperty-option', () => { it('should be passed to custom helpers', () => { expectTemplate('{{testHelper}}') - .withHelper( - 'testHelper', - function testHelper(this: any, options: Handlebars.HelperOptions) { - return options.lookupProperty(this, 'testProperty'); - } - ) + .withHelper('testHelper', function testHelper(this: any, options: HelperOptions) { + return options.lookupProperty(this, 'testProperty'); + }) .withInput({ testProperty: 'abc' }) .toCompileTo('abc'); }); diff --git a/packages/kbn-handlebars/src/spec/index.partials.test.ts b/packages/kbn-handlebars/src/spec/index.partials.test.ts index fbcf86f8762b..65930d06c63f 100644 --- a/packages/kbn-handlebars/src/spec/index.partials.test.ts +++ b/packages/kbn-handlebars/src/spec/index.partials.test.ts @@ -163,8 +163,7 @@ describe('partials', () => { global.kbnHandlebarsEnv = Handlebars.create(); expect(() => { - const undef: unknown = undefined; - kbnHandlebarsEnv!.registerPartial('undefined_test', undef as Handlebars.Template); + kbnHandlebarsEnv!.registerPartial('undefined_test', undefined as any); }).toThrow('Attempting to register a partial called "undefined_test" as undefined'); global.kbnHandlebarsEnv = null; @@ -294,7 +293,6 @@ describe('partials', () => { {}, { partials: { - // @ts-expect-error dude: 'fail', }, } diff --git a/packages/kbn-handlebars/src/spec/index.regressions.test.ts b/packages/kbn-handlebars/src/spec/index.regressions.test.ts index b6785372e5fc..fc2065fe7585 100644 --- a/packages/kbn-handlebars/src/spec/index.regressions.test.ts +++ b/packages/kbn-handlebars/src/spec/index.regressions.test.ts @@ -5,7 +5,7 @@ * See `packages/kbn-handlebars/LICENSE` for more information. */ -import Handlebars from '../..'; +import Handlebars, { type HelperOptions } from '../..'; import { expectTemplate, forEachCompileFunctionName } from '../__jest__/test_bench'; describe('Regressions', () => { @@ -99,10 +99,10 @@ describe('Regressions', () => { '{{#inverse}} {{#blk}} Unexpected {{/blk}} {{else}} {{#blk}} Expected {{/blk}} {{/inverse}}'; const helpers = { - blk(block: Handlebars.HelperOptions) { + blk(block: HelperOptions) { return block.fn(''); }, - inverse(block: Handlebars.HelperOptions) { + inverse(block: HelperOptions) { return block.inverse(''); }, }; @@ -204,7 +204,7 @@ describe('Regressions', () => { it('GH-1054: Should handle simple safe string responses', () => { expectTemplate('{{#wrap}}{{>partial}}{{/wrap}}') .withHelpers({ - wrap(options: Handlebars.HelperOptions) { + wrap(options: HelperOptions) { return new Handlebars.SafeString(options.fn()); }, }) @@ -279,7 +279,7 @@ describe('Regressions', () => { ) .withInput({ array: [1], name: 'John' }) .withHelpers({ - myif(conditional, options: Handlebars.HelperOptions) { + myif(conditional, options: HelperOptions) { if (conditional) { return options.fn(this); } else { @@ -325,7 +325,7 @@ describe('Regressions', () => { expectTemplate('{{helpa length="foo"}}') .withInput({ array: [1], name: 'John' }) .withHelpers({ - helpa(options: Handlebars.HelperOptions) { + helpa(options: HelperOptions) { return options.hash.length; }, }) @@ -371,7 +371,7 @@ describe('Regressions', () => { describe("GH-1639: TypeError: Cannot read property 'apply' of undefined\" when handlebars version > 4.6.0 (undocumented, deprecated usage)", () => { it('should treat undefined helpers like non-existing helpers', () => { expectTemplate('{{foo}}') - .withHelper('foo', undefined) + .withHelper('foo', undefined as any) .withInput({ foo: 'bar' }) .toCompileTo('bar'); }); diff --git a/packages/kbn-handlebars/src/spec/index.subexpressions.test.ts b/packages/kbn-handlebars/src/spec/index.subexpressions.test.ts index ccf6402fb3d1..4dee24b78f71 100644 --- a/packages/kbn-handlebars/src/spec/index.subexpressions.test.ts +++ b/packages/kbn-handlebars/src/spec/index.subexpressions.test.ts @@ -5,7 +5,7 @@ * See `packages/kbn-handlebars/LICENSE` for more information. */ -import Handlebars from '../..'; +import Handlebars, { type HelperOptions } from '../..'; import { expectTemplate } from '../__jest__/test_bench'; describe('subexpressions', () => { @@ -102,9 +102,9 @@ describe('subexpressions', () => { }); it('provides each nested helper invocation its own options hash', () => { - let lastOptions: Handlebars.HelperOptions; + let lastOptions: HelperOptions; const helpers = { - equal(x: any, y: any, options: Handlebars.HelperOptions) { + equal(x: any, y: any, options: HelperOptions) { if (!options || options === lastOptions) { throw new Error('options hash was reused'); } diff --git a/packages/kbn-handlebars/src/types.ts b/packages/kbn-handlebars/src/types.ts index fa11a0172e0d..583170cbe681 100644 --- a/packages/kbn-handlebars/src/types.ts +++ b/packages/kbn-handlebars/src/types.ts @@ -5,66 +5,67 @@ import { kHelper, kAmbiguous, kSimple } from './symbols'; +// Unexported `CompileOptions` lifted from node_modules/handlebars/types/index.d.ts +// While it could also be extracted using `NonNullable[1]>`, this isn't possible since we declare the handlebars module below +interface HandlebarsCompileOptions { + data?: boolean; + compat?: boolean; + knownHelpers?: KnownHelpers; + knownHelpersOnly?: boolean; + noEscape?: boolean; + strict?: boolean; + assumeObjects?: boolean; + preventIndent?: boolean; + ignoreStandalone?: boolean; + explicitPartialContext?: boolean; +} + /** - * A custom version of the Handlesbars module with an extra `compileAST` function and fixed typings. + * A custom version of the Handlebars module with an extra `compileAST` function and fixed typings. */ declare module 'handlebars' { + /** + * Compiles the given Handlebars template without the use of `eval`. + * + * @returns A render function with the same API as the return value from the regular Handlebars `compile` function. + */ export function compileAST( input: string | hbs.AST.Program, - options?: ExtendedCompileOptions - ): (context?: any, options?: ExtendedRuntimeOptions) => string; + options?: CompileOptions + ): TemplateDelegateFixed; // -------------------------------------------------------- - // Override/Extend inherited types below that are incorrect + // Override/Extend inherited funcions and interfaces below that are incorrect. + // + // Any exported `const` or `type` types can't be overwritten, so we'll just + // have to live with those and cast them to the correct types in our code. + // Some of these fixed types, we'll instead export outside the scope of this + // 'handlebars' module so consumers of @kbn/handlebars at least have a way to + // access the correct types. // -------------------------------------------------------- - export interface TemplateDelegate { - (context?: T, options?: RuntimeOptions): string; // Override to ensure `context` is optional - blockParams?: number; // TODO: Can this really be optional? - partials?: any; // TODO: Narrow type to something better than any? - } - - export interface HelperOptions { - name: string; - loc: { start: hbs.AST.SourceLocation['start']; end: hbs.AST.SourceLocation['end'] }; - lookupProperty: LookupProperty; - } - - export interface HelperDelegate { - // eslint-disable-next-line @typescript-eslint/prefer-function-type - (...params: any[]): any; - } - - export function registerPartial(spec: { [name: string]: Handlebars.Template }): void; // Ensure `spec` object values can be strings -} - -export type NodeType = typeof kHelper | typeof kAmbiguous | typeof kSimple; - -type LookupProperty = (parent: { [name: string]: any }, propertyName: string) => T; - -export type ProcessableStatementNode = - | hbs.AST.MustacheStatement - | hbs.AST.PartialStatement - | hbs.AST.SubExpression; -export type ProcessableBlockStatementNode = hbs.AST.BlockStatement | hbs.AST.PartialBlockStatement; -export type ProcessableNode = ProcessableStatementNode | ProcessableBlockStatementNode; -export type ProcessableNodeWithPathParts = ProcessableNode & { path: hbs.AST.PathExpression }; -export type ProcessableNodeWithPathPartsOrLiteral = ProcessableNode & { - path: hbs.AST.PathExpression | hbs.AST.Literal; -}; - -export interface Helper { - fn?: Handlebars.HelperDelegate; - context: any[]; - params: any[]; - options: AmbiguousHelperOptions; -} - -export type NonBlockHelperOptions = Omit; -export type AmbiguousHelperOptions = Handlebars.HelperOptions | NonBlockHelperOptions; - -export interface DecoratorOptions extends Omit { - args?: any[]; + /** + * A {@link https://handlebarsjs.com/api-reference/helpers.html helper-function} type. + * + * When registering a helper function, it should be of this type. + */ + export interface HelperDelegate extends HelperDelegateFixed {} // eslint-disable-line @typescript-eslint/no-empty-interface + + /** + * A template-function type. + * + * This type is primarily used for the return value of by calls to + * {@link https://handlebarsjs.com/api-reference/compilation.html#handlebars-compile-template-options Handlebars.compile}, + * Handlebars.compileAST and {@link https://handlebarsjs.com/api-reference/compilation.html#handlebars-precompile-template-options Handlebars.template}. + */ + export interface TemplateDelegate extends TemplateDelegateFixed {} // eslint-disable-line @typescript-eslint/no-empty-interface + + /** + * Register one or more {@link https://handlebarsjs.com/api-reference/runtime.html#handlebars-registerpartial-name-partial partials}. + * + * @param spec A key/value object where each key is the name of a partial (a string) and each value is the partial (either a string or a partial function). + */ + export function registerPartial(spec: Record): void; // Ensure `spec` object values can be strings } /** @@ -73,8 +74,8 @@ export interface DecoratorOptions extends Omit; +export interface RuntimeOptions extends Pick { + // The upstream `helpers` property is too loose and allows all functions. + helpers?: HelpersHash; + // The upstream `partials` property is incorrectly typed and doesn't allow + // partials to be strings. + partials?: PartialsHash; + // The upstream `decorators` property is too loose and allows all functions. + decorators?: DecoratorsHash; +} /** - * According to the [decorator docs]{@link https://github.com/handlebars-lang/handlebars.js/blob/4.x/docs/decorators-api.md}, - * a decorator will be called with a different set of arugments than what's actually happening in the upstream code. - * So here I assume that the docs are wrong and that the upstream code is correct. In reality, `context` is the last 4 - * documented arguments rolled into one object. + * The last argument being passed to a helper function is a an {@link https://handlebarsjs.com/api-reference/helpers.html#the-options-parameter options object}. */ -export type DecoratorFunction = ( - prog: Handlebars.TemplateDelegate, +export interface HelperOptions extends Omit { + name: string; + fn: TemplateDelegateFixed; + inverse: TemplateDelegateFixed; + loc: { start: hbs.AST.SourceLocation['start']; end: hbs.AST.SourceLocation['end'] }; + lookupProperty: LookupProperty; +} + +// Use the post-fix `Fixed` to allow us to acces it inside the 'handlebars' module declared above +/** + * A {@link https://handlebarsjs.com/api-reference/helpers.html helper-function} type. + * + * When registering a helper function, it should be of this type. + */ +interface HelperDelegateFixed { + // eslint-disable-next-line @typescript-eslint/prefer-function-type + (...params: any[]): any; +} +export type { HelperDelegateFixed as HelperDelegate }; + +// Use the post-fix `Fixed` to allow us to acces it inside the 'handlebars' module declared above +/** + * A template-function type. + * + * This type is primarily used for the return value of by calls to + * {@link https://handlebarsjs.com/api-reference/compilation.html#handlebars-compile-template-options Handlebars.compile}, + * Handlebars.compileAST and {@link https://handlebarsjs.com/api-reference/compilation.html#handlebars-precompile-template-options Handlebars.template}. + */ +interface TemplateDelegateFixed { + (context?: T, options?: RuntimeOptions): string; // Override to ensure `context` is optional + blockParams?: number; // TODO: Can this really be optional? + partials?: PartialsHash; +} +export type { TemplateDelegateFixed as TemplateDelegate }; + +// According to the decorator docs +// (https://github.com/handlebars-lang/handlebars.js/blob/4.x/docs/decorators-api.md) +// a decorator will be called with a different set of arugments than what's +// actually happening in the upstream code. So here I assume that the docs are +// wrong and that the upstream code is correct. In reality, `context` is the +// last 4 documented arguments rolled into one object. +/** + * A {@link https://github.com/handlebars-lang/handlebars.js/blob/master/docs/decorators-api.md decorator-function} type. + * + * When registering a decorator function, it should be of this type. + */ +export type DecoratorDelegate = ( + prog: TemplateDelegateFixed, props: Record, container: Container, options: any ) => any; -export interface HelpersHash { - [name: string]: Handlebars.HelperDelegate; +// ----------------------------------------------------------------------------- +// INTERNAL TYPES +// ----------------------------------------------------------------------------- + +export type NodeType = typeof kHelper | typeof kAmbiguous | typeof kSimple; + +type LookupProperty = (parent: Record, propertyName: string) => T; + +export type NonBlockHelperOptions = Omit; +export type AmbiguousHelperOptions = HelperOptions | NonBlockHelperOptions; + +export type ProcessableStatementNode = + | hbs.AST.MustacheStatement + | hbs.AST.PartialStatement + | hbs.AST.SubExpression; +export type ProcessableBlockStatementNode = hbs.AST.BlockStatement | hbs.AST.PartialBlockStatement; +export type ProcessableNode = ProcessableStatementNode | ProcessableBlockStatementNode; +export type ProcessableNodeWithPathParts = ProcessableNode & { path: hbs.AST.PathExpression }; +export type ProcessableNodeWithPathPartsOrLiteral = ProcessableNode & { + path: hbs.AST.PathExpression | hbs.AST.Literal; +}; + +export type HelpersHash = Record; +export type PartialsHash = Record; +export type DecoratorsHash = Record; + +// Use the post-fix `Fixed` to allow us to acces it inside the 'handlebars' module declared above +type TemplateFixed = TemplateDelegateFixed | string; +export type { TemplateFixed as Template }; + +export interface DecoratorOptions extends Omit { + args?: any[]; } -export interface PartialsHash { - [name: string]: HandlebarsTemplateDelegate; +export interface VisitorHelper { + fn?: HelperDelegateFixed; + context: any[]; + params: any[]; + options: AmbiguousHelperOptions; } -export interface DecoratorsHash { - [name: string]: DecoratorFunction; +export interface ResolvePartialOptions + extends Omit { + // The upstream `helpers` property is too loose and allows all functions. + helpers?: HelpersHash; + // The upstream `partials` property is incorrectly typed and doesn't allow + // partials to be strings. + partials?: PartialsHash; + // The upstream `decorators` property is too loose and allows all functions. + decorators?: DecoratorsHash; } export interface Container { helpers: HelpersHash; partials: PartialsHash; decorators: DecoratorsHash; - strict: (obj: { [name: string]: any }, name: string, loc: hbs.AST.SourceLocation) => any; + strict: (obj: Record, name: string, loc: hbs.AST.SourceLocation) => any; lookupProperty: LookupProperty; lambda: (current: any, context: any) => any; data: (value: any, depth: number) => any; hooks: { - helperMissing?: Handlebars.HelperDelegate; - blockHelperMissing?: Handlebars.HelperDelegate; + helperMissing?: HelperDelegateFixed; + blockHelperMissing?: HelperDelegateFixed; }; } diff --git a/packages/kbn-handlebars/src/visitor.ts b/packages/kbn-handlebars/src/visitor.ts index c5962f4beb4d..1842c8e5d6a2 100644 --- a/packages/kbn-handlebars/src/visitor.ts +++ b/packages/kbn-handlebars/src/visitor.ts @@ -18,13 +18,11 @@ import { moveHelperToHooks } from 'handlebars/dist/cjs/handlebars/helpers'; import type { AmbiguousHelperOptions, + CompileOptions, Container, - DecoratorFunction, + DecoratorDelegate, DecoratorsHash, - ExtendedCompileOptions, - ExtendedRuntimeOptions, - Helper, - HelpersHash, + HelperOptions, NodeType, NonBlockHelperOptions, ProcessableBlockStatementNode, @@ -32,6 +30,11 @@ import type { ProcessableNodeWithPathParts, ProcessableNodeWithPathPartsOrLiteral, ProcessableStatementNode, + ResolvePartialOptions, + RuntimeOptions, + Template, + TemplateDelegate, + VisitorHelper, } from './types'; import { kAmbiguous, kHelper, kSimple } from './symbols'; import { @@ -48,8 +51,8 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { private contexts: any[] = []; private output: any[] = []; private template?: string; - private compileOptions: ExtendedCompileOptions; - private runtimeOptions?: ExtendedRuntimeOptions; + private compileOptions: CompileOptions; + private runtimeOptions?: RuntimeOptions; private blockParamNames: any[][] = []; private blockParamValues: any[][] = []; private ast?: hbs.AST.Program; @@ -61,7 +64,7 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { constructor( env: typeof Handlebars, input: string | hbs.AST.Program, - options: ExtendedCompileOptions = {} + options: CompileOptions = {} ) { super(); @@ -136,18 +139,15 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { }; } - render(context: any, options: ExtendedRuntimeOptions = {}): string { + render(context: any, options: RuntimeOptions = {}): string { this.contexts = [context]; this.output = []; this.runtimeOptions = { ...options }; - this.container.helpers = { - ...this.env.helpers, - ...(options.helpers as HelpersHash), - }; + this.container.helpers = { ...this.env.helpers, ...options.helpers }; this.container.partials = { ...this.env.partials, ...options.partials }; this.container.decorators = { ...(this.env.decorators as DecoratorsHash), - ...(options.decorators as DecoratorsHash), + ...options.decorators, }; this.container.hooks = {}; this.processedRootDecorators = false; @@ -170,7 +170,7 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { // Generate a "program" function based on the root `Program` in the AST and // call it. This will start the processing of all the child nodes in the // AST. - const defaultMain: Handlebars.TemplateDelegate = (_context) => { + const defaultMain: TemplateDelegate = (_context) => { const prog = this.generateProgramFunction(this.ast!); return prog(_context, this.runtimeOptions); }; @@ -296,7 +296,7 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { * So we have to look into the program AST body and see if it contains any decorators that we have to process * before we can finish processing of the wrapping program. */ - private processDecorators(program: hbs.AST.Program, prog: Handlebars.TemplateDelegate) { + private processDecorators(program: hbs.AST.Program, prog: TemplateDelegate) { if (!this.processedDecoratorsForProgram.has(program)) { this.processedDecoratorsForProgram.add(program); const props = {}; @@ -312,12 +312,12 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { private processDecorator( decorator: hbs.AST.DecoratorBlock | hbs.AST.Decorator, - prog: Handlebars.TemplateDelegate, + prog: TemplateDelegate, props: Record ) { const options = this.setupDecoratorOptions(decorator); - const result = this.container.lookupProperty( + const result = this.container.lookupProperty( this.container.decorators, options.name )(prog, props, this.container, options); @@ -499,10 +499,7 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { ? this.resolveNodes(partial.name).join('') : (partial.name as hbs.AST.PathExpression).original; - const options: AmbiguousHelperOptions & Handlebars.ResolvePartialOptions = this.setupParams( - partial, - name - ); + const options: AmbiguousHelperOptions & ResolvePartialOptions = this.setupParams(partial, name); options.helpers = this.container.helpers; options.partials = this.container.partials; options.decorators = this.container.decorators; @@ -516,7 +513,7 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { // Wrapper function to get access to currentPartialBlock from the closure partialBlock = options.data['partial-block'] = function partialBlockWrapper( context: any, - wrapperOptions: { data?: Handlebars.HelperOptions['data'] } = {} + wrapperOptions: { data?: HelperOptions['data'] } = {} ) { // Restore the partial-block from the closure for the execution of the block // i.e. the part inside the block of the partial call. @@ -542,10 +539,17 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { context = Object.assign({}, context, options.hash); } - const partialTemplate: Handlebars.Template | undefined = + const partialTemplate: Template | undefined = this.container.partials[name] ?? partialBlock ?? - Handlebars.VM.resolvePartial(undefined, undefined, options); + // TypeScript note: We extend ResolvePartialOptions in our types.ts file + // to fix an error in the upstream type. When calling back into the + // upstream code, we just cast back to the non-extended type + Handlebars.VM.resolvePartial( + undefined, + undefined, + options as Handlebars.ResolvePartialOptions + ); if (partialTemplate === undefined) { throw new Handlebars.Exception(`The partial ${name} could not be found`); @@ -619,7 +623,7 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { } } - private setupHelper(node: ProcessableNode, helperName: string): Helper { + private setupHelper(node: ProcessableNode, helperName: string): VisitorHelper { return { fn: this.container.lookupProperty(this.container.helpers, helperName), context: this.context, @@ -649,11 +653,11 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { return options; } - private setupParams(node: ProcessableBlockStatementNode, name: string): Handlebars.HelperOptions; + private setupParams(node: ProcessableBlockStatementNode, name: string): HelperOptions; private setupParams(node: ProcessableStatementNode, name: string): NonBlockHelperOptions; private setupParams(node: ProcessableNode, name: string): AmbiguousHelperOptions; - private setupParams(node: ProcessableNode, name: string): AmbiguousHelperOptions { - const options = { + private setupParams(node: ProcessableNode, name: string) { + const options: AmbiguousHelperOptions = { name, hash: this.getHash(node), data: this.runtimeOptions!.data, @@ -662,10 +666,10 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { }; if (isBlock(node)) { - (options as Handlebars.HelperOptions).fn = node.program + (options as HelperOptions).fn = node.program ? this.processDecorators(node.program, this.generateProgramFunction(node.program)) : noop; - (options as Handlebars.HelperOptions).inverse = node.inverse + (options as HelperOptions).inverse = node.inverse ? this.processDecorators(node.inverse, this.generateProgramFunction(node.inverse)) : noop; } @@ -676,10 +680,7 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { private generateProgramFunction(program: hbs.AST.Program) { if (!program) return noop; - const prog: Handlebars.TemplateDelegate = ( - nextContext: any, - runtimeOptions: ExtendedRuntimeOptions = {} - ) => { + const prog: TemplateDelegate = (nextContext: any, runtimeOptions: RuntimeOptions = {}) => { runtimeOptions = { ...runtimeOptions }; // inherit data in blockParams from parent program diff --git a/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/handlebars.ts b/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/handlebars.ts index 14e1832c48af..4c8e55c9b374 100644 --- a/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/handlebars.ts +++ b/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/handlebars.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import Handlebars from '@kbn/handlebars'; +import Handlebars, { type HelperOptions, type HelperDelegate } from '@kbn/handlebars'; import { encode } from '@kbn/rison'; import dateMath from '@kbn/datemath'; import moment, { Moment } from 'moment'; @@ -18,9 +18,9 @@ const handlebars = Handlebars.create(); function createSerializationHelper( fnName: string, serializeFn: (value: unknown) => string -): Handlebars.HelperDelegate { +): HelperDelegate { return (...args) => { - const { hash } = args.slice(-1)[0] as Handlebars.HelperOptions; + const { hash } = args.slice(-1)[0] as HelperOptions; const hasHash = Object.keys(hash).length > 0; const hasValues = args.length > 1; if (hasHash && hasValues) { @@ -49,7 +49,7 @@ handlebars.registerHelper( handlebars.registerHelper('date', (...args) => { const values = args.slice(0, -1) as [string | Date, string | undefined]; - const { hash } = args.slice(-1)[0] as Handlebars.HelperOptions; + const { hash } = args.slice(-1)[0] as HelperOptions; // eslint-disable-next-line prefer-const let [date, format] = values; if (typeof date === 'undefined') throw new Error(`[date]: unknown variable`); diff --git a/src/plugins/vis_types/timeseries/public/application/components/lib/replace_vars.ts b/src/plugins/vis_types/timeseries/public/application/components/lib/replace_vars.ts index 9ae2c6d9c306..6a53f7c890dc 100644 --- a/src/plugins/vis_types/timeseries/public/application/components/lib/replace_vars.ts +++ b/src/plugins/vis_types/timeseries/public/application/components/lib/replace_vars.ts @@ -7,7 +7,12 @@ */ import { encode } from '@kbn/rison'; -import Handlebars, { type ExtendedCompileOptions, compileFnName } from '@kbn/handlebars'; +import Handlebars, { + type CompileOptions, + type HelperOptions, + type HelperDelegate, + compileFnName, +} from '@kbn/handlebars'; import { i18n } from '@kbn/i18n'; import { emptyLabel } from '../../../../common/empty_label'; @@ -16,9 +21,9 @@ const handlebars = Handlebars.create(); function createSerializationHelper( fnName: string, serializeFn: (value: unknown) => string -): Handlebars.HelperDelegate { +): HelperDelegate { return (...args) => { - const { hash } = args.slice(-1)[0] as Handlebars.HelperOptions; + const { hash } = args.slice(-1)[0] as HelperOptions; const hasHash = Object.keys(hash).length > 0; const hasValues = args.length > 1; if (hasHash && hasValues) { @@ -53,7 +58,7 @@ export function replaceVars( str: string, args: Record = {}, vars: Record = {}, - compileOptions: Partial = {} + compileOptions: Partial = {} ) { try { /** we need add '[]' for emptyLabel because this value contains special characters. From 9049386f78f4497cad5cf1994402f1015d95ef68 Mon Sep 17 00:00:00 2001 From: Ashokaditya <1849116+ashokaditya@users.noreply.github.com> Date: Tue, 14 Feb 2023 13:47:26 +0100 Subject: [PATCH 24/31] [Security Solution][Endpoint][Response Actions] Show `outputs` for given list of actions (#151020) ## Summary Adds optional `withOutputs` query param to actions log API that enables `outputs` on actions log for given actions. example API request ```json5 api/endpoint/action?withOutputs=&withOutputs= ``` ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../common/endpoint/schema/actions.test.ts | 55 ++++++++++++++++ .../common/endpoint/schema/actions.ts | 20 ++++++ .../common/endpoint/types/actions.ts | 10 ++- .../routes/actions/list_handler.test.ts | 2 + .../endpoint/routes/actions/list_handler.ts | 2 + .../services/actions/action_list.test.ts | 64 +++++++++++++++++++ .../endpoint/services/actions/action_list.ts | 18 ++++-- .../actions/pending_actions_summary.ts | 31 +++++---- 8 files changed, 180 insertions(+), 22 deletions(-) diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/actions.test.ts b/x-pack/plugins/security_solution/common/endpoint/schema/actions.test.ts index 477419213d5c..e9cab03724c3 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/actions.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/actions.test.ts @@ -233,6 +233,61 @@ describe('actions schemas', () => { }); }).not.toThrow(); }); + + it('should not work with only spaces for a string in `withOutputs` list', () => { + expect(() => { + EndpointActionListRequestSchema.query.validate({ + startDate: 'now-1d', // yesterday + endDate: 'now', // today + statuses: ['failed', 'pending', 'successful'], + withOutputs: ' ', + }); + }).toThrow(); + }); + + it('should not work with empty string in `withOutputs` list', () => { + expect(() => { + EndpointActionListRequestSchema.query.validate({ + startDate: 'now-1d', // yesterday + endDate: 'now', // today + statuses: ['failed', 'pending', 'successful'], + withOutputs: '', + }); + }).toThrow(); + }); + + it('should not work with empty strings in `withOutputs` list', () => { + expect(() => { + EndpointActionListRequestSchema.query.validate({ + startDate: 'now-1d', // yesterday + endDate: 'now', // today + statuses: ['failed', 'pending', 'successful'], + withOutputs: ['action-id-1', ' ', 'action-id-2'], + }); + }).toThrow(); + }); + + it('should work with a single action id in `withOutputs` list', () => { + expect(() => { + EndpointActionListRequestSchema.query.validate({ + startDate: 'now-1d', // yesterday + endDate: 'now', // today + statuses: ['failed', 'pending', 'successful'], + withOutputs: 'action-id-1', + }); + }).not.toThrow(); + }); + + it('should work with multiple `withOutputs` filter', () => { + expect(() => { + EndpointActionListRequestSchema.query.validate({ + startDate: 'now-1d', // yesterday + endDate: 'now', // today + statuses: ['failed', 'pending', 'successful'], + withOutputs: ['action-id-1', 'action-id-2'], + }); + }).not.toThrow(); + }); }); describe('NoParametersRequestSchema', () => { diff --git a/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts b/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts index aad678958292..c6fc2237f993 100644 --- a/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/schema/actions.ts @@ -131,6 +131,26 @@ export const EndpointActionListRequestSchema = { schema.string({ minLength: 1 }), ]) ), + withOutputs: schema.maybe( + schema.oneOf([ + schema.arrayOf(schema.string({ minLength: 1 }), { + minSize: 1, + validate: (actionIds) => { + if (actionIds.map((v) => v.trim()).some((v) => !v.length)) { + return 'actionIds cannot contain empty strings'; + } + }, + }), + schema.string({ + minLength: 1, + validate: (actionId) => { + if (!actionId.trim().length) { + return 'actionId cannot be an empty string'; + } + }, + }), + ]) + ), }), }; diff --git a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts index 3caf4712f2f4..0a1f482c8583 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/actions.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/actions.ts @@ -371,6 +371,10 @@ export interface ActionDetailsApiResponse< > { data: ActionDetails; } + +/** Action Details normally returned by Action List API response */ +export type ActionDetailsNoOutputs = Omit; + export interface ActionListApiResponse { page: number | undefined; pageSize: number | undefined; @@ -380,11 +384,13 @@ export interface ActionListApiResponse { userIds: string[] | undefined; // users that requested the actions commands: string[] | undefined; // type of actions /** - * The `outputs` is not currently part of the list response due to possibly large amounts of + * Introduced in 8.8, outputs are visible for specific actions like `execute`. + * The `outputs` are part the list response for given set of actions. + * `outputs` for all actions are restricted due to possibly large amounts of * data, especially for cases (in the future) where we might support actions being sent to * multiple agents */ - data: Array>; + data: Array; statuses: ResponseActionStatus[] | undefined; total: number; } diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.test.ts index 7c48c97ab4df..b9b67b2197b1 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.test.ts @@ -118,6 +118,7 @@ describe('Action List Handler', () => { it('should correctly format the request when calling `getActionListByStatus`', async () => { await actionListHandler({ + withOutputs: 'actionX', agentIds: 'agentX', commands: 'running-processes', statuses: 'failed', @@ -125,6 +126,7 @@ describe('Action List Handler', () => { }); expect(mockGetActionListByStatus).toBeCalledWith( expect.objectContaining({ + withOutputs: ['actionX'], elasticAgentIds: ['agentX'], commands: ['running-processes'], statuses: ['failed'], diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts index 9566d84898b7..cade342a9fdc 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/list_handler.ts @@ -56,6 +56,7 @@ export const actionListHandler = ( userIds, commands, statuses, + withOutputs, }, } = req; const esClient = (await context.core).elasticsearch.client.asInternalUser; @@ -72,6 +73,7 @@ export const actionListHandler = ( } const requestParams = { + withOutputs: formatStringIds(withOutputs), commands: formatCommandValues(commands), esClient, elasticAgentIds: formatStringIds(elasticAgentIds), diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.test.ts index 4856d00f6e1a..042a0dd3cd5f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.test.ts @@ -116,6 +116,70 @@ describe('When using `getActionList()', () => { }); }); + it('should return expected `output` for given actions', async () => { + const doc = actionRequests.hits.hits[0]._source; + // mock metadataService.findHostMetadataForFleetAgents resolved value + (endpointAppContextService.getEndpointMetadataService as jest.Mock) = jest + .fn() + .mockReturnValue({ + findHostMetadataForFleetAgents: jest.fn().mockResolvedValue([ + { + agent: { + id: 'agent-a', + }, + host: { + hostname: 'Host-agent-a', + }, + }, + ]), + }); + await expect( + getActionList({ + esClient, + logger, + metadataService: endpointAppContextService.getEndpointMetadataService(), + page: 1, + pageSize: 10, + withOutputs: ['123'], + }) + ).resolves.toEqual({ + page: 1, + pageSize: 10, + commands: undefined, + userIds: undefined, + startDate: undefined, + elasticAgentIds: undefined, + endDate: undefined, + data: [ + { + agents: ['agent-a'], + hosts: { 'agent-a': { name: 'Host-agent-a' } }, + command: 'kill-process', + completedAt: '2022-04-30T16:08:47.449Z', + wasSuccessful: true, + errors: undefined, + id: '123', + isCompleted: true, + isExpired: false, + startedAt: '2022-04-27T16:08:47.449Z', + status: 'successful', + outputs: {}, + comment: doc?.EndpointActions.data.comment, + createdBy: doc?.user.id, + parameters: doc?.EndpointActions.data.parameters, + agentState: { + 'agent-a': { + completedAt: '2022-04-30T16:08:47.449Z', + isCompleted: true, + wasSuccessful: true, + }, + }, + }, + ], + total: 1, + }); + }); + it('should return expected output for multiple agent ids', async () => { const agentIds = ['agent-a', 'agent-b', 'agent-x']; actionRequests = createActionRequestsEsSearchResultsMock(agentIds); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.ts index 28bb43a41919..f1e6b831cbbc 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/action_list.ts @@ -35,6 +35,8 @@ interface OptionalFilterParams { userIds?: string[]; /** Will filter out the action requests so that only those show `expiration` date is greater than now */ unExpiredOnly?: boolean; + /** list of action Ids that should have outputs */ + withOutputs?: string[]; } /** @@ -55,6 +57,7 @@ export const getActionListByStatus = async ({ statuses, userIds, unExpiredOnly = false, + withOutputs, }: OptionalFilterParams & { statuses: ResponseActionStatus[]; esClient: ElasticsearchClient; @@ -76,6 +79,7 @@ export const getActionListByStatus = async ({ startDate, userIds, unExpiredOnly, + withOutputs, }); // filter out search results based on status filter options @@ -113,6 +117,7 @@ export const getActionList = async ({ startDate, userIds, unExpiredOnly = false, + withOutputs, }: OptionalFilterParams & { esClient: ElasticsearchClient; logger: Logger; @@ -135,6 +140,7 @@ export const getActionList = async ({ startDate, userIds, unExpiredOnly, + withOutputs, }); return { @@ -169,6 +175,7 @@ const getActionDetailsList = async ({ startDate, userIds, unExpiredOnly, + withOutputs, }: GetActionDetailsListParam & { metadataService: EndpointMetadataService }): Promise<{ actionDetails: ActionListApiResponse['data']; totalRecords: number; @@ -260,10 +267,8 @@ const getActionDetailsList = async ({ ); // find the specific response's details using that set of matching responses - const { isCompleted, completedAt, wasSuccessful, errors, agentState } = getActionCompletionInfo( - action.agents, - matchedResponses - ); + const { isCompleted, completedAt, wasSuccessful, errors, agentState, outputs } = + getActionCompletionInfo(action.agents, matchedResponses); const { isExpired, status } = getActionStatus({ expirationDate: action.expiration, @@ -271,9 +276,6 @@ const getActionDetailsList = async ({ wasSuccessful, }); - // NOTE: `outputs` is not returned in this service because including it on a list of data - // could result in a very large response unnecessarily. In the future, we might include - // an option to optionally include it. const actionRecord: ActionListApiResponse['data'][number] = { id: action.id, agents: action.agents, @@ -290,6 +292,8 @@ const getActionDetailsList = async ({ agentState, isExpired, status, + // 8.8 onwards, show outputs only for actions with matching requested action ids + outputs: withOutputs && withOutputs.includes(action.id) ? outputs : undefined, createdBy: action.createdBy, comment: action.comment, parameters: action.parameters, diff --git a/x-pack/plugins/security_solution/server/endpoint/services/actions/pending_actions_summary.ts b/x-pack/plugins/security_solution/server/endpoint/services/actions/pending_actions_summary.ts index e389fc7e8ff9..a2aafaab57d4 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/actions/pending_actions_summary.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/actions/pending_actions_summary.ts @@ -8,7 +8,10 @@ import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import { getActionList } from '..'; import type { EndpointMetadataService } from '../metadata'; -import type { ActionDetails, EndpointPendingActions } from '../../../../common/endpoint/types'; +import type { + ActionListApiResponse, + EndpointPendingActions, +} from '../../../../common/endpoint/types'; import { ACTIONS_SEARCH_PAGE_SIZE } from './constants'; const PENDING_ACTION_RESPONSE_MAX_LAPSED_TIME = 300000; // 300k ms === 5 minutes @@ -34,19 +37,21 @@ export const getPendingActionsSummary = async ( }); // Store a map of `agent_id => array of actions` - const unExpiredByAgentId: Record = unExpiredActionList.reduce< - Record - >((byAgentMap, action) => { - for (const agent of action.agents) { - if (!byAgentMap[agent]) { - byAgentMap[agent] = []; - } - - byAgentMap[agent].push(action); - } + const unExpiredByAgentId: Record = + unExpiredActionList.reduce>( + (byAgentMap, action) => { + for (const agent of action.agents) { + if (!byAgentMap[agent]) { + byAgentMap[agent] = []; + } + + byAgentMap[agent].push(action); + } - return byAgentMap; - }, {}); + return byAgentMap; + }, + {} + ); const pending: EndpointPendingActions[] = []; From 58c68c94d47dd6e96c24a053a7530eab52691d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Tue, 14 Feb 2023 13:53:55 +0100 Subject: [PATCH 25/31] [Telemetry] Fix OptedOut banner (#151084) Resolves #135107. --- .../telemetry_notifications.ts | 3 +- .../telemetry_config/get_telemetry_opt_in.ts | 15 +-- .../apis/telemetry/telemetry_config.ts | 101 ++++++++++++-- test/plugin_functional/config.ts | 2 + .../test_suites/telemetry/telemetry.ts | 123 +++++++++++++++--- 5 files changed, 202 insertions(+), 42 deletions(-) diff --git a/src/plugins/telemetry/public/services/telemetry_notifications/telemetry_notifications.ts b/src/plugins/telemetry/public/services/telemetry_notifications/telemetry_notifications.ts index dddaf1259873..2a3daf14f841 100644 --- a/src/plugins/telemetry/public/services/telemetry_notifications/telemetry_notifications.ts +++ b/src/plugins/telemetry/public/services/telemetry_notifications/telemetry_notifications.ts @@ -74,7 +74,8 @@ export class TelemetryNotifications { * Should the banner to opt-in be shown to the user? */ public shouldShowOptInBanner = (): boolean => { - const isOptedIn = this.telemetryService.getIsOptedIn(); + // Using `config.optIn` instead of the getter `getIsOptedIn()` because the latter only returns boolean, and we want to compare it against `null`. + const isOptedIn = this.telemetryService.config.optIn; const bannerOnScreen = typeof this.optInBannerId !== 'undefined'; return !bannerOnScreen && isOptedIn === null; }; diff --git a/src/plugins/telemetry/server/telemetry_config/get_telemetry_opt_in.ts b/src/plugins/telemetry/server/telemetry_config/get_telemetry_opt_in.ts index 2cc02c15820e..f949a0e95853 100644 --- a/src/plugins/telemetry/server/telemetry_config/get_telemetry_opt_in.ts +++ b/src/plugins/telemetry/server/telemetry_config/get_telemetry_opt_in.ts @@ -29,17 +29,12 @@ export const getTelemetryOptIn: GetTelemetryOptIn = ({ return configTelemetryOptIn; } - if (typeof telemetrySavedObject.enabled !== 'boolean') { - return configTelemetryOptIn; - } + // If `enabled` is not available in the SO, fall back to the config value. + const savedOptIn = telemetrySavedObject.enabled ?? configTelemetryOptIn; - const savedOptIn = telemetrySavedObject.enabled; - - // if enabled is true, return it + // if the stored value is true, return it if (savedOptIn === true) return savedOptIn; - // TODO: Should we split the logic below into another OptIn getter? - // Additional check if they've already opted out (enabled: false): // - if the Kibana version has changed by at least a minor version, // return null to re-prompt. @@ -49,7 +44,7 @@ export const getTelemetryOptIn: GetTelemetryOptIn = ({ // if the last kibana version isn't set, or is somehow not a string, return null if (typeof lastKibanaVersion !== 'string') return null; - // if version hasn't changed, just return enabled value + // if version hasn't changed, just return the stored value if (lastKibanaVersion === currentKibanaVersion) return savedOptIn; const lastSemver = parseSemver(lastKibanaVersion); @@ -64,7 +59,7 @@ export const getTelemetryOptIn: GetTelemetryOptIn = ({ if (currentSemver.minor > lastSemver.minor) return null; } - // current version X.Y is not greater than last version X.Y, return enabled + // current version X.Y is not greater than last version X.Y, return the stored value return savedOptIn; }; diff --git a/test/api_integration/apis/telemetry/telemetry_config.ts b/test/api_integration/apis/telemetry/telemetry_config.ts index 57feb849c346..7a03600a3564 100644 --- a/test/api_integration/apis/telemetry/telemetry_config.ts +++ b/test/api_integration/apis/telemetry/telemetry_config.ts @@ -6,33 +6,38 @@ * Side Public License, v 1. */ +import { AxiosError } from 'axios'; import { FtrProviderContext } from '../../ftr_provider_context'; -export default function optInTest({ getService }: FtrProviderContext) { - const client = getService('es'); +const TELEMETRY_SO_TYPE = 'telemetry'; +const TELEMETRY_SO_ID = 'telemetry'; + +export default function telemetryConfigTest({ getService }: FtrProviderContext) { + const kbnClient = getService('kibanaServer'); const supertest = getService('supertest'); describe('/api/telemetry/v2/config API Telemetry config', () => { before(async () => { - await client.delete( - { - index: '.kibana', - id: 'telemetry:telemetry', - }, - { ignore: [404] } - ); + try { + await kbnClient.savedObjects.delete({ type: TELEMETRY_SO_TYPE, id: TELEMETRY_SO_ID }); + } catch (err) { + const is404Error = err instanceof AxiosError && err.response?.status === 404; + if (!is404Error) { + throw err; + } + } }); it('GET should get the default config', async () => { await supertest.get('/api/telemetry/v2/config').set('kbn-xsrf', 'xxx').expect(200, { allowChangingOptInStatus: true, - optIn: false, // the config.js for this FTR sets it to `false` + optIn: null, // the config.js for this FTR sets it to `false`, we are bound to ask again. sendUsageFrom: 'server', - telemetryNotifyUserAboutOptInDefault: false, // it's not opted-in, so we don't notify about opt-in?? + telemetryNotifyUserAboutOptInDefault: false, // it's not opted-in by default (that's what this flag is about) }); }); - it('GET should get when opted-in', async () => { + it('GET should get `true` when opted-in', async () => { // Opt-in await supertest .post('/api/telemetry/v2/optIn') @@ -44,9 +49,79 @@ export default function optInTest({ getService }: FtrProviderContext) { allowChangingOptInStatus: true, optIn: true, sendUsageFrom: 'server', - // it's not opted-in (in the YAML config) despite being opted-in via API/UI, and we still say false?? telemetryNotifyUserAboutOptInDefault: false, }); }); + + it('GET should get false when opted-out', async () => { + // Opt-in + await supertest + .post('/api/telemetry/v2/optIn') + .set('kbn-xsrf', 'xxx') + .send({ enabled: false }) + .expect(200); + + await supertest.get('/api/telemetry/v2/config').set('kbn-xsrf', 'xxx').expect(200, { + allowChangingOptInStatus: true, + optIn: false, + sendUsageFrom: 'server', + telemetryNotifyUserAboutOptInDefault: false, + }); + }); + + describe('From a previous version', function () { + this.tags(['skipCloud']); + + // Get current values + let attributes: Record; + let currentVersion: string; + let previousMinor: string; + + before(async () => { + [{ attributes }, currentVersion] = await Promise.all([ + kbnClient.savedObjects.get({ type: TELEMETRY_SO_TYPE, id: TELEMETRY_SO_ID }), + kbnClient.version.get(), + ]); + + const [major, minor, patch] = currentVersion.match(/^(\d+)\.(\d+)\.(\d+)/)!.map(parseInt); + previousMinor = `${minor === 0 ? major - 1 : major}.${ + minor === 0 ? minor : minor - 1 + }.${patch}`; + }); + + it('GET should get `true` when opted-in in the current version', async () => { + // Opt-in from a previous version + await kbnClient.savedObjects.create({ + overwrite: true, + type: TELEMETRY_SO_TYPE, + id: TELEMETRY_SO_ID, + attributes: { ...attributes, enabled: true, lastVersionChecked: previousMinor }, + }); + + await supertest.get('/api/telemetry/v2/config').set('kbn-xsrf', 'xxx').expect(200, { + allowChangingOptInStatus: true, + optIn: true, + sendUsageFrom: 'server', + telemetryNotifyUserAboutOptInDefault: false, + }); + }); + + it('GET should get `null` when opted-out in a previous version', async () => { + // Opt-out from previous version + await kbnClient.savedObjects.create({ + overwrite: true, + type: TELEMETRY_SO_TYPE, + id: TELEMETRY_SO_ID, + attributes: { ...attributes, enabled: false, lastVersionChecked: previousMinor }, + }); + + await supertest.get('/api/telemetry/v2/config').set('kbn-xsrf', 'xxx').expect(200, { + allowChangingOptInStatus: true, + optIn: null, + sendUsageFrom: 'server', + telemetryNotifyUserAboutOptInDefault: false, + }); + }); + }); }); } diff --git a/test/plugin_functional/config.ts b/test/plugin_functional/config.ts index 4ee09b45e6bd..fa3e6d072a23 100644 --- a/test/plugin_functional/config.ts +++ b/test/plugin_functional/config.ts @@ -53,6 +53,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { '--corePluginDeprecations.noLongerUsed=still_using', // for testing set buffer duration to 0 to immediately flush counters into saved objects. '--usageCollection.usageCounters.bufferDuration=0', + // We want to test when the banner is shown + '--telemetry.banner=true', // explicitly enable the cloud integration plugins to validate the rendered config keys '--xpack.cloud_integrations.chat.enabled=true', '--xpack.cloud_integrations.chat.chatURL=a_string', diff --git a/test/plugin_functional/test_suites/telemetry/telemetry.ts b/test/plugin_functional/test_suites/telemetry/telemetry.ts index 3b087c2705c1..b866733f7f6c 100644 --- a/test/plugin_functional/test_suites/telemetry/telemetry.ts +++ b/test/plugin_functional/test_suites/telemetry/telemetry.ts @@ -10,36 +10,123 @@ import expect from '@kbn/expect'; import { KBN_SCREENSHOT_MODE_ENABLED_KEY } from '@kbn/screenshot-mode-plugin/public'; import { PluginFunctionalProviderContext } from '../../services'; +const TELEMETRY_SO_TYPE = 'telemetry'; +const TELEMETRY_SO_ID = 'telemetry'; + export default function ({ getService, getPageObjects }: PluginFunctionalProviderContext) { + const kbnClient = getService('kibanaServer'); const browser = getService('browser'); + const find = getService('find'); + const supertest = getService('supertest'); const PageObjects = getPageObjects(['common']); describe('Telemetry service', () => { - const checkCanSendTelemetry = (): Promise => { - return browser.executeAsync((cb) => { - (window as unknown as Record Promise>) - ._checkCanSendTelemetry() - .then(cb); + describe('Screenshot mode', () => { + const checkCanSendTelemetry = (): Promise => { + return browser.executeAsync((cb) => { + (window as unknown as Record Promise>) + ._checkCanSendTelemetry() + .then(cb); + }); + }; + + after(async () => { + await browser.removeLocalStorageItem(KBN_SCREENSHOT_MODE_ENABLED_KEY); + await browser.executeAsync((cb) => { + (window as unknown as Record Promise>) + ._resetTelemetry() + .then(() => cb()); + }); }); - }; - after(async () => { - await browser.removeLocalStorageItem(KBN_SCREENSHOT_MODE_ENABLED_KEY); - await browser.executeAsync((cb) => { - (window as unknown as Record Promise>) - ._resetTelemetry() - .then(() => cb()); + it('detects that telemetry cannot be sent in screenshot mode', async () => { + await PageObjects.common.navigateToApp('home'); + expect(await checkCanSendTelemetry()).to.be(true); + + await browser.setLocalStorageItem(KBN_SCREENSHOT_MODE_ENABLED_KEY, 'true'); + await PageObjects.common.navigateToApp('home'); + + expect(await checkCanSendTelemetry()).to.be(false); }); }); - it('detects that telemetry cannot be sent in screenshot mode', async () => { - await PageObjects.common.navigateToApp('home'); - expect(await checkCanSendTelemetry()).to.be(true); + describe('Opt-in/out banners', function () { + this.tags(['skipCloud']); + + // Get current values + let attributes: Record; + let currentVersion: string; + let previousMinor: string; + + before(async () => { + [{ attributes }, currentVersion] = await Promise.all([ + kbnClient.savedObjects.get({ type: TELEMETRY_SO_TYPE, id: TELEMETRY_SO_ID }), + kbnClient.version.get(), + ]); + + const [major, minor, patch] = currentVersion.match(/^(\d+)\.(\d+)\.(\d+)/)!.map(parseInt); + previousMinor = `${minor === 0 ? major - 1 : major}.${ + minor === 0 ? minor : minor - 1 + }.${patch}`; + + await kbnClient.savedObjects.delete({ type: TELEMETRY_SO_TYPE, id: TELEMETRY_SO_ID }); + }); + + it('shows the banner in the default configuration', async () => { + await PageObjects.common.navigateToApp('home'); + expect(await find.existsByCssSelector('[data-test-subj="enable"]')).to.eql(true); + expect(await find.existsByCssSelector('[data-test-subj="disable"]')).to.eql(true); + }); - await browser.setLocalStorageItem(KBN_SCREENSHOT_MODE_ENABLED_KEY, 'true'); - await PageObjects.common.navigateToApp('home'); + it('does not show the banner if opted-in', async () => { + await supertest + .post('/api/telemetry/v2/optIn') + .set('kbn-xsrf', 'xxx') + .send({ enabled: true }) + .expect(200); - expect(await checkCanSendTelemetry()).to.be(false); + await PageObjects.common.navigateToApp('home'); + expect(await find.existsByCssSelector('[data-test-subj="enable"]')).to.eql(false); + expect(await find.existsByCssSelector('[data-test-subj="disable"]')).to.eql(false); + }); + + it('does not show the banner if opted-out in this version', async () => { + await supertest + .post('/api/telemetry/v2/optIn') + .set('kbn-xsrf', 'xxx') + .send({ enabled: false }) + .expect(200); + + await PageObjects.common.navigateToApp('home'); + expect(await find.existsByCssSelector('[data-test-subj="enable"]')).to.eql(false); + expect(await find.existsByCssSelector('[data-test-subj="disable"]')).to.eql(false); + }); + + it('shows the banner if opted-out in a previous version', async () => { + await kbnClient.savedObjects.create({ + overwrite: true, + type: TELEMETRY_SO_TYPE, + id: TELEMETRY_SO_ID, + attributes: { ...attributes, enabled: false, lastVersionChecked: previousMinor }, + }); + + await PageObjects.common.navigateToApp('home'); + expect(await find.existsByCssSelector('[data-test-subj="enable"]')).to.eql(true); + expect(await find.existsByCssSelector('[data-test-subj="disable"]')).to.eql(true); + }); + + it('does not show the banner if opted-in in a previous version', async () => { + await kbnClient.savedObjects.create({ + overwrite: true, + type: TELEMETRY_SO_TYPE, + id: TELEMETRY_SO_ID, + attributes: { ...attributes, enabled: true, lastVersionChecked: previousMinor }, + }); + + await PageObjects.common.navigateToApp('home'); + expect(await find.existsByCssSelector('[data-test-subj="enable"]')).to.eql(false); + expect(await find.existsByCssSelector('[data-test-subj="disable"]')).to.eql(false); + }); }); }); } From 9a52ef4baf07baa8a877252e3a740cfde1624063 Mon Sep 17 00:00:00 2001 From: Mark Hopkin Date: Tue, 14 Feb 2023 13:36:17 +0000 Subject: [PATCH 26/31] [Fleet] Fix agent policy selection and creation when there are a large number of agent policies ( > 1k) (#151119) ## Summary Closes #150605 When adding an integration, the agent policy selector (create or select existing agent policy) does not work if there are too many agent policies. In an environment with a large number of agent policies (e.g 1000+) the following API request times out or takes 30 - 60 seconds to respond: ``` http://localhost:5601/mark/api/fleet/agent_policies?page=1&perPage=10000&sortField=name&sortOrder=asc&full=true ``` That is because for each agent policy we get the saved object twice, get ALL package policies, and count the agents, so for 1000 agents we fun 4000 queries using `pmap` in some places. this PR changes it so that we do not get the agent count or `full` agent policy for every agent policy when populating the agent policy select, instead we only get the selected agent policy. This has meant that I have to separately query package policies in order to do the limited packages and APM output checks, but the component now loads instantly on an environment with 3k agent policies. Key changes: - add `noAgentCount` query param to agent policies API, to not count the agents for all agent policies - populate `agents` in the get one agent policy API, this was an inconsistency in our agent policy API - when selecting an existing agent policy, only get the full agent policy for the selected agent policy ###Testing No behaviour should have changed for the agent policy select, some niche behaviour of the selector: - if adding the APM integration, any agent policy with a logstash output configured for integration data should be disabled - if adding a limited integration e.g apm or defend, any agent policy already containing that integration should be disabled Screenshot 2023-02-14 at 10 45 03 --- .../plugins/fleet/common/openapi/bundled.json | 8 ++ .../plugins/fleet/common/openapi/bundled.yaml | 9 ++ .../common/openapi/paths/agent_policies.yaml | 5 + .../common/types/rest_spec/agent_policy.ts | 1 + .../steps/step_select_agent_policy.tsx | 100 +++++++++++------- .../components/steps/step_select_hosts.tsx | 3 +- .../server/routes/agent_policy/handlers.ts | 12 ++- .../server/types/rest_spec/agent_policy.ts | 1 + 8 files changed, 97 insertions(+), 42 deletions(-) diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json index 041c757075bb..f535bad37c6c 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.json +++ b/x-pack/plugins/fleet/common/openapi/bundled.json @@ -2522,6 +2522,14 @@ "in": "query", "name": "full", "description": "When set to true, retrieve the related package policies for each agent policy." + }, + { + "schema": { + "type": "boolean" + }, + "in": "query", + "name": "noAgentCount", + "description": "When set to true, do not count how many agents are in the agent policy, this can improve performance if you are searching over a large number of agent policies. The \"agents\" property will always be 0 if set to true." } ], "description": "" diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml index 576cc240f64b..7dcc4ba9610d 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.yaml +++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml @@ -1558,6 +1558,15 @@ paths: description: >- When set to true, retrieve the related package policies for each agent policy. + - schema: + type: boolean + in: query + name: noAgentCount + description: >- + When set to true, do not count how many agents are in the agent + policy, this can improve performance if you are searching over a + large number of agent policies. The "agents" property will always be + 0 if set to true. description: '' post: summary: Agent policy - Create diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_policies.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_policies.yaml index d43102444565..eb701057c295 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_policies.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_policies.yaml @@ -34,6 +34,11 @@ get: in: query name: full description: When set to true, retrieve the related package policies for each agent policy. + - schema: + type: boolean + in: query + name: noAgentCount + description: When set to true, do not count how many agents are in the agent policy, this can improve performance if you are searching over a large number of agent policies. The "agents" property will always be 0 if set to true. description: '' post: diff --git a/x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts b/x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts index a62b1a1b9e4e..738a8201b14a 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/agent_policy.ts @@ -11,6 +11,7 @@ import type { ListResult, ListWithKuery, BulkGetResult } from './common'; export interface GetAgentPoliciesRequest { query: ListWithKuery & { + noAgentCount?: boolean; full?: boolean; }; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx index cef02bfdc84d..718392ca8e2b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_agent_policy.tsx @@ -22,23 +22,20 @@ import { } from '@elastic/eui'; import { Error } from '../../../../../components'; -import type { - AgentPolicy, - Output, - PackageInfo, - GetAgentPoliciesResponseItem, -} from '../../../../../types'; +import type { AgentPolicy, Output, PackageInfo } from '../../../../../types'; import { isPackageLimited, doesAgentPolicyAlreadyIncludePackage } from '../../../../../services'; import { useGetAgentPolicies, useGetOutputs, sendGetOneAgentPolicy, useFleetStatus, + useGetPackagePolicies, } from '../../../../../hooks'; import { FLEET_APM_PACKAGE, SO_SEARCH_LIMIT, outputType, + PACKAGE_POLICY_SAVED_OBJECT_TYPE, } from '../../../../../../../../common/constants'; const AgentPolicyFormRow = styled(EuiFormRow)` @@ -58,22 +55,36 @@ function useAgentPoliciesOptions(packageInfo?: PackageInfo) { perPage: SO_SEARCH_LIMIT, sortField: 'name', sortOrder: 'asc', - full: true, + noAgentCount: true, // agentPolicy.agents will always be 0 + full: false, // package_policies will always be empty }); const agentPolicies = useMemo( () => agentPoliciesData?.items.filter((policy) => !policy.is_managed) || [], [agentPoliciesData?.items] ); - const agentPoliciesById = useMemo(() => { - return agentPolicies.reduce((acc: { [key: string]: GetAgentPoliciesResponseItem }, policy) => { - acc[policy.id] = policy; - return acc; - }, {}); - }, [agentPolicies]); - const { data: outputsData, isLoading: isOutputLoading } = useGetOutputs(); + // get all package policies with apm integration or the current integration + const { data: packagePoliciesForThisPackage, isLoading: isLoadingPackagePolicies } = + useGetPackagePolicies({ + page: 1, + perPage: SO_SEARCH_LIMIT, + kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name: ${packageInfo?.name}`, + }); + + const packagePoliciesForThisPackageByAgentPolicyId = useMemo( + () => + packagePoliciesForThisPackage?.items.reduce( + (acc: { [key: string]: boolean }, packagePolicy) => { + acc[packagePolicy.policy_id] = true; + return acc; + }, + {} + ), + [packagePoliciesForThisPackage?.items] + ); + const { getDataOutputForPolicy } = useMemo(() => { const defaultOutput = (outputsData?.items ?? []).find((output) => output.is_default); const outputsById = (outputsData?.items ?? []).reduce( @@ -85,7 +96,7 @@ function useAgentPoliciesOptions(packageInfo?: PackageInfo) { ); return { - getDataOutputForPolicy: (policy: AgentPolicy) => { + getDataOutputForPolicy: (policy: Pick) => { return policy.data_output_id ? outputsById[policy.data_output_id] : defaultOutput; }, }; @@ -94,20 +105,19 @@ function useAgentPoliciesOptions(packageInfo?: PackageInfo) { const agentPolicyOptions: Array> = useMemo( () => packageInfo - ? agentPolicies.map((agentConf) => { - const isLimitedPackageAlreadyInPolicy = doesAgentPolicyHaveLimitedPackage( - agentConf, - packageInfo - ); + ? agentPolicies.map((policy) => { + const isLimitedPackageAlreadyInPolicy = + isPackageLimited(packageInfo) && + packagePoliciesForThisPackageByAgentPolicyId?.[policy.id]; const isAPMPackageAndDataOutputIsLogstash = - packageInfo.name === FLEET_APM_PACKAGE && - getDataOutputForPolicy(agentConf)?.type === outputType.Logstash; + packageInfo?.name === FLEET_APM_PACKAGE && + getDataOutputForPolicy(policy)?.type === outputType.Logstash; return { inputDisplay: ( <> - {agentConf.name} + {policy.name} {isAPMPackageAndDataOutputIsLogstash && ( <> @@ -121,21 +131,25 @@ function useAgentPoliciesOptions(packageInfo?: PackageInfo) { )} ), - value: agentConf.id, + value: policy.id, disabled: isLimitedPackageAlreadyInPolicy || isAPMPackageAndDataOutputIsLogstash, 'data-test-subj': 'agentPolicyItem', }; }) : [], - [agentPolicies, packageInfo, getDataOutputForPolicy] + [ + packageInfo, + agentPolicies, + packagePoliciesForThisPackageByAgentPolicyId, + getDataOutputForPolicy, + ] ); return { agentPoliciesError, - isLoading: isOutputLoading || isAgentPoliciesLoading, - agentPolicies, - agentPoliciesById, + isLoading: isOutputLoading || isAgentPoliciesLoading || isLoadingPackagePolicies, agentPolicyOptions, + agentPolicies, }; } @@ -154,7 +168,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ }> = ({ packageInfo, agentPolicy, - updateAgentPolicy, + updateAgentPolicy: updateSelectedAgentPolicy, setHasAgentPolicyError, selectedAgentPolicyId, }) => { @@ -162,7 +176,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ const [selectedAgentPolicyError, setSelectedAgentPolicyError] = useState(); - const { agentPolicies, agentPoliciesById, isLoading, agentPoliciesError, agentPolicyOptions } = + const { isLoading, agentPoliciesError, agentPolicyOptions, agentPolicies } = useAgentPoliciesOptions(packageInfo); // Selected agent policy state const [selectedPolicyId, setSelectedPolicyId] = useState( @@ -170,10 +184,23 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ (selectedAgentPolicyId || (agentPolicies.length === 1 ? agentPolicies[0].id : undefined)) ); + const [isLoadingSelectedAgentPolicy, setIsLoadingSelectedAgentPolicy] = useState(false); + const [selectedAgentPolicy, setSelectedAgentPolicy] = useState( + agentPolicy + ); + + const updateAgentPolicy = useCallback( + (selectedPolicy: AgentPolicy | undefined) => { + setSelectedAgentPolicy(selectedPolicy); + updateSelectedAgentPolicy(selectedPolicy); + }, + [updateSelectedAgentPolicy] + ); // Update parent selected agent policy state useEffect(() => { const fetchAgentPolicyInfo = async () => { if (selectedPolicyId) { + setIsLoadingSelectedAgentPolicy(true); const { data, error } = await sendGetOneAgentPolicy(selectedPolicyId); if (error) { setSelectedAgentPolicyError(error); @@ -182,6 +209,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ setSelectedAgentPolicyError(undefined); updateAgentPolicy(data.item); } + setIsLoadingSelectedAgentPolicy(false); } else { setSelectedAgentPolicyError(undefined); updateAgentPolicy(undefined); @@ -268,12 +296,12 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ } helpText={ - isFleetReady && selectedPolicyId ? ( + isFleetReady && selectedPolicyId && !isLoadingSelectedAgentPolicy ? ( ) : null @@ -281,10 +309,8 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ isInvalid={Boolean( !selectedPolicyId || !packageInfo || - doesAgentPolicyHaveLimitedPackage( - agentPoliciesById[selectedPolicyId], - packageInfo - ) + (selectedAgentPolicy && + doesAgentPolicyHaveLimitedPackage(selectedAgentPolicy, packageInfo)) )} error={ !selectedPolicyId ? ( @@ -308,7 +334,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ } )} fullWidth - isLoading={isLoading || !packageInfo} + isLoading={isLoading || !packageInfo || isLoadingSelectedAgentPolicy} options={agentPolicyOptions} valueOfSelected={selectedPolicyId} onChange={onChange} diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.tsx index 992501e012a8..87ef9ac864bf 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.tsx @@ -64,7 +64,8 @@ export const StepSelectHosts: React.FunctionComponent = ({ perPage: SO_SEARCH_LIMIT, sortField: 'name', sortOrder: 'asc', - full: true, + full: false, // package_policies will always be empty + noAgentCount: true, // agentPolicy.agents will always be 0 }); if (err) { // eslint-disable-next-line no-console diff --git a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts index 9da77a9bed21..505f5e1b89b0 100644 --- a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts @@ -75,7 +75,7 @@ export const getAgentPoliciesHandler: FleetRequestHandler< const fleetContext = await context.fleet; const soClient = fleetContext.internalSoClient; const esClient = coreContext.elasticsearch.client.asInternalUser; - const { full: withPackagePolicies = false, ...restOfQuery } = request.query; + const { full: withPackagePolicies = false, noAgentCount = false, ...restOfQuery } = request.query; try { const { items, total, page, perPage } = await agentPolicyService.list(soClient, { withPackagePolicies, @@ -88,9 +88,11 @@ export const getAgentPoliciesHandler: FleetRequestHandler< page, perPage, }; - - await populateAssignedAgentsCount(esClient, soClient, items); - + if (!noAgentCount) { + await populateAssignedAgentsCount(esClient, soClient, items); + } else { + items.forEach((item) => (item.agents = 0)); + } return response.ok({ body }); } catch (error) { return defaultFleetErrorHandler({ error, response }); @@ -136,10 +138,12 @@ export const getOneAgentPolicyHandler: RequestHandler< TypeOf > = async (context, request, response) => { const coreContext = await context.core; + const esClient = coreContext.elasticsearch.client.asInternalUser; const soClient = coreContext.savedObjects.client; try { const agentPolicy = await agentPolicyService.get(soClient, request.params.agentPolicyId); if (agentPolicy) { + await populateAssignedAgentsCount(esClient, soClient, [agentPolicy]); const body: GetOneAgentPolicyResponse = { item: agentPolicy, }; diff --git a/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts b/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts index c2599d79b336..25275ed998c5 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts @@ -13,6 +13,7 @@ import { ListWithKuerySchema, BulkRequestBodySchema } from './common'; export const GetAgentPoliciesRequestSchema = { query: ListWithKuerySchema.extends({ + noAgentCount: schema.maybe(schema.boolean()), full: schema.maybe(schema.boolean()), }), }; From 49d7a2540d2355950aa3b0a56d9db1737f242bd5 Mon Sep 17 00:00:00 2001 From: Andrew Macri Date: Tue, 14 Feb 2023 06:41:07 -0700 Subject: [PATCH 27/31] [Security Solution] Fixes Data Quality dashboard integration issues (#151071) ## [Security Solution] Fixes Data Quality dashboard integration issues This PR implements fixes for the following issues observed during integration testing: - [[Security Solution] Data Quality dashboard: read Docs count from primaries.docs.count](https://github.com/elastic/kibana/issues/151061) `issue 151061` - [[Security Solution] Display a Remote clusters won't be checked message, and remove the text read_cross_cluster from error messages](https://github.com/elastic/kibana/issues/151063) `issue 151063` - This PR also updates the `getFieldTypes` function to fix an issue where, (for example), a field named `some.field.keyword` would be expanded as `some.field.fields.keyword`. ### Desk testing - See the details of the issues above for reproduction / desk testing steps --- .../errors_popover/index.tsx | 2 +- .../errors_popover/translations.ts | 7 - .../error_empty_prompt/index.tsx | 2 +- .../index_properties/markdown/helpers.ts | 3 +- .../data_quality_panel/pattern/index.test.tsx | 73 +++ .../data_quality_panel/pattern/index.tsx | 8 + .../remote_clusters_callout/index.test.tsx | 22 + .../remote_clusters_callout/index.tsx | 21 + .../remote_clusters_callout/translations.ts | 20 + .../impl/data_quality/helpers.test.ts | 279 ++++++++- .../impl/data_quality/helpers.ts | 6 +- .../mock/stats/mock_stats_green_index.ts | 293 +++++++++ .../mock/stats/mock_stats_yellow_index.tsx | 568 ++++++++++++++++++ .../mock/test_providers/index.tsx | 28 + .../jest.config.js | 1 + .../setup_tests.ts | 9 + .../tsconfig.json | 1 + 17 files changed, 1318 insertions(+), 25 deletions(-) create mode 100644 x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/pattern/index.test.tsx create mode 100644 x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.test.tsx create mode 100644 x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.tsx create mode 100644 x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/translations.ts create mode 100644 x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/stats/mock_stats_green_index.ts create mode 100644 x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/stats/mock_stats_yellow_index.tsx create mode 100644 x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/test_providers/index.tsx create mode 100644 x-pack/packages/kbn-ecs-data-quality-dashboard/setup_tests.ts diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.tsx b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.tsx index b24c7e6cd598..b9e0fc61ec54 100644 --- a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.tsx +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/index.tsx @@ -92,7 +92,7 @@ const ErrorsPopoverComponent: React.FC = ({ addSuccessToast, errorSummary {i18n.VIEW_INDEX_METADATA}
  • - {i18n.READ} {i18n.OR} {i18n.READ_CROSS_CLUSTER} + {i18n.READ}
diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/translations.ts b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/translations.ts index e6c9459d308e..304ce658a070 100644 --- a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/translations.ts +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/data_quality_summary/errors_popover/translations.ts @@ -56,13 +56,6 @@ export const READ = i18n.translate('ecsDataQualityDashboard.errors.read', { defaultMessage: 'read', }); -export const READ_CROSS_CLUSTER = i18n.translate( - 'ecsDataQualityDashboard.errors.readCrossCluster', - { - defaultMessage: 'read_cross_cluster', - } -); - export const THE_FOLLOWING_PRIVILEGES_ARE_REQUIRED = i18n.translate( 'ecsDataQualityDashboard.errors.theFollowingPrivilegesLabel', { diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.tsx b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.tsx index 9a81fcd9ad7e..a0b70daee0e4 100644 --- a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.tsx +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/error_empty_prompt/index.tsx @@ -27,7 +27,7 @@ const ErrorEmptyPromptComponent: React.FC = ({ title }) => ( {i18n.VIEW_INDEX_METADATA}
  • - {i18n.READ} {i18n.OR} {i18n.READ_CROSS_CLUSTER} + {i18n.READ}
  • diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.ts b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.ts index a4df52d02ca5..7d8d7ca03f08 100644 --- a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.ts +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/index_properties/markdown/helpers.ts @@ -14,7 +14,6 @@ import { MONITOR, OR, READ, - READ_CROSS_CLUSTER, THE_FOLLOWING_PRIVILEGES_ARE_REQUIRED, VIEW_INDEX_METADATA, } from '../../data_quality_summary/errors_popover/translations'; @@ -178,7 +177,7 @@ ${ERRORS_MAY_OCCUR} ${THE_FOLLOWING_PRIVILEGES_ARE_REQUIRED} - \`${MONITOR}\` ${OR} \`${MANAGE}\` - \`${VIEW_INDEX_METADATA}\` -- \`${READ}\` ${OR} \`${READ_CROSS_CLUSTER}\` +- \`${READ}\` ${getMarkdownTableHeader(headerNames)} ${getMarkdownTableRows(errorSummary)} diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/pattern/index.test.tsx b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/pattern/index.test.tsx new file mode 100644 index 000000000000..4fa3b3488492 --- /dev/null +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/pattern/index.test.tsx @@ -0,0 +1,73 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { DARK_THEME } from '@elastic/charts'; +import { render, screen } from '@testing-library/react'; +import React from 'react'; + +import { TestProviders } from '../../mock/test_providers'; +import { Pattern } from '.'; + +jest.mock('../../use_stats', () => ({ + useStats: jest.fn(() => ({ + stats: {}, + error: null, + loading: false, + })), +})); + +jest.mock('../../use_ilm_explain', () => ({ + useIlmExplain: jest.fn(() => ({ + error: null, + ilmExplain: {}, + loading: false, + })), +})); + +const defaultProps = { + addSuccessToast: jest.fn(), + canUserCreateAndReadCases: jest.fn(), + defaultNumberFormat: '0,0.[000]', + getGroupByFieldsOnClick: jest.fn(), + ilmPhases: ['hot', 'warm', 'unmanaged'], + indexNames: undefined, + openCreateCaseFlyout: jest.fn(), + patternRollup: undefined, + theme: DARK_THEME, + updatePatternIndexNames: jest.fn(), + updatePatternRollup: jest.fn(), +}; + +describe('pattern', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + test('it renders the remote clusters callout when the pattern includes a colon', () => { + const pattern = 'remote:*'; // <-- a colon in the pattern indicates the use of cross cluster search + + render( + + + + ); + + expect(screen.getByTestId('remoteClustersCallout')).toBeInTheDocument(); + }); + + test('it does NOT render the remote clusters callout when the pattern does NOT include a colon', () => { + const pattern = 'auditbeat-*'; // <-- no colon in the pattern + + render( + + + + ); + + expect(screen.queryByTestId('remoteClustersCallout')).not.toBeInTheDocument(); + }); +}); diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/pattern/index.tsx b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/pattern/index.tsx index d6a73f1fd2cf..bd6479490dab 100644 --- a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/pattern/index.tsx +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/pattern/index.tsx @@ -37,6 +37,7 @@ import { import { IndexProperties } from '../index_properties'; import { LoadingEmptyPrompt } from '../loading_empty_prompt'; import { PatternSummary } from './pattern_summary'; +import { RemoteClustersCallout } from '../remote_clusters_callout'; import { SummaryTable } from '../summary_table'; import { getSummaryTableColumns } from '../summary_table/helpers'; import * as i18n from './translations'; @@ -227,6 +228,13 @@ const PatternComponent: React.FC = ({ + {!loading && pattern.includes(':') && ( + <> + + + + )} + {!loading && error != null && ( )} diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.test.tsx b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.test.tsx new file mode 100644 index 000000000000..00bbab3b3853 --- /dev/null +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.test.tsx @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { render, screen } from '@testing-library/react'; +import React from 'react'; + +import { TITLE, TO_CHECK_INDICES_ON_REMOTE_CLUSTERS } from './translations'; +import { RemoteClustersCallout } from '.'; + +describe('RemoteClustersCallout', () => { + test('it renders the expected content', () => { + render(); + + expect(screen.getByTestId('remoteClustersCallout')).toHaveTextContent( + `${TITLE}${TO_CHECK_INDICES_ON_REMOTE_CLUSTERS}` + ); + }); +}); diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.tsx b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.tsx new file mode 100644 index 000000000000..d7ad6408b4bb --- /dev/null +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/index.tsx @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiCallOut } from '@elastic/eui'; +import React from 'react'; + +import * as i18n from './translations'; + +const RemoteClustersCalloutComponent: React.FC = () => ( + +

    {i18n.TO_CHECK_INDICES_ON_REMOTE_CLUSTERS}

    +
    +); + +RemoteClustersCalloutComponent.displayName = 'RemoteClustersCalloutComponent'; + +export const RemoteClustersCallout = React.memo(RemoteClustersCalloutComponent); diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/translations.ts b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/translations.ts new file mode 100644 index 000000000000..549bcb1fec48 --- /dev/null +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/data_quality_panel/remote_clusters_callout/translations.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const TITLE = i18n.translate('ecsDataQualityDashboard.remoteClustersCallout.title', { + defaultMessage: "Remote clusters won't be checked", +}); + +export const TO_CHECK_INDICES_ON_REMOTE_CLUSTERS = i18n.translate( + 'ecsDataQualityDashboard.remoteClustersCallout.toCheckIndicesOnRemoteClustersLabel', + { + defaultMessage: + "To check indices on remote clusters supporting cross-cluster search, login to the remote cluster's Kibana", + } +); diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/helpers.test.ts b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/helpers.test.ts index c44104451b1d..b9feec8a04f9 100644 --- a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/helpers.test.ts +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/helpers.test.ts @@ -5,24 +5,281 @@ * 2.0. */ -import { getIncompatibleStatColor } from './helpers'; +import { MappingProperty } from '@elastic/elasticsearch/lib/api/types'; +import { + getDocsCount, + getFieldTypes, + getIncompatibleStatColor, + getTotalDocsCount, +} from './helpers'; +import { mockStatsGreenIndex } from './mock/stats/mock_stats_green_index'; +import { mockStatsYellowIndex } from './mock/stats/mock_stats_yellow_index'; -describe('getIncompatibleStatColor', () => { - test('it returns the expected color when incompatible is greater than zero', () => { - const incompatible = 123; +describe('helpers', () => { + describe('getFieldTypes', () => { + /** + * These `mappingsProperties` represent mappings that were generated by + * Elasticsearch automatically, for an index named `auditbeat-custom-index-1`: + * + * ``` + * DELETE auditbeat-custom-index-1 + * + * PUT auditbeat-custom-index-1 + * + * PUT auditbeat-custom-index-1/_mapping + * { + * "properties": { + * "@timestamp": { + * "type": "date" + * }, + * "event.category": { + * "type": "keyword", + * "ignore_above": 1024 + * } + * } + * } + * ``` + * + * when the following document was inserted: + * + * ``` + * POST auditbeat-custom-index-1/_doc + * { + * "@timestamp": "2023-02-06T09:41:49.668Z", + * "host": { + * "name": "foo" + * }, + * "event": { + * "category": "an_invalid_category" + * }, + * "some.field": "this", + * "source": { + * "port": 90210, + * "ip": "10.1.2.3" + * } + * } + * ``` + */ + const mappingsProperties: Record = { + '@timestamp': { + type: 'date', + }, + event: { + properties: { + category: { + type: 'keyword', + ignore_above: 1024, + }, + }, + }, + host: { + properties: { + name: { + type: 'text', + fields: { + keyword: { + type: 'keyword', + ignore_above: 256, + }, + }, + }, + }, + }, + some: { + properties: { + field: { + type: 'text', + fields: { + keyword: { + type: 'keyword', + ignore_above: 256, + }, + }, + }, + }, + }, + source: { + properties: { + ip: { + type: 'text', + fields: { + keyword: { + type: 'keyword', + ignore_above: 256, + }, + }, + }, + port: { + type: 'long', + }, + }, + }, + }; - expect(getIncompatibleStatColor(incompatible)).toBe('#bd271e'); + const expected = [ + { + field: '@timestamp', + type: 'date', + }, + { + field: 'event.category', + type: 'keyword', + }, + { + field: 'host.name', + type: 'text', + }, + { + field: 'host.name.keyword', + type: 'keyword', + }, + { + field: 'some.field', + type: 'text', + }, + { + field: 'some.field.keyword', + type: 'keyword', + }, + { + field: 'source.ip', + type: 'text', + }, + { + field: 'source.ip.keyword', + type: 'keyword', + }, + { + field: 'source.port', + type: 'long', + }, + ]; + + test('it flattens the field names and types in the mapping properties', () => { + expect(getFieldTypes(mappingsProperties)).toEqual(expected); + }); + + test('it throws a type error when mappingsProperties is not flatten-able', () => { + // @ts-expect-error + const invalidType: Record = []; // <-- this is an array, NOT a valid Record + + expect(() => getFieldTypes(invalidType)).toThrowError('Root value is not flatten-able'); + }); }); - test('it returns undefined when incompatible is zero', () => { - const incompatible = 0; + describe('getDocsCount', () => { + test('it returns the expected docs count when `stats` contains the `indexName`', () => { + const indexName = '.ds-packetbeat-8.6.1-2023.02.04-000001'; + const expectedCount = mockStatsYellowIndex[indexName].primaries?.docs?.count; + + expect( + getDocsCount({ + indexName, + stats: mockStatsYellowIndex, + }) + ).toEqual(expectedCount); + }); + + test('it returns zero when `stats` does NOT contain the `indexName`', () => { + const indexName = 'not-gonna-find-it'; + + expect( + getDocsCount({ + indexName, + stats: mockStatsYellowIndex, + }) + ).toEqual(0); + }); - expect(getIncompatibleStatColor(incompatible)).toBeUndefined(); + test('it returns zero when `stats` is null', () => { + const indexName = '.ds-packetbeat-8.6.1-2023.02.04-000001'; + + expect( + getDocsCount({ + indexName, + stats: null, + }) + ).toEqual(0); + }); + + test('it returns the expected total for a green index, where `primaries.docs.count` and `total.docs.count` have different values', () => { + const indexName = 'auditbeat-custom-index-1'; + + expect( + getDocsCount({ + indexName, + stats: mockStatsGreenIndex, + }) + ).toEqual(mockStatsGreenIndex[indexName].primaries?.docs?.count); + }); }); - test('it returns undefined when incompatible is undefined', () => { - const incompatible = undefined; + describe('getTotalDocsCount', () => { + test('it returns the expected total given a subset of index names in the stats', () => { + const indexName = '.ds-packetbeat-8.5.3-2023.02.04-000001'; + const expectedCount = mockStatsYellowIndex[indexName].primaries?.docs?.count; + + expect( + getTotalDocsCount({ + indexNames: [indexName], + stats: mockStatsYellowIndex, + }) + ).toEqual(expectedCount); + }); + + test('it returns the expected total given all index names in the stats', () => { + const allIndexNamesInStats = [ + '.ds-packetbeat-8.6.1-2023.02.04-000001', + '.ds-packetbeat-8.5.3-2023.02.04-000001', + ]; + + expect( + getTotalDocsCount({ + indexNames: allIndexNamesInStats, + stats: mockStatsYellowIndex, + }) + ).toEqual(3258632); + }); + + test('it returns zero given an empty collection of index names', () => { + expect( + getTotalDocsCount({ + indexNames: [], // <-- empty + stats: mockStatsYellowIndex, + }) + ).toEqual(0); + }); + + test('it returns the expected total for a green index', () => { + const indexName = 'auditbeat-custom-index-1'; + const expectedCount = mockStatsGreenIndex[indexName].primaries?.docs?.count; + + expect( + getTotalDocsCount({ + indexNames: [indexName], + stats: mockStatsGreenIndex, + }) + ).toEqual(expectedCount); + }); + }); + + describe('getIncompatibleStatColor', () => { + test('it returns the expected color when incompatible is greater than zero', () => { + const incompatible = 123; + + expect(getIncompatibleStatColor(incompatible)).toBe('#bd271e'); + }); + + test('it returns undefined when incompatible is zero', () => { + const incompatible = 0; + + expect(getIncompatibleStatColor(incompatible)).toBeUndefined(); + }); + + test('it returns undefined when incompatible is undefined', () => { + const incompatible = undefined; - expect(getIncompatibleStatColor(incompatible)).toBeUndefined(); + expect(getIncompatibleStatColor(incompatible)).toBeUndefined(); + }); }); }); diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/helpers.ts b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/helpers.ts index ac1fead3d187..c3574844ae01 100644 --- a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/helpers.ts +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/helpers.ts @@ -71,8 +71,8 @@ const getNextPathWithoutProperties = ({ return key; } - if (shouldReadKeys(value) && key === 'properties') { - return `${pathWithoutProperties}`; // TODO: wrap required? + if (shouldReadKeys(value) && (key === 'properties' || key === 'fields')) { + return `${pathWithoutProperties}`; } else { return `${pathWithoutProperties}.${key}`; } @@ -200,7 +200,7 @@ export const getDocsCount = ({ }: { indexName: string; stats: Record | null; -}): number => (stats && stats[indexName]?.total?.docs?.count) ?? 0; +}): number => (stats && stats[indexName]?.primaries?.docs?.count) ?? 0; export const getTotalDocsCount = ({ indexNames, diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/stats/mock_stats_green_index.ts b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/stats/mock_stats_green_index.ts new file mode 100644 index 000000000000..74b10123e79f --- /dev/null +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/stats/mock_stats_green_index.ts @@ -0,0 +1,293 @@ +/* + * Copyright 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 { IndicesStatsIndicesStats } from '@elastic/elasticsearch/lib/api/types'; + +/** + * In a deployment where indices have a `green` health status, because there + * are enough nodes to have replicas for all data indices, (i.e. deployments + * created in Elastic Cloud), the `_stats` API returns, for any index, results + * where the index's `primaries.docs.count` and `total.docs.count` have + * **different** values, `4` and `8`, per this mock `_stats` API output + */ +export const mockStatsGreenIndex: Record = { + 'auditbeat-custom-index-1': { + uuid: 'jRlr6H_jSAysOLZ6KynoCQ', + health: 'green', + status: 'open', + primaries: { + docs: { + count: 4, + deleted: 0, + }, + shard_stats: { + total_count: 1, + }, + store: { + size_in_bytes: 28425, + total_data_set_size_in_bytes: 28425, + reserved_in_bytes: 0, + }, + indexing: { + index_total: 4, + index_time_in_millis: 2, + index_current: 0, + index_failed: 0, + delete_total: 0, + delete_time_in_millis: 0, + delete_current: 0, + noop_update_total: 0, + is_throttled: false, + throttle_time_in_millis: 0, + }, + get: { + total: 0, + time_in_millis: 0, + exists_total: 0, + exists_time_in_millis: 0, + missing_total: 0, + missing_time_in_millis: 0, + current: 0, + }, + search: { + open_contexts: 0, + query_total: 2, + query_time_in_millis: 1, + query_current: 0, + fetch_total: 2, + fetch_time_in_millis: 0, + fetch_current: 0, + scroll_total: 0, + scroll_time_in_millis: 0, + scroll_current: 0, + suggest_total: 0, + suggest_time_in_millis: 0, + suggest_current: 0, + }, + merges: { + current: 0, + current_docs: 0, + current_size_in_bytes: 0, + total: 0, + total_time_in_millis: 0, + total_docs: 0, + total_size_in_bytes: 0, + total_stopped_time_in_millis: 0, + total_throttled_time_in_millis: 0, + total_auto_throttle_in_bytes: 20971520, + }, + refresh: { + total: 12, + total_time_in_millis: 29, + external_total: 7, + external_total_time_in_millis: 29, + listeners: 0, + }, + flush: { + total: 1, + periodic: 1, + total_time_in_millis: 4, + }, + warmer: { + current: 0, + total: 6, + total_time_in_millis: 0, + }, + query_cache: { + memory_size_in_bytes: 0, + total_count: 0, + hit_count: 0, + miss_count: 0, + cache_size: 0, + cache_count: 0, + evictions: 0, + }, + fielddata: { + memory_size_in_bytes: 608, + evictions: 0, + }, + completion: { + size_in_bytes: 0, + }, + segments: { + count: 4, + memory_in_bytes: 0, + terms_memory_in_bytes: 0, + stored_fields_memory_in_bytes: 0, + term_vectors_memory_in_bytes: 0, + norms_memory_in_bytes: 0, + points_memory_in_bytes: 0, + doc_values_memory_in_bytes: 0, + index_writer_memory_in_bytes: 0, + version_map_memory_in_bytes: 0, + fixed_bit_set_memory_in_bytes: 0, + max_unsafe_auto_id_timestamp: -1, + file_sizes: {}, + }, + translog: { + operations: 0, + size_in_bytes: 55, + uncommitted_operations: 0, + uncommitted_size_in_bytes: 55, + earliest_last_modified_age: 170944710, + }, + request_cache: { + memory_size_in_bytes: 1792, + evictions: 0, + hit_count: 0, + miss_count: 2, + }, + recovery: { + current_as_source: 0, + current_as_target: 0, + throttle_time_in_millis: 0, + }, + bulk: { + total_operations: 4, + total_time_in_millis: 34, + total_size_in_bytes: 852, + avg_time_in_millis: 2, + avg_size_in_bytes: 73, + }, + }, + total: { + docs: { + count: 8, + deleted: 0, + }, + shard_stats: { + total_count: 2, + }, + store: { + size_in_bytes: 56861, + total_data_set_size_in_bytes: 56861, + reserved_in_bytes: 0, + }, + indexing: { + index_total: 8, + index_time_in_millis: 4, + index_current: 0, + index_failed: 0, + delete_total: 0, + delete_time_in_millis: 0, + delete_current: 0, + noop_update_total: 0, + is_throttled: false, + throttle_time_in_millis: 0, + }, + get: { + total: 0, + time_in_millis: 0, + exists_total: 0, + exists_time_in_millis: 0, + missing_total: 0, + missing_time_in_millis: 0, + current: 0, + }, + search: { + open_contexts: 0, + query_total: 4, + query_time_in_millis: 1, + query_current: 0, + fetch_total: 4, + fetch_time_in_millis: 0, + fetch_current: 0, + scroll_total: 0, + scroll_time_in_millis: 0, + scroll_current: 0, + suggest_total: 0, + suggest_time_in_millis: 0, + suggest_current: 0, + }, + merges: { + current: 0, + current_docs: 0, + current_size_in_bytes: 0, + total: 0, + total_time_in_millis: 0, + total_docs: 0, + total_size_in_bytes: 0, + total_stopped_time_in_millis: 0, + total_throttled_time_in_millis: 0, + total_auto_throttle_in_bytes: 41943040, + }, + refresh: { + total: 21, + total_time_in_millis: 58, + external_total: 14, + external_total_time_in_millis: 59, + listeners: 0, + }, + flush: { + total: 2, + periodic: 2, + total_time_in_millis: 9, + }, + warmer: { + current: 0, + total: 12, + total_time_in_millis: 0, + }, + query_cache: { + memory_size_in_bytes: 1048, + total_count: 0, + hit_count: 0, + miss_count: 0, + cache_size: 0, + cache_count: 0, + evictions: 0, + }, + fielddata: { + memory_size_in_bytes: 608, + evictions: 0, + }, + completion: { + size_in_bytes: 0, + }, + segments: { + count: 8, + memory_in_bytes: 0, + terms_memory_in_bytes: 0, + stored_fields_memory_in_bytes: 0, + term_vectors_memory_in_bytes: 0, + norms_memory_in_bytes: 0, + points_memory_in_bytes: 0, + doc_values_memory_in_bytes: 0, + index_writer_memory_in_bytes: 0, + version_map_memory_in_bytes: 0, + fixed_bit_set_memory_in_bytes: 0, + max_unsafe_auto_id_timestamp: 1676070541751, + file_sizes: {}, + }, + translog: { + operations: 0, + size_in_bytes: 110, + uncommitted_operations: 0, + uncommitted_size_in_bytes: 110, + earliest_last_modified_age: 170944710, + }, + request_cache: { + memory_size_in_bytes: 3760, + evictions: 0, + hit_count: 0, + miss_count: 4, + }, + recovery: { + current_as_source: 0, + current_as_target: 0, + throttle_time_in_millis: 0, + }, + bulk: { + total_operations: 8, + total_time_in_millis: 36, + total_size_in_bytes: 1704, + avg_time_in_millis: 1, + avg_size_in_bytes: 73, + }, + }, + }, +}; diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/stats/mock_stats_yellow_index.tsx b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/stats/mock_stats_yellow_index.tsx new file mode 100644 index 000000000000..49b5b1935218 --- /dev/null +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/stats/mock_stats_yellow_index.tsx @@ -0,0 +1,568 @@ +/* + * Copyright 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 { IndicesStatsIndicesStats } from '@elastic/elasticsearch/lib/api/types'; + +/** + * In a deployment where indices have a `yellow` health status, the + * [`_stats`](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html) + * API returns, (for an arbitrary index), results where the index's + * `primaries.docs.count` and `total.docs.count` have the same value, per this + * mock `_stats` API output + */ +export const mockStatsYellowIndex: Record = { + '.ds-packetbeat-8.6.1-2023.02.04-000001': { + uuid: 'x5Uuw4j4QM2YidHLNixCwg', + health: 'yellow', + status: 'open', + primaries: { + docs: { + count: 1628343, + deleted: 0, + }, + shard_stats: { + total_count: 1, + }, + store: { + size_in_bytes: 731583142, + total_data_set_size_in_bytes: 731583142, + reserved_in_bytes: 0, + }, + indexing: { + index_total: 0, + index_time_in_millis: 0, + index_current: 0, + index_failed: 0, + delete_total: 0, + delete_time_in_millis: 0, + delete_current: 0, + noop_update_total: 0, + is_throttled: false, + throttle_time_in_millis: 0, + }, + get: { + total: 0, + time_in_millis: 0, + exists_total: 0, + exists_time_in_millis: 0, + missing_total: 0, + missing_time_in_millis: 0, + current: 0, + }, + search: { + open_contexts: 0, + query_total: 32, + query_time_in_millis: 111, + query_current: 0, + fetch_total: 32, + fetch_time_in_millis: 0, + fetch_current: 0, + scroll_total: 0, + scroll_time_in_millis: 0, + scroll_current: 0, + suggest_total: 0, + suggest_time_in_millis: 0, + suggest_current: 0, + }, + merges: { + current: 0, + current_docs: 0, + current_size_in_bytes: 0, + total: 0, + total_time_in_millis: 0, + total_docs: 0, + total_size_in_bytes: 0, + total_stopped_time_in_millis: 0, + total_throttled_time_in_millis: 0, + total_auto_throttle_in_bytes: 20971520, + }, + refresh: { + total: 2, + total_time_in_millis: 0, + external_total: 2, + external_total_time_in_millis: 15, + listeners: 0, + }, + flush: { + total: 1, + periodic: 1, + total_time_in_millis: 0, + }, + warmer: { + current: 0, + total: 1, + total_time_in_millis: 15, + }, + query_cache: { + memory_size_in_bytes: 0, + total_count: 301, + hit_count: 0, + miss_count: 301, + cache_size: 0, + cache_count: 0, + evictions: 0, + }, + fielddata: { + memory_size_in_bytes: 1080, + evictions: 0, + }, + completion: { + size_in_bytes: 0, + }, + segments: { + count: 19, + memory_in_bytes: 0, + terms_memory_in_bytes: 0, + stored_fields_memory_in_bytes: 0, + term_vectors_memory_in_bytes: 0, + norms_memory_in_bytes: 0, + points_memory_in_bytes: 0, + doc_values_memory_in_bytes: 0, + index_writer_memory_in_bytes: 0, + version_map_memory_in_bytes: 0, + fixed_bit_set_memory_in_bytes: 304, + max_unsafe_auto_id_timestamp: -1, + file_sizes: {}, + }, + translog: { + operations: 0, + size_in_bytes: 55, + uncommitted_operations: 0, + uncommitted_size_in_bytes: 55, + earliest_last_modified_age: 136482466, + }, + request_cache: { + memory_size_in_bytes: 3680, + evictions: 0, + hit_count: 28, + miss_count: 4, + }, + recovery: { + current_as_source: 0, + current_as_target: 0, + throttle_time_in_millis: 0, + }, + bulk: { + total_operations: 0, + total_time_in_millis: 0, + total_size_in_bytes: 0, + avg_time_in_millis: 0, + avg_size_in_bytes: 0, + }, + }, + total: { + docs: { + count: 1628343, + deleted: 0, + }, + shard_stats: { + total_count: 1, + }, + store: { + size_in_bytes: 731583142, + total_data_set_size_in_bytes: 731583142, + reserved_in_bytes: 0, + }, + indexing: { + index_total: 0, + index_time_in_millis: 0, + index_current: 0, + index_failed: 0, + delete_total: 0, + delete_time_in_millis: 0, + delete_current: 0, + noop_update_total: 0, + is_throttled: false, + throttle_time_in_millis: 0, + }, + get: { + total: 0, + time_in_millis: 0, + exists_total: 0, + exists_time_in_millis: 0, + missing_total: 0, + missing_time_in_millis: 0, + current: 0, + }, + search: { + open_contexts: 0, + query_total: 32, + query_time_in_millis: 111, + query_current: 0, + fetch_total: 32, + fetch_time_in_millis: 0, + fetch_current: 0, + scroll_total: 0, + scroll_time_in_millis: 0, + scroll_current: 0, + suggest_total: 0, + suggest_time_in_millis: 0, + suggest_current: 0, + }, + merges: { + current: 0, + current_docs: 0, + current_size_in_bytes: 0, + total: 0, + total_time_in_millis: 0, + total_docs: 0, + total_size_in_bytes: 0, + total_stopped_time_in_millis: 0, + total_throttled_time_in_millis: 0, + total_auto_throttle_in_bytes: 20971520, + }, + refresh: { + total: 2, + total_time_in_millis: 0, + external_total: 2, + external_total_time_in_millis: 15, + listeners: 0, + }, + flush: { + total: 1, + periodic: 1, + total_time_in_millis: 0, + }, + warmer: { + current: 0, + total: 1, + total_time_in_millis: 15, + }, + query_cache: { + memory_size_in_bytes: 0, + total_count: 301, + hit_count: 0, + miss_count: 301, + cache_size: 0, + cache_count: 0, + evictions: 0, + }, + fielddata: { + memory_size_in_bytes: 1080, + evictions: 0, + }, + completion: { + size_in_bytes: 0, + }, + segments: { + count: 19, + memory_in_bytes: 0, + terms_memory_in_bytes: 0, + stored_fields_memory_in_bytes: 0, + term_vectors_memory_in_bytes: 0, + norms_memory_in_bytes: 0, + points_memory_in_bytes: 0, + doc_values_memory_in_bytes: 0, + index_writer_memory_in_bytes: 0, + version_map_memory_in_bytes: 0, + fixed_bit_set_memory_in_bytes: 304, + max_unsafe_auto_id_timestamp: -1, + file_sizes: {}, + }, + translog: { + operations: 0, + size_in_bytes: 55, + uncommitted_operations: 0, + uncommitted_size_in_bytes: 55, + earliest_last_modified_age: 136482466, + }, + request_cache: { + memory_size_in_bytes: 3680, + evictions: 0, + hit_count: 28, + miss_count: 4, + }, + recovery: { + current_as_source: 0, + current_as_target: 0, + throttle_time_in_millis: 0, + }, + bulk: { + total_operations: 0, + total_time_in_millis: 0, + total_size_in_bytes: 0, + avg_time_in_millis: 0, + avg_size_in_bytes: 0, + }, + }, + }, + '.ds-packetbeat-8.5.3-2023.02.04-000001': { + uuid: 'we0vNWm2Q6iz6uHubyHS6Q', + health: 'yellow', + status: 'open', + primaries: { + docs: { + count: 1630289, + deleted: 0, + }, + shard_stats: { + total_count: 1, + }, + store: { + size_in_bytes: 733175040, + total_data_set_size_in_bytes: 733175040, + reserved_in_bytes: 0, + }, + indexing: { + index_total: 0, + index_time_in_millis: 0, + index_current: 0, + index_failed: 0, + delete_total: 0, + delete_time_in_millis: 0, + delete_current: 0, + noop_update_total: 0, + is_throttled: false, + throttle_time_in_millis: 0, + }, + get: { + total: 0, + time_in_millis: 0, + exists_total: 0, + exists_time_in_millis: 0, + missing_total: 0, + missing_time_in_millis: 0, + current: 0, + }, + search: { + open_contexts: 0, + query_total: 32, + query_time_in_millis: 111, + query_current: 0, + fetch_total: 32, + fetch_time_in_millis: 0, + fetch_current: 0, + scroll_total: 0, + scroll_time_in_millis: 0, + scroll_current: 0, + suggest_total: 0, + suggest_time_in_millis: 0, + suggest_current: 0, + }, + merges: { + current: 0, + current_docs: 0, + current_size_in_bytes: 0, + total: 0, + total_time_in_millis: 0, + total_docs: 0, + total_size_in_bytes: 0, + total_stopped_time_in_millis: 0, + total_throttled_time_in_millis: 0, + total_auto_throttle_in_bytes: 20971520, + }, + refresh: { + total: 2, + total_time_in_millis: 0, + external_total: 2, + external_total_time_in_millis: 2, + listeners: 0, + }, + flush: { + total: 1, + periodic: 1, + total_time_in_millis: 0, + }, + warmer: { + current: 0, + total: 1, + total_time_in_millis: 2, + }, + query_cache: { + memory_size_in_bytes: 0, + total_count: 203, + hit_count: 0, + miss_count: 203, + cache_size: 0, + cache_count: 0, + evictions: 0, + }, + fielddata: { + memory_size_in_bytes: 1168, + evictions: 0, + }, + completion: { + size_in_bytes: 0, + }, + segments: { + count: 20, + memory_in_bytes: 0, + terms_memory_in_bytes: 0, + stored_fields_memory_in_bytes: 0, + term_vectors_memory_in_bytes: 0, + norms_memory_in_bytes: 0, + points_memory_in_bytes: 0, + doc_values_memory_in_bytes: 0, + index_writer_memory_in_bytes: 0, + version_map_memory_in_bytes: 0, + fixed_bit_set_memory_in_bytes: 320, + max_unsafe_auto_id_timestamp: -1, + file_sizes: {}, + }, + translog: { + operations: 0, + size_in_bytes: 55, + uncommitted_operations: 0, + uncommitted_size_in_bytes: 55, + earliest_last_modified_age: 136482425, + }, + request_cache: { + memory_size_in_bytes: 3688, + evictions: 0, + hit_count: 28, + miss_count: 4, + }, + recovery: { + current_as_source: 0, + current_as_target: 0, + throttle_time_in_millis: 0, + }, + bulk: { + total_operations: 0, + total_time_in_millis: 0, + total_size_in_bytes: 0, + avg_time_in_millis: 0, + avg_size_in_bytes: 0, + }, + }, + total: { + docs: { + count: 1630289, + deleted: 0, + }, + shard_stats: { + total_count: 1, + }, + store: { + size_in_bytes: 733175040, + total_data_set_size_in_bytes: 733175040, + reserved_in_bytes: 0, + }, + indexing: { + index_total: 0, + index_time_in_millis: 0, + index_current: 0, + index_failed: 0, + delete_total: 0, + delete_time_in_millis: 0, + delete_current: 0, + noop_update_total: 0, + is_throttled: false, + throttle_time_in_millis: 0, + }, + get: { + total: 0, + time_in_millis: 0, + exists_total: 0, + exists_time_in_millis: 0, + missing_total: 0, + missing_time_in_millis: 0, + current: 0, + }, + search: { + open_contexts: 0, + query_total: 32, + query_time_in_millis: 111, + query_current: 0, + fetch_total: 32, + fetch_time_in_millis: 0, + fetch_current: 0, + scroll_total: 0, + scroll_time_in_millis: 0, + scroll_current: 0, + suggest_total: 0, + suggest_time_in_millis: 0, + suggest_current: 0, + }, + merges: { + current: 0, + current_docs: 0, + current_size_in_bytes: 0, + total: 0, + total_time_in_millis: 0, + total_docs: 0, + total_size_in_bytes: 0, + total_stopped_time_in_millis: 0, + total_throttled_time_in_millis: 0, + total_auto_throttle_in_bytes: 20971520, + }, + refresh: { + total: 2, + total_time_in_millis: 0, + external_total: 2, + external_total_time_in_millis: 2, + listeners: 0, + }, + flush: { + total: 1, + periodic: 1, + total_time_in_millis: 0, + }, + warmer: { + current: 0, + total: 1, + total_time_in_millis: 2, + }, + query_cache: { + memory_size_in_bytes: 0, + total_count: 203, + hit_count: 0, + miss_count: 203, + cache_size: 0, + cache_count: 0, + evictions: 0, + }, + fielddata: { + memory_size_in_bytes: 1168, + evictions: 0, + }, + completion: { + size_in_bytes: 0, + }, + segments: { + count: 20, + memory_in_bytes: 0, + terms_memory_in_bytes: 0, + stored_fields_memory_in_bytes: 0, + term_vectors_memory_in_bytes: 0, + norms_memory_in_bytes: 0, + points_memory_in_bytes: 0, + doc_values_memory_in_bytes: 0, + index_writer_memory_in_bytes: 0, + version_map_memory_in_bytes: 0, + fixed_bit_set_memory_in_bytes: 320, + max_unsafe_auto_id_timestamp: -1, + file_sizes: {}, + }, + translog: { + operations: 0, + size_in_bytes: 55, + uncommitted_operations: 0, + uncommitted_size_in_bytes: 55, + earliest_last_modified_age: 136482425, + }, + request_cache: { + memory_size_in_bytes: 3688, + evictions: 0, + hit_count: 28, + miss_count: 4, + }, + recovery: { + current_as_source: 0, + current_as_target: 0, + throttle_time_in_millis: 0, + }, + bulk: { + total_operations: 0, + total_time_in_millis: 0, + total_size_in_bytes: 0, + avg_time_in_millis: 0, + avg_size_in_bytes: 0, + }, + }, + }, +}; diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/test_providers/index.tsx b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/test_providers/index.tsx new file mode 100644 index 000000000000..984e38cd0de5 --- /dev/null +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/impl/data_quality/mock/test_providers/index.tsx @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { I18nProvider } from '@kbn/i18n-react'; +import { euiDarkVars } from '@kbn/ui-theme'; +import React from 'react'; +import { ThemeProvider } from 'styled-components'; + +interface Props { + children: React.ReactNode; +} + +window.scrollTo = jest.fn(); + +/** A utility for wrapping children in the providers required to run tests */ +export const TestProvidersComponent: React.FC = ({ children }) => ( + + ({ eui: euiDarkVars, darkMode: true })}>{children} + +); + +TestProvidersComponent.displayName = 'TestProvidersComponent'; + +export const TestProviders = React.memo(TestProvidersComponent); diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/jest.config.js b/x-pack/packages/kbn-ecs-data-quality-dashboard/jest.config.js index 5f6465bb21a5..cd5c74e9b44b 100644 --- a/x-pack/packages/kbn-ecs-data-quality-dashboard/jest.config.js +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/jest.config.js @@ -9,4 +9,5 @@ module.exports = { preset: '@kbn/test', rootDir: '../../..', roots: ['/x-pack/packages/kbn-ecs-data-quality-dashboard'], + setupFilesAfterEnv: ['/x-pack/packages/kbn-ecs-data-quality-dashboard/setup_tests.ts'], }; diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/setup_tests.ts b/x-pack/packages/kbn-ecs-data-quality-dashboard/setup_tests.ts new file mode 100644 index 000000000000..72e0edd0d07f --- /dev/null +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/setup_tests.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// eslint-disable-next-line import/no-extraneous-dependencies +import '@testing-library/jest-dom'; diff --git a/x-pack/packages/kbn-ecs-data-quality-dashboard/tsconfig.json b/x-pack/packages/kbn-ecs-data-quality-dashboard/tsconfig.json index ddb539c293a2..09b55094f3b2 100644 --- a/x-pack/packages/kbn-ecs-data-quality-dashboard/tsconfig.json +++ b/x-pack/packages/kbn-ecs-data-quality-dashboard/tsconfig.json @@ -18,6 +18,7 @@ "kbn_references": [ "@kbn/ecs", "@kbn/i18n", + "@kbn/i18n-react", "@kbn/ui-theme", ] } From 96d10f05b325cb2a621b24194f5ebabab578e793 Mon Sep 17 00:00:00 2001 From: Alexi Doak <109488926+doakalexi@users.noreply.github.com> Date: Tue, 14 Feb 2023 08:44:43 -0500 Subject: [PATCH 28/31] [Response Ops][Alerting] Editing rule action does not auto-populate default summary message (#151048) Resolves https://github.com/elastic/kibana/issues/150715 ## Summary When editing an existing action on an existing rule, switching between the For each alert and Summary alert dropdown does switch the existing action message to the default message. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify - create a rule with an action that uses `For each alert` notification frequency; use the default message - edit your new rule and switch the action frequency to `Summary of alerts`; notice that the message does change to the default summary message - create a rule with an action that uses `Summary of alerts` notification frequency; use the default message - edit your new rule and switch the action frequency to `For each alert`; notice that the message does change to the default summary message - repeat the steps above and but create the rule a with an action that does not use the default message --- .../email/email_params.test.tsx | 58 +++++++++++++++++++ .../connector_types/email/email_params.tsx | 2 + .../server_log/server_log_params.test.tsx | 52 +++++++++++++++++ .../server_log/server_log_params.tsx | 11 +++- .../slack/slack_params.test.tsx | 52 +++++++++++++++++ .../connector_types/slack/slack_params.tsx | 2 + .../teams/teams_params.test.tsx | 52 +++++++++++++++++ .../connector_types/teams/teams_params.tsx | 5 +- .../action_type_form.tsx | 4 ++ .../triggers_actions_ui/public/types.ts | 1 + 10 files changed, 236 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/stack_connectors/public/connector_types/email/email_params.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/email/email_params.test.tsx index 1762fc0b39f8..7626606a0bf6 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/email/email_params.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/email/email_params.test.tsx @@ -128,4 +128,62 @@ describe('EmailParamsFields renders', () => { expect(editAction).not.toHaveBeenCalledWith('message', 'Some different default message', 0); }); + + test('when useDefaultMessage is set to true and the default message changes, the underlying message is replaced with the default message', () => { + const actionParams = { + cc: [], + bcc: [], + to: ['test@test.com'], + subject: 'test', + }; + + const editAction = jest.fn(); + const wrapper = mountWithIntl( + + ); + const text = wrapper.find('[data-test-subj="messageTextArea"]').first().text(); + expect(text).toEqual('not the default message'); + + wrapper.setProps({ + useDefaultMessage: true, + defaultMessage: 'Some different default message', + }); + + expect(editAction).toHaveBeenCalledWith('message', 'Some different default message', 0); + }); + + test('when useDefaultMessage is set to false and the default message changes, the underlying message is not changed', () => { + const actionParams = { + cc: [], + bcc: [], + to: ['test@test.com'], + subject: 'test', + }; + + const editAction = jest.fn(); + const wrapper = mountWithIntl( + + ); + const text = wrapper.find('[data-test-subj="messageTextArea"]').first().text(); + expect(text).toEqual('not the default message'); + + wrapper.setProps({ + useDefaultMessage: false, + defaultMessage: 'Some different default message', + }); + + expect(editAction).not.toHaveBeenCalled(); + }); }); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/email/email_params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/email/email_params.tsx index 29e2a8525ae0..a8df45ba0e33 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/email/email_params.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/email/email_params.tsx @@ -29,6 +29,7 @@ export const EmailParamsFields = ({ isDisabled, onBlur = noop, showEmailSubjectAndMessage = true, + useDefaultMessage, }: ActionParamsProps) => { const { to, cc, bcc, subject, message } = actionParams; const toOptions = to ? to.map((label: string) => ({ label })) : []; @@ -42,6 +43,7 @@ export const EmailParamsFields = ({ >([false, defaultMessage]); useEffect(() => { if ( + useDefaultMessage || !actionParams?.message || (isUsingDefault && actionParams?.message === defaultMessageUsed && diff --git a/x-pack/plugins/stack_connectors/public/connector_types/server_log/server_log_params.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/server_log/server_log_params.test.tsx index 90bed8f28701..6a5426d95289 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/server_log/server_log_params.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/server_log/server_log_params.test.tsx @@ -136,4 +136,56 @@ describe('ServerLogParamsFields renders', () => { expect(editAction).not.toHaveBeenCalledWith('message', 'Some different default message', 0); }); + + test('when useDefaultMessage is set to true and the default message changes, the underlying message is replaced with the default message', () => { + const actionParams = { + level: ServerLogLevelOptions.TRACE, + }; + + const editAction = jest.fn(); + const wrapper = mountWithIntl( + + ); + const text = wrapper.find('[data-test-subj="messageTextArea"]').first().text(); + expect(text).toEqual('not the default message'); + + wrapper.setProps({ + useDefaultMessage: true, + defaultMessage: 'Some different default message', + }); + + expect(editAction).toHaveBeenCalledWith('message', 'Some different default message', 0); + }); + + test('when useDefaultMessage is set to false and the default message changes, the underlying message is not changed', () => { + const actionParams = { + level: ServerLogLevelOptions.TRACE, + }; + + const editAction = jest.fn(); + const wrapper = mountWithIntl( + + ); + const text = wrapper.find('[data-test-subj="messageTextArea"]').first().text(); + expect(text).toEqual('not the default message'); + + wrapper.setProps({ + useDefaultMessage: false, + defaultMessage: 'Some different default message', + }); + + expect(editAction).not.toHaveBeenCalled(); + }); }); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/server_log/server_log_params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/server_log/server_log_params.tsx index f9882f1a67c7..7c7424528983 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/server_log/server_log_params.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/server_log/server_log_params.tsx @@ -14,7 +14,15 @@ import { ServerLogActionParams } from '../types'; export const ServerLogParamsFields: React.FunctionComponent< ActionParamsProps -> = ({ actionParams, editAction, index, errors, messageVariables, defaultMessage }) => { +> = ({ + actionParams, + editAction, + index, + errors, + messageVariables, + defaultMessage, + useDefaultMessage, +}) => { const { message, level } = actionParams; const levelOptions = [ { value: 'trace', text: 'Trace' }, @@ -36,6 +44,7 @@ export const ServerLogParamsFields: React.FunctionComponent< >([false, defaultMessage]); useEffect(() => { if ( + useDefaultMessage || !actionParams?.message || (isUsingDefault && actionParams?.message === defaultMessageUsed && diff --git a/x-pack/plugins/stack_connectors/public/connector_types/slack/slack_params.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/slack/slack_params.test.tsx index 6611b33e094b..faf6dc208a11 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/slack/slack_params.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/slack/slack_params.test.tsx @@ -28,4 +28,56 @@ describe('SlackParamsFields renders', () => { 'test message' ); }); + + test('when useDefaultMessage is set to true and the default message changes, the underlying message is replaced with the default message', () => { + const actionParams = { + message: 'not the default message', + }; + + const editAction = jest.fn(); + const wrapper = mountWithIntl( + + ); + const text = wrapper.find('[data-test-subj="messageTextArea"]').first().text(); + expect(text).toEqual('not the default message'); + + wrapper.setProps({ + useDefaultMessage: true, + defaultMessage: 'Some different default message', + }); + + expect(editAction).toHaveBeenCalledWith('message', 'Some different default message', 0); + }); + + test('when useDefaultMessage is set to false and the default message changes, the underlying message is not changed', () => { + const actionParams = { + message: 'not the default message', + }; + + const editAction = jest.fn(); + const wrapper = mountWithIntl( + + ); + const text = wrapper.find('[data-test-subj="messageTextArea"]').first().text(); + expect(text).toEqual('not the default message'); + + wrapper.setProps({ + useDefaultMessage: false, + defaultMessage: 'Some different default message', + }); + + expect(editAction).not.toHaveBeenCalled(); + }); }); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/slack/slack_params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/slack/slack_params.tsx index ec62b64b4796..4d219aebfe5b 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/slack/slack_params.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/slack/slack_params.tsx @@ -18,6 +18,7 @@ const SlackParamsFields: React.FunctionComponent { const { message } = actionParams; const [[isUsingDefault, defaultMessageUsed], setDefaultMessageUsage] = useState< @@ -25,6 +26,7 @@ const SlackParamsFields: React.FunctionComponent([false, defaultMessage]); useEffect(() => { if ( + useDefaultMessage || !actionParams?.message || (isUsingDefault && actionParams?.message === defaultMessageUsed && diff --git a/x-pack/plugins/stack_connectors/public/connector_types/teams/teams_params.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/teams/teams_params.test.tsx index ac1228ac5fda..b730e21bb350 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/teams/teams_params.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/teams/teams_params.test.tsx @@ -29,4 +29,56 @@ describe('TeamsParamsFields renders', () => { 'test message' ); }); + + test('when useDefaultMessage is set to true and the default message changes, the underlying message is replaced with the default message', () => { + const actionParams = { + message: 'not the default message', + }; + + const editAction = jest.fn(); + const wrapper = mountWithIntl( + + ); + const text = wrapper.find('[data-test-subj="messageTextArea"]').first().text(); + expect(text).toEqual('not the default message'); + + wrapper.setProps({ + useDefaultMessage: true, + defaultMessage: 'Some different default message', + }); + + expect(editAction).toHaveBeenCalledWith('message', 'Some different default message', 0); + }); + + test('when useDefaultMessage is set to false and the default message changes, the underlying message is not changed', () => { + const actionParams = { + message: 'not the default message', + }; + + const editAction = jest.fn(); + const wrapper = mountWithIntl( + + ); + const text = wrapper.find('[data-test-subj="messageTextArea"]').first().text(); + expect(text).toEqual('not the default message'); + + wrapper.setProps({ + useDefaultMessage: false, + defaultMessage: 'Some different default message', + }); + + expect(editAction).not.toHaveBeenCalled(); + }); }); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/teams/teams_params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/teams/teams_params.tsx index d2ef099bee82..93f8d0e0fe02 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/teams/teams_params.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/teams/teams_params.tsx @@ -18,14 +18,15 @@ const TeamsParamsFields: React.FunctionComponent { const { message } = actionParams; useEffect(() => { - if (!message && defaultMessage && defaultMessage.length > 0) { + if (useDefaultMessage || (!message && defaultMessage && defaultMessage.length > 0)) { editAction('message', defaultMessage, index); } // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [defaultMessage]); return ( { @@ -264,6 +265,8 @@ export const ActionTypeForm = ({ )} onSummaryChange={useCallback( (summary: boolean) => { + // use the default message when a user toggles between action frequencies + setUseDefaultMessage(true); setActionFrequencyProperty('summary', summary, index); }, [setActionFrequencyProperty, index] @@ -387,6 +390,7 @@ export const ActionTypeForm = ({ ? defaultSummaryMessage : selectedActionGroup?.defaultActionMessage ?? defaultActionMessage } + useDefaultMessage={useDefaultMessage} actionConnector={actionConnector} executionMode={ActionConnectorMode.ActionForm} /> diff --git a/x-pack/plugins/triggers_actions_ui/public/types.ts b/x-pack/plugins/triggers_actions_ui/public/types.ts index 6622b35fa892..f99573150faa 100644 --- a/x-pack/plugins/triggers_actions_ui/public/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/types.ts @@ -207,6 +207,7 @@ export interface ActionParamsProps { errors: IErrorObject; messageVariables?: ActionVariable[]; defaultMessage?: string; + useDefaultMessage?: boolean; actionConnector?: ActionConnector; isLoading?: boolean; isDisabled?: boolean; From fe78c05e1f493ffa2d995da37c8cc88fb1457c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Kopyci=C5=84ski?= Date: Tue, 14 Feb 2023 14:49:24 +0100 Subject: [PATCH 29/31] [Osquery] Cleanup spaces dependency (#151059) ## Summary Cleanup unused `spaces` plugin dependency --- x-pack/plugins/osquery/public/types.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/x-pack/plugins/osquery/public/types.ts b/x-pack/plugins/osquery/public/types.ts index f6d05a3d4599..6f26c56fcf91 100644 --- a/x-pack/plugins/osquery/public/types.ts +++ b/x-pack/plugins/osquery/public/types.ts @@ -18,7 +18,6 @@ import type { } from '@kbn/triggers-actions-ui-plugin/public'; import type { CasesUiStart, CasesUiSetup } from '@kbn/cases-plugin/public'; import type { TimelinesUIStart } from '@kbn/timelines-plugin/public'; -import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; import type { getLazyOsqueryResults, getLazyLiveQueryField, @@ -50,7 +49,6 @@ export interface StartPlugins { fleet: FleetStart; lens?: LensPublicStart; security: SecurityPluginStart; - spaces: SpacesPluginStart; triggersActionsUi: TriggersAndActionsUIPublicPluginStart; cases: CasesUiStart; timelines: TimelinesUIStart; From 687294d4d30e936aa95b4a4c566b29c4462ab362 Mon Sep 17 00:00:00 2001 From: Mark Hopkin Date: Tue, 14 Feb 2023 14:05:34 +0000 Subject: [PATCH 30/31] [Fleet] Bugfix: prevent status runtime query going over character limit (#150910) ## Summary Closes #150577 if there are too many agent policies in a system, we were creating too big a runtime query for elastic and the query would be rejected. This PR adds a limit, if the user has more than 750 agent policies then agents will not be marked as inactive anymore. If the user reaches the limit then a warning badge is displayed (the text underlined has also been added): Screenshot 2023-02-13 at 20 14 31 Integration test added. --- .../test_suites/core_plugins/rendering.ts | 1 + x-pack/plugins/fleet/common/types/index.ts | 1 + .../agent_policy_advanced_fields/index.tsx | 41 ++- x-pack/plugins/fleet/server/config.ts | 4 + .../agents/build_status_runtime_field.test.ts | 259 +++--------------- .../agents/build_status_runtime_field.ts | 125 +++++++-- .../services/agents/update_agent_tags.test.ts | 9 +- .../apis/agents/status.ts | 49 ++++ x-pack/test/fleet_api_integration/config.ts | 1 + 9 files changed, 239 insertions(+), 251 deletions(-) diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index 3a15129dcd2d..19ee7178fcd9 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -190,6 +190,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { 'xpack.discoverEnhanced.actions.exploreDataInContextMenu.enabled (boolean)', 'xpack.fleet.agents.enabled (boolean)', 'xpack.fleet.enableExperimental (array)', + 'xpack.fleet.developer.maxAgentPoliciesWithInactivityTimeout (number)', 'xpack.global_search.search_timeout (duration)', 'xpack.graph.canEditDrillDownUrls (boolean)', 'xpack.graph.savePolicy (alternatives)', diff --git a/x-pack/plugins/fleet/common/types/index.ts b/x-pack/plugins/fleet/common/types/index.ts index 202dd0c81ead..d3a7f9ee95bd 100644 --- a/x-pack/plugins/fleet/common/types/index.ts +++ b/x-pack/plugins/fleet/common/types/index.ts @@ -40,6 +40,7 @@ export interface FleetConfigType { agentPolicySchemaUpgradeBatchSize?: number; }; developer?: { + maxAgentPoliciesWithInactivityTimeout?: number; disableRegistryVersionCheck?: boolean; bundledPackageLocation?: string; }; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx index 9dbc1754fd12..cf3d6e84137e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx @@ -24,13 +24,14 @@ import { EuiFlexGroup, EuiFlexItem, EuiBetaBadge, + EuiBadge, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; -import { dataTypes } from '../../../../../../../common/constants'; +import { AGENT_POLICY_SAVED_OBJECT_TYPE, dataTypes } from '../../../../../../../common/constants'; import type { NewAgentPolicy, AgentPolicy } from '../../../../types'; -import { useStartServices } from '../../../../hooks'; +import { useStartServices, useConfig, useGetAgentPolicies } from '../../../../hooks'; import { AgentPolicyPackageBadge } from '../../../../components'; @@ -63,12 +64,26 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent = }) => { const { agentFqdnMode: agentFqdnModeEnabled } = ExperimentalFeaturesService.get(); const { docLinks } = useStartServices(); + const config = useConfig(); + const maxAgentPoliciesWithInactivityTimeout = + config.developer?.maxAgentPoliciesWithInactivityTimeout ?? 0; const [touchedFields, setTouchedFields] = useState<{ [key: string]: boolean }>({}); const { dataOutputOptions, monitoringOutputOptions, isLoading: isLoadingOptions, } = useOutputOptions(agentPolicy); + + const { data: agentPoliciesData } = useGetAgentPolicies({ + page: 1, + perPage: 0, + kuery: `${AGENT_POLICY_SAVED_OBJECT_TYPE}.inactivity_timeout:*`, + }); + + const totalAgentPoliciesWithInactivityTimeout = agentPoliciesData?.total ?? 0; + const tooManyAgentPoliciesForInactivityTimeout = + maxAgentPoliciesWithInactivityTimeout !== undefined && + totalAgentPoliciesWithInactivityTimeout > (maxAgentPoliciesWithInactivityTimeout ?? 0); const { dataDownloadSourceOptions, isLoading: isLoadingDownloadSources } = useDownloadSourcesOptions(agentPolicy); @@ -273,12 +288,32 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent = id="xpack.fleet.agentPolicyForm.inactivityTimeoutLabel" defaultMessage="Inactivity timeout" /> + {tooManyAgentPoliciesForInactivityTimeout && ( + <> +   + + } + > + + + + + + )} } description={ } > diff --git a/x-pack/plugins/fleet/server/config.ts b/x-pack/plugins/fleet/server/config.ts index 6cbbbd3a94bf..d5312bf9bc65 100644 --- a/x-pack/plugins/fleet/server/config.ts +++ b/x-pack/plugins/fleet/server/config.ts @@ -35,6 +35,9 @@ export const config: PluginConfigDescriptor = { enabled: true, }, enableExperimental: true, + developer: { + maxAgentPoliciesWithInactivityTimeout: true, + }, }, deprecations: ({ renameFromRoot, unused, unusedFromRoot }) => [ // Unused settings before Fleet server exists @@ -126,6 +129,7 @@ export const config: PluginConfigDescriptor = { }) ), developer: schema.object({ + maxAgentPoliciesWithInactivityTimeout: schema.maybe(schema.number()), disableRegistryVersionCheck: schema.boolean({ defaultValue: false }), allowAgentUpgradeSourceUri: schema.boolean({ defaultValue: false }), bundledPackageLocation: schema.string({ defaultValue: DEFAULT_BUNDLED_PACKAGE_LOCATION }), 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 249b74db1325..2c54d7d50c57 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 @@ -15,54 +15,13 @@ describe('buildStatusRuntimeField', () => { }); it('should build the correct runtime field if there are no inactivity timeouts', () => { const inactivityTimeouts: InactivityTimeouts = []; - const runtimeField = _buildStatusRuntimeField(inactivityTimeouts); + const runtimeField = _buildStatusRuntimeField({ inactivityTimeouts }); expect(runtimeField).toMatchInlineSnapshot(` Object { "status": Object { "script": Object { "lang": "painless", - "source": " - long lastCheckinMillis = doc['last_checkin'].size() > 0 - ? doc['last_checkin'].value.toInstant().toEpochMilli() - : ( - 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) { - emit('inactive'); - } else if ( - lastCheckinMillis > 0 - && lastCheckinMillis - < (1234567590123L) - ) { - emit('offline'); - } else if ( - doc['policy_revision_idx'].size() == 0 || ( - doc['upgrade_started_at'].size() > 0 && - doc['upgraded_at'].size() == 0 - ) - ) { - emit('updating'); - } else if (doc['last_checkin'].size() == 0) { - emit('enrolling'); - } else if (doc['unenrollment_started_at'].size() > 0) { - emit('unenrolling'); - } else if ( - doc['last_checkin_status'].size() > 0 && - doc['last_checkin_status'].value.toLowerCase() == 'error' - ) { - emit('error'); - } else if ( - doc['last_checkin_status'].size() > 0 && - doc['last_checkin_status'].value.toLowerCase() == 'degraded' - ) { - emit('degraded'); - } else { - emit('online'); - }", + "source": " long lastCheckinMillis = doc['last_checkin'].size() > 0 ? doc['last_checkin'].value.toInstant().toEpochMilli() : ( 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 && lastCheckinMillis < 1234567590123L ) { emit('offline'); } else if ( doc['policy_revision_idx'].size() == 0 || ( doc['upgrade_started_at'].size() > 0 && doc['upgraded_at'].size() == 0 ) ) { emit('updating'); } else if (doc['last_checkin'].size() == 0) { emit('enrolling'); } else if (doc['unenrollment_started_at'].size() > 0) { emit('unenrolling'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'error' ) { emit('error'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'degraded' ) { emit('degraded'); } else { emit('online'); }", }, "type": "keyword", }, @@ -71,54 +30,13 @@ describe('buildStatusRuntimeField', () => { }); it('should build the correct runtime field if there are no inactivity timeouts (prefix)', () => { const inactivityTimeouts: InactivityTimeouts = []; - const runtimeField = _buildStatusRuntimeField(inactivityTimeouts, 'my.prefix.'); + const runtimeField = _buildStatusRuntimeField({ inactivityTimeouts, pathPrefix: 'my.prefix.' }); expect(runtimeField).toMatchInlineSnapshot(` Object { "status": Object { "script": Object { "lang": "painless", - "source": " - long lastCheckinMillis = doc['my.prefix.last_checkin'].size() > 0 - ? doc['my.prefix.last_checkin'].value.toInstant().toEpochMilli() - : ( - 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) { - emit('inactive'); - } else if ( - lastCheckinMillis > 0 - && lastCheckinMillis - < (1234567590123L) - ) { - emit('offline'); - } else if ( - doc['my.prefix.policy_revision_idx'].size() == 0 || ( - doc['my.prefix.upgrade_started_at'].size() > 0 && - doc['my.prefix.upgraded_at'].size() == 0 - ) - ) { - emit('updating'); - } else if (doc['my.prefix.last_checkin'].size() == 0) { - emit('enrolling'); - } else if (doc['my.prefix.unenrollment_started_at'].size() > 0) { - emit('unenrolling'); - } else if ( - doc['my.prefix.last_checkin_status'].size() > 0 && - doc['my.prefix.last_checkin_status'].value.toLowerCase() == 'error' - ) { - emit('error'); - } else if ( - doc['my.prefix.last_checkin_status'].size() > 0 && - doc['my.prefix.last_checkin_status'].value.toLowerCase() == 'degraded' - ) { - emit('degraded'); - } else { - emit('online'); - }", + "source": " long lastCheckinMillis = doc['my.prefix.last_checkin'].size() > 0 ? doc['my.prefix.last_checkin'].value.toInstant().toEpochMilli() : ( 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 && lastCheckinMillis < 1234567590123L ) { emit('offline'); } else if ( doc['my.prefix.policy_revision_idx'].size() == 0 || ( doc['my.prefix.upgrade_started_at'].size() > 0 && doc['my.prefix.upgraded_at'].size() == 0 ) ) { emit('updating'); } else if (doc['my.prefix.last_checkin'].size() == 0) { emit('enrolling'); } else if (doc['my.prefix.unenrollment_started_at'].size() > 0) { emit('unenrolling'); } else if ( doc['my.prefix.last_checkin_status'].size() > 0 && doc['my.prefix.last_checkin_status'].value.toLowerCase() == 'error' ) { emit('error'); } else if ( doc['my.prefix.last_checkin_status'].size() > 0 && doc['my.prefix.last_checkin_status'].value.toLowerCase() == 'degraded' ) { emit('degraded'); } else { emit('online'); }", }, "type": "keyword", }, @@ -132,54 +50,13 @@ describe('buildStatusRuntimeField', () => { policyIds: ['policy-1'], }, ]; - const runtimeField = _buildStatusRuntimeField(inactivityTimeouts); + const runtimeField = _buildStatusRuntimeField({ inactivityTimeouts }); expect(runtimeField).toMatchInlineSnapshot(` Object { "status": Object { "script": Object { "lang": "painless", - "source": " - long lastCheckinMillis = doc['last_checkin'].size() > 0 - ? doc['last_checkin'].value.toInstant().toEpochMilli() - : ( - 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) { - emit('inactive'); - } else if ( - lastCheckinMillis > 0 - && lastCheckinMillis - < (1234567590123L) - ) { - emit('offline'); - } else if ( - doc['policy_revision_idx'].size() == 0 || ( - doc['upgrade_started_at'].size() > 0 && - doc['upgraded_at'].size() == 0 - ) - ) { - emit('updating'); - } else if (doc['last_checkin'].size() == 0) { - emit('enrolling'); - } else if (doc['unenrollment_started_at'].size() > 0) { - emit('unenrolling'); - } else if ( - doc['last_checkin_status'].size() > 0 && - doc['last_checkin_status'].value.toLowerCase() == 'error' - ) { - emit('error'); - } else if ( - doc['last_checkin_status'].size() > 0 && - doc['last_checkin_status'].value.toLowerCase() == 'degraded' - ) { - emit('degraded'); - } else { - emit('online'); - }", + "source": " long lastCheckinMillis = doc['last_checkin'].size() > 0 ? doc['last_checkin'].value.toInstant().toEpochMilli() : ( 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 && ['policy-1'].contains(doc['policy_id'].value) && lastCheckinMillis < 1234567590123L) {emit('inactive');} else if ( lastCheckinMillis > 0 && lastCheckinMillis < 1234567590123L ) { emit('offline'); } else if ( doc['policy_revision_idx'].size() == 0 || ( doc['upgrade_started_at'].size() > 0 && doc['upgraded_at'].size() == 0 ) ) { emit('updating'); } else if (doc['last_checkin'].size() == 0) { emit('enrolling'); } else if (doc['unenrollment_started_at'].size() > 0) { emit('unenrolling'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'error' ) { emit('error'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'degraded' ) { emit('degraded'); } else { emit('online'); }", }, "type": "keyword", }, @@ -193,54 +70,37 @@ describe('buildStatusRuntimeField', () => { policyIds: ['policy-1', 'policy-2'], }, ]; - const runtimeField = _buildStatusRuntimeField(inactivityTimeouts); + const runtimeField = _buildStatusRuntimeField({ inactivityTimeouts }); expect(runtimeField).toMatchInlineSnapshot(` Object { "status": Object { "script": Object { "lang": "painless", - "source": " - long lastCheckinMillis = doc['last_checkin'].size() > 0 - ? doc['last_checkin'].value.toInstant().toEpochMilli() - : ( - 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) { - emit('inactive'); - } else if ( - lastCheckinMillis > 0 - && lastCheckinMillis - < (1234567590123L) - ) { - emit('offline'); - } else if ( - doc['policy_revision_idx'].size() == 0 || ( - doc['upgrade_started_at'].size() > 0 && - doc['upgraded_at'].size() == 0 - ) - ) { - emit('updating'); - } else if (doc['last_checkin'].size() == 0) { - emit('enrolling'); - } else if (doc['unenrollment_started_at'].size() > 0) { - emit('unenrolling'); - } else if ( - doc['last_checkin_status'].size() > 0 && - doc['last_checkin_status'].value.toLowerCase() == 'error' - ) { - emit('error'); - } else if ( - doc['last_checkin_status'].size() > 0 && - doc['last_checkin_status'].value.toLowerCase() == 'degraded' - ) { - emit('degraded'); - } else { - emit('online'); - }", + "source": " long lastCheckinMillis = doc['last_checkin'].size() > 0 ? doc['last_checkin'].value.toInstant().toEpochMilli() : ( 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 && ['policy-1','policy-2'].contains(doc['policy_id'].value) && lastCheckinMillis < 1234567590123L) {emit('inactive');} else if ( lastCheckinMillis > 0 && lastCheckinMillis < 1234567590123L ) { emit('offline'); } else if ( doc['policy_revision_idx'].size() == 0 || ( doc['upgrade_started_at'].size() > 0 && doc['upgraded_at'].size() == 0 ) ) { emit('updating'); } else if (doc['last_checkin'].size() == 0) { emit('enrolling'); } else if (doc['unenrollment_started_at'].size() > 0) { emit('unenrolling'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'error' ) { emit('error'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'degraded' ) { emit('degraded'); } else { emit('online'); }", + }, + "type": "keyword", + }, + } + `); + }); + it('should not perform inactivity check if there are too many agent policies with an inactivity timeout', () => { + const inactivityTimeouts: InactivityTimeouts = [ + { + inactivityTimeout: 300, + // default max is 750 + policyIds: new Array(1000).fill(0).map((_, i) => `policy-${i}`), + }, + ]; + + const runtimeField = _buildStatusRuntimeField({ inactivityTimeouts }); + + expect(runtimeField).not.toContain('policy-'); + expect(runtimeField).toMatchInlineSnapshot(` + Object { + "status": Object { + "script": Object { + "lang": "painless", + "source": " long lastCheckinMillis = doc['last_checkin'].size() > 0 ? doc['last_checkin'].value.toInstant().toEpochMilli() : ( 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 && lastCheckinMillis < 1234567590123L ) { emit('offline'); } else if ( doc['policy_revision_idx'].size() == 0 || ( doc['upgrade_started_at'].size() > 0 && doc['upgraded_at'].size() == 0 ) ) { emit('updating'); } else if (doc['last_checkin'].size() == 0) { emit('enrolling'); } else if (doc['unenrollment_started_at'].size() > 0) { emit('unenrolling'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'error' ) { emit('error'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'degraded' ) { emit('degraded'); } else { emit('online'); }", }, "type": "keyword", }, @@ -258,54 +118,13 @@ describe('buildStatusRuntimeField', () => { policyIds: ['policy-3'], }, ]; - const runtimeField = _buildStatusRuntimeField(inactivityTimeouts); + const runtimeField = _buildStatusRuntimeField({ inactivityTimeouts }); expect(runtimeField).toMatchInlineSnapshot(` Object { "status": Object { "script": Object { "lang": "painless", - "source": " - long lastCheckinMillis = doc['last_checkin'].size() > 0 - ? doc['last_checkin'].value.toInstant().toEpochMilli() - : ( - 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) { - emit('inactive'); - } else if ( - lastCheckinMillis > 0 - && lastCheckinMillis - < (1234567590123L) - ) { - emit('offline'); - } else if ( - doc['policy_revision_idx'].size() == 0 || ( - doc['upgrade_started_at'].size() > 0 && - doc['upgraded_at'].size() == 0 - ) - ) { - emit('updating'); - } else if (doc['last_checkin'].size() == 0) { - emit('enrolling'); - } else if (doc['unenrollment_started_at'].size() > 0) { - emit('unenrolling'); - } else if ( - doc['last_checkin_status'].size() > 0 && - doc['last_checkin_status'].value.toLowerCase() == 'error' - ) { - emit('error'); - } else if ( - doc['last_checkin_status'].size() > 0 && - doc['last_checkin_status'].value.toLowerCase() == 'degraded' - ) { - emit('degraded'); - } else { - emit('online'); - }", + "source": " long lastCheckinMillis = doc['last_checkin'].size() > 0 ? doc['last_checkin'].value.toInstant().toEpochMilli() : ( 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 && ['policy-1','policy-2'].contains(doc['policy_id'].value) && lastCheckinMillis < 1234567590123L || ['policy-3'].contains(doc['policy_id'].value) && lastCheckinMillis < 1234567490123L) {emit('inactive');} else if ( lastCheckinMillis > 0 && lastCheckinMillis < 1234567590123L ) { emit('offline'); } else if ( doc['policy_revision_idx'].size() == 0 || ( doc['upgrade_started_at'].size() > 0 && doc['upgraded_at'].size() == 0 ) ) { emit('updating'); } else if (doc['last_checkin'].size() == 0) { emit('enrolling'); } else if (doc['unenrollment_started_at'].size() > 0) { emit('unenrolling'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'error' ) { emit('error'); } else if ( doc['last_checkin_status'].size() > 0 && doc['last_checkin_status'].value.toLowerCase() == 'degraded' ) { emit('degraded'); } else { emit('online'); }", }, "type": "keyword", }, @@ -314,8 +133,14 @@ describe('buildStatusRuntimeField', () => { }); it('should build the same runtime field if path ends with. or not', () => { const inactivityTimeouts: InactivityTimeouts = []; - const runtimeFieldWithDot = _buildStatusRuntimeField(inactivityTimeouts, 'my.prefix.'); - const runtimeFieldNoDot = _buildStatusRuntimeField(inactivityTimeouts, 'my.prefix'); + const runtimeFieldWithDot = _buildStatusRuntimeField({ + inactivityTimeouts, + pathPrefix: 'my.prefix.', + }); + const runtimeFieldNoDot = _buildStatusRuntimeField({ + inactivityTimeouts, + pathPrefix: 'my.prefix', + }); expect(runtimeFieldWithDot).toEqual(runtimeFieldNoDot); }); }); 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 cebf3a440e51..f0f70139c543 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 @@ -7,41 +7,88 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/types'; import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { AGENT_POLLING_THRESHOLD_MS } from '../../constants'; import { agentPolicyService } from '../agent_policy'; +import { appContextService } from '../app_context'; const MISSED_INTERVALS_BEFORE_OFFLINE = 10; const MS_BEFORE_OFFLINE = MISSED_INTERVALS_BEFORE_OFFLINE * AGENT_POLLING_THRESHOLD_MS; - +const DEFAULT_MAX_AGENT_POLICIES_WITH_INACTIVITY_TIMEOUT = 750; export type InactivityTimeouts = Awaited< ReturnType >; -const _buildInactiveClause = ( - now: number, - inactivityTimeouts: InactivityTimeouts, - field: (path: string) => string -) => { +let inactivityTimeoutsDisabled = false; +const _buildInactiveCondition = (opts: { + now: number; + inactivityTimeouts: InactivityTimeouts; + maxAgentPoliciesWithInactivityTimeout: number; + field: (path: string) => string; + logger?: Logger; +}): string | null => { + const { now, inactivityTimeouts, maxAgentPoliciesWithInactivityTimeout, field, logger } = opts; + // if there are no policies with inactivity timeouts, then no agents are inactive + if (inactivityTimeouts.length === 0) { + return null; + } + + const totalAgentPoliciesWithInactivityTimeouts = inactivityTimeouts.reduce( + (total, { policyIds }) => total + policyIds.length, + 0 + ); + + // if too many agent policies have inactivity timeouts, then we can't use the inactivity timeout + // as the query becomes too large see github.com/elastic/kibana/issues/150577 + if (totalAgentPoliciesWithInactivityTimeouts > maxAgentPoliciesWithInactivityTimeout) { + if (!inactivityTimeoutsDisabled) { + // only log this once as this function is executed a lot + logger?.warn( + `There are ${totalAgentPoliciesWithInactivityTimeouts} agent policies with an inactivity timeout set but the maximum allowed is ${maxAgentPoliciesWithInactivityTimeout}. Agents will not be marked as inactive.` + ); + inactivityTimeoutsDisabled = true; + } + return null; + } + + if (inactivityTimeoutsDisabled) { + logger?.info( + `There are ${totalAgentPoliciesWithInactivityTimeouts} agent policies which is now below the maximum allowed of ${maxAgentPoliciesWithInactivityTimeout}. Agents will now be marked as inactive again.` + ); + inactivityTimeoutsDisabled = false; + } + const policyClauses = inactivityTimeouts .map(({ inactivityTimeout, policyIds }) => { const inactivityTimeoutMs = inactivityTimeout * 1000; - const policyOrs = policyIds - .map((policyId) => `${field('policy_id')}.value == '${policyId}'`) - .join(' || '); + const policyIdMatches = `[${policyIds.map((id) => `'${id}'`).join(',')}].contains(${field( + 'policy_id' + )}.value)`; - return `(${policyOrs}) && lastCheckinMillis < ${now - inactivityTimeoutMs}L`; + return `${policyIdMatches} && lastCheckinMillis < ${now - inactivityTimeoutMs}L`; }) .join(' || '); - const agentIsInactive = policyClauses.length ? `${policyClauses}` : 'false'; // if no policies have inactivity timeouts, then no agents are inactive - - return `lastCheckinMillis > 0 && ${field('policy_id')}.size() > 0 && ${agentIsInactive}`; + return `lastCheckinMillis > 0 && ${field('policy_id')}.size() > 0 && ${policyClauses}`; }; -function _buildSource(inactivityTimeouts: InactivityTimeouts, pathPrefix?: string) { +function _buildSource( + inactivityTimeouts: InactivityTimeouts, + maxAgentPoliciesWithInactivityTimeout: number, + pathPrefix?: string, + logger?: Logger +) { const normalizedPrefix = pathPrefix ? `${pathPrefix}${pathPrefix.endsWith('.') ? '' : '.'}` : ''; const field = (path: string) => `doc['${normalizedPrefix + path}']`; const now = Date.now(); + const agentIsInactiveCondition = _buildInactiveCondition({ + now, + inactivityTimeouts, + maxAgentPoliciesWithInactivityTimeout, + field, + logger, + }); + return ` long lastCheckinMillis = ${field('last_checkin')}.size() > 0 ? ${field('last_checkin')}.value.toInstant().toEpochMilli() @@ -52,12 +99,11 @@ function _buildSource(inactivityTimeouts: InactivityTimeouts, pathPrefix?: strin ); if (${field('active')}.size() > 0 && ${field('active')}.value == false) { emit('unenrolled'); - } else if (${_buildInactiveClause(now, inactivityTimeouts, field)}) { - emit('inactive'); - } else if ( + } ${agentIsInactiveCondition ? `else if (${agentIsInactiveCondition}) {emit('inactive');}` : ''} + else if ( lastCheckinMillis > 0 && lastCheckinMillis - < (${now - MS_BEFORE_OFFLINE}L) + < ${now - MS_BEFORE_OFFLINE}L ) { emit('offline'); } else if ( @@ -83,15 +129,28 @@ function _buildSource(inactivityTimeouts: InactivityTimeouts, pathPrefix?: strin emit('degraded'); } else { emit('online'); - }`; + }`.replace(/\s{2,}/g, ' '); // replace newlines and double spaces to save characters } // exported for testing -export function _buildStatusRuntimeField( - inactivityTimeouts: InactivityTimeouts, - pathPrefix?: string -): NonNullable { - const source = _buildSource(inactivityTimeouts, pathPrefix); +export function _buildStatusRuntimeField(opts: { + inactivityTimeouts: InactivityTimeouts; + maxAgentPoliciesWithInactivityTimeout?: number; + pathPrefix?: string; + logger?: Logger; +}): NonNullable { + const { + inactivityTimeouts, + maxAgentPoliciesWithInactivityTimeout = DEFAULT_MAX_AGENT_POLICIES_WITH_INACTIVITY_TIMEOUT, + pathPrefix, + logger, + } = opts; + const source = _buildSource( + inactivityTimeouts, + maxAgentPoliciesWithInactivityTimeout, + pathPrefix, + logger + ); return { status: { type: 'keyword', @@ -111,7 +170,23 @@ export async function buildAgentStatusRuntimeField( soClient: SavedObjectsClientContract, pathPrefix?: string ) { + const config = appContextService.getConfig(); + + let logger: Logger | undefined; + try { + logger = appContextService.getLogger(); + } catch (e) { + // ignore, logger is optional + // this code can be used and tested without an app context + } + const maxAgentPoliciesWithInactivityTimeout = + config?.developer?.maxAgentPoliciesWithInactivityTimeout; const inactivityTimeouts = await agentPolicyService.getInactivityTimeouts(soClient); - return _buildStatusRuntimeField(inactivityTimeouts, pathPrefix); + return _buildStatusRuntimeField({ + inactivityTimeouts, + maxAgentPoliciesWithInactivityTimeout, + pathPrefix, + logger, + }); } diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts index 30c56b53640a..3ef1a269d8e6 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts @@ -16,14 +16,11 @@ import { updateAgentTags } from './update_agent_tags'; import { UpdateAgentTagsActionRunner, updateTagsBatch } from './update_agent_tags_action_runner'; jest.mock('../app_context', () => { + const { loggerMock } = jest.requireActual('@kbn/logging-mocks'); return { appContextService: { - getLogger: jest.fn().mockReturnValue({ - debug: jest.fn(), - warn: jest.fn(), - info: jest.fn(), - error: jest.fn(), - } as any), + getLogger: () => loggerMock.create(), + getConfig: () => {}, }, }; }); diff --git a/x-pack/test/fleet_api_integration/apis/agents/status.ts b/x-pack/test/fleet_api_integration/apis/agents/status.ts index b11087127550..89a3a67bbf3f 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/status.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/status.ts @@ -257,5 +257,54 @@ export default function ({ getService }: FtrProviderContext) { statusCode: 403, }); }); + + it('should not perform inactivity check if there are too many agent policies with inactivity timeout', async () => { + // the test server is started with --xpack.fleet.developer.maxAgentPoliciesWithInactivityTimeout=10 + // so we create 11 policies with inactivity timeout then no agents should turn inactive + + const policiesToAdd = new Array(11).fill(0).map((_, i) => `policy-inactivity-timeout-${i}`); + + await Promise.all( + policiesToAdd.map((policyId) => + es.create({ + id: 'ingest-agent-policies:' + policyId, + index: '.kibana', + refresh: 'wait_for', + document: { + type: 'ingest-agent-policies', + 'ingest-agent-policies': { + name: policyId, + namespace: 'default', + description: 'Policy with inactivity timeout', + status: 'active', + is_default: true, + monitoring_enabled: ['logs', 'metrics'], + revision: 2, + updated_at: '2020-05-07T19:34:42.533Z', + updated_by: 'system', + inactivity_timeout: 60, + }, + migrationVersion: { + 'ingest-agent-policies': '7.10.0', + }, + }, + }) + ) + ); + const { body: apiResponse } = await supertest.get(`/api/fleet/agent_status`).expect(200); + expect(apiResponse).to.eql({ + results: { + events: 0, + other: 0, + total: 10, + online: 3, + error: 2, + offline: 1, + updating: 4, + inactive: 0, + unenrolled: 1, + }, + }); + }); }); } diff --git a/x-pack/test/fleet_api_integration/config.ts b/x-pack/test/fleet_api_integration/config.ts index ed7c90f96bc3..77c3860ba0fa 100644 --- a/x-pack/test/fleet_api_integration/config.ts +++ b/x-pack/test/fleet_api_integration/config.ts @@ -69,6 +69,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...(registryPort ? [`--xpack.fleet.registryUrl=http://localhost:${registryPort}`] : []), `--xpack.fleet.developer.bundledPackageLocation=${BUNDLED_PACKAGE_DIR}`, '--xpack.cloudSecurityPosture.enabled=true', + `--xpack.fleet.developer.maxAgentPoliciesWithInactivityTimeout=10`, `--xpack.fleet.packageVerification.gpgKeyPath=${getFullPath( './apis/fixtures/package_verification/signatures/fleet_test_key_public.asc' )}`, From 01b11cff6ab744d9403ba97e7f259d04162979ba Mon Sep 17 00:00:00 2001 From: James Gowdy Date: Tue, 14 Feb 2023 14:06:22 +0000 Subject: [PATCH 31/31] [ML] trained_models_spaces api tests (#151026) Adding api tests for `/api/ml/saved_objects/trained_models_spaces` Related to https://github.com/elastic/kibana/issues/147170 --- .../{jobs_spaces.ts => get_jobs_spaces.ts} | 0 .../saved_objects/get_trained_model_spaces.ts | 83 +++++++++++++++++++ .../apis/ml/saved_objects/index.ts | 3 +- 3 files changed, 85 insertions(+), 1 deletion(-) rename x-pack/test/api_integration/apis/ml/saved_objects/{jobs_spaces.ts => get_jobs_spaces.ts} (100%) create mode 100644 x-pack/test/api_integration/apis/ml/saved_objects/get_trained_model_spaces.ts diff --git a/x-pack/test/api_integration/apis/ml/saved_objects/jobs_spaces.ts b/x-pack/test/api_integration/apis/ml/saved_objects/get_jobs_spaces.ts similarity index 100% rename from x-pack/test/api_integration/apis/ml/saved_objects/jobs_spaces.ts rename to x-pack/test/api_integration/apis/ml/saved_objects/get_jobs_spaces.ts diff --git a/x-pack/test/api_integration/apis/ml/saved_objects/get_trained_model_spaces.ts b/x-pack/test/api_integration/apis/ml/saved_objects/get_trained_model_spaces.ts new file mode 100644 index 000000000000..7f18b518d063 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/saved_objects/get_trained_model_spaces.ts @@ -0,0 +1,83 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { COMMON_REQUEST_HEADERS } from '../../../../functional/services/ml/common_api'; + +export default ({ getService }: FtrProviderContext) => { + const ml = getService('ml'); + const spacesService = getService('spaces'); + const supertest = getService('supertestWithoutAuth'); + + const trainedModelIdSpace1 = 'trained_model_single_space1'; + const trainedModelIdSpace2 = 'trained_model_single_space2'; + const idSpace1 = 'space1'; + const idSpace2 = 'space2'; + const langIdent = 'lang_ident_model_1'; + + async function runRequest(expectedStatusCode: number, user: USER) { + const { body, status } = await supertest + .get(`/api/ml/saved_objects/trained_models_spaces`) + .auth(user, ml.securityCommon.getPasswordForUser(user)) + .set(COMMON_REQUEST_HEADERS); + + ml.api.assertResponseStatusCode(expectedStatusCode, status, body); + + return body; + } + + describe('GET saved_objects/trained_models_spaces', () => { + before(async () => { + await ml.testResources.setKibanaTimeZoneToUTC(); + + await spacesService.create({ id: idSpace1, name: 'space_one', disabledFeatures: [] }); + await spacesService.create({ id: idSpace2, name: 'space_two', disabledFeatures: [] }); + + const trainedModelConfig1 = ml.api.createTestTrainedModelConfig( + trainedModelIdSpace1, + 'regression' + ); + await ml.api.createTrainedModel(trainedModelIdSpace1, trainedModelConfig1.body, idSpace1); + + const trainedModelConfig2 = ml.api.createTestTrainedModelConfig( + trainedModelIdSpace2, + 'regression' + ); + await ml.api.createTrainedModel(trainedModelIdSpace2, trainedModelConfig2.body, idSpace2); + }); + + after(async () => { + await spacesService.delete(idSpace1); + await spacesService.delete(idSpace2); + await ml.api.cleanMlIndices(); + await ml.testResources.cleanMLSavedObjects(); + }); + + it('should list all trained models for user with access to all spaces', async () => { + const body = await runRequest(200, USER.ML_VIEWER_ALL_SPACES); + + expect(body).to.have.property('trainedModels'); + expect(body.trainedModels).to.eql({ + [langIdent]: ['*'], + [trainedModelIdSpace1]: [idSpace1], + [trainedModelIdSpace2]: [idSpace2], + }); + }); + + it('should only list trained models for the space the user has access to', async () => { + const body = await runRequest(200, USER.ML_VIEWER_SPACE1); + + expect(body).to.have.property('trainedModels'); + expect(body.trainedModels).to.eql({ + [langIdent]: ['*'], + [trainedModelIdSpace1]: [idSpace1], + }); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/ml/saved_objects/index.ts b/x-pack/test/api_integration/apis/ml/saved_objects/index.ts index 32c83cb62416..b4b8e1d0653f 100644 --- a/x-pack/test/api_integration/apis/ml/saved_objects/index.ts +++ b/x-pack/test/api_integration/apis/ml/saved_objects/index.ts @@ -9,9 +9,10 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('saved objects', function () { - loadTestFile(require.resolve('./jobs_spaces')); + loadTestFile(require.resolve('./get_jobs_spaces')); loadTestFile(require.resolve('./can_delete_job')); loadTestFile(require.resolve('./can_delete_trained_model')); + loadTestFile(require.resolve('./get_trained_model_spaces')); loadTestFile(require.resolve('./initialize_jobs')); loadTestFile(require.resolve('./initialize_trained_models')); loadTestFile(require.resolve('./status'));