From d7ad3f992a2e0a49ced8a1c0460886efa90dd384 Mon Sep 17 00:00:00 2001
From: Jon
Date: Fri, 7 Jun 2024 14:35:34 -0500
Subject: [PATCH 01/23] [ci] Remove defend workflows from on-merge-unsupported
(#185047)
This is already in the on-merge pipeline.
---
.../pipelines/on_merge_unsupported_ftrs.yml | 36 -------------------
1 file changed, 36 deletions(-)
diff --git a/.buildkite/pipelines/on_merge_unsupported_ftrs.yml b/.buildkite/pipelines/on_merge_unsupported_ftrs.yml
index 24fc59fdbe26..c7ac27e032bd 100644
--- a/.buildkite/pipelines/on_merge_unsupported_ftrs.yml
+++ b/.buildkite/pipelines/on_merge_unsupported_ftrs.yml
@@ -80,39 +80,3 @@ steps:
limit: 3
- exit_status: '*'
limit: 1
-
- - command: .buildkite/scripts/steps/functional/defend_workflows.sh
- label: 'Defend Workflows Cypress Tests'
- agents:
- image: family/kibana-ubuntu-2004
- imageProject: elastic-images-prod
- provider: gcp
- enableNestedVirtualization: true
- localSsdInterface: nvme
- localSsds: 1
- machineType: n2-standard-4
- depends_on: build
- timeout_in_minutes: 60
- parallelism: 20
- retry:
- automatic:
- - exit_status: '-1'
- limit: 1
-
- - command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh
- label: 'Defend Workflows Cypress Tests on Serverless'
- agents:
- image: family/kibana-ubuntu-2004
- imageProject: elastic-images-prod
- provider: gcp
- enableNestedVirtualization: true
- localSsdInterface: nvme
- localSsds: 1
- machineType: n2-standard-4
- depends_on: build
- timeout_in_minutes: 60
- parallelism: 14
- retry:
- automatic:
- - exit_status: '-1'
- limit: 1
From 18b48f80ac697a48d5f096e9807d505b815e0c04 Mon Sep 17 00:00:00 2001
From: Ahmad Bamieh
Date: Fri, 7 Jun 2024 22:44:37 +0300
Subject: [PATCH 02/23] [Storybook][i18n] initialize i18n with english locale
(#185033)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
We added a check to ensure that `i18n` is initialized on the browser
before any javascript code uses `i18n`. We need to do the same in the
storybook so it works properly.
To summarize in a couple of pictures 😄
**Before PR:**
![image](https://github.com/elastic/kibana/assets/6191849/3a598dd9-963d-4f4a-aa2a-d98a3d7f379a)
**After PR:**
![image](https://github.com/elastic/kibana/assets/6191849/e0f0b4a7-69f4-4eb1-b5b6-14bdfa716caf)
cc @petrklapka
---
packages/kbn-storybook/src/lib/decorators.tsx | 7 +++++--
packages/kbn-storybook/tsconfig.json | 1 +
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/packages/kbn-storybook/src/lib/decorators.tsx b/packages/kbn-storybook/src/lib/decorators.tsx
index 8693d55faac6..ff10c78fe458 100644
--- a/packages/kbn-storybook/src/lib/decorators.tsx
+++ b/packages/kbn-storybook/src/lib/decorators.tsx
@@ -18,10 +18,11 @@ import { CoreTheme } from '@kbn/core-theme-browser';
import { I18nStart } from '@kbn/core-i18n-browser';
import type { AnalyticsServiceStart } from '@kbn/core-analytics-browser';
import { KibanaRootContextProvider } from '@kbn/react-kibana-context-root';
+import { i18n } from '@kbn/i18n';
const theme$ = new BehaviorSubject({ darkMode: false });
-const i18n: I18nStart = {
+const i18nStart: I18nStart = {
Context: ({ children }) => {children},
};
@@ -36,6 +37,8 @@ const analytics: AnalyticsServiceStart = {
* `globals` provided by the Storybook theme switcher to set the `colorMode`.
*/
const KibanaContextDecorator: DecoratorFn = (storyFn, { globals }) => {
+ // TODO: Add a switcher to see components in other locales or pseudo locale
+ i18n.init({ locale: 'en', messages: {} });
const colorMode = globals.euiTheme === 'v8.dark' ? 'dark' : 'light';
useEffect(() => {
@@ -43,7 +46,7 @@ const KibanaContextDecorator: DecoratorFn = (storyFn, { globals }) => {
}, [colorMode]);
return (
-
+
{storyFn()}
);
diff --git a/packages/kbn-storybook/tsconfig.json b/packages/kbn-storybook/tsconfig.json
index 97d423551115..ab513c1d02c0 100644
--- a/packages/kbn-storybook/tsconfig.json
+++ b/packages/kbn-storybook/tsconfig.json
@@ -17,6 +17,7 @@
"@kbn/repo-info",
"@kbn/dev-cli-runner",
"@kbn/core-theme-browser",
+ "@kbn/i18n",
"@kbn/i18n-react",
"@kbn/core-i18n-browser",
"@kbn/react-kibana-context-root",
From 641f3a23d58fe27b92175fd476c4769cc07f5e87 Mon Sep 17 00:00:00 2001
From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Date: Sat, 8 Jun 2024 06:13:16 +1000
Subject: [PATCH 03/23] skip failing test suite (#185024)
---
.../e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts
index 5fa97ed2f90f..518980c29c90 100644
--- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts
+++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts
@@ -35,7 +35,8 @@ import { deleteRiskEngineConfiguration } from '../../../tasks/api_calls/risk_eng
const spaceId = 'default';
-describe('Upgrade risk scores', { tags: ['@ess'] }, () => {
+// Failing: See https://github.com/elastic/kibana/issues/185024
+describe.skip('Upgrade risk scores', { tags: ['@ess'] }, () => {
beforeEach(() => {
login();
deleteRiskEngineConfiguration();
From 0be47ca8130abec9b52c9a594ffd231b96fbd20a Mon Sep 17 00:00:00 2001
From: Ahmad Bamieh
Date: Fri, 7 Jun 2024 23:19:46 +0300
Subject: [PATCH 04/23] [i18n] Fix broken i18n messages (#185011)
---
.../src/ui/app_container.tsx | 2 +-
.../src/legacy_status.ts | 8 +-
.../ai_assistant_selection_page.tsx | 4 +-
.../editor/legacy/console_editor/editor.tsx | 4 +-
.../editor/monaco/monaco_editor.tsx | 4 +-
.../lib/time_buckets/calc_auto_interval.ts | 168 +++++-------------
.../buckets/lib/time_buckets/i18n_messages.ts | 54 ++++++
.../components/data_table_selector.tsx | 2 +-
src/plugins/data/server/ui_settings.ts | 2 +-
.../common/data_views/data_views.ts | 22 +--
.../server/deprecations/scripted_fields.ts | 1 +
.../instructions/heartbeat_instructions.ts | 2 +-
.../instructions/metricbeat_instructions.ts | 2 +-
.../flyout/hooks/use_download_runtime.ts | 2 +-
.../components/i18n.ts | 2 +-
.../result_settings_table/column_headers.tsx | 1 +
.../single_page_layout/hooks/form.tsx | 2 +-
.../advanced_step/advanced_step_form.tsx | 1 +
.../alerting/inventory/components/metric.tsx | 1 +
.../index_setup_dataset_filter.tsx | 2 +-
.../sections/anomalies/table.tsx | 4 +-
.../components/settings_tab/settings_tab.tsx | 1 +
.../security/server/config_deprecations.ts | 2 +
.../control_columns/translations.ts | 2 +-
.../rule_types/threshold/visualization.tsx | 1 -
.../translations/translations/fr-FR.json | 4 +-
.../translations/translations/ja-JP.json | 4 +-
.../translations/translations/zh-CN.json | 4 +-
.../test_connector_form.tsx | 1 -
.../server/lib/es_deprecations_status.ts | 2 +
30 files changed, 142 insertions(+), 169 deletions(-)
create mode 100644 src/plugins/data/common/search/aggs/buckets/lib/time_buckets/i18n_messages.ts
diff --git a/packages/core/application/core-application-browser-internal/src/ui/app_container.tsx b/packages/core/application/core-application-browser-internal/src/ui/app_container.tsx
index a6b85e017e24..0bb763ed9d57 100644
--- a/packages/core/application/core-application-browser-internal/src/ui/app_container.tsx
+++ b/packages/core/application/core-application-browser-internal/src/ui/app_container.tsx
@@ -134,7 +134,7 @@ const AppLoadingPlaceholder: FC<{ showPlainSpinner: boolean }> = ({ showPlainSpi
size={'xxl'}
className="appContainer__loading"
data-test-subj="appContainer-loadingSpinner"
- aria-label={i18n.translate('core.application.appContainer.loadingAriaLabel', {
+ aria-label={i18n.translate('core.application.appContainer.plainSpinner.loadingAriaLabel', {
defaultMessage: 'Loading application',
})}
/>
diff --git a/packages/core/status/core-status-server-internal/src/legacy_status.ts b/packages/core/status/core-status-server-internal/src/legacy_status.ts
index f154374d5470..ac692b2b4876 100644
--- a/packages/core/status/core-status-server-internal/src/legacy_status.ts
+++ b/packages/core/status/core-status-server-internal/src/legacy_status.ts
@@ -106,7 +106,7 @@ const STATUS_LEVEL_LEGACY_ATTRS = deepFreeze>({
[ServiceStatusLevels.critical.toString()]: {
id: 'red',
state: 'red',
- title: i18n.translate('core.status.redTitle', {
+ title: i18n.translate('core.status.critical.redTitle', {
defaultMessage: 'Red',
}),
icon: 'danger',
@@ -116,7 +116,7 @@ const STATUS_LEVEL_LEGACY_ATTRS = deepFreeze>({
[ServiceStatusLevels.unavailable.toString()]: {
id: 'red',
state: 'red',
- title: i18n.translate('core.status.redTitle', {
+ title: i18n.translate('core.status.unavailable.redTitle', {
defaultMessage: 'Red',
}),
icon: 'danger',
@@ -126,7 +126,7 @@ const STATUS_LEVEL_LEGACY_ATTRS = deepFreeze>({
[ServiceStatusLevels.degraded.toString()]: {
id: 'yellow',
state: 'yellow',
- title: i18n.translate('core.status.yellowTitle', {
+ title: i18n.translate('core.status.degraded.yellowTitle', {
defaultMessage: 'Yellow',
}),
icon: 'warning',
@@ -136,7 +136,7 @@ const STATUS_LEVEL_LEGACY_ATTRS = deepFreeze>({
[ServiceStatusLevels.available.toString()]: {
id: 'green',
state: 'green',
- title: i18n.translate('core.status.greenTitle', {
+ title: i18n.translate('core.status.available.greenTitle', {
defaultMessage: 'Green',
}),
icon: 'success',
diff --git a/src/plugins/ai_assistant_management/selection/public/routes/components/ai_assistant_selection_page.tsx b/src/plugins/ai_assistant_management/selection/public/routes/components/ai_assistant_selection_page.tsx
index 62687625db86..41422212fa08 100644
--- a/src/plugins/ai_assistant_management/selection/public/routes/components/ai_assistant_selection_page.tsx
+++ b/src/plugins/ai_assistant_management/selection/public/routes/components/ai_assistant_selection_page.tsx
@@ -75,7 +75,7 @@ export function AiAssistantSelectionPage() {
Features.',
@@ -124,7 +124,7 @@ export function AiAssistantSelectionPage() {
Features.',
diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx
index abdd7c5a5ab9..d7cc6073b566 100644
--- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx
+++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/editor.tsx
@@ -289,7 +289,7 @@ function EditorUI({ initialTextValue, setEditorInstance }: EditorProps) {
>
@@ -297,7 +297,7 @@ function EditorUI({ initialTextValue, setEditorInstance }: EditorProps) {
color="primary"
onClick={sendCurrentRequest}
data-test-subj="sendRequestButton"
- aria-label={i18n.translate('console.sendRequestButtonTooltip', {
+ aria-label={i18n.translate('console.sendRequestButtonTooltipAriaLabel', {
defaultMessage: 'Click to send request',
})}
>
diff --git a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx
index b54e6fa900b6..bc9d6cf2ee3c 100644
--- a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx
+++ b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx
@@ -125,7 +125,7 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => {
>
@@ -133,7 +133,7 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => {
color="primary"
onClick={sendRequestsCallback}
data-test-subj="sendRequestButton"
- aria-label={i18n.translate('console.sendRequestButtonTooltip', {
+ aria-label={i18n.translate('console.sendRequestButtonTooltipAriaLabel', {
defaultMessage: 'Click to send request',
})}
>
diff --git a/src/plugins/data/common/search/aggs/buckets/lib/time_buckets/calc_auto_interval.ts b/src/plugins/data/common/search/aggs/buckets/lib/time_buckets/calc_auto_interval.ts
index 9332315f57cd..ca8881cba5f9 100644
--- a/src/plugins/data/common/search/aggs/buckets/lib/time_buckets/calc_auto_interval.ts
+++ b/src/plugins/data/common/search/aggs/buckets/lib/time_buckets/calc_auto_interval.ts
@@ -6,197 +6,115 @@
* Side Public License, v 1.
*/
-import { i18n } from '@kbn/i18n';
import moment from 'moment';
+import {
+ dayLabel,
+ hourLabel,
+ yearLabel,
+ minuteLabel,
+ secondLabel,
+ millisecondLabel,
+ infinityLabel,
+ monthLabel,
+} from './i18n_messages';
+
export const boundsDescendingRaw = [
{
bound: Infinity,
interval: moment.duration(1, 'year'),
- boundLabel: i18n.translate('data.search.timeBuckets.infinityLabel', {
- defaultMessage: 'More than a year',
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.yearLabel', {
- defaultMessage: 'a year',
- }),
+ boundLabel: infinityLabel(),
+ intervalLabel: yearLabel(),
},
{
bound: moment.duration(1, 'year'),
interval: moment.duration(1, 'month'),
- boundLabel: i18n.translate('data.search.timeBuckets.yearLabel', {
- defaultMessage: 'a year',
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.monthLabel', {
- defaultMessage: 'a month',
- }),
+ boundLabel: yearLabel(),
+ intervalLabel: monthLabel(),
},
{
bound: moment.duration(3, 'week'),
interval: moment.duration(1, 'week'),
- boundLabel: i18n.translate('data.search.timeBuckets.dayLabel', {
- defaultMessage: '{amount, plural, one {a day} other {# days}}',
- values: { amount: 21 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.dayLabel', {
- defaultMessage: '{amount, plural, one {a day} other {# days}}',
- values: { amount: 7 },
- }),
+ boundLabel: dayLabel(21),
+ intervalLabel: dayLabel(7),
},
{
bound: moment.duration(1, 'week'),
interval: moment.duration(1, 'd'),
- boundLabel: i18n.translate('data.search.timeBuckets.dayLabel', {
- defaultMessage: '{amount, plural, one {a day} other {# days}}',
- values: { amount: 7 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.dayLabel', {
- defaultMessage: '{amount, plural, one {a day} other {# days}}',
- values: { amount: 1 },
- }),
+ boundLabel: dayLabel(7),
+ intervalLabel: dayLabel(1),
},
{
bound: moment.duration(24, 'hour'),
interval: moment.duration(12, 'hour'),
- boundLabel: i18n.translate('data.search.timeBuckets.dayLabel', {
- defaultMessage: '{amount, plural, one {a day} other {# days}}',
- values: { amount: 1 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.hourLabel', {
- defaultMessage: '{amount, plural, one {an hour} other {# hours}}',
- values: { amount: 12 },
- }),
+ boundLabel: dayLabel(1),
+ intervalLabel: hourLabel(12),
},
{
bound: moment.duration(6, 'hour'),
interval: moment.duration(3, 'hour'),
- boundLabel: i18n.translate('data.search.timeBuckets.hourLabel', {
- defaultMessage: '{amount, plural, one {an hour} other {# hours}}',
- values: { amount: 6 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.hourLabel', {
- defaultMessage: '{amount, plural, one {an hour} other {# hours}}',
- values: { amount: 3 },
- }),
+ boundLabel: hourLabel(6),
+ intervalLabel: hourLabel(3),
},
{
bound: moment.duration(2, 'hour'),
interval: moment.duration(1, 'hour'),
- boundLabel: i18n.translate('data.search.timeBuckets.hourLabel', {
- defaultMessage: '{amount, plural, one {an hour} other {# hours}}',
- values: { amount: 2 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.hourLabel', {
- defaultMessage: '{amount, plural, one {an hour} other {# hours}}',
- values: { amount: 1 },
- }),
+ boundLabel: hourLabel(2),
+ intervalLabel: hourLabel(1),
},
{
bound: moment.duration(45, 'minute'),
interval: moment.duration(30, 'minute'),
- boundLabel: i18n.translate('data.search.timeBuckets.minuteLabel', {
- defaultMessage: '{amount, plural, one {a minute} other {# minutes}}',
- values: { amount: 45 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.minuteLabel', {
- defaultMessage: '{amount, plural, one {a minute} other {# minutes}}',
- values: { amount: 30 },
- }),
+ boundLabel: minuteLabel(45),
+ intervalLabel: minuteLabel(30),
},
{
bound: moment.duration(20, 'minute'),
interval: moment.duration(10, 'minute'),
- boundLabel: i18n.translate('data.search.timeBuckets.minuteLabel', {
- defaultMessage: '{amount, plural, one {a minute} other {# minutes}}',
- values: { amount: 20 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.minuteLabel', {
- defaultMessage: '{amount, plural, one {a minute} other {# minutes}}',
- values: { amount: 10 },
- }),
+ boundLabel: minuteLabel(20),
+ intervalLabel: minuteLabel(10),
},
{
bound: moment.duration(9, 'minute'),
interval: moment.duration(5, 'minute'),
- boundLabel: i18n.translate('data.search.timeBuckets.minuteLabel', {
- defaultMessage: '{amount, plural, one {a minute} other {# minutes}}',
- values: { amount: 9 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.minuteLabel', {
- defaultMessage: '{amount, plural, one {a minute} other {# minutes}}',
- values: { amount: 5 },
- }),
+ boundLabel: minuteLabel(9),
+ intervalLabel: minuteLabel(5),
},
{
bound: moment.duration(3, 'minute'),
interval: moment.duration(1, 'minute'),
- boundLabel: i18n.translate('data.search.timeBuckets.minuteLabel', {
- defaultMessage: '{amount, plural, one {a minute} other {# minutes}}',
- values: { amount: 3 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.minuteLabel', {
- defaultMessage: '{amount, plural, one {a minute} other {# minutes}}',
- values: { amount: 1 },
- }),
+ boundLabel: minuteLabel(3),
+ intervalLabel: minuteLabel(1),
},
{
bound: moment.duration(45, 'second'),
interval: moment.duration(30, 'second'),
- boundLabel: i18n.translate('data.search.timeBuckets.secondLabel', {
- defaultMessage: '{amount, plural, one {a second} other {# seconds}}',
- values: { amount: 45 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.secondLabel', {
- defaultMessage: '{amount, plural, one {a second} other {# seconds}}',
- values: { amount: 30 },
- }),
+ boundLabel: secondLabel(45),
+ intervalLabel: secondLabel(30),
},
{
bound: moment.duration(15, 'second'),
interval: moment.duration(10, 'second'),
- boundLabel: i18n.translate('data.search.timeBuckets.secondLabel', {
- defaultMessage: '{amount, plural, one {a second} other {# seconds}}',
- values: { amount: 15 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.secondLabel', {
- defaultMessage: '{amount, plural, one {a second} other {# seconds}}',
- values: { amount: 10 },
- }),
+ boundLabel: secondLabel(15),
+ intervalLabel: secondLabel(10),
},
{
bound: moment.duration(7.5, 'second'),
interval: moment.duration(5, 'second'),
- boundLabel: i18n.translate('data.search.timeBuckets.secondLabel', {
- defaultMessage: '{amount, plural, one {a second} other {# seconds}}',
- values: { amount: 7.5 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.secondLabel', {
- defaultMessage: '{amount, plural, one {a second} other {# seconds}}',
- values: { amount: 5 },
- }),
+ boundLabel: secondLabel(7.5),
+ intervalLabel: secondLabel(5),
},
{
bound: moment.duration(5, 'second'),
interval: moment.duration(1, 'second'),
- boundLabel: i18n.translate('data.search.timeBuckets.secondLabel', {
- defaultMessage: '{amount, plural, one {a second} other {# seconds}}',
- values: { amount: 5 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.secondLabel', {
- defaultMessage: '{amount, plural, one {a second} other {# seconds}}',
- values: { amount: 1 },
- }),
+ boundLabel: secondLabel(5),
+ intervalLabel: secondLabel(1),
},
{
bound: moment.duration(500, 'ms'),
interval: moment.duration(100, 'ms'),
- boundLabel: i18n.translate('data.search.timeBuckets.millisecondLabel', {
- defaultMessage: '{amount, plural, one {a millisecond} other {# milliseconds}}',
- values: { amount: 500 },
- }),
- intervalLabel: i18n.translate('data.search.timeBuckets.millisecondLabel', {
- defaultMessage: '{amount, plural, one {a millisecond} other {# milliseconds}}',
- values: { amount: 100 },
- }),
+ boundLabel: millisecondLabel(500),
+ intervalLabel: millisecondLabel(100),
},
];
diff --git a/src/plugins/data/common/search/aggs/buckets/lib/time_buckets/i18n_messages.ts b/src/plugins/data/common/search/aggs/buckets/lib/time_buckets/i18n_messages.ts
new file mode 100644
index 000000000000..56cfdc920317
--- /dev/null
+++ b/src/plugins/data/common/search/aggs/buckets/lib/time_buckets/i18n_messages.ts
@@ -0,0 +1,54 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { i18n } from '@kbn/i18n';
+
+export const dayLabel = (amount: number) =>
+ i18n.translate('data.search.timeBuckets.dayLabel', {
+ defaultMessage: '{amount, plural, one {a day} other {# days}}',
+ values: { amount },
+ });
+
+export const hourLabel = (amount: number) =>
+ i18n.translate('data.search.timeBuckets.hourLabel', {
+ defaultMessage: '{amount, plural, one {an hour} other {# hours}}',
+ values: { amount },
+ });
+
+export const yearLabel = () =>
+ i18n.translate('data.search.timeBuckets.yearLabel', {
+ defaultMessage: 'a year',
+ });
+
+export const minuteLabel = (amount: number) =>
+ i18n.translate('data.search.timeBuckets.minuteLabel', {
+ defaultMessage: '{amount, plural, one {a minute} other {# minutes}}',
+ values: { amount },
+ });
+
+export const secondLabel = (amount: number) =>
+ i18n.translate('data.search.timeBuckets.secondLabel', {
+ defaultMessage: '{amount, plural, one {a second} other {# seconds}}',
+ values: { amount },
+ });
+
+export const millisecondLabel = (amount: number) =>
+ i18n.translate('data.search.timeBuckets.millisecondLabel', {
+ defaultMessage: '{amount, plural, one {a millisecond} other {# milliseconds}}',
+ values: { amount },
+ });
+
+export const infinityLabel = () =>
+ i18n.translate('data.search.timeBuckets.infinityLabel', {
+ defaultMessage: 'More than a year',
+ });
+
+export const monthLabel = () =>
+ i18n.translate('data.search.timeBuckets.monthLabel', {
+ defaultMessage: 'a month',
+ });
diff --git a/src/plugins/data/public/utils/table_inspector_view/components/data_table_selector.tsx b/src/plugins/data/public/utils/table_inspector_view/components/data_table_selector.tsx
index faea07d402f1..0ecbe9e7fabd 100644
--- a/src/plugins/data/public/utils/table_inspector_view/components/data_table_selector.tsx
+++ b/src/plugins/data/public/utils/table_inspector_view/components/data_table_selector.tsx
@@ -96,7 +96,7 @@ export class TableSelector extends Component
diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts
index 7c314d66c190..1a850152e2d3 100644
--- a/src/plugins/data/server/ui_settings.ts
+++ b/src/plugins/data/server/ui_settings.ts
@@ -204,7 +204,7 @@ export function getUiSettings(
{sessionId}: restricts operations to execute all search requests on the same shards.
This has the benefit of reusing shard caches across requests.
{custom}: allows you to define a your own preference.
- Use \''courier:customRequestPreference\'' to customize your preference value.
+ Use courier:customRequestPreference to customize your preference value.
{none}: means do not set a preference.
This might provide better performance because requests can be spread across all shard copies.
However, results might be inconsistent because different shards might be in different refresh states.
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 adce2a007994..182429de37ef 100644
--- a/src/plugins/data_views/common/data_views/data_views.ts
+++ b/src/plugins/data_views/common/data_views/data_views.ts
@@ -39,6 +39,12 @@ import { DuplicateDataViewError, DataViewInsufficientAccessError } from '../erro
const MAX_ATTEMPTS_TO_RESOLVE_CONFLICTS = 3;
+const createFetchFieldErrorTitle = ({ id, title }: { id?: string; title?: string }) =>
+ i18n.translate('dataViews.fetchFieldErrorTitle', {
+ defaultMessage: 'Error fetching fields for data view {title} (ID: {id})',
+ values: { id, title },
+ });
+
/*
* Attributes of the data view saved object
* @public
@@ -661,9 +667,9 @@ export class DataViewsService {
this.onError(
err,
{
- title: i18n.translate('dataViews.fetchFieldErrorTitle', {
- defaultMessage: 'Error fetching fields for data view {title} (ID: {id})',
- values: { id: dataView.id, title: dataView.getIndexPattern() },
+ title: createFetchFieldErrorTitle({
+ id: dataView.id,
+ title: dataView.getIndexPattern(),
}),
},
dataView.getIndexPattern()
@@ -722,10 +728,7 @@ export class DataViewsService {
this.onError(
err,
{
- title: i18n.translate('dataViews.fetchFieldErrorTitle', {
- defaultMessage: 'Error fetching fields for data view {title} (ID: {id})',
- values: { id, title },
- }),
+ title: createFetchFieldErrorTitle({ id, title }),
},
title
);
@@ -884,10 +887,7 @@ export class DataViewsService {
this.onError(
err,
{
- title: i18n.translate('dataViews.fetchFieldErrorTitle', {
- defaultMessage: 'Error fetching fields for data view {title} (ID: {id})',
- values: { id: savedObject.id, title: spec.title },
- }),
+ title: createFetchFieldErrorTitle({ id: savedObject.id, title: spec.title }),
},
spec.title || ''
);
diff --git a/src/plugins/data_views/server/deprecations/scripted_fields.ts b/src/plugins/data_views/server/deprecations/scripted_fields.ts
index 198a44ed4555..934bb71c8587 100644
--- a/src/plugins/data_views/server/deprecations/scripted_fields.ts
+++ b/src/plugins/data_views/server/deprecations/scripted_fields.ts
@@ -66,6 +66,7 @@ export const createScriptedFieldsDeprecationsConfig: (
allTitles: indexPatternTitles.join('; '),
numberOfIndexPatternsWithScriptedFields: indexPatternsWithScriptedFields.length,
},
+ ignoreTag: true,
}),
],
},
diff --git a/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts
index 1fbea1ddf58a..c1ada0fd8d4c 100644
--- a/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts
+++ b/src/plugins/home/server/tutorials/instructions/heartbeat_instructions.ts
@@ -71,7 +71,7 @@ export const createHeartbeatInstructions = (context: TutorialContext) => {
'sudo rpm -vi heartbeat-{config.kibana.version}-x86_64.rpm',
],
textPost: i18n.translate(
- 'home.tutorials.common.heartbeatInstructions.install.debTextPost',
+ 'home.tutorials.common.heartbeatInstructions.install.rpmTextPost',
{
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).',
values: { link: 'https://www.elastic.co/downloads/beats/heartbeat' },
diff --git a/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts b/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts
index fc83af906210..859015613e65 100644
--- a/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts
+++ b/src/plugins/home/server/tutorials/instructions/metricbeat_instructions.ts
@@ -82,7 +82,7 @@ export const createMetricbeatInstructions = memoize(
'sudo rpm -vi metricbeat-{config.kibana.version}-x86_64.rpm',
],
textPost: i18n.translate(
- 'home.tutorials.common.metricbeatInstructions.install.debTextPost',
+ 'home.tutorials.common.metricbeatInstructions.install.rpmTextPost',
{
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).',
values: { link: 'https://www.elastic.co/downloads/beats/metricbeat' },
diff --git a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/hooks/use_download_runtime.ts b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/hooks/use_download_runtime.ts
index cb158fd3958c..cd1635d65a57 100644
--- a/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/hooks/use_download_runtime.ts
+++ b/x-pack/plugins/canvas/public/components/workpad_header/share_menu/flyout/hooks/use_download_runtime.ts
@@ -26,7 +26,7 @@ const strings = {
getShareableZipErrorTitle: (workpadName: string) =>
i18n.translate('xpack.canvas.workpadHeaderShareMenu.shareWebsiteErrorTitle', {
defaultMessage:
- "Failed to create {ZIP} file for '{workpadName}'. The workpad may be too large. You'll need to download the files separately.",
+ "Failed to create {ZIP} file for ''{workpadName}''. The workpad may be too large. You'll need to download the files separately.",
values: {
ZIP,
workpadName,
diff --git a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/i18n.ts b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/i18n.ts
index 01b3fb0d93be..bbcb7f5b2c6b 100644
--- a/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/i18n.ts
+++ b/x-pack/plugins/dashboard_enhanced/public/services/drilldowns/abstract_dashboard_drilldown/components/i18n.ts
@@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n';
export const txtDestinationDashboardNotFound = (dashboardId?: string) =>
i18n.translate('xpack.dashboard.drilldown.errorDestinationDashboardIsMissing', {
defaultMessage:
- "Destination dashboard ('{dashboardId}') no longer exists. Choose another dashboard.",
+ "Destination dashboard (''{dashboardId}'') no longer exists. Choose another dashboard.",
values: {
dashboardId,
},
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/column_headers.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/column_headers.tsx
index b36d71a49de1..8bc4da27dcbb 100644
--- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/column_headers.tsx
+++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_table/column_headers.tsx
@@ -43,6 +43,7 @@ export const ColumnHeaders: React.FC = () => {
{
defaultMessage:
'A snippet is an escaped representaiton of a field value. Query matches are encapsulated in tags for highlighting. Fallback will look for a snippet match, but fallback to an escaped raw value if none is found. Range is between 20-1000. Defaults to 100.',
+ ignoreTag: true,
}
)}
/>
diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx
index 5fe50e7e2071..e2c8ae42d63e 100644
--- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx
+++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx
@@ -378,7 +378,7 @@ export function useOnSubmit({
notifications.toasts.addSuccess({
title: i18n.translate('xpack.fleet.createPackagePolicy.addedNotificationTitle', {
- defaultMessage: `'{packagePolicyName}' integration added.`,
+ defaultMessage: `''{packagePolicyName}'' integration added.`,
values: {
packagePolicyName: packagePolicy.name,
},
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx
index bb344a2b373a..6e93775486ed 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/advanced_step/advanced_step_form.tsx
@@ -402,6 +402,7 @@ export const AdvancedStepForm: FC = ({
{
defaultMessage:
'Define the name of the prediction field in the results. The default is _prediction.',
+ ignoreTag: true,
}
)}
>
diff --git a/x-pack/plugins/observability_solution/infra/public/alerting/inventory/components/metric.tsx b/x-pack/plugins/observability_solution/infra/public/alerting/inventory/components/metric.tsx
index dfe22251fb59..e4a6185cce80 100644
--- a/x-pack/plugins/observability_solution/infra/public/alerting/inventory/components/metric.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/alerting/inventory/components/metric.tsx
@@ -269,6 +269,7 @@ export const MetricExpression = ({
helpText={i18n.translate('xpack.infra.waffle.alerting.customMetrics.helpText', {
defaultMessage:
'Choose a name to help identify your custom metric. Defaults to " of ".',
+ ignoreTag: true,
})}
>
{
'xpack.infra.logs.analysis.anomaliesTableMoreThanExpectedAnomalyMessage',
{
defaultMessage:
- 'more log messages in this {type, select, logRate {dataset} logCategory {category}} than expected',
+ 'more log messages in this {type, select, logRate {dataset} logCategory {category} other{#}} than expected',
values: { type },
}
);
@@ -239,7 +239,7 @@ const AnomalyMessage = ({ anomaly }: { anomaly: TableItem }) => {
'xpack.infra.logs.analysis.anomaliesTableFewerThanExpectedAnomalyMessage',
{
defaultMessage:
- 'fewer log messages in this {type, select, logRate {dataset} logCategory {category}} than expected',
+ 'fewer log messages in this {type, select, logRate {dataset} logCategory {category} other{#}} than expected',
values: { type },
}
);
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/settings_tab/settings_tab.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/settings_tab/settings_tab.tsx
index b455d4a13ca8..4ec17f34610e 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/settings_tab/settings_tab.tsx
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/settings_tab/settings_tab.tsx
@@ -50,6 +50,7 @@ export function SettingsTab() {
{
defaultMessage:
'Toggle the AI Assistant button and Contextual Insights on or off in Observability apps by checking or unchecking the AI Assistant feature in Spaces > > Features.',
+ ignoreTag: true,
}
)}
diff --git a/x-pack/plugins/security/server/config_deprecations.ts b/x-pack/plugins/security/server/config_deprecations.ts
index 511fe1d04119..2e6a14b2028a 100644
--- a/x-pack/plugins/security/server/config_deprecations.ts
+++ b/x-pack/plugins/security/server/config_deprecations.ts
@@ -122,6 +122,7 @@ export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
title: i18n.translate('xpack.security.deprecations.maxRedirectURLSizeTitle', {
defaultMessage:
'"xpack.security.authc.providers.saml..maxRedirectURLSize" has no effect',
+ ignoreTag: true,
}),
message: i18n.translate('xpack.security.deprecations.maxRedirectURLSizeMessage', {
defaultMessage: 'This setting is no longer used.',
@@ -133,6 +134,7 @@ export const securityConfigDeprecationProvider: ConfigDeprecationProvider = ({
i18n.translate('xpack.security.deprecations.maxRedirectURLSize.manualSteps1', {
defaultMessage:
'Remove "xpack.security.authc.providers.saml..maxRedirectURLSize" from kibana.yml.',
+ ignoreTag: true,
}),
],
},
diff --git a/x-pack/plugins/security_solution/public/common/components/control_columns/translations.ts b/x-pack/plugins/security_solution/public/common/components/control_columns/translations.ts
index 31872dd0087a..ab8f90224bf5 100644
--- a/x-pack/plugins/security_solution/public/common/components/control_columns/translations.ts
+++ b/x-pack/plugins/security_solution/public/common/components/control_columns/translations.ts
@@ -18,5 +18,5 @@ export const CHECKBOX_FOR_ROW = ({
i18n.translate('xpack.securitySolution.controlColumns.checkboxForRowAriaLabel', {
values: { ariaRowindex, checked, columnValues },
defaultMessage:
- '{checked, select, false {unchecked} true {checked}} checkbox for the alert or event in row {ariaRowindex}, with columns {columnValues}',
+ '{checked, select, true {checked} other {unchecked}} checkbox for the alert or event in row {ariaRowindex}, with columns {columnValues}',
});
diff --git a/x-pack/plugins/stack_alerts/public/rule_types/threshold/visualization.tsx b/x-pack/plugins/stack_alerts/public/rule_types/threshold/visualization.tsx
index f31dc2fab438..a6af4a2ae48a 100644
--- a/x-pack/plugins/stack_alerts/public/rule_types/threshold/visualization.tsx
+++ b/x-pack/plugins/stack_alerts/public/rule_types/threshold/visualization.tsx
@@ -223,7 +223,6 @@ export const ThresholdVisualization: React.FunctionComponent = ({
}
color="danger"
diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json
index 77f55af59627..317f4c8f1ee8 100644
--- a/x-pack/plugins/translations/translations/fr-FR.json
+++ b/x-pack/plugins/translations/translations/fr-FR.json
@@ -324,7 +324,6 @@
"console.requestOptions.openDocumentationButtonLabel": "Ouvrir la documentation",
"console.requestOptionsButtonAriaLabel": "Options de requête",
"console.requestTimeElapasedBadgeTooltipContent": "Temps écoulé",
- "console.sendRequestButtonTooltip": "Cliquer pour envoyer la requête",
"console.settingsPage.accessibilityOverlayLabel": "Superposition d’accessibilité",
"console.settingsPage.autocompleteLabel": "Saisie semi-automatique",
"console.settingsPage.cancelButtonLabel": "Annuler",
@@ -44139,7 +44138,6 @@
"advancedSettings.advancedSettingsLabel": "Paramètres avancés",
"advancedSettings.featureCatalogueTitle": "Personnalisez votre expérience Kibana : modifiez le format de date, activez le mode sombre, et bien plus encore.",
"aiAssistantManagementSelection.aiAssistantSelectionPage.observabilityLabel": "Assistant d'IA Elastic pour Observability",
- "aiAssistantManagementSelection.aiAssistantSelectionPage.thisFeatureIsDisabledCallOutLabel": "Cette fonctionnalité est désactivée. Elle peut être activée dans Espaces > Fonctionnalités.",
"aiAssistantManagementSelection.aiAssistantSettingsPage.descriptionTextLabel": "L'Assistant d'IA utilise l'IA générative pour aider votre équipe en expliquant les erreurs, en suggérant une résolution et en vous aidant à demander, analyser et visualiser vos données.",
"aiAssistantManagementSelection.aiAssistantSettingsPage.h2.aIAssistantLabel": "Assistant d'intelligence artificielle",
"aiAssistantManagementSelection.aiAssistantSettingsPage.obsAssistant.documentationLinkLabel": "Documentation",
@@ -44857,4 +44855,4 @@
"xpack.serverlessObservability.nav.projectSettings": "Paramètres de projet",
"xpack.serverlessObservability.nav.synthetics": "Synthetics"
}
-}
\ No newline at end of file
+}
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 2f522969a2d2..5894cbe71d98 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -324,7 +324,6 @@
"console.requestOptions.openDocumentationButtonLabel": "ドキュメントを開く",
"console.requestOptionsButtonAriaLabel": "リクエストオプション",
"console.requestTimeElapasedBadgeTooltipContent": "経過時間",
- "console.sendRequestButtonTooltip": "クリックしてリクエストを送信",
"console.settingsPage.accessibilityOverlayLabel": "アクセシビリティオーバーレイ",
"console.settingsPage.autocompleteLabel": "自動入力",
"console.settingsPage.cancelButtonLabel": "キャンセル",
@@ -44111,7 +44110,6 @@
"advancedSettings.advancedSettingsLabel": "高度な設定",
"advancedSettings.featureCatalogueTitle": "日付形式の変更、ダークモードの有効化など、Kibanaエクスペリエンスをカスタマイズします。",
"aiAssistantManagementSelection.aiAssistantSelectionPage.observabilityLabel": "Elastic AI Assistant for Observability",
- "aiAssistantManagementSelection.aiAssistantSelectionPage.thisFeatureIsDisabledCallOutLabel": "この機能は無効です。[スペース]>[機能]から有効化できます。",
"aiAssistantManagementSelection.aiAssistantSettingsPage.descriptionTextLabel": "AI Assistantは、生成AIを使用して、エラーを説明したり、改善策を提案したり、データのリクエスト、分析、可視化を支援したりすることで、チームを支援します。",
"aiAssistantManagementSelection.aiAssistantSettingsPage.h2.aIAssistantLabel": "AI Assistant",
"aiAssistantManagementSelection.aiAssistantSettingsPage.obsAssistant.documentationLinkLabel": "ドキュメント",
@@ -44829,4 +44827,4 @@
"xpack.serverlessObservability.nav.projectSettings": "プロジェクト設定",
"xpack.serverlessObservability.nav.synthetics": "Synthetics"
}
-}
\ No newline at end of file
+}
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index 02341e19e9c9..306d08d1e7fb 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -324,7 +324,6 @@
"console.requestOptions.openDocumentationButtonLabel": "打开文档",
"console.requestOptionsButtonAriaLabel": "请求选项",
"console.requestTimeElapasedBadgeTooltipContent": "已用时间",
- "console.sendRequestButtonTooltip": "单击以发送请求",
"console.settingsPage.accessibilityOverlayLabel": "辅助功能覆盖",
"console.settingsPage.autocompleteLabel": "自动完成",
"console.settingsPage.cancelButtonLabel": "取消",
@@ -44159,7 +44158,6 @@
"advancedSettings.advancedSettingsLabel": "高级设置",
"advancedSettings.featureCatalogueTitle": "定制您的 Kibana 体验 — 更改日期格式、打开深色模式,等等。",
"aiAssistantManagementSelection.aiAssistantSelectionPage.observabilityLabel": "适用于 Observability 的 Elastic AI 助手",
- "aiAssistantManagementSelection.aiAssistantSelectionPage.thisFeatureIsDisabledCallOutLabel": "此功能处于禁用状态。可以从“工作区 > 功能”中启用该功能。",
"aiAssistantManagementSelection.aiAssistantSettingsPage.descriptionTextLabel": "通过解释错误,建议补救措施并帮助您请求、分析和可视化数据,AI 助手使用生成式 AI 来为您的团队提供帮助。",
"aiAssistantManagementSelection.aiAssistantSettingsPage.h2.aIAssistantLabel": "AI 助手",
"aiAssistantManagementSelection.aiAssistantSettingsPage.obsAssistant.documentationLinkLabel": "文档",
@@ -44877,4 +44875,4 @@
"xpack.serverlessObservability.nav.projectSettings": "项目设置",
"xpack.serverlessObservability.nav.synthetics": "Synthetics"
}
-}
\ No newline at end of file
+}
diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/test_connector_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/test_connector_form.tsx
index 15e61c7b1494..e04a0d6e42a1 100644
--- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/test_connector_form.tsx
+++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/test_connector_form.tsx
@@ -187,7 +187,6 @@ const SuccessfulExecution = () => (
'xpack.triggersActionsUI.sections.testConnectorForm.executionSuccessfulTitle',
{
defaultMessage: 'Test was successful',
- values: {},
}
)}
color="success"
diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts
index b557e636c618..d343aca07f9f 100644
--- a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts
+++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts
@@ -42,6 +42,7 @@ export function getShardCapacityDeprecationInfo({
{
defaultMessage:
'The number of nodes that are running low on disk and it is likely that they will run out of space. Their disk usage has tripped the <>.',
+ ignoreTag: true,
}
)
);
@@ -54,6 +55,7 @@ export function getShardCapacityDeprecationInfo({
{
defaultMessage:
'The number of nodes that have run out of disk. Their disk usage has tripped the <>.',
+ ignoreTag: true,
}
)
);
From 6746dd6e9e70679371e740c8a47a3b755f137ecd Mon Sep 17 00:00:00 2001
From: Matthew Kime
Date: Fri, 7 Jun 2024 16:44:44 -0500
Subject: [PATCH 05/23] Siem query rule - reduce field_caps usage (#184890)
## Summary
Previously, the siem query rule loaded the full set of fields for an
index pattern when running a query. This could load 5k fields or more.
Now it only loads the fields necessary for the query.
Changes as part of this PR
- The data plugin exports `queryToFields` which takes a query and
returns a list of the fields required to translate the query to ES DSL.
- `queryToFields` properly handles all filter types, previously expected
unified search bar provided filters.
- `createSecurityRuleTypeWrapper` has been modified to skip field
loading for the siem query rule
- `getFilter` takes an optional `loadFields` arguments which loads only
necessary fields
- `getQueryFilterLoadFields` was created - based on `getQueryFilter` but
also loads necessary fields
---
.../data/common/search/search_source/index.ts | 1 +
.../search/search_source/query_to_fields.ts | 58 ++++++++++++++++
.../search/search_source/search_source.ts | 41 +-----------
.../rule_types/__mocks__/rule_type.ts | 8 +++
.../create_security_rule_type_wrapper.ts | 9 ++-
.../rule_types/query/query.ts | 1 +
.../rule_types/utils/get_filter.ts | 8 ++-
.../utils/get_query_filter_load_fields.ts | 67 +++++++++++++++++++
8 files changed, 152 insertions(+), 41 deletions(-)
create mode 100644 src/plugins/data/common/search/search_source/query_to_fields.ts
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_query_filter_load_fields.ts
diff --git a/src/plugins/data/common/search/search_source/index.ts b/src/plugins/data/common/search/search_source/index.ts
index 189538415ab5..0bc25a0fe85d 100644
--- a/src/plugins/data/common/search/search_source/index.ts
+++ b/src/plugins/data/common/search/search_source/index.ts
@@ -15,3 +15,4 @@ export * from './fetch';
export * from './search_source';
export * from './search_source_service';
export * from './types';
+export * from './query_to_fields';
diff --git a/src/plugins/data/common/search/search_source/query_to_fields.ts b/src/plugins/data/common/search/search_source/query_to_fields.ts
new file mode 100644
index 000000000000..5c64a95a0a92
--- /dev/null
+++ b/src/plugins/data/common/search/search_source/query_to_fields.ts
@@ -0,0 +1,58 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { DataViewLazy } from '@kbn/data-views-plugin/common';
+import { fromKueryExpression, getKqlFieldNames } from '@kbn/es-query';
+import type { SearchRequest } from './fetch';
+import { EsQuerySortValue } from '../..';
+
+export async function queryToFields({
+ dataView,
+ sort,
+ request,
+}: {
+ dataView: DataViewLazy;
+ sort?: EsQuerySortValue | EsQuerySortValue[];
+ request: SearchRequest;
+}) {
+ let fields = dataView.timeFieldName ? [dataView.timeFieldName] : [];
+ if (sort) {
+ const sortArr = Array.isArray(sort) ? sort : [sort];
+ fields.push(...sortArr.flatMap((s) => Object.keys(s)));
+ }
+ for (const query of request.query) {
+ if (query.query) {
+ const nodes = fromKueryExpression(query.query);
+ const queryFields = getKqlFieldNames(nodes);
+ fields = fields.concat(queryFields);
+ }
+ }
+ const filters = request.filters;
+ if (filters) {
+ const filtersArr = Array.isArray(filters) ? filters : [filters];
+ for (const f of filtersArr) {
+ // unified search bar filters have meta object and key (regular filters)
+ // unified search bar "custom" filters ("Edit as query DSL", where meta.key is not present but meta is)
+ // Any other Elasticsearch query DSL filter that gets passed in by consumers (not coming from unified search, and these probably won't have a meta key at all)
+ if (f?.meta?.key && f.meta.disabled !== true) {
+ fields.push(f.meta.key);
+ }
+ }
+ }
+
+ // if source filtering is enabled, we need to fetch all the fields
+ const fieldName =
+ dataView.getSourceFiltering() && dataView.getSourceFiltering().excludes.length ? ['*'] : fields;
+
+ if (fieldName.length) {
+ return (await dataView.getFields({ fieldName })).getFieldMapSorted();
+ }
+
+ // no fields needed to be loaded for query
+ return {};
+}
diff --git a/src/plugins/data/common/search/search_source/search_source.ts b/src/plugins/data/common/search/search_source/search_source.ts
index 6f0807cb4224..a5009f350bd3 100644
--- a/src/plugins/data/common/search/search_source/search_source.ts
+++ b/src/plugins/data/common/search/search_source/search_source.ts
@@ -77,11 +77,9 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import {
buildEsQuery,
Filter,
- fromKueryExpression,
isOfQueryType,
isPhraseFilter,
isPhrasesFilter,
- getKqlFieldNames,
} from '@kbn/es-query';
import { fieldWildcardFilter } from '@kbn/kibana-utils-plugin/common';
import { getHighlightRequest } from '@kbn/field-formats-plugin/common';
@@ -95,6 +93,7 @@ import type { ISearchGeneric, IKibanaSearchResponse, IEsSearchResponse } from '@
import { normalizeSortRequest } from './normalize_sort_request';
import { AggConfigSerialized, DataViewField, SerializedSearchSourceFields } from '../..';
+import { queryToFields } from './query_to_fields';
import { AggConfigs, EsQuerySortValue } from '../..';
import type {
@@ -778,43 +777,7 @@ export class SearchSource {
public async loadDataViewFields(dataView: DataViewLazy) {
const request = this.mergeProps(this, { body: {} });
- let fields = dataView.timeFieldName ? [dataView.timeFieldName] : [];
- const sort = this.getField('sort');
- if (sort) {
- const sortArr = Array.isArray(sort) ? sort : [sort];
- for (const s of sortArr) {
- const keys = Object.keys(s);
- fields = fields.concat(keys);
- }
- }
- for (const query of request.query) {
- if (query.query) {
- const nodes = fromKueryExpression(query.query);
- const queryFields = getKqlFieldNames(nodes);
- fields = fields.concat(queryFields);
- }
- }
- const filters = request.filters;
- if (filters) {
- const filtersArr = Array.isArray(filters) ? filters : [filters];
- for (const f of filtersArr) {
- fields = fields.concat(f.meta.key);
- }
- }
- fields = fields.filter((f) => Boolean(f));
-
- if (dataView.getSourceFiltering() && dataView.getSourceFiltering().excludes.length) {
- // if source filtering is enabled, we need to fetch all the fields
- return (await dataView.getFields({ fieldName: ['*'] })).getFieldMapSorted();
- } else if (fields.length) {
- return (
- await dataView.getFields({
- fieldName: fields,
- })
- ).getFieldMapSorted();
- }
- // no fields needed to be loaded for query
- return {};
+ return await queryToFields({ dataView, request });
}
private flatten() {
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts
index 6a863728cd74..6cf237ca583e 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts
@@ -104,6 +104,14 @@ export const createRuleTypeMocks = (
alertWithPersistence: jest.fn(),
logger: loggerMock,
shouldWriteAlerts: () => true,
+ dataViews: {
+ createDataViewLazy: jest.fn().mockResolvedValue({
+ getFields: jest.fn().mockResolvedValue({
+ getFieldMapSorted: jest.fn().mockReturnValue({}),
+ }),
+ getSourceFiltering: jest.fn().mockReturnValue({ excludes: [] }),
+ }),
+ },
};
return {
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts
index 72caa1d61ff6..471087fa77a4 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/create_security_rule_type_wrapper.ts
@@ -26,6 +26,8 @@ import {
hasTimestampFields,
isMachineLearningParams,
isEsqlParams,
+ isQueryParams,
+ isEqlParams,
getDisabledActionsWarningText,
} from './utils/utils';
import { DEFAULT_MAX_SIGNALS, DEFAULT_SEARCH_AFTER_PAGE_SIZE } from '../../../../common/constants';
@@ -341,7 +343,12 @@ export const createSecurityRuleTypeWrapper: CreateSecurityRuleTypeWrapper =
});
}
- if (!isMachineLearningParams(params) && !isEsqlParams(params)) {
+ if (
+ !isMachineLearningParams(params) &&
+ !isEsqlParams(params) &&
+ !isQueryParams(params) &&
+ !isEqlParams(params)
+ ) {
inputIndexFields = await getFieldsForWildcard({
index: inputIndex,
dataViews: services.dataViews,
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts
index b3de5a39d829..272184dbf1e5 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts
@@ -59,6 +59,7 @@ export const queryExecutor = async ({
index: runOpts.inputIndex,
exceptionFilter: runOpts.exceptionFilter,
fields: runOpts.inputIndexFields,
+ loadFields: true,
});
const license = await firstValueFrom(licensing.license$);
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_filter.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_filter.ts
index 7d7492bd17e2..920e2c2df9c5 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_filter.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_filter.ts
@@ -26,7 +26,8 @@ import type { SavedIdOrUndefined } from '../../../../../common/api/detection_eng
import type { PartialFilter } from '../../types';
import { withSecuritySpan } from '../../../../utils/with_security_span';
import type { ESBoolQuery } from '../../../../../common/typed_json';
-import { getQueryFilter } from './get_query_filter';
+import { getQueryFilter as getQueryFilterNoLoadFields } from './get_query_filter';
+import { getQueryFilterLoadFields } from './get_query_filter_load_fields';
export interface GetFilterArgs {
type: Type;
@@ -38,6 +39,7 @@ export interface GetFilterArgs {
index: IndexPatternArray | undefined;
exceptionFilter: Filter | undefined;
fields?: DataViewFieldBase[];
+ loadFields?: boolean;
}
interface QueryAttributes {
@@ -59,7 +61,11 @@ export const getFilter = async ({
query,
exceptionFilter,
fields = [],
+ loadFields = false,
}: GetFilterArgs): Promise => {
+ const getQueryFilter = loadFields
+ ? getQueryFilterLoadFields(services.dataViews)
+ : getQueryFilterNoLoadFields;
const queryFilter = () => {
if (query != null && language != null && index != null) {
return getQueryFilter({
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_query_filter_load_fields.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_query_filter_load_fields.ts
new file mode 100644
index 000000000000..d1c8eab7ac2c
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_query_filter_load_fields.ts
@@ -0,0 +1,67 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { Language } from '@kbn/securitysolution-io-ts-alerting-types';
+import type { Filter, EsQueryConfig, DataViewFieldBase } from '@kbn/es-query';
+import { DataView } from '@kbn/data-views-plugin/server';
+import { queryToFields } from '@kbn/data-plugin/common';
+import type { DataViewsContract } from '@kbn/data-views-plugin/common';
+import type { FieldFormatsStartCommon } from '@kbn/field-formats-plugin/common';
+import { buildEsQuery } from '@kbn/es-query';
+import type { ESBoolQuery } from '../../../../../common/typed_json';
+import { getAllFilters } from './get_query_filter';
+import type {
+ IndexPatternArray,
+ RuleQuery,
+} from '../../../../../common/api/detection_engine/model/rule_schema';
+
+export const getQueryFilterLoadFields =
+ (dataViewsService: DataViewsContract) =>
+ async ({
+ query,
+ language,
+ filters,
+ index,
+ exceptionFilter,
+ }: {
+ query: RuleQuery;
+ language: Language;
+ filters: unknown;
+ index: IndexPatternArray;
+ exceptionFilter: Filter | undefined;
+ fields?: DataViewFieldBase[];
+ }): Promise => {
+ const config: EsQueryConfig = {
+ allowLeadingWildcards: true,
+ queryStringOptions: { analyze_wildcard: true },
+ ignoreFilterIfFieldNotInIndex: false,
+ dateFormatTZ: 'Zulu',
+ };
+
+ const initialQuery = { query, language };
+ const allFilters = getAllFilters(filters as Filter[], exceptionFilter);
+
+ const title = (index ?? []).join();
+
+ const dataViewLazy = await dataViewsService.createDataViewLazy({ title });
+
+ const flds = await queryToFields({
+ dataView: dataViewLazy,
+ request: { query: [initialQuery], filters: allFilters },
+ });
+
+ const dataViewLimitedFields = new DataView({
+ spec: { title },
+ fieldFormats: {} as unknown as FieldFormatsStartCommon,
+ shortDotsEnable: false,
+ metaFields: [],
+ });
+
+ dataViewLimitedFields.fields.replaceAll(Object.values(flds).map((fld) => fld.toSpec()));
+
+ return buildEsQuery(dataViewLimitedFields, initialQuery, allFilters, config);
+ };
From be3d34a4a2afd86af5de2088b3c17be82a959c8e Mon Sep 17 00:00:00 2001
From: Nathan Reese
Date: Fri, 7 Jun 2024 15:50:23 -0600
Subject: [PATCH 06/23] [embeddable rebuild] log stream react embeddable
(#184247)
PR migrates log stream embeddable from the legacy class based system.
### test instructions
1. Run kibana on a system with o11y data and log streams
2. Create a new dashboard, click "Add panel" => "Log stream"
3. Verify panel behavior has not changed with legacy embeddable
4. Click panel context menu and select "Settings"
5. Set custom title, description and time range. Verify behavior has not
changed with legacy embeddable
6. Import dashboard with log stream panel. Verify behavior has not
changed with legacy embeddable
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../group1/create_and_add_embeddables.ts | 2 +-
.../public/components/log_stream/constants.ts | 9 ++
.../log_stream/log_stream_embeddable.tsx | 133 ------------------
.../log_stream_embeddable_factory.ts | 57 --------
.../log_stream_react_embeddable.tsx | 123 ++++++++++++++++
.../public/components/log_stream/types.ts | 21 +++
.../infra/public/plugin.ts | 53 ++++++-
.../infra/tsconfig.json | 2 +
8 files changed, 203 insertions(+), 197 deletions(-)
create mode 100644 x-pack/plugins/observability_solution/infra/public/components/log_stream/constants.ts
delete mode 100644 x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_embeddable.tsx
delete mode 100644 x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_embeddable_factory.ts
create mode 100644 x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_react_embeddable.tsx
create mode 100644 x-pack/plugins/observability_solution/infra/public/components/log_stream/types.ts
diff --git a/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts b/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts
index 9531606e649f..1219fb03fd1c 100644
--- a/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts
+++ b/test/functional/apps/dashboard/group1/create_and_add_embeddables.ts
@@ -34,7 +34,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.dashboard.switchToEditMode();
await dashboardAddPanel.clickEditorMenuButton();
- await dashboardAddPanel.clickAddNewEmbeddableLink('LOG_STREAM_EMBEDDABLE');
+ await dashboardAddPanel.clickAddNewPanelFromUIActionLink('Log stream');
await dashboardAddPanel.expectEditorMenuClosed();
});
diff --git a/x-pack/plugins/observability_solution/infra/public/components/log_stream/constants.ts b/x-pack/plugins/observability_solution/infra/public/components/log_stream/constants.ts
new file mode 100644
index 000000000000..c573295aeb81
--- /dev/null
+++ b/x-pack/plugins/observability_solution/infra/public/components/log_stream/constants.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.
+ */
+
+export const LOG_STREAM_EMBEDDABLE = 'LOG_STREAM_EMBEDDABLE';
+export const ADD_LOG_STREAM_ACTION_ID = 'ADD_SEARCH_ACTION_ID';
diff --git a/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_embeddable.tsx b/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_embeddable.tsx
deleted file mode 100644
index 9d8be340d9bd..000000000000
--- a/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_embeddable.tsx
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import { Query, Filter } from '@kbn/es-query';
-import { AppMountParameters, CoreStart } from '@kbn/core/public';
-import React, { FC, PropsWithChildren } from 'react';
-import ReactDOM from 'react-dom';
-import { Subscription } from 'rxjs';
-import type { TimeRange } from '@kbn/es-query';
-import { Embeddable, EmbeddableInput, IContainer } from '@kbn/embeddable-plugin/public';
-import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
-import { LogStream } from '@kbn/logs-shared-plugin/public';
-import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
-import { InfraClientStartDeps, InfraClientStartExports } from '../../types';
-import { datemathToEpochMillis } from '../../utils/datemath';
-import { useKibanaContextForPluginProvider } from '../../hooks/use_kibana';
-
-export const LOG_STREAM_EMBEDDABLE = 'LOG_STREAM_EMBEDDABLE';
-
-export interface LogStreamEmbeddableInput extends EmbeddableInput {
- filters: Filter[];
- timeRange: TimeRange;
- query: Query;
-}
-
-export class LogStreamEmbeddable extends Embeddable {
- public readonly type = LOG_STREAM_EMBEDDABLE;
- private node?: HTMLElement;
- private subscription: Subscription;
- private isDarkMode = false;
-
- constructor(
- private core: CoreStart,
- private pluginDeps: InfraClientStartDeps,
- private pluginStart: InfraClientStartExports,
- initialInput: LogStreamEmbeddableInput,
- parent?: IContainer
- ) {
- super(initialInput, {}, parent);
-
- this.subscription = new Subscription();
-
- this.subscription.add(
- core.theme?.theme$.subscribe((theme) => (this.isDarkMode = theme.darkMode))
- );
-
- this.subscription.add(this.getInput$().subscribe(() => this.renderComponent()));
- }
-
- public render(node: HTMLElement) {
- if (this.node) {
- ReactDOM.unmountComponentAtNode(this.node);
- }
- this.node = node;
-
- this.renderComponent();
- }
-
- public destroy() {
- super.destroy();
- this.subscription.unsubscribe();
- if (this.node) {
- ReactDOM.unmountComponentAtNode(this.node);
- }
- }
-
- public async reload() {}
-
- private renderComponent() {
- if (!this.node) {
- return;
- }
-
- const startTimestamp = datemathToEpochMillis(this.input.timeRange.from);
- const endTimestamp = datemathToEpochMillis(this.input.timeRange.to, 'up');
-
- if (!startTimestamp || !endTimestamp) {
- return;
- }
-
- ReactDOM.render(
-
-
-
-
-
-
- ,
- this.node
- );
- }
-}
-
-export interface LogStreamEmbeddableProvidersProps {
- core: CoreStart;
- pluginStart: InfraClientStartExports;
- plugins: InfraClientStartDeps;
- theme$: AppMountParameters['theme$'];
-}
-
-export const LogStreamEmbeddableProviders: FC<
- PropsWithChildren
-> = ({ children, core, pluginStart, plugins }) => {
- const KibanaContextProviderForPlugin = useKibanaContextForPluginProvider(
- core,
- plugins,
- pluginStart
- );
-
- return (
-
-
- {children}
-
-
- );
-};
diff --git a/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_embeddable_factory.ts b/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_embeddable_factory.ts
deleted file mode 100644
index 3d472654c086..000000000000
--- a/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_embeddable_factory.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import { i18n } from '@kbn/i18n';
-import { EmbeddableFactoryDefinition, IContainer } from '@kbn/embeddable-plugin/public';
-import { InfraClientStartServicesAccessor } from '../../types';
-import {
- LogStreamEmbeddable,
- LogStreamEmbeddableInput,
- LOG_STREAM_EMBEDDABLE,
-} from './log_stream_embeddable';
-
-export class LogStreamEmbeddableFactoryDefinition
- implements EmbeddableFactoryDefinition
-{
- public readonly type = LOG_STREAM_EMBEDDABLE;
-
- constructor(private getStartServices: InfraClientStartServicesAccessor) {}
-
- public async isEditable() {
- const [{ application }] = await this.getStartServices();
- return application.capabilities.logs.save as boolean;
- }
-
- public async create(initialInput: LogStreamEmbeddableInput, parent?: IContainer) {
- const [core, plugins, pluginStart] = await this.getStartServices();
- return new LogStreamEmbeddable(core, plugins, pluginStart, initialInput, parent);
- }
-
- public getDisplayName() {
- return i18n.translate('xpack.infra.logStreamEmbeddable.displayName', {
- defaultMessage: 'Log stream',
- });
- }
-
- public getDescription() {
- return i18n.translate('xpack.infra.logStreamEmbeddable.description', {
- defaultMessage: 'Add a table of live streaming logs.',
- });
- }
-
- public getIconType() {
- return 'logsApp';
- }
-
- public async getExplicitInput() {
- return {
- title: i18n.translate('xpack.infra.logStreamEmbeddable.title', {
- defaultMessage: 'Log stream',
- }),
- };
- }
-}
diff --git a/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_react_embeddable.tsx b/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_react_embeddable.tsx
new file mode 100644
index 000000000000..313eb476c4ae
--- /dev/null
+++ b/x-pack/plugins/observability_solution/infra/public/components/log_stream/log_stream_react_embeddable.tsx
@@ -0,0 +1,123 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React, { FC, PropsWithChildren, useEffect, useMemo, useState } from 'react';
+import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public';
+import {
+ initializeTimeRange,
+ initializeTitles,
+ useFetchContext,
+} from '@kbn/presentation-publishing';
+import { LogStream } from '@kbn/logs-shared-plugin/public';
+import { AppMountParameters, CoreStart } from '@kbn/core/public';
+import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common';
+import { Query } from '@kbn/es-query';
+import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
+import type { LogStreamApi, LogStreamSerializedState, Services } from './types';
+import { datemathToEpochMillis } from '../../utils/datemath';
+import { LOG_STREAM_EMBEDDABLE } from './constants';
+import { useKibanaContextForPluginProvider } from '../../hooks/use_kibana';
+import { InfraClientStartDeps, InfraClientStartExports } from '../../types';
+
+export function getLogStreamEmbeddableFactory(services: Services) {
+ const factory: ReactEmbeddableFactory = {
+ type: LOG_STREAM_EMBEDDABLE,
+ deserializeState: (state) => state.rawState,
+ buildEmbeddable: async (state, buildApi) => {
+ const timeRangeContext = initializeTimeRange(state);
+ const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state);
+
+ const api = buildApi(
+ {
+ ...timeRangeContext.api,
+ ...titlesApi,
+ serializeState: () => {
+ return {
+ rawState: {
+ ...timeRangeContext.serialize(),
+ ...serializeTitles(),
+ },
+ };
+ },
+ },
+ {
+ ...timeRangeContext.comparators,
+ ...titleComparators,
+ }
+ );
+
+ return {
+ api,
+ Component: () => {
+ const { filters, query, timeRange } = useFetchContext(api);
+ const { startTimestamp, endTimestamp } = useMemo(() => {
+ return {
+ startTimestamp: timeRange ? datemathToEpochMillis(timeRange.from) : undefined,
+ endTimestamp: timeRange ? datemathToEpochMillis(timeRange.to, 'up') : undefined,
+ };
+ }, [timeRange]);
+
+ const [darkMode, setDarkMode] = useState(false);
+ useEffect(() => {
+ const subscription = services.coreStart.theme.theme$.subscribe((theme) => {
+ setDarkMode(theme.darkMode);
+ });
+ return () => subscription.unsubscribe();
+ }, []);
+
+ return !startTimestamp || !endTimestamp ? null : (
+
+
+
+
+
+
+
+ );
+ },
+ };
+ },
+ };
+ return factory;
+}
+
+export interface LogStreamEmbeddableProvidersProps {
+ core: CoreStart;
+ pluginStart: InfraClientStartExports;
+ plugins: InfraClientStartDeps;
+ theme$: AppMountParameters['theme$'];
+}
+
+export const LogStreamEmbeddableProviders: FC<
+ PropsWithChildren
+> = ({ children, core, pluginStart, plugins }) => {
+ const KibanaContextProviderForPlugin = useKibanaContextForPluginProvider(
+ core,
+ plugins,
+ pluginStart
+ );
+
+ return (
+
+
+ {children}
+
+
+ );
+};
diff --git a/x-pack/plugins/observability_solution/infra/public/components/log_stream/types.ts b/x-pack/plugins/observability_solution/infra/public/components/log_stream/types.ts
new file mode 100644
index 000000000000..26a9201c41a9
--- /dev/null
+++ b/x-pack/plugins/observability_solution/infra/public/components/log_stream/types.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; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { CoreStart } from '@kbn/core/public';
+import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public';
+import { SerializedTimeRange, SerializedTitles } from '@kbn/presentation-publishing';
+import { InfraClientStartDeps, InfraClientStartExports } from '../../types';
+
+export type LogStreamSerializedState = SerializedTitles & SerializedTimeRange;
+
+export type LogStreamApi = DefaultEmbeddableApi;
+
+export interface Services {
+ coreStart: CoreStart;
+ pluginDeps: InfraClientStartDeps;
+ pluginStart: InfraClientStartExports;
+}
diff --git a/x-pack/plugins/observability_solution/infra/public/plugin.ts b/x-pack/plugins/observability_solution/infra/public/plugin.ts
index 20a6d85092c8..20f819b7eb34 100644
--- a/x-pack/plugins/observability_solution/infra/public/plugin.ts
+++ b/x-pack/plugins/observability_solution/infra/public/plugin.ts
@@ -19,12 +19,14 @@ import { enableInfrastructureHostsView } from '@kbn/observability-plugin/public'
import { ObservabilityTriggerId } from '@kbn/observability-shared-plugin/common';
import { BehaviorSubject, combineLatest, from } from 'rxjs';
import { map } from 'rxjs';
+import type { EmbeddableApiContext } from '@kbn/presentation-publishing';
+import { apiCanAddNewPanel } from '@kbn/presentation-containers';
+import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public';
import type { InfraPublicConfig } from '../common/plugin_config_types';
import { createInventoryMetricRuleType } from './alerting/inventory';
import { createLogThresholdRuleType } from './alerting/log_threshold';
import { createMetricThresholdRuleType } from './alerting/metric_threshold';
-import { LOG_STREAM_EMBEDDABLE } from './components/log_stream/log_stream_embeddable';
-import { LogStreamEmbeddableFactoryDefinition } from './components/log_stream/log_stream_embeddable_factory';
+import { ADD_LOG_STREAM_ACTION_ID, LOG_STREAM_EMBEDDABLE } from './components/log_stream/constants';
import {
type InfraLocators,
InfraLogsLocatorDefinition,
@@ -44,6 +46,7 @@ import type {
InfraClientStartExports,
} from './types';
import { getLogsHasDataFetcher, getLogsOverviewDataFetcher } from './utils/logs_overview_fetchers';
+import type { LogStreamSerializedState } from './components/log_stream/types';
export class Plugin implements InfraClientPluginClass {
public config: InfraPublicConfig;
@@ -173,10 +176,17 @@ export class Plugin implements InfraClientPluginClass {
)
);
- pluginsSetup.embeddable.registerEmbeddableFactory(
- LOG_STREAM_EMBEDDABLE,
- new LogStreamEmbeddableFactoryDefinition(core.getStartServices)
- );
+ pluginsSetup.embeddable.registerReactEmbeddableFactory(LOG_STREAM_EMBEDDABLE, async () => {
+ const { getLogStreamEmbeddableFactory } = await import(
+ './components/log_stream/log_stream_react_embeddable'
+ );
+ const [coreStart, pluginDeps, pluginStart] = await core.getStartServices();
+ return getLogStreamEmbeddableFactory({
+ coreStart,
+ pluginDeps,
+ pluginStart,
+ });
+ });
// Register Locators
const logsLocator = this.config.featureFlags.logsUIEnabled
@@ -388,6 +398,37 @@ export class Plugin implements InfraClientPluginClass {
const telemetry = this.telemetry.start();
+ plugins.uiActions.registerAction({
+ id: ADD_LOG_STREAM_ACTION_ID,
+ getDisplayName: () =>
+ i18n.translate('xpack.infra.logStreamEmbeddable.displayName', {
+ defaultMessage: 'Log stream',
+ }),
+ getDisplayNameTooltip: () =>
+ i18n.translate('xpack.infra.logStreamEmbeddable.description', {
+ defaultMessage: 'Add a table of live streaming logs.',
+ }),
+ getIconType: () => 'logsApp',
+ isCompatible: async ({ embeddable }) => {
+ return apiCanAddNewPanel(embeddable);
+ },
+ execute: async ({ embeddable }) => {
+ if (!apiCanAddNewPanel(embeddable)) throw new IncompatibleActionError();
+ embeddable.addNewPanel(
+ {
+ panelType: LOG_STREAM_EMBEDDABLE,
+ initialState: {
+ title: i18n.translate('xpack.infra.logStreamEmbeddable.title', {
+ defaultMessage: 'Log stream',
+ }),
+ },
+ },
+ true
+ );
+ },
+ });
+ plugins.uiActions.attachAction('ADD_PANEL_TRIGGER', ADD_LOG_STREAM_ACTION_ID);
+
const startContract: InfraClientStartExports = {
inventoryViews,
metricsExplorerViews,
diff --git a/x-pack/plugins/observability_solution/infra/tsconfig.json b/x-pack/plugins/observability_solution/infra/tsconfig.json
index 22f3fb1d16d7..cb98f8ab0859 100644
--- a/x-pack/plugins/observability_solution/infra/tsconfig.json
+++ b/x-pack/plugins/observability_solution/infra/tsconfig.json
@@ -104,6 +104,8 @@
"@kbn/router-utils",
"@kbn/react-kibana-context-render",
"@kbn/react-kibana-context-theme",
+ "@kbn/presentation-publishing",
+ "@kbn/presentation-containers",
"@kbn/deeplinks-observability"
],
"exclude": [
From 2875ab84f0e9a9892b48646710377f9eb3e51303 Mon Sep 17 00:00:00 2001
From: Tiago Costa
Date: Sat, 8 Jun 2024 00:09:45 +0100
Subject: [PATCH 07/23] skip flaky suite (#167914)
---
.../e2e/investigations/alerts/detection_page_filters.cy.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts
index ce95eed9c667..142ae6efbd43 100644
--- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts
+++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts
@@ -105,7 +105,8 @@ const assertFilterControlsWithFilterObject = (
});
};
-describe(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () => {
+// FLAKY: https://github.com/elastic/kibana/issues/167914
+describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () => {
beforeEach(() => {
deleteAlertsAndRules();
createRule(getNewRule());
From 38952b1432569aefb0828640cc0ac80f4b641188 Mon Sep 17 00:00:00 2001
From: Nikita Indik
Date: Sat, 8 Jun 2024 01:21:58 +0200
Subject: [PATCH 08/23] [Security Solution] `DetectionRulesClient`: various
refactorings (#184954)
**Partially addresses: https://github.com/elastic/kibana/issues/184364**
## Summary
This PR contains various smaller-scale refactorings for the recently
added `DetectionsRuleClient`.
**Changes**:
- Renamed `DetectionRulesClient` containing directory from
`rule_management` to `detection_rules_client`
- Moved `DetectionRulesClient` methods into the
`detection_rules_client/methods` dir
- Moved the TS interface of `DetectionRulesClient` into a separate file
`detection_rules_client_interface.ts`
- Simplified `importRule` method parameters
- Added memoization to `getDetectionRulesClient`
---------
Co-authored-by: Georgii Gorbachev
---
.../rule_objects/create_prebuilt_rules.ts | 2 +-
.../rule_objects/upgrade_prebuilt_rules.ts | 2 +-
.../routes/__mocks__/request_context.ts | 2 +-
.../api/create_rule_exceptions/route.ts | 4 +-
.../fetch_rules_by_query_or_ids.ts | 2 +-
.../api/rules/bulk_actions/route.test.ts | 4 +-
.../api/rules/bulk_create_rules/route.ts | 2 +-
.../api/rules/bulk_delete_rules/route.ts | 2 +-
.../api/rules/bulk_patch_rules/route.ts | 2 +-
.../api/rules/bulk_update_rules/route.ts | 2 +-
.../api/rules/create_rule/route.ts | 2 +-
.../api/rules/delete_rule/route.ts | 2 +-
.../api/rules/patch_rule/route.ts | 2 +-
.../api/rules/read_rule/route.ts | 2 +-
.../api/rules/update_rule/route.ts | 2 +-
.../__mocks__/detection_rules_client.ts | 2 +-
.../__mocks__/read_rules.ts | 0
...n_rules_client.create_custom_rule.test.ts} | 2 +-
...rules_client.create_prebuilt_rule.test.ts} | 2 +-
...etection_rules_client.delete_rule.test.ts} | 2 +-
...etection_rules_client.import_rule.test.ts} | 12 +--
...detection_rules_client.patch_rule.test.ts} | 2 +-
.../detection_rules_client.ts | 78 ++++++++++++++++
...etection_rules_client.update_rule.test.ts} | 24 ++---
...ules_client.upgrade_prebuilt_rule.test.ts} | 2 +-
.../detection_rules_client_interface.ts | 58 ++++++++++++
.../methods/create_custom_rule.ts | 30 +++++++
.../methods/create_prebuilt_rule.ts | 35 ++++++++
.../methods/delete_rule.ts | 14 +++
.../methods/import_rule.ts | 63 +++++++++++++
.../methods/patch_rule.ts | 54 +++++++++++
.../methods/update_rule.ts | 53 +++++++++++
.../methods/upgrade_prebuilt_rule.ts | 84 +++++++++++++++++
.../read_rules.test.ts | 0
.../read_rules.ts | 0
.../utils.ts | 0
.../logic/import/import_rules_utils.ts | 6 +-
.../rule_management/create_custom_rule.ts | 36 --------
.../rule_management/create_prebuilt_rule.ts | 41 ---------
.../logic/rule_management/delete_rule.ts | 23 -----
.../rule_management/detection_rules_client.ts | 80 -----------------
.../logic/rule_management/import_rule.ts | 75 ----------------
.../logic/rule_management/patch_rule.ts | 60 -------------
.../logic/rule_management/update_rule.ts | 59 ------------
.../rule_management/upgrade_prebuilt_rule.ts | 90 -------------------
.../rule_objects/fetch_rule_by_id.ts | 2 +-
.../server/request_context_factory.ts | 6 +-
.../plugins/security_solution/server/types.ts | 2 +-
48 files changed, 519 insertions(+), 512 deletions(-)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management => detection_rules_client}/__mocks__/detection_rules_client.ts (97%)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management => detection_rules_client}/__mocks__/read_rules.ts (100%)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management/create_custom_rule.detection_rules_client.test.ts => detection_rules_client/detection_rules_client.create_custom_rule.test.ts} (99%)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management/create_prebuilt_rule.detection_rules_client.test.ts => detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts} (99%)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management/delete_rule.detection_rules_client.test.ts => detection_rules_client/detection_rules_client.delete_rule.test.ts} (98%)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management/import_rule.detection_rules_client.test.ts => detection_rules_client/detection_rules_client.import_rule.test.ts} (95%)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management/patch_rule.detection_rules_client.test.ts => detection_rules_client/detection_rules_client.patch_rule.test.ts} (99%)
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management/update_rule.detection_rules_client.test.ts => detection_rules_client/detection_rules_client.update_rule.test.ts} (89%)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management/upgrade_prebuilt_rule.detection_rules_client.test.ts => detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts} (99%)
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client_interface.ts
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_custom_rule.ts
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_prebuilt_rule.ts
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/delete_rule.ts
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts
create mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management => detection_rules_client}/read_rules.test.ts (100%)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management => detection_rules_client}/read_rules.ts (100%)
rename x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/{rule_management => detection_rules_client}/utils.ts (100%)
delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_custom_rule.ts
delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_prebuilt_rule.ts
delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/delete_rule.ts
delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/detection_rules_client.ts
delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/import_rule.ts
delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/patch_rule.ts
delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/update_rule.ts
delete mode 100644 x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/upgrade_prebuilt_rule.ts
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/create_prebuilt_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/create_prebuilt_rules.ts
index ef3d34b65750..8da1055156d3 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/create_prebuilt_rules.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/create_prebuilt_rules.ts
@@ -9,7 +9,7 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../../../common/consta
import { initPromisePool } from '../../../../../utils/promise_pool';
import { withSecuritySpan } from '../../../../../utils/with_security_span';
import type { PrebuiltRuleAsset } from '../../model/rule_assets/prebuilt_rule_asset';
-import type { IDetectionRulesClient } from '../../../rule_management/logic/rule_management/detection_rules_client';
+import type { IDetectionRulesClient } from '../../../rule_management/logic/detection_rules_client/detection_rules_client_interface';
export const createPrebuiltRules = (
detectionRulesClient: IDetectionRulesClient,
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/upgrade_prebuilt_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/upgrade_prebuilt_rules.ts
index 4ae595cca16b..2c9a81a7af6c 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/upgrade_prebuilt_rules.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_objects/upgrade_prebuilt_rules.ts
@@ -9,7 +9,7 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../../../common/consta
import { initPromisePool } from '../../../../../utils/promise_pool';
import { withSecuritySpan } from '../../../../../utils/with_security_span';
import type { PrebuiltRuleAsset } from '../../model/rule_assets/prebuilt_rule_asset';
-import type { IDetectionRulesClient } from '../../../rule_management/logic/rule_management/detection_rules_client';
+import type { IDetectionRulesClient } from '../../../rule_management/logic/detection_rules_client/detection_rules_client_interface';
/**
* Upgrades existing prebuilt rules given a set of rules and output index.
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts
index a2e6f2f03854..fa9fcc1fa5e2 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts
@@ -38,7 +38,7 @@ import { riskEngineDataClientMock } from '../../../entity_analytics/risk_engine/
import { riskScoreDataClientMock } from '../../../entity_analytics/risk_score/risk_score_data_client.mock';
import { assetCriticalityDataClientMock } from '../../../entity_analytics/asset_criticality/asset_criticality_data_client.mock';
import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks';
-import { detectionRulesClientMock } from '../../rule_management/logic/rule_management/__mocks__/detection_rules_client';
+import { detectionRulesClientMock } from '../../rule_management/logic/detection_rules_client/__mocks__/detection_rules_client';
export const createMockClients = () => {
const core = coreMock.createRequestHandlerContext();
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts
index c5dfc3a0d847..c8c257770e26 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts
@@ -37,13 +37,13 @@ import {
CreateRuleExceptionsRequestParams,
} from '../../../../../../common/api/detection_engine/rule_exceptions';
-import { readRules } from '../../../rule_management/logic/rule_management/read_rules';
+import { readRules } from '../../../rule_management/logic/detection_rules_client/read_rules';
import { checkDefaultRuleExceptionListReferences } from '../../../rule_management/logic/exceptions/check_for_default_rule_exception_list';
import type { RuleParams } from '../../../rule_schema';
import type { SecuritySolutionPluginRouter } from '../../../../../types';
import { buildSiemResponse } from '../../../routes/utils';
import { buildRouteValidation } from '../../../../../utils/build_validation/route_validation';
-import type { IDetectionRulesClient } from '../../../rule_management/logic/rule_management/detection_rules_client';
+import type { IDetectionRulesClient } from '../../../rule_management/logic/detection_rules_client/detection_rules_client_interface';
export const createRuleExceptionsRoute = (router: SecuritySolutionPluginRouter) => {
router.versioned
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/fetch_rules_by_query_or_ids.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/fetch_rules_by_query_or_ids.ts
index 1ef231bb0b5a..d59ba5676b60 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/fetch_rules_by_query_or_ids.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/fetch_rules_by_query_or_ids.ts
@@ -11,7 +11,7 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL } from '../../../../../../../common/con
import type { PromisePoolOutcome } from '../../../../../../utils/promise_pool';
import { initPromisePool } from '../../../../../../utils/promise_pool';
import type { RuleAlertType } from '../../../../rule_schema';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { findRules } from '../../../logic/search/find_rules';
import { MAX_RULES_TO_PROCESS_TOTAL } from './route';
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts
index d74afe0bea65..37ad3dc7d848 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts
@@ -30,10 +30,10 @@ import {
getBulkDisableRuleActionSchemaMock,
} from '../../../../../../../common/api/detection_engine/rule_management/mocks';
import { loggingSystemMock } from '@kbn/core/server/mocks';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
jest.mock('../../../../../machine_learning/authz');
-jest.mock('../../../logic/rule_management/read_rules', () => ({ readRules: jest.fn() }));
+jest.mock('../../../logic/detection_rules_client/read_rules', () => ({ readRules: jest.fn() }));
describe('Perform bulk action route', () => {
const readRulesMock = readRules as jest.Mock;
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts
index e4373e156353..a8e5a0446c6e 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts
@@ -16,7 +16,7 @@ import {
} from '../../../../../../../common/api/detection_engine/rule_management';
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { getDuplicates } from './get_duplicates';
import { transformValidateBulkError } from '../../../utils/validate';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts
index 2ac6fb3340ba..234439eb4905 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts
@@ -24,7 +24,7 @@ import {
createBulkErrorObject,
transformBulkError,
} from '../../../../routes/utils';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { getIdBulkError } from '../../../utils/utils';
import { transformValidateBulkError } from '../../../utils/validate';
import { getDeprecatedBulkEndpointHeader, logDeprecatedBulkEndpoint } from '../../deprecation';
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts
index 1ed5f529b201..a3752d421380 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts
@@ -19,7 +19,7 @@ import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { transformBulkError, buildSiemResponse } from '../../../../routes/utils';
import { getIdBulkError } from '../../../utils/utils';
import { transformValidateBulkError } from '../../../utils/validate';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { getDeprecatedBulkEndpointHeader, logDeprecatedBulkEndpoint } from '../../deprecation';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { validateRulesWithDuplicatedDefaultExceptionsList } from '../../../logic/exceptions/validate_rules_with_duplicated_default_exceptions_list';
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts
index 2b3ee7c2f751..e08d781cd74d 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts
@@ -24,7 +24,7 @@ import {
buildSiemResponse,
createBulkErrorObject,
} from '../../../../routes/utils';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { getDeprecatedBulkEndpointHeader, logDeprecatedBulkEndpoint } from '../../deprecation';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { validateRulesWithDuplicatedDefaultExceptionsList } from '../../../logic/exceptions/validate_rules_with_duplicated_default_exceptions_list';
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts
index db01f1f78389..03642aa12266 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts
@@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { checkDefaultRuleExceptionListReferences } from '../../../logic/exceptions/check_for_default_rule_exception_list';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { transformValidate, validateResponseActionsPermissions } from '../../../utils/validate';
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts
index 31b72c76daaa..3cf9aa6a2fb5 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts
@@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { getIdError, transform } from '../../../utils/utils';
export const deleteRuleRoute = (router: SecuritySolutionPluginRouter) => {
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts
index 78c5a15ef058..38b283b2c5fb 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts
@@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { checkDefaultRuleExceptionListReferences } from '../../../logic/exceptions/check_for_default_rule_exception_list';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { getIdError } from '../../../utils/utils';
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts
index aabf53836793..95992618b062 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts
@@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { getIdError, transform } from '../../../utils/utils';
export const readRuleRoute = (router: SecuritySolutionPluginRouter, logger: Logger) => {
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts
index 8c46e1979a43..5ac2df600908 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts
@@ -16,7 +16,7 @@ import { DETECTION_ENGINE_RULES_URL } from '../../../../../../../common/constant
import type { SecuritySolutionPluginRouter } from '../../../../../../types';
import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation';
import { buildSiemResponse } from '../../../../routes/utils';
-import { readRules } from '../../../logic/rule_management/read_rules';
+import { readRules } from '../../../logic/detection_rules_client/read_rules';
import { checkDefaultRuleExceptionListReferences } from '../../../logic/exceptions/check_for_default_rule_exception_list';
import { validateRuleDefaultExceptionList } from '../../../logic/exceptions/validate_rule_default_exception_list';
import { getIdError } from '../../../utils/utils';
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/__mocks__/detection_rules_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/__mocks__/detection_rules_client.ts
similarity index 97%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/__mocks__/detection_rules_client.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/__mocks__/detection_rules_client.ts
index 2411de933fb1..b6d14a307801 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/__mocks__/detection_rules_client.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/__mocks__/detection_rules_client.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import type { IDetectionRulesClient } from '../detection_rules_client';
+import type { IDetectionRulesClient } from '../detection_rules_client_interface';
export type DetectionRulesClientMock = jest.Mocked;
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/__mocks__/read_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/__mocks__/read_rules.ts
similarity index 100%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/__mocks__/read_rules.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/__mocks__/read_rules.ts
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_custom_rule.detection_rules_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts
similarity index 99%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_custom_rule.detection_rules_client.test.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts
index 6053d5109676..a8335108d7cb 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_custom_rule.detection_rules_client.test.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts
@@ -16,7 +16,7 @@ import { DEFAULT_INDICATOR_SOURCE_PATH } from '../../../../../../common/constant
import { buildMlAuthz } from '../../../../machine_learning/authz';
import { throwAuthzError } from '../../../../machine_learning/validation';
import { createDetectionRulesClient } from './detection_rules_client';
-import type { IDetectionRulesClient } from './detection_rules_client';
+import type { IDetectionRulesClient } from './detection_rules_client_interface';
jest.mock('../../../../machine_learning/authz');
jest.mock('../../../../machine_learning/validation');
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_prebuilt_rule.detection_rules_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts
similarity index 99%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_prebuilt_rule.detection_rules_client.test.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts
index c6d80ad412dc..d2a61dcc65e4 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_prebuilt_rule.detection_rules_client.test.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts
@@ -16,7 +16,7 @@ import { DEFAULT_INDICATOR_SOURCE_PATH } from '../../../../../../common/constant
import { buildMlAuthz } from '../../../../machine_learning/authz';
import { throwAuthzError } from '../../../../machine_learning/validation';
import { createDetectionRulesClient } from './detection_rules_client';
-import type { IDetectionRulesClient } from './detection_rules_client';
+import type { IDetectionRulesClient } from './detection_rules_client_interface';
jest.mock('../../../../machine_learning/authz');
jest.mock('../../../../machine_learning/validation');
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/delete_rule.detection_rules_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts
similarity index 98%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/delete_rule.detection_rules_client.test.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts
index 2182927a373d..37cb8e0aa709 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/delete_rule.detection_rules_client.test.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts
@@ -8,7 +8,7 @@
import { rulesClientMock } from '@kbn/alerting-plugin/server/mocks';
import { buildMlAuthz } from '../../../../machine_learning/authz';
import { createDetectionRulesClient } from './detection_rules_client';
-import type { IDetectionRulesClient } from './detection_rules_client';
+import type { IDetectionRulesClient } from './detection_rules_client_interface';
jest.mock('../../../../machine_learning/authz');
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/import_rule.detection_rules_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts
similarity index 95%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/import_rule.detection_rules_client.test.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts
index f783c5963c2b..4d2cb0ee6551 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/import_rule.detection_rules_client.test.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts
@@ -13,7 +13,7 @@ import { getQueryRuleParams } from '../../../rule_schema/mocks';
import { buildMlAuthz } from '../../../../machine_learning/authz';
import { throwAuthzError } from '../../../../machine_learning/validation';
import { createDetectionRulesClient } from './detection_rules_client';
-import type { IDetectionRulesClient } from './detection_rules_client';
+import type { IDetectionRulesClient } from './detection_rules_client_interface';
jest.mock('../../../../machine_learning/authz');
jest.mock('../../../../machine_learning/validation');
@@ -50,7 +50,7 @@ describe('DetectionRulesClient.importRule', () => {
await detectionRulesClient.importRule({
ruleToImport,
overwriteRules: true,
- options: { allowMissingConnectorSecrets },
+ allowMissingConnectorSecrets,
});
expect(rulesClient.create).toHaveBeenCalledWith(
@@ -78,7 +78,7 @@ describe('DetectionRulesClient.importRule', () => {
detectionRulesClient.importRule({
ruleToImport,
overwriteRules: true,
- options: { allowMissingConnectorSecrets },
+ allowMissingConnectorSecrets,
})
).rejects.toThrow('mocked MLAuth error');
@@ -92,7 +92,7 @@ describe('DetectionRulesClient.importRule', () => {
await detectionRulesClient.importRule({
ruleToImport,
overwriteRules: true,
- options: { allowMissingConnectorSecrets },
+ allowMissingConnectorSecrets,
});
expect(rulesClient.update).toHaveBeenCalledWith(
@@ -133,7 +133,7 @@ describe('DetectionRulesClient.importRule', () => {
timestamp_override: undefined,
},
overwriteRules: true,
- options: { allowMissingConnectorSecrets },
+ allowMissingConnectorSecrets,
});
expect(rulesClient.create).not.toHaveBeenCalled();
@@ -154,7 +154,7 @@ describe('DetectionRulesClient.importRule', () => {
detectionRulesClient.importRule({
ruleToImport,
overwriteRules: false,
- options: { allowMissingConnectorSecrets },
+ allowMissingConnectorSecrets,
})
).rejects.toMatchObject({
error: {
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/patch_rule.detection_rules_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts
similarity index 99%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/patch_rule.detection_rules_client.test.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts
index 59d250606e28..7f1c21988863 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/patch_rule.detection_rules_client.test.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts
@@ -17,7 +17,7 @@ import { readRules } from './read_rules';
import { buildMlAuthz } from '../../../../machine_learning/authz';
import { throwAuthzError } from '../../../../machine_learning/validation';
import { createDetectionRulesClient } from './detection_rules_client';
-import type { IDetectionRulesClient } from './detection_rules_client';
+import type { IDetectionRulesClient } from './detection_rules_client_interface';
jest.mock('../../../../machine_learning/authz');
jest.mock('../../../../machine_learning/validation');
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts
new file mode 100644
index 000000000000..7256441697e6
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts
@@ -0,0 +1,78 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { RulesClient } from '@kbn/alerting-plugin/server';
+import type { MlAuthz } from '../../../../machine_learning/authz';
+
+import type { RuleAlertType } from '../../../rule_schema';
+import type {
+ IDetectionRulesClient,
+ CreateCustomRuleArgs,
+ CreatePrebuiltRuleArgs,
+ UpdateRuleArgs,
+ PatchRuleArgs,
+ DeleteRuleArgs,
+ UpgradePrebuiltRuleArgs,
+ ImportRuleArgs,
+} from './detection_rules_client_interface';
+
+import { createCustomRule } from './methods/create_custom_rule';
+import { createPrebuiltRule } from './methods/create_prebuilt_rule';
+import { updateRule } from './methods/update_rule';
+import { patchRule } from './methods/patch_rule';
+import { deleteRule } from './methods/delete_rule';
+import { upgradePrebuiltRule } from './methods/upgrade_prebuilt_rule';
+import { importRule } from './methods/import_rule';
+
+import { withSecuritySpan } from '../../../../../utils/with_security_span';
+
+export const createDetectionRulesClient = (
+ rulesClient: RulesClient,
+ mlAuthz: MlAuthz
+): IDetectionRulesClient => ({
+ async createCustomRule(args: CreateCustomRuleArgs): Promise {
+ return withSecuritySpan('DetectionRulesClient.createCustomRule', async () => {
+ return createCustomRule(rulesClient, args, mlAuthz);
+ });
+ },
+
+ async createPrebuiltRule(args: CreatePrebuiltRuleArgs): Promise {
+ return withSecuritySpan('DetectionRulesClient.createPrebuiltRule', async () => {
+ return createPrebuiltRule(rulesClient, args, mlAuthz);
+ });
+ },
+
+ async updateRule(args: UpdateRuleArgs): Promise {
+ return withSecuritySpan('DetectionRulesClient.updateRule', async () => {
+ return updateRule(rulesClient, args, mlAuthz);
+ });
+ },
+
+ async patchRule(args: PatchRuleArgs): Promise {
+ return withSecuritySpan('DetectionRulesClient.patchRule', async () => {
+ return patchRule(rulesClient, args, mlAuthz);
+ });
+ },
+
+ async deleteRule(args: DeleteRuleArgs): Promise {
+ return withSecuritySpan('DetectionRulesClient.deleteRule', async () => {
+ return deleteRule(rulesClient, args);
+ });
+ },
+
+ async upgradePrebuiltRule(args: UpgradePrebuiltRuleArgs): Promise {
+ return withSecuritySpan('DetectionRulesClient.upgradePrebuiltRule', async () => {
+ return upgradePrebuiltRule(rulesClient, args, mlAuthz);
+ });
+ },
+
+ async importRule(args: ImportRuleArgs): Promise {
+ return withSecuritySpan('DetectionRulesClient.importRule', async () => {
+ return importRule(rulesClient, args, mlAuthz);
+ });
+ },
+});
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/update_rule.detection_rules_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts
similarity index 89%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/update_rule.detection_rules_client.test.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts
index f538672444b0..671460b046fe 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/update_rule.detection_rules_client.test.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts
@@ -13,10 +13,11 @@ import {
getCreateMachineLearningRulesSchemaMock,
getCreateRulesSchemaMock,
} from '../../../../../../common/api/detection_engine/model/rule_schema/mocks';
-import { updateRule } from './update_rule';
import { readRules } from './read_rules';
import { buildMlAuthz } from '../../../../machine_learning/authz';
import { throwAuthzError } from '../../../../machine_learning/validation';
+import { createDetectionRulesClient } from './detection_rules_client';
+import type { IDetectionRulesClient } from './detection_rules_client_interface';
jest.mock('../../../../machine_learning/authz');
jest.mock('../../../../machine_learning/validation');
@@ -25,10 +26,13 @@ jest.mock('./read_rules');
describe('DetectionRulesClient.updateRule', () => {
let rulesClient: ReturnType;
+ let detectionRulesClient: IDetectionRulesClient;
+
const mlAuthz = (buildMlAuthz as jest.Mock)();
beforeEach(() => {
rulesClient = rulesClientMock.create();
+ detectionRulesClient = createDetectionRulesClient(rulesClient, mlAuthz);
});
it('calls the rulesClient with expected params', async () => {
@@ -37,7 +41,7 @@ describe('DetectionRulesClient.updateRule', () => {
(readRules as jest.Mock).mockResolvedValueOnce(existingRule);
rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams()));
- await updateRule(rulesClient, { ruleUpdate }, mlAuthz);
+ await detectionRulesClient.updateRule({ ruleUpdate });
expect(rulesClient.update).toHaveBeenCalledWith(
expect.objectContaining({
@@ -58,7 +62,7 @@ describe('DetectionRulesClient.updateRule', () => {
(readRules as jest.Mock).mockResolvedValueOnce(existingRule);
rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams()));
- const rule = await updateRule(rulesClient, { ruleUpdate }, mlAuthz);
+ const rule = await detectionRulesClient.updateRule({ ruleUpdate });
expect(rule.enabled).toBe(true);
});
@@ -69,7 +73,7 @@ describe('DetectionRulesClient.updateRule', () => {
(readRules as jest.Mock).mockResolvedValueOnce(existingRule);
rulesClient.update.mockResolvedValue(getRuleMock(getMlRuleParams()));
- await updateRule(rulesClient, { ruleUpdate }, mlAuthz);
+ await detectionRulesClient.updateRule({ ruleUpdate });
expect(rulesClient.update).toHaveBeenCalledWith(
expect.objectContaining({
@@ -92,7 +96,7 @@ describe('DetectionRulesClient.updateRule', () => {
(readRules as jest.Mock).mockResolvedValueOnce(existingRule);
rulesClient.update.mockResolvedValue(getRuleMock(getMlRuleParams()));
- await updateRule(rulesClient, { ruleUpdate }, mlAuthz);
+ await detectionRulesClient.updateRule({ ruleUpdate });
expect(rulesClient.update).toHaveBeenCalledWith(
expect.objectContaining({
@@ -118,7 +122,7 @@ describe('DetectionRulesClient.updateRule', () => {
rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams()));
(readRules as jest.Mock).mockResolvedValueOnce(existingRule);
- await updateRule(rulesClient, { ruleUpdate }, mlAuthz);
+ await detectionRulesClient.updateRule({ ruleUpdate });
expect(rulesClient.disable).toHaveBeenCalledWith(
expect.objectContaining({
@@ -139,7 +143,7 @@ describe('DetectionRulesClient.updateRule', () => {
rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams()));
(readRules as jest.Mock).mockResolvedValueOnce(existingRule);
- await updateRule(rulesClient, { ruleUpdate }, mlAuthz);
+ await detectionRulesClient.updateRule({ ruleUpdate });
expect(rulesClient.enable).toHaveBeenCalledWith(
expect.objectContaining({
@@ -158,7 +162,7 @@ describe('DetectionRulesClient.updateRule', () => {
enabled: true,
};
- await expect(updateRule(rulesClient, { ruleUpdate }, mlAuthz)).rejects.toThrow(
+ await expect(detectionRulesClient.updateRule({ ruleUpdate })).rejects.toThrow(
'mocked MLAuth error'
);
@@ -184,7 +188,7 @@ describe('DetectionRulesClient.updateRule', () => {
(readRules as jest.Mock).mockResolvedValueOnce(existingRule);
rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams()));
- await updateRule(rulesClient, { ruleUpdate }, mlAuthz);
+ await detectionRulesClient.updateRule({ ruleUpdate });
expect(rulesClient.update).toHaveBeenCalledWith(
expect.objectContaining({
@@ -222,7 +226,7 @@ describe('DetectionRulesClient.updateRule', () => {
rulesClient.update.mockResolvedValue(getRuleMock(getQueryRuleParams()));
(readRules as jest.Mock).mockResolvedValueOnce(existingRule);
- await updateRule(rulesClient, { ruleUpdate }, mlAuthz);
+ await detectionRulesClient.updateRule({ ruleUpdate });
expect(rulesClient.update).toHaveBeenCalledWith(
expect.objectContaining({
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/upgrade_prebuilt_rule.detection_rules_client.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts
similarity index 99%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/upgrade_prebuilt_rule.detection_rules_client.test.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts
index 50dc69b660c0..97a564cbf86e 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/upgrade_prebuilt_rule.detection_rules_client.test.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts
@@ -20,7 +20,7 @@ import { getEqlRuleParams, getQueryRuleParams } from '../../../rule_schema/mocks
import { buildMlAuthz } from '../../../../machine_learning/authz';
import { throwAuthzError } from '../../../../machine_learning/validation';
import { createDetectionRulesClient } from './detection_rules_client';
-import type { IDetectionRulesClient } from './detection_rules_client';
+import type { IDetectionRulesClient } from './detection_rules_client_interface';
jest.mock('../../../../machine_learning/authz');
jest.mock('../../../../machine_learning/validation');
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client_interface.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client_interface.ts
new file mode 100644
index 000000000000..d99b0b9c2cbd
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client_interface.ts
@@ -0,0 +1,58 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { RuleCreateProps } from '../../../../../../common/api/detection_engine/model/rule_schema';
+import type { PrebuiltRuleAsset } from '../../../prebuilt_rules';
+import type {
+ RuleUpdateProps,
+ RulePatchProps,
+ RuleObjectId,
+ RuleToImport,
+} from '../../../../../../common/api/detection_engine';
+import type { RuleAlertType } from '../../../rule_schema';
+
+export interface IDetectionRulesClient {
+ createCustomRule: (createCustomRulePayload: CreateCustomRuleArgs) => Promise;
+ createPrebuiltRule: (createPrebuiltRulePayload: CreatePrebuiltRuleArgs) => Promise;
+ updateRule: (updateRulePayload: UpdateRuleArgs) => Promise;
+ patchRule: (patchRulePayload: PatchRuleArgs) => Promise;
+ deleteRule: (deleteRulePayload: DeleteRuleArgs) => Promise;
+ upgradePrebuiltRule: (
+ upgradePrebuiltRulePayload: UpgradePrebuiltRuleArgs
+ ) => Promise;
+ importRule: (importRulePayload: ImportRuleArgs) => Promise;
+}
+
+export interface CreateCustomRuleArgs {
+ params: RuleCreateProps;
+}
+
+export interface CreatePrebuiltRuleArgs {
+ ruleAsset: PrebuiltRuleAsset;
+}
+
+export interface UpdateRuleArgs {
+ ruleUpdate: RuleUpdateProps;
+}
+
+export interface PatchRuleArgs {
+ nextParams: RulePatchProps;
+}
+
+export interface DeleteRuleArgs {
+ ruleId: RuleObjectId;
+}
+
+export interface UpgradePrebuiltRuleArgs {
+ ruleAsset: PrebuiltRuleAsset;
+}
+
+export interface ImportRuleArgs {
+ ruleToImport: RuleToImport;
+ overwriteRules?: boolean;
+ allowMissingConnectorSecrets?: boolean;
+}
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_custom_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_custom_rule.ts
new file mode 100644
index 000000000000..c9b3b7b542a1
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_custom_rule.ts
@@ -0,0 +1,30 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { RulesClient } from '@kbn/alerting-plugin/server';
+import type { CreateCustomRuleArgs } from '../detection_rules_client_interface';
+import type { MlAuthz } from '../../../../../machine_learning/authz';
+import type { RuleAlertType, RuleParams } from '../../../../rule_schema';
+import { convertCreateAPIToInternalSchema } from '../../../normalization/rule_converters';
+
+import { validateMlAuth } from '../utils';
+
+export const createCustomRule = async (
+ rulesClient: RulesClient,
+ args: CreateCustomRuleArgs,
+ mlAuthz: MlAuthz
+): Promise => {
+ const { params } = args;
+ await validateMlAuth(mlAuthz, params.type);
+
+ const internalRule = convertCreateAPIToInternalSchema(params, { immutable: false });
+ const rule = await rulesClient.create({
+ data: internalRule,
+ });
+
+ return rule;
+};
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_prebuilt_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_prebuilt_rule.ts
new file mode 100644
index 000000000000..0ada0197137a
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/create_prebuilt_rule.ts
@@ -0,0 +1,35 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { RulesClient } from '@kbn/alerting-plugin/server';
+import type { CreatePrebuiltRuleArgs } from '../detection_rules_client_interface';
+import type { MlAuthz } from '../../../../../machine_learning/authz';
+import type { RuleAlertType, RuleParams } from '../../../../rule_schema';
+import { convertCreateAPIToInternalSchema } from '../../../normalization/rule_converters';
+
+import { validateMlAuth } from '../utils';
+
+export const createPrebuiltRule = async (
+ rulesClient: RulesClient,
+ args: CreatePrebuiltRuleArgs,
+ mlAuthz: MlAuthz
+): Promise => {
+ const { ruleAsset } = args;
+
+ await validateMlAuth(mlAuthz, ruleAsset.type);
+
+ const internalRule = convertCreateAPIToInternalSchema(ruleAsset, {
+ immutable: true,
+ defaultEnabled: false,
+ });
+
+ const rule = await rulesClient.create({
+ data: internalRule,
+ });
+
+ return rule;
+};
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/delete_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/delete_rule.ts
new file mode 100644
index 000000000000..ec1491e8159d
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/delete_rule.ts
@@ -0,0 +1,14 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { RulesClient } from '@kbn/alerting-plugin/server';
+import type { DeleteRuleArgs } from '../detection_rules_client_interface';
+
+export const deleteRule = async (rulesClient: RulesClient, args: DeleteRuleArgs): Promise => {
+ const { ruleId } = args;
+ await rulesClient.delete({ id: ruleId });
+};
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts
new file mode 100644
index 000000000000..8761478e30ed
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts
@@ -0,0 +1,63 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { RulesClient } from '@kbn/alerting-plugin/server';
+import type { MlAuthz } from '../../../../../machine_learning/authz';
+import type { ImportRuleArgs } from '../detection_rules_client_interface';
+import type { RuleAlertType, RuleParams } from '../../../../rule_schema';
+import { createBulkErrorObject } from '../../../../routes/utils';
+import {
+ convertCreateAPIToInternalSchema,
+ convertUpdateAPIToInternalSchema,
+} from '../../../normalization/rule_converters';
+
+import { validateMlAuth } from '../utils';
+
+import { readRules } from '../read_rules';
+
+export const importRule = async (
+ rulesClient: RulesClient,
+ importRulePayload: ImportRuleArgs,
+ mlAuthz: MlAuthz
+): Promise => {
+ const { ruleToImport, overwriteRules, allowMissingConnectorSecrets } = importRulePayload;
+
+ await validateMlAuth(mlAuthz, ruleToImport.type);
+
+ const existingRule = await readRules({
+ rulesClient,
+ ruleId: ruleToImport.rule_id,
+ id: undefined,
+ });
+
+ if (!existingRule) {
+ const internalRule = convertCreateAPIToInternalSchema(ruleToImport, {
+ immutable: false,
+ });
+
+ return rulesClient.create({
+ data: internalRule,
+ allowMissingConnectorSecrets,
+ });
+ } else if (existingRule && overwriteRules) {
+ const newInternalRule = convertUpdateAPIToInternalSchema({
+ existingRule,
+ ruleUpdate: ruleToImport,
+ });
+
+ return rulesClient.update({
+ id: existingRule.id,
+ data: newInternalRule,
+ });
+ } else {
+ throw createBulkErrorObject({
+ ruleId: existingRule.params.ruleId,
+ statusCode: 409,
+ message: `rule_id: "${existingRule.params.ruleId}" already exists`,
+ });
+ }
+};
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts
new file mode 100644
index 000000000000..b7c8c1539d66
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts
@@ -0,0 +1,54 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { RulesClient } from '@kbn/alerting-plugin/server';
+import type { MlAuthz } from '../../../../../machine_learning/authz';
+import type { PatchRuleArgs } from '../detection_rules_client_interface';
+import type { RuleAlertType } from '../../../../rule_schema';
+import { getIdError } from '../../../utils/utils';
+import { convertPatchAPIToInternalSchema } from '../../../normalization/rule_converters';
+
+import { validateMlAuth, ClientError, toggleRuleEnabledOnUpdate } from '../utils';
+
+import { readRules } from '../read_rules';
+
+export const patchRule = async (
+ rulesClient: RulesClient,
+ args: PatchRuleArgs,
+ mlAuthz: MlAuthz
+): Promise => {
+ const { nextParams } = args;
+ const { rule_id: ruleId, id } = nextParams;
+
+ const existingRule = await readRules({
+ rulesClient,
+ ruleId,
+ id,
+ });
+
+ if (existingRule == null) {
+ const error = getIdError({ id, ruleId });
+ throw new ClientError(error.message, error.statusCode);
+ }
+
+ await validateMlAuth(mlAuthz, nextParams.type ?? existingRule.params.type);
+
+ const patchedRule = convertPatchAPIToInternalSchema(nextParams, existingRule);
+
+ const update = await rulesClient.update({
+ id: existingRule.id,
+ data: patchedRule,
+ });
+
+ await toggleRuleEnabledOnUpdate(rulesClient, existingRule, nextParams.enabled);
+
+ if (nextParams.enabled != null) {
+ return { ...update, enabled: nextParams.enabled };
+ } else {
+ return update;
+ }
+};
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts
new file mode 100644
index 000000000000..a37b5eaddcee
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts
@@ -0,0 +1,53 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { RulesClient } from '@kbn/alerting-plugin/server';
+import type { MlAuthz } from '../../../../../machine_learning/authz';
+import type { RuleAlertType } from '../../../../rule_schema';
+import type { UpdateRuleArgs } from '../detection_rules_client_interface';
+import { getIdError } from '../../../utils/utils';
+import { convertUpdateAPIToInternalSchema } from '../../../normalization/rule_converters';
+
+import { validateMlAuth, ClientError, toggleRuleEnabledOnUpdate } from '../utils';
+
+import { readRules } from '../read_rules';
+
+export const updateRule = async (
+ rulesClient: RulesClient,
+ args: UpdateRuleArgs,
+ mlAuthz: MlAuthz
+): Promise => {
+ const { ruleUpdate } = args;
+ const { rule_id: ruleId, id } = ruleUpdate;
+
+ await validateMlAuth(mlAuthz, ruleUpdate.type);
+
+ const existingRule = await readRules({
+ rulesClient,
+ ruleId,
+ id,
+ });
+
+ if (existingRule == null) {
+ const error = getIdError({ id, ruleId });
+ throw new ClientError(error.message, error.statusCode);
+ }
+
+ const newInternalRule = convertUpdateAPIToInternalSchema({
+ existingRule,
+ ruleUpdate,
+ });
+
+ const update = await rulesClient.update({
+ id: existingRule.id,
+ data: newInternalRule,
+ });
+
+ await toggleRuleEnabledOnUpdate(rulesClient, existingRule, ruleUpdate.enabled);
+
+ return { ...update, enabled: ruleUpdate.enabled ?? existingRule.enabled };
+};
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts
new file mode 100644
index 000000000000..528f81ac9c57
--- /dev/null
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts
@@ -0,0 +1,84 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { RulesClient } from '@kbn/alerting-plugin/server';
+import type { MlAuthz } from '../../../../../machine_learning/authz';
+import type { RuleAlertType, RuleParams } from '../../../../rule_schema';
+import type { UpgradePrebuiltRuleArgs } from '../detection_rules_client_interface';
+import {
+ convertPatchAPIToInternalSchema,
+ convertCreateAPIToInternalSchema,
+} from '../../../normalization/rule_converters';
+import { transformAlertToRuleAction } from '../../../../../../../common/detection_engine/transform_actions';
+
+import { validateMlAuth, ClientError } from '../utils';
+
+import { readRules } from '../read_rules';
+
+export const upgradePrebuiltRule = async (
+ rulesClient: RulesClient,
+ upgradePrebuiltRulePayload: UpgradePrebuiltRuleArgs,
+ mlAuthz: MlAuthz
+): Promise => {
+ const { ruleAsset } = upgradePrebuiltRulePayload;
+
+ await validateMlAuth(mlAuthz, ruleAsset.type);
+
+ const existingRule = await readRules({
+ rulesClient,
+ ruleId: ruleAsset.rule_id,
+ id: undefined,
+ });
+
+ if (!existingRule) {
+ throw new ClientError(`Failed to find rule ${ruleAsset.rule_id}`, 500);
+ }
+
+ if (ruleAsset.type !== existingRule.params.type) {
+ // If we're trying to change the type of a prepackaged rule, we need to delete the old one
+ // and replace it with the new rule, keeping the enabled setting, actions, throttle, id,
+ // and exception lists from the old rule
+ await rulesClient.delete({ id: existingRule.id });
+
+ const internalRule = convertCreateAPIToInternalSchema(
+ {
+ ...ruleAsset,
+ enabled: existingRule.enabled,
+ exceptions_list: existingRule.params.exceptionsList,
+ actions: existingRule.actions.map(transformAlertToRuleAction),
+ timeline_id: existingRule.params.timelineId,
+ timeline_title: existingRule.params.timelineTitle,
+ },
+ { immutable: true, defaultEnabled: existingRule.enabled }
+ );
+
+ return rulesClient.create({
+ data: internalRule,
+ options: { id: existingRule.id },
+ });
+ }
+
+ // Else, simply patch it.
+ const patchedRule = convertPatchAPIToInternalSchema(ruleAsset, existingRule);
+
+ await rulesClient.update({
+ id: existingRule.id,
+ data: patchedRule,
+ });
+
+ const updatedRule = await readRules({
+ rulesClient,
+ ruleId: ruleAsset.rule_id,
+ id: undefined,
+ });
+
+ if (!updatedRule) {
+ throw new ClientError(`Rule ${ruleAsset.rule_id} not found after upgrade`, 500);
+ }
+
+ return updatedRule;
+};
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/read_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/read_rules.test.ts
similarity index 100%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/read_rules.test.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/read_rules.test.ts
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/read_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/read_rules.ts
similarity index 100%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/read_rules.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/read_rules.ts
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/utils.ts
similarity index 100%
rename from x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/utils.ts
rename to x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/utils.ts
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rules_utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rules_utils.ts
index 8c8f32181c23..5c64a2a6f9a3 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rules_utils.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/import_rules_utils.ts
@@ -16,7 +16,7 @@ import type { RuleToImport } from '../../../../../../common/api/detection_engine
import type { ImportRuleResponse } from '../../../routes/utils';
import { createBulkErrorObject } from '../../../routes/utils';
import { checkRuleExceptionReferences } from './check_rule_exception_references';
-import type { IDetectionRulesClient } from '../rule_management/detection_rules_client';
+import type { IDetectionRulesClient } from '../detection_rules_client/detection_rules_client_interface';
export type PromiseFromStreams = RuleToImport | Error;
export interface RuleExceptionsPromiseFromStreams {
@@ -94,9 +94,7 @@ export const importRules = async ({
exceptions_list: [...exceptions],
},
overwriteRules,
- options: {
- allowMissingConnectorSecrets,
- },
+ allowMissingConnectorSecrets,
});
resolve({
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_custom_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_custom_rule.ts
deleted file mode 100644
index c8951d5ff4a6..000000000000
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_custom_rule.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import type { RulesClient } from '@kbn/alerting-plugin/server';
-import type { RuleCreateProps } from '../../../../../../common/api/detection_engine';
-import type { MlAuthz } from '../../../../machine_learning/authz';
-import type { RuleAlertType, RuleParams } from '../../../rule_schema';
-import { withSecuritySpan } from '../../../../../utils/with_security_span';
-import { convertCreateAPIToInternalSchema } from '../../normalization/rule_converters';
-
-import { validateMlAuth } from './utils';
-
-export interface CreateCustomRuleProps {
- params: RuleCreateProps;
-}
-
-export const createCustomRule = async (
- rulesClient: RulesClient,
- createCustomRulePayload: CreateCustomRuleProps,
- mlAuthz: MlAuthz
-): Promise =>
- withSecuritySpan('DetectionRulesClient.createCustomRule', async () => {
- const { params } = createCustomRulePayload;
- await validateMlAuth(mlAuthz, params.type);
-
- const internalRule = convertCreateAPIToInternalSchema(params, { immutable: false });
- const rule = await rulesClient.create({
- data: internalRule,
- });
-
- return rule;
- });
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_prebuilt_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_prebuilt_rule.ts
deleted file mode 100644
index 7cf13cec6382..000000000000
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/create_prebuilt_rule.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import type { RulesClient } from '@kbn/alerting-plugin/server';
-import type { PrebuiltRuleAsset } from '../../../prebuilt_rules';
-import type { MlAuthz } from '../../../../machine_learning/authz';
-import type { RuleAlertType, RuleParams } from '../../../rule_schema';
-import { withSecuritySpan } from '../../../../../utils/with_security_span';
-import { convertCreateAPIToInternalSchema } from '../../normalization/rule_converters';
-
-import { validateMlAuth } from './utils';
-
-export interface CreatePrebuiltRuleProps {
- ruleAsset: PrebuiltRuleAsset;
-}
-
-export const createPrebuiltRule = async (
- rulesClient: RulesClient,
- createPrebuiltRulePayload: CreatePrebuiltRuleProps,
- mlAuthz: MlAuthz
-): Promise =>
- withSecuritySpan('DetectionRulesClient.createPrebuiltRule', async () => {
- const { ruleAsset } = createPrebuiltRulePayload;
-
- await validateMlAuth(mlAuthz, ruleAsset.type);
-
- const internalRule = convertCreateAPIToInternalSchema(ruleAsset, {
- immutable: true,
- defaultEnabled: false,
- });
-
- const rule = await rulesClient.create({
- data: internalRule,
- });
-
- return rule;
- });
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/delete_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/delete_rule.ts
deleted file mode 100644
index a2b4acfc6a58..000000000000
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/delete_rule.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import type { RulesClient } from '@kbn/alerting-plugin/server';
-import type { RuleObjectId } from '../../../../../../common/api/detection_engine';
-import { withSecuritySpan } from '../../../../../utils/with_security_span';
-
-export interface DeleteRuleProps {
- ruleId: RuleObjectId;
-}
-
-export const deleteRule = async (
- rulesClient: RulesClient,
- deleteRulePayload: DeleteRuleProps
-): Promise =>
- withSecuritySpan('DetectionRulesClient.deleteRule', async () => {
- const { ruleId } = deleteRulePayload;
- await rulesClient.delete({ id: ruleId });
- });
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/detection_rules_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/detection_rules_client.ts
deleted file mode 100644
index c976f6d247ac..000000000000
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/detection_rules_client.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import type { RulesClient } from '@kbn/alerting-plugin/server';
-import type { MlAuthz } from '../../../../machine_learning/authz';
-
-import type { RuleAlertType } from '../../../rule_schema';
-
-import type { CreateCustomRuleProps } from './create_custom_rule';
-import type { CreatePrebuiltRuleProps } from './create_prebuilt_rule';
-import type { UpdateRuleProps } from './update_rule';
-import type { PatchRuleProps } from './patch_rule';
-import type { DeleteRuleProps } from './delete_rule';
-import type { UpgradePrebuiltRuleProps } from './upgrade_prebuilt_rule';
-import type { ImportRuleProps } from './import_rule';
-
-import { createCustomRule } from './create_custom_rule';
-import { createPrebuiltRule } from './create_prebuilt_rule';
-import { updateRule } from './update_rule';
-import { patchRule } from './patch_rule';
-import { deleteRule } from './delete_rule';
-import { upgradePrebuiltRule } from './upgrade_prebuilt_rule';
-import { importRule } from './import_rule';
-
-export interface IDetectionRulesClient {
- createCustomRule: (createCustomRulePayload: CreateCustomRuleProps) => Promise;
- createPrebuiltRule: (
- createPrebuiltRulePayload: CreatePrebuiltRuleProps
- ) => Promise;
- updateRule: (updateRulePayload: UpdateRuleProps) => Promise;
- patchRule: (patchRulePayload: PatchRuleProps) => Promise;
- deleteRule: (deleteRulePayload: DeleteRuleProps) => Promise;
- upgradePrebuiltRule: (
- upgradePrebuiltRulePayload: UpgradePrebuiltRuleProps
- ) => Promise;
- importRule: (importRulePayload: ImportRuleProps) => Promise;
-}
-
-export const createDetectionRulesClient = (
- rulesClient: RulesClient,
- mlAuthz: MlAuthz
-): IDetectionRulesClient => ({
- createCustomRule: async (
- createCustomRulePayload: CreateCustomRuleProps
- ): Promise => {
- return createCustomRule(rulesClient, createCustomRulePayload, mlAuthz);
- },
-
- createPrebuiltRule: async (
- createPrebuiltRulePayload: CreatePrebuiltRuleProps
- ): Promise => {
- return createPrebuiltRule(rulesClient, createPrebuiltRulePayload, mlAuthz);
- },
-
- updateRule: async (updateRulePayload: UpdateRuleProps): Promise => {
- return updateRule(rulesClient, updateRulePayload, mlAuthz);
- },
-
- patchRule: async (patchRulePayload: PatchRuleProps): Promise => {
- return patchRule(rulesClient, patchRulePayload, mlAuthz);
- },
-
- deleteRule: async (deleteRulePayload: DeleteRuleProps): Promise => {
- return deleteRule(rulesClient, deleteRulePayload);
- },
-
- upgradePrebuiltRule: async (
- upgradePrebuiltRulePayload: UpgradePrebuiltRuleProps
- ): Promise => {
- return upgradePrebuiltRule(rulesClient, upgradePrebuiltRulePayload, mlAuthz);
- },
-
- importRule: async (importRulePayload: ImportRuleProps): Promise => {
- return importRule(rulesClient, importRulePayload, mlAuthz);
- },
-});
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/import_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/import_rule.ts
deleted file mode 100644
index 643d59a0c495..000000000000
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/import_rule.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import type { RulesClient } from '@kbn/alerting-plugin/server';
-import type { MlAuthz } from '../../../../machine_learning/authz';
-import type { RuleAlertType, RuleParams } from '../../../rule_schema';
-import { withSecuritySpan } from '../../../../../utils/with_security_span';
-import type { RuleToImport } from '../../../../../../common/api/detection_engine';
-import { createBulkErrorObject } from '../../../routes/utils';
-import {
- convertCreateAPIToInternalSchema,
- convertUpdateAPIToInternalSchema,
-} from '../../normalization/rule_converters';
-
-import { validateMlAuth } from './utils';
-
-import { readRules } from './read_rules';
-
-interface ImportRuleOptions {
- allowMissingConnectorSecrets?: boolean;
-}
-
-export interface ImportRuleProps {
- ruleToImport: RuleToImport;
- overwriteRules?: boolean;
- options: ImportRuleOptions;
-}
-
-export const importRule = async (
- rulesClient: RulesClient,
- importRulePayload: ImportRuleProps,
- mlAuthz: MlAuthz
-): Promise =>
- withSecuritySpan('DetectionRulesClient.importRule', async () => {
- const { ruleToImport, overwriteRules, options } = importRulePayload;
-
- await validateMlAuth(mlAuthz, ruleToImport.type);
-
- const existingRule = await readRules({
- rulesClient,
- ruleId: ruleToImport.rule_id,
- id: undefined,
- });
-
- if (!existingRule) {
- const internalRule = convertCreateAPIToInternalSchema(ruleToImport, {
- immutable: false,
- });
-
- return rulesClient.create({
- data: internalRule,
- allowMissingConnectorSecrets: options.allowMissingConnectorSecrets,
- });
- } else if (existingRule && overwriteRules) {
- const newInternalRule = convertUpdateAPIToInternalSchema({
- existingRule,
- ruleUpdate: ruleToImport,
- });
-
- return rulesClient.update({
- id: existingRule.id,
- data: newInternalRule,
- });
- } else {
- throw createBulkErrorObject({
- ruleId: existingRule.params.ruleId,
- statusCode: 409,
- message: `rule_id: "${existingRule.params.ruleId}" already exists`,
- });
- }
- });
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/patch_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/patch_rule.ts
deleted file mode 100644
index dad3d74a6f20..000000000000
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/patch_rule.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import type { RulesClient } from '@kbn/alerting-plugin/server';
-import type { PatchRuleRequestBody } from '../../../../../../common/api/detection_engine';
-import type { MlAuthz } from '../../../../machine_learning/authz';
-import type { RuleAlertType } from '../../../rule_schema';
-import { withSecuritySpan } from '../../../../../utils/with_security_span';
-import { getIdError } from '../../utils/utils';
-import { convertPatchAPIToInternalSchema } from '../../normalization/rule_converters';
-
-import { validateMlAuth, ClientError, toggleRuleEnabledOnUpdate } from './utils';
-
-import { readRules } from './read_rules';
-
-export interface PatchRuleProps {
- nextParams: PatchRuleRequestBody;
-}
-
-export const patchRule = async (
- rulesClient: RulesClient,
- patchRulePayload: PatchRuleProps,
- mlAuthz: MlAuthz
-): Promise =>
- withSecuritySpan('DetectionRulesClient.patchRule', async () => {
- const { nextParams } = patchRulePayload;
- const { rule_id: ruleId, id } = nextParams;
-
- const existingRule = await readRules({
- rulesClient,
- ruleId,
- id,
- });
-
- if (existingRule == null) {
- const error = getIdError({ id, ruleId });
- throw new ClientError(error.message, error.statusCode);
- }
-
- await validateMlAuth(mlAuthz, nextParams.type ?? existingRule.params.type);
-
- const patchedRule = convertPatchAPIToInternalSchema(nextParams, existingRule);
-
- const update = await rulesClient.update({
- id: existingRule.id,
- data: patchedRule,
- });
-
- await toggleRuleEnabledOnUpdate(rulesClient, existingRule, nextParams.enabled);
-
- if (nextParams.enabled != null) {
- return { ...update, enabled: nextParams.enabled };
- } else {
- return update;
- }
- });
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/update_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/update_rule.ts
deleted file mode 100644
index 4370e4f45744..000000000000
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/update_rule.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import type { RulesClient } from '@kbn/alerting-plugin/server';
-import type { RuleUpdateProps } from '../../../../../../common/api/detection_engine';
-import type { MlAuthz } from '../../../../machine_learning/authz';
-import type { RuleAlertType } from '../../../rule_schema';
-import { withSecuritySpan } from '../../../../../utils/with_security_span';
-import { getIdError } from '../../utils/utils';
-import { convertUpdateAPIToInternalSchema } from '../../normalization/rule_converters';
-
-import { validateMlAuth, ClientError, toggleRuleEnabledOnUpdate } from './utils';
-
-import { readRules } from './read_rules';
-
-export interface UpdateRuleProps {
- ruleUpdate: RuleUpdateProps;
-}
-
-export const updateRule = async (
- rulesClient: RulesClient,
- updateRulePayload: UpdateRuleProps,
- mlAuthz: MlAuthz
-): Promise =>
- withSecuritySpan('DetectionRulesClient.updateRule', async () => {
- const { ruleUpdate } = updateRulePayload;
- const { rule_id: ruleId, id } = ruleUpdate;
-
- await validateMlAuth(mlAuthz, ruleUpdate.type);
-
- const existingRule = await readRules({
- rulesClient,
- ruleId,
- id,
- });
-
- if (existingRule == null) {
- const error = getIdError({ id, ruleId });
- throw new ClientError(error.message, error.statusCode);
- }
-
- const newInternalRule = convertUpdateAPIToInternalSchema({
- existingRule,
- ruleUpdate,
- });
-
- const update = await rulesClient.update({
- id: existingRule.id,
- data: newInternalRule,
- });
-
- await toggleRuleEnabledOnUpdate(rulesClient, existingRule, ruleUpdate.enabled);
-
- return { ...update, enabled: ruleUpdate.enabled ?? existingRule.enabled };
- });
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/upgrade_prebuilt_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/upgrade_prebuilt_rule.ts
deleted file mode 100644
index b516fc997055..000000000000
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/rule_management/upgrade_prebuilt_rule.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0; you may not use this file except in compliance with the Elastic License
- * 2.0.
- */
-
-import type { RulesClient } from '@kbn/alerting-plugin/server';
-import type { PrebuiltRuleAsset } from '../../../prebuilt_rules';
-import type { MlAuthz } from '../../../../machine_learning/authz';
-import type { RuleAlertType, RuleParams } from '../../../rule_schema';
-import { withSecuritySpan } from '../../../../../utils/with_security_span';
-import {
- convertPatchAPIToInternalSchema,
- convertCreateAPIToInternalSchema,
-} from '../../normalization/rule_converters';
-import { transformAlertToRuleAction } from '../../../../../../common/detection_engine/transform_actions';
-
-import { validateMlAuth, ClientError } from './utils';
-
-import { readRules } from './read_rules';
-
-export interface UpgradePrebuiltRuleProps {
- ruleAsset: PrebuiltRuleAsset;
-}
-
-export const upgradePrebuiltRule = async (
- rulesClient: RulesClient,
- upgradePrebuiltRulePayload: UpgradePrebuiltRuleProps,
- mlAuthz: MlAuthz
-): Promise =>
- withSecuritySpan('DetectionRulesClient.upgradePrebuiltRule', async () => {
- const { ruleAsset } = upgradePrebuiltRulePayload;
-
- await validateMlAuth(mlAuthz, ruleAsset.type);
-
- const existingRule = await readRules({
- rulesClient,
- ruleId: ruleAsset.rule_id,
- id: undefined,
- });
-
- if (!existingRule) {
- throw new ClientError(`Failed to find rule ${ruleAsset.rule_id}`, 500);
- }
-
- if (ruleAsset.type !== existingRule.params.type) {
- // If we're trying to change the type of a prepackaged rule, we need to delete the old one
- // and replace it with the new rule, keeping the enabled setting, actions, throttle, id,
- // and exception lists from the old rule
- await rulesClient.delete({ id: existingRule.id });
-
- const internalRule = convertCreateAPIToInternalSchema(
- {
- ...ruleAsset,
- enabled: existingRule.enabled,
- exceptions_list: existingRule.params.exceptionsList,
- actions: existingRule.actions.map(transformAlertToRuleAction),
- timeline_id: existingRule.params.timelineId,
- timeline_title: existingRule.params.timelineTitle,
- },
- { immutable: true, defaultEnabled: existingRule.enabled }
- );
-
- return rulesClient.create({
- data: internalRule,
- options: { id: existingRule.id },
- });
- }
-
- // Else, simply patch it.
- const patchedRule = convertPatchAPIToInternalSchema(ruleAsset, existingRule);
-
- await rulesClient.update({
- id: existingRule.id,
- data: patchedRule,
- });
-
- const updatedRule = await readRules({
- rulesClient,
- ruleId: ruleAsset.rule_id,
- id: undefined,
- });
-
- if (!updatedRule) {
- throw new ClientError(`Rule ${ruleAsset.rule_id} not found after upgrade`, 500);
- }
-
- return updatedRule;
- });
diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/rule_objects/fetch_rule_by_id.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/rule_objects/fetch_rule_by_id.ts
index 520363eb67e5..4272af8ee9f9 100644
--- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/rule_objects/fetch_rule_by_id.ts
+++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/rule_objects/fetch_rule_by_id.ts
@@ -11,7 +11,7 @@ import type {
RuleObjectId,
RuleResponse,
} from '../../../../../../../common/api/detection_engine/model/rule_schema';
-import { readRules } from '../../../../rule_management/logic/rule_management/read_rules';
+import { readRules } from '../../../../rule_management/logic/detection_rules_client/read_rules';
import { transform } from '../../../../rule_management/utils/utils';
// TODO: https://github.com/elastic/kibana/issues/125642 Move to rule_management into a DetectionRulesClient
diff --git a/x-pack/plugins/security_solution/server/request_context_factory.ts b/x-pack/plugins/security_solution/server/request_context_factory.ts
index a47535772dd8..1f36f7ecff23 100644
--- a/x-pack/plugins/security_solution/server/request_context_factory.ts
+++ b/x-pack/plugins/security_solution/server/request_context_factory.ts
@@ -28,7 +28,7 @@ import type { EndpointAppContextService } from './endpoint/endpoint_app_context_
import { RiskEngineDataClient } from './lib/entity_analytics/risk_engine/risk_engine_data_client';
import { RiskScoreDataClient } from './lib/entity_analytics/risk_score/risk_score_data_client';
import { AssetCriticalityDataClient } from './lib/entity_analytics/asset_criticality';
-import { createDetectionRulesClient } from './lib/detection_engine/rule_management/logic/rule_management/detection_rules_client';
+import { createDetectionRulesClient } from './lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client';
import { buildMlAuthz } from './lib/machine_learning/authz';
export interface IRequestContextFactory {
@@ -114,7 +114,7 @@ export class RequestContextFactory implements IRequestContextFactory {
getAuditLogger,
- getDetectionRulesClient: () => {
+ getDetectionRulesClient: memoize(() => {
const mlAuthz = buildMlAuthz({
license: licensing.license,
ml: plugins.ml,
@@ -126,7 +126,7 @@ export class RequestContextFactory implements IRequestContextFactory {
startPlugins.alerting.getRulesClientWithRequest(request),
mlAuthz
);
- },
+ }),
getDetectionEngineHealthClient: memoize(() =>
ruleMonitoringService.createDetectionEngineHealthClient({
diff --git a/x-pack/plugins/security_solution/server/types.ts b/x-pack/plugins/security_solution/server/types.ts
index 563d61bfae30..121eb7b1758f 100644
--- a/x-pack/plugins/security_solution/server/types.ts
+++ b/x-pack/plugins/security_solution/server/types.ts
@@ -33,7 +33,7 @@ import type { EndpointInternalFleetServicesInterface } from './endpoint/services
import type { RiskEngineDataClient } from './lib/entity_analytics/risk_engine/risk_engine_data_client';
import type { RiskScoreDataClient } from './lib/entity_analytics/risk_score/risk_score_data_client';
import type { AssetCriticalityDataClient } from './lib/entity_analytics/asset_criticality';
-import type { IDetectionRulesClient } from './lib/detection_engine/rule_management/logic/rule_management/detection_rules_client';
+import type { IDetectionRulesClient } from './lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client_interface';
export { AppClient };
export interface SecuritySolutionApiRequestHandlerContext {
From 3fb15c17836ccb489011ae2d64223c524fa83f99 Mon Sep 17 00:00:00 2001
From: Catherine Liu
Date: Fri, 7 Jun 2024 17:54:56 -0700
Subject: [PATCH 09/23] [Dashboard] Check suggested dashboard title for
duplicates on save as (#184777)
## Summary
Follow up to #180938.
On `Save as`, the suggested title should always be a unique title. I've
added a check for duplicate titles when generating a suggested new
dashboard title. If the dashboards `Dashboard A`, `Dashboard A (1)`, and
`Dashboard A (2)` already exist, the next suggested dashboard title will
be `Dashboard A (3)`. This way the user doesn't end up hitting the
duplicate title warning if they want to quickly clone a dashboard
without updating the title.
![Jun-04-2024
12-27-59](https://github.com/elastic/kibana/assets/1697105/b1f1ae1a-87d3-4dcd-80cd-395bd6ee9800)
### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
---------
Co-authored-by: Eyo Okon Eyo
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
---
.../embeddable/api/run_save_functions.tsx | 103 +++++++++++-------
.../apps/dashboard/group4/dashboard_clone.ts | 7 ++
2 files changed, 71 insertions(+), 39 deletions(-)
diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/api/run_save_functions.tsx b/src/plugins/dashboard/public/dashboard_container/embeddable/api/run_save_functions.tsx
index fe2a383291f7..049bfaf00e5d 100644
--- a/src/plugins/dashboard/public/dashboard_container/embeddable/api/run_save_functions.tsx
+++ b/src/plugins/dashboard/public/dashboard_container/embeddable/api/run_save_functions.tsx
@@ -268,47 +268,72 @@ export async function runInteractiveSave(this: DashboardContainer, interactionMo
}
};
- let customModalTitle;
- let newTitle = currentState.title;
-
- if (lastSavedId) {
- const [baseTitle, baseCount] = extractTitleAndCount(currentState.title);
- newTitle = `${baseTitle} (${baseCount + 1})`;
+ (async () => {
+ try {
+ let customModalTitle;
+ let newTitle = currentState.title;
+
+ if (lastSavedId) {
+ const [baseTitle, baseCount] = extractTitleAndCount(newTitle);
+ let copyCount = baseCount + 1;
+ newTitle = `${baseTitle} (${copyCount})`;
+
+ // increment count until we find a unique title
+ while (
+ !(await checkForDuplicateDashboardTitle({
+ title: newTitle,
+ lastSavedTitle: currentState.title,
+ copyOnSave: true,
+ isTitleDuplicateConfirmed: false,
+ }))
+ ) {
+ copyCount++;
+ newTitle = `${baseTitle} (${copyCount})`;
+ }
- switch (interactionMode) {
- case ViewMode.EDIT: {
- customModalTitle = i18n.translate('dashboard.topNav.editModeInteractiveSave.modalTitle', {
- defaultMessage: 'Save as new dashboard',
- });
- break;
- }
- case ViewMode.VIEW: {
- customModalTitle = i18n.translate('dashboard.topNav.viewModeInteractiveSave.modalTitle', {
- defaultMessage: 'Duplicate dashboard',
- });
- break;
- }
- default: {
- customModalTitle = undefined;
+ switch (interactionMode) {
+ case ViewMode.EDIT: {
+ customModalTitle = i18n.translate(
+ 'dashboard.topNav.editModeInteractiveSave.modalTitle',
+ {
+ defaultMessage: 'Save as new dashboard',
+ }
+ );
+ break;
+ }
+ case ViewMode.VIEW: {
+ customModalTitle = i18n.translate(
+ 'dashboard.topNav.viewModeInteractiveSave.modalTitle',
+ {
+ defaultMessage: 'Duplicate dashboard',
+ }
+ );
+ break;
+ }
+ default: {
+ customModalTitle = undefined;
+ }
+ }
}
- }
- }
- const dashboardDuplicateModal = (
- resolve(undefined)}
- timeRestore={currentState.timeRestore}
- showStoreTimeOnSave={!lastSavedId}
- description={currentState.description ?? ''}
- showCopyOnSave={false}
- onSave={onSaveAttempt}
- customModalTitle={customModalTitle}
- />
- );
-
- this.clearOverlays();
- showSaveModal(dashboardDuplicateModal);
+ const dashboardDuplicateModal = (
+ resolve(undefined)}
+ timeRestore={currentState.timeRestore}
+ showStoreTimeOnSave={!lastSavedId}
+ description={currentState.description ?? ''}
+ showCopyOnSave={false}
+ onSave={onSaveAttempt}
+ customModalTitle={customModalTitle}
+ />
+ );
+ this.clearOverlays();
+ showSaveModal(dashboardDuplicateModal);
+ } catch (error) {
+ reject(error);
+ }
+ })();
});
}
diff --git a/test/functional/apps/dashboard/group4/dashboard_clone.ts b/test/functional/apps/dashboard/group4/dashboard_clone.ts
index 438f01061dda..1e15f4d44e74 100644
--- a/test/functional/apps/dashboard/group4/dashboard_clone.ts
+++ b/test/functional/apps/dashboard/group4/dashboard_clone.ts
@@ -42,5 +42,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
expect(panelTitles).to.eql(PageObjects.dashboard.getTestVisualizationNames());
});
});
+
+ it('Clone should suggest a unique title', async function () {
+ await PageObjects.dashboard.loadSavedDashboard(clonedDashboardName);
+ await PageObjects.dashboard.duplicateDashboard();
+ await PageObjects.dashboard.gotoDashboardLandingPage();
+ await listingTable.searchAndExpectItemsCount('dashboard', `${dashboardName} (2)`, 1);
+ });
});
}
From 2e7eef4771dd7649faeba730119f3439f3fcf217 Mon Sep 17 00:00:00 2001
From: Dario Gieselaar
Date: Sat, 8 Jun 2024 09:59:25 +0200
Subject: [PATCH 10/23] Consolidate react-hooks/exhaustive-deps lint rules for
O11y (#184865)
Use one react-hooks/exhaustive-deps across our Obs plugins, for
consistency reasons.
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Carlos Crespo
---
.eslintrc.js | 27 +++++-----
.../components/asset_details/charts/chart.tsx | 29 ++++++----
.../asset_details/charts/docker_charts.tsx | 3 +-
.../asset_details/charts/host_charts.tsx | 5 +-
.../charts/kubernetes_charts.tsx | 8 +--
.../components/kpis/container_kpi_charts.tsx | 14 +----
.../components/kpis/host_kpi_charts.tsx | 12 ++---
.../asset_details/components/kpis/kpi.tsx | 2 +-
.../hooks/use_container_metrics_charts.ts | 32 +++++------
.../asset_details/hooks/use_data_views.ts | 2 +-
.../hooks/use_host_metrics_charts.test.ts | 6 +--
.../hooks/use_host_metrics_charts.ts | 54 ++++++++-----------
.../public/components/lens/lens_chart.tsx | 9 ++--
.../infra/public/hooks/use_lens_attributes.ts | 2 +-
.../public/hooks/use_log_view_reference.ts | 2 +-
.../hosts/components/kpis/kpi_charts.tsx | 2 +-
.../hosts/components/tabs/metrics/chart.tsx | 3 +-
.../metrics/hosts/hooks/use_metrics_charts.ts | 3 +-
.../public/components/nav_control/index.tsx | 2 +-
.../public/functions/lens.tsx | 2 +-
.../public/functions/visualize_esql.tsx | 3 +-
.../public/hooks/use_conversation.ts | 2 +-
.../public/hooks/use_knowledge_base.tsx | 13 +++--
.../custom_logs/install_elastic_agent.tsx | 12 ++++-
.../system_logs/install_elastic_agent.tsx | 6 ++-
.../public/hooks/use_es_search.ts | 1 +
.../components/alerts/query_bar.tsx | 2 +-
.../common/components/monitor_inspect.tsx | 3 ++
.../common/components/stderr_logs.tsx | 2 +-
.../result_details_successful.tsx | 18 +++++--
.../monitor_add_edit/form/run_test_btn.tsx | 2 +-
.../hooks/use_monitor_save.tsx | 3 ++
.../monitor_add_edit/monitor_edit_page.tsx | 3 ++
.../use_recently_viewed_monitors.ts | 3 ++
.../overview/monitor_detail_flyout.tsx | 8 ++-
.../components/settings/policy_link.tsx | 5 +-
.../hooks/use_locations_api.ts | 6 +++
.../project_api_keys/project_api_keys.tsx | 3 ++
.../last_successful_screenshot.tsx | 3 ++
.../hooks/use_browser_run_once_monitors.ts | 3 ++
.../hooks/use_test_flyout_open.ts | 10 ++--
.../test_now_mode_flyout_container.tsx | 47 ++++++++--------
.../contexts/synthetics_data_view_context.tsx | 2 +-
.../public/hooks/use_capabilities.ts | 2 +-
.../ping_timestamp/use_in_progress_image.ts | 3 ++
.../alerts/alerts_containers/use_snap_shot.ts | 3 ++
.../integration_deprecation/index.tsx | 3 ++
.../overview/snapshot/use_snap_shot.ts | 3 ++
.../synthetics/check_steps/stderr_logs.tsx | 3 ++
.../step_expanded_row/step_screenshots.tsx | 3 ++
.../synthetics/step_screenshot_display.tsx | 3 ++
.../contexts/uptime_data_view_context.tsx | 3 ++
52 files changed, 238 insertions(+), 167 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index d7956c159068..4e6c367970c0 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -908,10 +908,6 @@ module.exports = {
},
],
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
- 'react-hooks/exhaustive-deps': [
- 'error',
- { additionalHooks: '^(useFetcher|useProgressiveFetcher|useBreadcrumb)$' },
- ],
},
},
{
@@ -931,6 +927,18 @@ module.exports = {
],
},
},
+ {
+ files: ['x-pack/plugins/observability_solution/**/*.{ts,tsx}'],
+ rules: {
+ 'react-hooks/exhaustive-deps': [
+ 'error',
+ {
+ additionalHooks:
+ '^(useAbortableAsync|useMemoWithAbortSignal|useFetcher|useProgressiveFetcher|useBreadcrumb|useAsync|useTimeRangeAsync|useAutoAbortedHttpClient)$',
+ },
+ ],
+ },
+ },
{
files: [
'x-pack/plugins/aiops/**/*.tsx',
@@ -964,17 +972,6 @@ module.exports = {
],
},
},
- // Profiling
- {
- files: ['x-pack/plugins/observability_solution/profiling/**/*.{js,mjs,ts,tsx}'],
- rules: {
- 'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
- 'react-hooks/exhaustive-deps': [
- 'error',
- { additionalHooks: '^(useAsync|useTimeRangeAsync|useAutoAbortedHttpClient)$' },
- ],
- },
- },
{
// disable imports from legacy uptime plugin
files: [
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/charts/chart.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/charts/chart.tsx
index e356eb009a1c..89d47e598de8 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/charts/chart.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/charts/chart.tsx
@@ -17,15 +17,22 @@ import { useDatePickerContext } from '../hooks/use_date_picker';
import { extractRangeFromChartFilterEvent } from './chart_utils';
import { useLoadingStateContext } from '../hooks/use_loading_state';
-export type ChartProps = LensConfig &
- Pick & {
- id: string;
- queryField: string;
- dateRange: TimeRange;
- assetId: string;
- };
+export type ChartProps = Pick & {
+ id: string;
+ queryField: string;
+ dateRange: TimeRange;
+ assetId: string;
+ lensAttributes: LensConfig;
+};
-export const Chart = ({ id, queryField, overrides, dateRange, assetId, ...props }: ChartProps) => {
+export const Chart = ({
+ id,
+ queryField,
+ overrides,
+ dateRange,
+ assetId,
+ lensAttributes,
+}: ChartProps) => {
const { setDateRange } = useDatePickerContext();
const { searchSessionId } = useLoadingStateContext();
const {
@@ -34,7 +41,7 @@ export const Chart = ({ id, queryField, overrides, dateRange, assetId, ...props
const { value: filters = [] } = useAsync(async () => {
const resolvedDataView = await resolveDataView({
- dataViewId: (props.dataset as LensDataviewDataset)?.index,
+ dataViewId: (lensAttributes.dataset as LensDataviewDataset)?.index,
dataViewsService: dataViews,
});
@@ -45,7 +52,7 @@ export const Chart = ({ id, queryField, overrides, dateRange, assetId, ...props
dataView: resolvedDataView.dataViewReference,
}),
];
- }, [assetId, dataViews, props.dataset, queryField]);
+ }, [assetId, dataViews, lensAttributes.dataset, queryField]);
const handleBrushEnd = useCallback(
({ range, preventDefault }: BrushEndArgs) => {
@@ -75,13 +82,13 @@ export const Chart = ({ id, queryField, overrides, dateRange, assetId, ...props
return (
(
{charts.map((chart) => (
(
const { charts } = useHostCharts({
metric,
dataViewId: dataView?.id,
- options: { overview },
+ overview,
});
return (
@@ -91,10 +91,11 @@ export const HostCharts = React.forwardRef(
{charts.map((chart) => (
))}
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/charts/kubernetes_charts.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/charts/kubernetes_charts.tsx
index b386b1e9d8cb..55771a47d09b 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/charts/kubernetes_charts.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/charts/kubernetes_charts.tsx
@@ -27,7 +27,7 @@ export const KubernetesNodeCharts = React.forwardRef {
const { charts } = useKubernetesCharts({
dataViewId: dataView?.id,
- options: { overview },
+ overview,
});
const hasIntegration = useIntegrationCheck({ dependsOn: INTEGRATIONS.kubernetesNode });
@@ -63,10 +63,11 @@ export const KubernetesNodeCharts = React.forwardRef
{charts.map((chart) => (
))}
@@ -127,8 +128,9 @@ export const KubernetesContainerCharts = React.forwardRef<
{charts.map((chart) => (
string;
- };
+ getSubtitle?: (formulaValue: string) => string;
loading?: boolean;
}
@@ -28,7 +26,7 @@ export const HostKpiCharts = ({
dateRange,
dataView,
filters,
- options,
+ getSubtitle,
query,
searchSessionId,
loading = false,
@@ -36,10 +34,8 @@ export const HostKpiCharts = ({
const { euiTheme } = useEuiTheme();
const charts = useHostKpiCharts({
dataViewId: dataView?.id,
- options: {
- getSubtitle: options?.getSubtitle,
- seriesColor: euiTheme.colors.lightestShade,
- },
+ getSubtitle,
+ seriesColor: euiTheme.colors.lightestShade,
});
return (
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/components/kpis/kpi.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/components/kpis/kpi.tsx
index 6652bd2b12b9..3545a54d813d 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/components/kpis/kpi.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/components/kpis/kpi.tsx
@@ -36,11 +36,11 @@ export const Kpi = ({
return (
{
export const useDockerContainerKpiCharts = ({
dataViewId,
- options,
+ seriesColor,
}: {
dataViewId?: string;
- options?: { seriesColor: string; getSubtitle?: (formulaValue: string) => string };
+ seriesColor?: string;
}) => {
const { value: charts = [] } = useAsync(async () => {
const model = findInventoryModel('container');
@@ -113,9 +113,8 @@ export const useDockerContainerKpiCharts = ({
return [cpu.metric.dockerContainerCpuUsage, memory.metric.dockerContainerMemoryUsage].map(
(chart) => ({
...chart,
- seriesColor: options?.seriesColor,
+ seriesColor,
decimals: 1,
- subtitle: getSubtitle(options, chart),
...(dataViewId && {
dataset: {
index: dataViewId,
@@ -123,17 +122,17 @@ export const useDockerContainerKpiCharts = ({
}),
})
);
- }, [dataViewId, options?.seriesColor, options?.getSubtitle]);
+ }, [dataViewId, seriesColor]);
return charts;
};
export const useK8sContainerKpiCharts = ({
dataViewId,
- options,
+ seriesColor,
}: {
dataViewId?: string;
- options?: { seriesColor: string; getSubtitle?: (formulaValue: string) => string };
+ seriesColor?: string;
}) => {
const { value: charts = [] } = useAsync(async () => {
const model = findInventoryModel('container');
@@ -142,9 +141,9 @@ export const useK8sContainerKpiCharts = ({
return [cpu.metric.k8sContainerCpuUsage, memory.metric.k8sContainerMemoryUsage].map(
(chart) => ({
...chart,
- seriesColor: options?.seriesColor,
+ seriesColor,
decimals: 1,
- subtitle: getSubtitle(options, chart),
+ subtitle: getSubtitle(chart),
...(dataViewId && {
dataset: {
index: dataViewId,
@@ -152,16 +151,11 @@ export const useK8sContainerKpiCharts = ({
}),
})
);
- }, [dataViewId, options?.seriesColor, options?.getSubtitle]);
+ }, [dataViewId, seriesColor]);
return charts;
};
-function getSubtitle(
- options: { getSubtitle?: ((formulaValue: string) => string) | undefined } | undefined,
- chart: { value: string }
-) {
- return options?.getSubtitle
- ? options?.getSubtitle(chart.value)
- : getSubtitleFromFormula(chart.value);
+function getSubtitle(chart: { value: string }) {
+ return getSubtitleFromFormula(chart.value);
}
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_data_views.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_data_views.ts
index 6ef5ab61f517..7740b968e74d 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_data_views.ts
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_data_views.ts
@@ -34,7 +34,7 @@ const useDataViews = () => {
const { value: logsDataView, loading: logsDataViewLoading } = useAsync(
() => getLogsDataView(logViewReference),
- [logViewReference]
+ [logViewReference, getLogsDataView]
);
return {
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_host_metrics_charts.test.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_host_metrics_charts.test.ts
index c4e3815f5e0f..006fae9bec75 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_host_metrics_charts.test.ts
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_host_metrics_charts.test.ts
@@ -61,7 +61,7 @@ describe('useHostCharts', () => {
const expectedOrder = getHostChartsExpectedOrder(metric, true);
const { result, waitForNextUpdate } = renderHook(() =>
- useHostCharts({ dataViewId, metric, options: { overview: true } })
+ useHostCharts({ dataViewId, metric, overview: true })
);
await waitForNextUpdate();
@@ -81,7 +81,7 @@ describe('useHostCharts', () => {
describe('useKubernetesCharts', () => {
it('should return an array of charts with correct order - overview', async () => {
const { result, waitForNextUpdate } = renderHook(() =>
- useKubernetesCharts({ dataViewId, options: { overview: true } })
+ useKubernetesCharts({ dataViewId, overview: true })
);
await waitForNextUpdate();
@@ -141,7 +141,7 @@ describe('useHostKpiCharts', () => {
};
const { result, waitForNextUpdate } = renderHook(() =>
- useHostKpiCharts({ dataViewId, options })
+ useHostKpiCharts({ dataViewId, ...options })
);
await waitForNextUpdate();
diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_host_metrics_charts.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_host_metrics_charts.ts
index 6d5381caf618..57c9a5a0d7d4 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_host_metrics_charts.ts
+++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/hooks/use_host_metrics_charts.ts
@@ -7,24 +7,21 @@
import { i18n } from '@kbn/i18n';
import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common';
+import { useMemo } from 'react';
import useAsync from 'react-use/lib/useAsync';
import { HostMetricTypes } from '../charts/types';
-interface UseChartsOptions {
- overview?: boolean;
-}
-
export const useHostCharts = ({
metric,
dataViewId,
- options,
+ overview,
}: {
metric: HostMetricTypes;
dataViewId?: string;
- options?: UseChartsOptions;
+ overview?: boolean;
}) => {
const { value: charts = [], error } = useAsync(async () => {
- const hostCharts = await getHostsCharts({ metric, options });
+ const hostCharts = await getHostsCharts({ metric, overview });
return hostCharts.map((chart) => ({
...chart,
...(dataViewId && {
@@ -33,24 +30,24 @@ export const useHostCharts = ({
},
}),
}));
- }, [dataViewId]);
+ }, [dataViewId, metric, overview]);
return { charts, error };
};
export const useKubernetesCharts = ({
dataViewId,
- options,
+ overview,
}: {
dataViewId?: string;
- options?: UseChartsOptions;
+ overview?: boolean;
}) => {
- const model = findInventoryModel('host');
+ const model = useMemo(() => findInventoryModel('host'), []);
const { value: charts = [], error } = useAsync(async () => {
const { kibernetesNode } = await model.metrics.getCharts();
- const items = options?.overview
+ const items = overview
? [kibernetesNode.xy.nodeCpuCapacity, kibernetesNode.xy.nodeMemoryCapacity]
: [
kibernetesNode.xy.nodeCpuCapacity,
@@ -69,7 +66,7 @@ export const useKubernetesCharts = ({
}),
};
});
- }, [dataViewId, options?.overview]);
+ }, [dataViewId, overview, model.metrics]);
return { charts, error };
};
@@ -83,10 +80,12 @@ const getSubtitleFromFormula = (value: string) =>
export const useHostKpiCharts = ({
dataViewId,
- options,
+ seriesColor,
+ getSubtitle,
}: {
dataViewId?: string;
- options?: { seriesColor: string; getSubtitle?: (formulaValue: string) => string };
+ seriesColor?: string;
+ getSubtitle?: (formulaValue: string) => string;
}) => {
const { value: charts = [] } = useAsync(async () => {
const model = findInventoryModel('host');
@@ -99,33 +98,33 @@ export const useHostKpiCharts = ({
disk.metric.diskUsage,
].map((chart) => ({
...chart,
- seriesColor: options?.seriesColor,
+ seriesColor,
decimals: 1,
- subtitle: getSubtitle(options, chart),
+ subtitle: getSubtitle ? getSubtitle(chart.value) : getSubtitleFromFormula(chart.value),
...(dataViewId && {
dataset: {
index: dataViewId,
},
}),
}));
- }, [dataViewId, options?.seriesColor, options?.getSubtitle]);
+ }, [dataViewId, seriesColor, getSubtitle]);
return charts;
};
const getHostsCharts = async ({
metric,
- options,
+ overview,
}: {
metric: HostMetricTypes;
- options?: UseChartsOptions;
+ overview?: boolean;
}) => {
const model = findInventoryModel('host');
const { cpu, memory, network, disk, logs } = await model.metrics.getCharts();
switch (metric) {
case 'cpu':
- return options?.overview
+ return overview
? [cpu.xy.cpuUsage, cpu.xy.normalizedLoad1m]
: [
cpu.xy.cpuUsage,
@@ -134,13 +133,13 @@ const getHostsCharts = async ({
cpu.xy.loadBreakdown,
];
case 'memory':
- return options?.overview
+ return overview
? [memory.xy.memoryUsage]
: [memory.xy.memoryUsage, memory.xy.memoryUsageBreakdown];
case 'network':
return [network.xy.rxTx];
case 'disk':
- return options?.overview
+ return overview
? [disk.xy.diskUsageByMountPoint, disk.xy.diskIOReadWrite]
: [disk.xy.diskUsageByMountPoint, disk.xy.diskIOReadWrite, disk.xy.diskThroughputReadWrite];
case 'log':
@@ -149,12 +148,3 @@ const getHostsCharts = async ({
return [];
}
};
-
-function getSubtitle(
- options: { getSubtitle?: ((formulaValue: string) => string) | undefined } | undefined,
- chart: { value: string }
-) {
- return options?.getSubtitle
- ? options?.getSubtitle(chart.value)
- : getSubtitleFromFormula(chart.value);
-}
diff --git a/x-pack/plugins/observability_solution/infra/public/components/lens/lens_chart.tsx b/x-pack/plugins/observability_solution/infra/public/components/lens/lens_chart.tsx
index e9cd4407fb5b..c69b3b8bc34c 100644
--- a/x-pack/plugins/observability_solution/infra/public/components/lens/lens_chart.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/components/lens/lens_chart.tsx
@@ -16,12 +16,13 @@ import { ChartLoadError } from './chart_load_error';
const MIN_HEIGHT = 300;
-export type LensChartProps = UseLensAttributesParams &
- BaseChartProps &
+export type LensChartProps = BaseChartProps &
Pick & {
toolTip?: React.ReactElement;
searchSessionId?: string;
description?: string;
+ } & {
+ lensAttributes: UseLensAttributesParams;
};
export const LensChart = React.memo(
@@ -41,9 +42,9 @@ export const LensChart = React.memo(
disableTriggers = false,
height = MIN_HEIGHT,
loading = false,
- ...lensAttributesParams
+ lensAttributes,
}: LensChartProps) => {
- const { formula, attributes, getExtraActions, error } = useLensAttributes(lensAttributesParams);
+ const { formula, attributes, getExtraActions, error } = useLensAttributes(lensAttributes);
const isLoading = loading || !attributes;
diff --git a/x-pack/plugins/observability_solution/infra/public/hooks/use_lens_attributes.ts b/x-pack/plugins/observability_solution/infra/public/hooks/use_lens_attributes.ts
index 96082871c514..9e0f9071eb07 100644
--- a/x-pack/plugins/observability_solution/infra/public/hooks/use_lens_attributes.ts
+++ b/x-pack/plugins/observability_solution/infra/public/hooks/use_lens_attributes.ts
@@ -34,7 +34,7 @@ export const useLensAttributes = (params: UseLensAttributesParams) => {
const builder = new LensConfigBuilder(dataViews, formulaAPI);
return builder.build(params) as Promise;
- }, [params.chartType, params.dataset, dataViews]);
+ }, [params, dataViews, lens]);
const injectFilters = useCallback(
({ filters, query }: { filters: Filter[]; query: Query }): LensAttributes | null => {
diff --git a/x-pack/plugins/observability_solution/infra/public/hooks/use_log_view_reference.ts b/x-pack/plugins/observability_solution/infra/public/hooks/use_log_view_reference.ts
index 56ba82b69733..da68b8811558 100644
--- a/x-pack/plugins/observability_solution/infra/public/hooks/use_log_view_reference.ts
+++ b/x-pack/plugins/observability_solution/infra/public/hooks/use_log_view_reference.ts
@@ -28,7 +28,7 @@ export const useLogViewReference = ({ id, name, extraFields = [] }: Props) => {
const { loading, value: defaultLogView } = useAsync(
() => logsShared.logViews.client.getLogView(DEFAULT_LOG_VIEW),
- []
+ [logsShared.logViews.client]
);
const logViewReference = useLazyRef(() => {
diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/kpi_charts.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/kpi_charts.tsx
index 9b349441c587..d0ff61c66abc 100644
--- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/kpi_charts.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/kpi_charts.tsx
@@ -76,7 +76,7 @@ export const KpiCharts = () => {
filters={afterLoadedState.filters}
query={afterLoadedState.query}
searchSessionId={afterLoadedState.searchSessionId}
- options={{ getSubtitle: afterLoadedState.getSubtitle }}
+ getSubtitle={afterLoadedState.getSubtitle}
loading={loading}
/>
);
diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/metrics/chart.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/metrics/chart.tsx
index ac6c370a7ce6..77f45445f002 100644
--- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/metrics/chart.tsx
+++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/metrics/chart.tsx
@@ -62,11 +62,12 @@ export const Chart = ({ id, ...chartProps }: ChartProps) => {
chartProps.dataset,
searchCriteria.filters,
searchCriteria.panelFilters,
+ shouldUseSearchCriteria,
]);
return (
{
- const model = findInventoryModel('host');
-
const { value: charts = [] } = useAsync(async () => {
+ const model = findInventoryModel('host');
const { cpu, disk, memory, network } = await model.metrics.getCharts();
return [
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx
index 8757b9f8235b..4bb7f1404117 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx
@@ -56,7 +56,7 @@ export function NavControl({}: {}) {
})
: undefined;
},
- [service, hasBeenOpened]
+ [service, hasBeenOpened, notifications.toasts]
);
const [isOpen, setIsOpen] = useState(false);
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/functions/lens.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/functions/lens.tsx
index cd2a522755f6..ec51efb85efc 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/functions/lens.tsx
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/functions/lens.tsx
@@ -57,7 +57,7 @@ function Lens({
title: indexPattern,
timeFieldName: timeField,
});
- }, [indexPattern]);
+ }, [indexPattern, dataViews, timeField]);
const [isSaveModalOpen, setIsSaveModalOpen] = useState(false);
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/functions/visualize_esql.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/functions/visualize_esql.tsx
index fe39a51d353b..97c46a6a2d75 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/functions/visualize_esql.tsx
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/functions/visualize_esql.tsx
@@ -130,7 +130,8 @@ export function VisualizeESQL({
}
return dataView;
});
- }, [indexPattern]);
+ }, [indexPattern, dataViews]);
+
const chatFlyoutSecondSlotHandler = useContext(ObservabilityAIAssistantMultipaneFlyoutContext);
const [isSaveModalOpen, setIsSaveModalOpen] = useState(false);
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.ts
index 122d1d93addf..0616e9dbaca3 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.ts
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.ts
@@ -152,7 +152,7 @@ export function useConversation({
throw error;
});
},
- [displayedConversationId, initialTitle],
+ [displayedConversationId, initialTitle, service, setMessages],
{
defaultValue: () => {
if (!displayedConversationId) {
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_knowledge_base.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_knowledge_base.tsx
index 0df3ab16c421..bca9b3848569 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_knowledge_base.tsx
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_knowledge_base.tsx
@@ -39,11 +39,14 @@ export function useKnowledgeBase(): UseKnowledgeBaseResult {
} = useKibana().services;
const service = useObservabilityAIAssistantAppService();
- const status = useAbortableAsync(({ signal }) => {
- return service.callApi('GET /internal/observability_ai_assistant/kb/status', {
- signal,
- });
- }, []);
+ const status = useAbortableAsync(
+ ({ signal }) => {
+ return service.callApi('GET /internal/observability_ai_assistant/kb/status', {
+ signal,
+ });
+ },
+ [service]
+ );
const [isInstalling, setIsInstalling] = useState(false);
diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/custom_logs/install_elastic_agent.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/custom_logs/install_elastic_agent.tsx
index 2b209d8e9870..18fdc833483f 100644
--- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/custom_logs/install_elastic_agent.tsx
+++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/custom_logs/install_elastic_agent.tsx
@@ -70,6 +70,8 @@ export function InstallElasticAgent() {
if (!hasAlreadySavedFlow(getState())) {
return callApi('GET /internal/observability_onboarding/logs/setup/privileges');
}
+ // FIXME: Dario could not find a reasonable fix for getState()
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const { data: setup } = useFetcher((callApi) => {
@@ -102,6 +104,8 @@ export function InstallElasticAgent() {
});
}
},
+ // FIXME: Dario could not find a reasonable fix for getState()
+ // eslint-disable-next-line react-hooks/exhaustive-deps
[monitoringRole?.hasPrivileges]
);
@@ -130,10 +134,14 @@ export function InstallElasticAgent() {
},
});
}
+ // FIXME: Dario could not find a reasonable fix for getState()
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const { apiKeyEncoded, onboardingId } = installShipperSetup ?? getState();
+ const succesfullySavedOnboardingState = saveOnboardingStateDataStatus === FETCH_STATUS.SUCCESS;
+
const { data: yamlConfig = '', status: yamlConfigStatus } = useFetcher(
(callApi) => {
if (apiKeyEncoded && onboardingId) {
@@ -143,7 +151,9 @@ export function InstallElasticAgent() {
});
}
},
- [apiKeyEncoded, onboardingId, saveOnboardingStateDataStatus === FETCH_STATUS.SUCCESS]
+ // FIXME: Dario could not find a reasonable fix for succesfullySavedOnboardingState
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ [apiKeyEncoded, onboardingId, succesfullySavedOnboardingState]
);
useEffect(() => {
diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/system_logs/install_elastic_agent.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/system_logs/install_elastic_agent.tsx
index a46a7c662766..ea2518124357 100644
--- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/system_logs/install_elastic_agent.tsx
+++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/system_logs/install_elastic_agent.tsx
@@ -109,6 +109,8 @@ export function InstallElasticAgent() {
const { apiKeyEncoded, onboardingId } = installShipperSetup ?? getState();
+ const successfullyInstalledShipperSetup = installShipperSetupStatus === FETCH_STATUS.SUCCESS;
+
const { data: yamlConfig = '', status: yamlConfigStatus } = useFetcher(
(callApi) => {
if (apiKeyEncoded && onboardingId) {
@@ -118,7 +120,9 @@ export function InstallElasticAgent() {
});
}
},
- [apiKeyEncoded, onboardingId, installShipperSetupStatus === FETCH_STATUS.SUCCESS]
+ // FIXME: Dario could not find a reasonable fix for successfullyInstalledShipperSetup
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ [apiKeyEncoded, onboardingId, successfullyInstalledShipperSetup]
);
useEffect(() => {
diff --git a/x-pack/plugins/observability_solution/observability_shared/public/hooks/use_es_search.ts b/x-pack/plugins/observability_solution/observability_shared/public/hooks/use_es_search.ts
index e51fdb8964bf..ef38cf13a8c2 100644
--- a/x-pack/plugins/observability_solution/observability_shared/public/hooks/use_es_search.ts
+++ b/x-pack/plugins/observability_solution/observability_shared/public/hooks/use_es_search.ts
@@ -110,6 +110,7 @@ export const useEsSearch = {
const { data: dataView } = useFetcher(async () => {
return await dataViews.create({ title: SYNTHETICS_INDEX_PATTERN });
- }, []);
+ }, [dataViews]);
useEffect(() => {
onChange(query);
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/monitor_inspect.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/monitor_inspect.tsx
index f7fff9c9ce33..90d30606b860 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/monitor_inspect.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/monitor_inspect.tsx
@@ -70,6 +70,9 @@ const MonitorInspect = ({ isValid, monitorFields }: InspectorProps) => {
monitor: monitorFields,
});
}
+ // FIXME: Dario couldn't find a solution for monitorFields
+ // which is not memoized downstream
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [isInspecting, hideParams]);
let flyout;
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/stderr_logs.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/stderr_logs.tsx
index b4a28335ce13..2b332ec78671 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/stderr_logs.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/stderr_logs.tsx
@@ -86,7 +86,7 @@ export const StdErrorLogs = ({
}
: undefined,
});
- }, [checkGroup, timestamp]);
+ }, [checkGroup, timestamp, discover, exploratoryView]);
const search = {
box: {
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx
index 08194c3b77f2..25f0ed084347 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/monitor_test_result/result_details_successful.tsx
@@ -25,14 +25,22 @@ export const ResultDetailsSuccessful = ({
}) => {
const { euiTheme } = useEuiTheme();
+ const timestamp = step['@timestamp'];
+ const monitorId = step.monitor.id;
+ const stepIndex = Number(step.synthetics.step?.index);
+ const location = step.observer?.geo?.name;
+
const { data, loading } = useFetcher(() => {
return fetchLastSuccessfulCheck({
- timestamp: step['@timestamp'],
- monitorId: step.monitor.id,
- stepIndex: Number(step.synthetics.step?.index),
- location: step.observer?.geo?.name,
+ timestamp,
+ monitorId,
+ stepIndex,
+ location,
});
- }, [step._id, step['@timestamp']]);
+ // FIXME: Dario is not sure what step._id is being used for,
+ // so he'll leave it in place
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [timestamp, monitorId, stepIndex, location, step._id]);
const { currentStep } = useJourneySteps(
data?.monitor.check_group,
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/form/run_test_btn.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/form/run_test_btn.tsx
index 579cf526c1b3..00ddc5b4a7ef 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/form/run_test_btn.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/form/run_test_btn.tsx
@@ -52,7 +52,7 @@ export const RunTestButton = ({
id: testRun.id,
});
}
- }, [testRun?.id]);
+ }, [testRun?.id, testRun?.monitor]);
const { tooltipContent, isDisabled } = useTooltipContent(formState.isValid, inProgress);
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_save.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_save.tsx
index 4fa482eb63bb..1ba3cec88588 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_save.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/hooks/use_monitor_save.tsx
@@ -39,6 +39,9 @@ export const useMonitorSave = ({ monitorData }: { monitorData?: SyntheticsMonito
});
}
}
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [monitorData]);
useEffect(() => {
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_edit_page.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_edit_page.tsx
index 772a4bc36022..f339c6961067 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_edit_page.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/monitor_edit_page.tsx
@@ -45,6 +45,9 @@ export const MonitorEditPage: React.FC = () => {
const { data, loading, error } = useFetcher(() => {
return getDecryptedMonitorAPI({ id: monitorId });
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const monitorNotFoundError = useMonitorNotFound(
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts
index 74efd982c3d1..0988e6c2aefc 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/monitor_selector/use_recently_viewed_monitors.ts
@@ -92,6 +92,9 @@ export const useRecentlyViewedMonitors = () => {
updateRecentlyViewed();
}
}
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [monitorQueryId]);
return useMemo(
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx
index cb8da8a64cad..78ac9dd2f663 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/monitor_detail_flyout.tsx
@@ -255,7 +255,13 @@ export function MonitorDetailFlyout(props: Props) {
error,
status,
loading,
- } = useFetcher(() => fetchSyntheticsMonitor({ monitorId: configId }), [configId, upsertSuccess]);
+ } = useFetcher(
+ () => fetchSyntheticsMonitor({ monitorId: configId }),
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ [configId, upsertSuccess]
+ );
const [isActionsPopoverOpen, setIsActionsPopoverOpen] = useState(false);
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/policy_link.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/policy_link.tsx
index c36296b1ff42..0c9cb465c127 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/policy_link.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/policy_link.tsx
@@ -24,6 +24,9 @@ export const PolicyLink = ({ name }: { name: string }) => {
const { data } = useFetcher(async () => {
return ilmLocator?.getLocation({ page: 'policy_edit', policyName: name });
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [name]);
if (!data) {
@@ -31,7 +34,7 @@ export const PolicyLink = ({ name }: { name: string }) => {
}
if (!name) {
- return <>-->;
+ return <>{i18n.translate('xpack.synthetics.policyLink.Label', { defaultMessage: '--' })}>;
}
if (!canManageILM) {
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts
index 6ee8acd4a93e..6b3899a5b44c 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/hooks/use_locations_api.ts
@@ -44,6 +44,9 @@ export const usePrivateLocationsAPI = () => {
dispatch(getPrivateLocationsAction.get());
return result;
}
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [formData]);
const onSubmit = (data: NewLocation) => {
@@ -62,6 +65,9 @@ export const usePrivateLocationsAPI = () => {
dispatch(getPrivateLocationsAction.get());
return result;
}
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [deleteId]);
return {
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/project_api_keys/project_api_keys.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/project_api_keys/project_api_keys.tsx
index 5ea801dea4ed..4a8752e8b992 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/project_api_keys/project_api_keys.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/project_api_keys/project_api_keys.tsx
@@ -38,6 +38,9 @@ export const ProjectAPIKeys = () => {
return fetchProjectAPIKey(accessToElasticManagedLocations && Boolean(canUsePublicLocations));
}
return null;
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [loadAPIKey, canUsePublicLocations]);
useEffect(() => {
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx
index 45052a38a21f..cde0cb93fed1 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/step_details_page/step_screenshot/last_successful_screenshot.tsx
@@ -35,6 +35,9 @@ export const LastSuccessfulScreenshot = ({
stepIndex: Number(stepIndex ?? stepInd),
location: step.observer?.geo?.name,
});
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [step._id, step['@timestamp']]);
return (
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_browser_run_once_monitors.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_browser_run_once_monitors.ts
index 2ad18149f26d..c5b11dc27223 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_browser_run_once_monitors.ts
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_browser_run_once_monitors.ts
@@ -187,6 +187,9 @@ export const useBrowserRunOnceMonitors = ({
}
return Promise.resolve(null);
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Synthetics folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [checkGroupCheckSum, setCheckGroupResults, lastRefresh]);
// Whenever a new found document is fetched, update lastUpdated
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_test_flyout_open.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_test_flyout_open.ts
index ed3bf648cfe5..082a7ffc84c7 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_test_flyout_open.ts
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/hooks/use_test_flyout_open.ts
@@ -7,7 +7,7 @@
import { useDispatch, useSelector } from 'react-redux';
import { useRouteMatch } from 'react-router-dom';
-import { useEffect } from 'react';
+import { useEffect, useMemo } from 'react';
import { MONITOR_ROUTE, OVERVIEW_ROUTE } from '../../../../../../common/constants';
import { hideTestNowFlyoutAction, testNowRunsSelector } from '../../../state/manual_test_runs';
@@ -24,9 +24,11 @@ export const useTestFlyoutOpen = () => {
const dispatch = useDispatch();
- const flyoutTestOpen = Object.values(testNowRuns).find((value) => {
- return value.isTestNowFlyoutOpen;
- });
+ const flyoutTestOpen = useMemo(() => {
+ return Object.values(testNowRuns).find((value) => {
+ return value.isTestNowFlyoutOpen;
+ });
+ }, [testNowRuns]);
const isSameMonitor = flyoutTestOpen?.configId === isMonitorDetails?.params.monitorId;
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/test_now_mode_flyout_container.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/test_now_mode_flyout_container.tsx
index ff3114c98f84..b550cdbd2745 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/test_now_mode_flyout_container.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/test_now_mode/test_now_mode_flyout_container.tsx
@@ -5,7 +5,7 @@
* 2.0.
*/
-import React, { useCallback } from 'react';
+import React, { useCallback, useMemo } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useTestFlyoutOpen } from './hooks/use_test_flyout_open';
@@ -50,27 +50,30 @@ export function TestNowModeFlyoutContainer() {
[dispatch]
);
- const flyout = flyoutOpenTestRun ? (
- handleFlyoutClose(flyoutOpenTestRun.testRunId)}
- onDone={onDone}
- isPushing={flyoutOpenTestRun.status === 'loading'}
- errors={flyoutOpenTestRun.errors ?? []}
- />
- ) : null;
+ const testRun = useMemo(() => {
+ return flyoutOpenTestRun?.testRunId && flyoutOpenTestRun?.monitor
+ ? {
+ id: flyoutOpenTestRun.testRunId,
+ monitor: flyoutOpenTestRun.monitor,
+ name: flyoutOpenTestRun.name,
+ }
+ : undefined;
+ }, [flyoutOpenTestRun]);
+
+ const flyout =
+ flyoutOpenTestRun && testRun ? (
+ handleFlyoutClose(flyoutOpenTestRun.testRunId)}
+ onDone={onDone}
+ isPushing={flyoutOpenTestRun.status === 'loading'}
+ errors={flyoutOpenTestRun.errors ?? []}
+ />
+ ) : null;
return (
<>
diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_data_view_context.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_data_view_context.tsx
index b7a7c8f25602..04c502e3f181 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_data_view_context.tsx
+++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_data_view_context.tsx
@@ -19,7 +19,7 @@ export const SyntheticsDataViewContextProvider: FC<
> = ({ children, dataViews }) => {
const { data } = useFetcher>(async () => {
return dataViews.create({ title: SYNTHETICS_INDEX_PATTERN });
- }, []);
+ }, [dataViews]);
return ;
};
diff --git a/x-pack/plugins/observability_solution/synthetics/public/hooks/use_capabilities.ts b/x-pack/plugins/observability_solution/synthetics/public/hooks/use_capabilities.ts
index 1f9d7f1538b9..6e09a9bfe593 100644
--- a/x-pack/plugins/observability_solution/synthetics/public/hooks/use_capabilities.ts
+++ b/x-pack/plugins/observability_solution/synthetics/public/hooks/use_capabilities.ts
@@ -62,7 +62,7 @@ export const useCanReadSyntheticsIndex = () => {
},
});
});
- }, []);
+ }, [dataPublicPluginStart.search]);
return {
canRead: data?.canRead,
diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/use_in_progress_image.ts b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/use_in_progress_image.ts
index 0a252651c9ed..bc85b45857c2 100644
--- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/use_in_progress_image.ts
+++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/ping_list/columns/ping_timestamp/use_in_progress_image.ts
@@ -43,6 +43,9 @@ export const useInProgressImage = ({
}
if (hasIntersected && !hasImage) return getJourneyScreenshot(imgPath);
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Uptime folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [hasIntersected, imgPath, skippedStep, retryLoading]);
useEffect(() => {
diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/alerts/alerts_containers/use_snap_shot.ts b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/alerts/alerts_containers/use_snap_shot.ts
index 30445a5441cc..b6d250a2cb70 100644
--- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/alerts/alerts_containers/use_snap_shot.ts
+++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/alerts/alerts_containers/use_snap_shot.ts
@@ -24,6 +24,9 @@ export const useSnapShotCount = ({ query, filters }: { query: string; filters?:
dateRangeEnd: 'now',
filters: error ? undefined : esKuery,
}),
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Uptime folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
[esKuery, query]
);
diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/integration_deprecation/index.tsx b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/integration_deprecation/index.tsx
index afff54bb69f2..ac7e20db41b1 100644
--- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/integration_deprecation/index.tsx
+++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/integration_deprecation/index.tsx
@@ -26,6 +26,9 @@ export const IntegrationDeprecation = () => {
return getHasIntegrationMonitors();
}
return undefined;
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Uptime folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [monitorList.isLoaded]);
const hasIntegrationMonitors = !loading && data && data.hasIntegrationMonitors;
const [shouldShowNotice, setShouldShowNotice] = useState(
diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/snapshot/use_snap_shot.ts b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/snapshot/use_snap_shot.ts
index 8932d5755e70..15ffd98c739c 100644
--- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/snapshot/use_snap_shot.ts
+++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/overview/snapshot/use_snap_shot.ts
@@ -22,6 +22,9 @@ export const useSnapShotCount = () => {
const { data, loading } = useFetcher(
() => fetchSnapshotCount({ query, dateRangeStart, dateRangeEnd, filters: esKuery }),
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Uptime folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
[dateRangeStart, dateRangeEnd, esKuery, lastRefresh, query]
);
diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx
index 1b17bb5f1702..7eab37d2b9af 100644
--- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx
+++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/check_steps/stderr_logs.tsx
@@ -90,6 +90,9 @@ export const StdErrorLogs = ({
});
}
return '';
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Uptime folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [checkGroup, timestamp]);
const search = {
diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/check_steps/step_expanded_row/step_screenshots.tsx b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/check_steps/step_expanded_row/step_screenshots.tsx
index 8a4f101fdc4d..606019c99429 100644
--- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/check_steps/step_expanded_row/step_screenshots.tsx
+++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/check_steps/step_expanded_row/step_screenshots.tsx
@@ -40,6 +40,9 @@ export const StepScreenshots = ({ step }: Props) => {
location: step.observer?.geo?.name,
});
}
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Uptime folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [step._id, step['@timestamp']]);
const lastSuccessfulCheck: Ping | undefined = data;
diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/step_screenshot_display.tsx b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/step_screenshot_display.tsx
index 7afb544fdeac..b7d2f6d85fe2 100644
--- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/step_screenshot_display.tsx
+++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/synthetics/step_screenshot_display.tsx
@@ -135,6 +135,9 @@ export const StepScreenshotDisplay: FC = ({
if (isScreenshotRef) {
return getJourneyScreenshot(imgSrc);
}
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Uptime folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [basePath, checkGroup, imgSrc, stepIndex, isScreenshotRef, lastRefresh]);
const refDimensions = useMemo(() => {
diff --git a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/contexts/uptime_data_view_context.tsx b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/contexts/uptime_data_view_context.tsx
index edcf638b4414..7abbdf3fde8c 100644
--- a/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/contexts/uptime_data_view_context.tsx
+++ b/x-pack/plugins/observability_solution/uptime/public/legacy_uptime/contexts/uptime_data_view_context.tsx
@@ -26,6 +26,9 @@ export const UptimeDataViewContextProvider: FC<
// this only creates an dateView in memory, not as saved object
return dataViews.create({ title: heartbeatIndices });
}
+ // FIXME: Dario thinks there is a better way to do this but
+ // he's getting tired and maybe the Uptime folks can fix it
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [heartbeatIndices, indexStatus?.indexExists]);
return ;
From 60aa207f4bea8ae5da2a04229440a96d72263fcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?=
Date: Sat, 8 Jun 2024 22:32:49 +0200
Subject: [PATCH 11/23] [Obs AI Assistant] Boost user prompt in recall
(#184933)
Closes: https://github.com/elastic/kibana/issues/180995
---------
Co-authored-by: Dario Gieselaar
---
.../public/service/create_service.ts | 4 --
.../server/functions/context.ts | 69 +++++--------------
.../server/routes/functions/route.ts | 11 ++-
.../get_context_function_request_if_needed.ts | 4 --
.../server/service/client/index.test.ts | 2 -
.../server/service/client/index.ts | 6 +-
.../service/knowledge_base_service/index.ts | 14 ++--
.../public/components/chat/chat_body.test.tsx | 4 +-
.../tests/complete/complete.spec.ts | 1 -
.../public_complete/public_complete.spec.ts | 14 +++-
.../tests/conversations/index.spec.ts | 4 +-
11 files changed, 53 insertions(+), 80 deletions(-)
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts
index 9e0adc5a94d8..7232078d2efe 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts
@@ -72,10 +72,6 @@ export function createService({
return of(
createFunctionRequestMessage({
name: 'context',
- args: {
- queries: [],
- categories: [],
- },
}),
createFunctionResponseMessage({
name: 'context',
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts
index 4bc32a2330ac..baf006844c51 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts
@@ -40,34 +40,10 @@ export function registerContextFunction({
description:
'This function provides context as to what the user is looking at on their screen, and recalled documents from the knowledge base that matches their query',
visibility: FunctionVisibility.Internal,
- parameters: {
- type: 'object',
- properties: {
- queries: {
- type: 'array',
- description: 'The query for the semantic search',
- items: {
- type: 'string',
- },
- },
- categories: {
- type: 'array',
- description:
- 'Categories of internal documentation that you want to search for. By default internal documentation will be excluded. Use `apm` to get internal APM documentation, `lens` to get internal Lens documentation, or both.',
- items: {
- type: 'string',
- enum: ['apm', 'lens'],
- },
- },
- },
- required: ['queries', 'categories'],
- } as const,
},
- async ({ arguments: args, messages, screenContexts, chat }, signal) => {
+ async ({ messages, screenContexts, chat }, signal) => {
const { analytics } = (await resources.context.core).coreStart;
- const { queries, categories } = args;
-
async function getContext() {
const screenDescription = compact(
screenContexts.map((context) => context.screenDescription)
@@ -94,30 +70,21 @@ export function registerContextFunction({
messages.filter((message) => message.message.role === MessageRole.User)
);
- const nonEmptyQueries = compact(queries);
-
- const queriesOrUserPrompt = nonEmptyQueries.length
- ? nonEmptyQueries
- : compact([userMessage?.message.content]);
-
- queriesOrUserPrompt.push(screenDescription);
-
- const suggestions = await retrieveSuggestions({
- client,
- categories,
- queries: queriesOrUserPrompt,
- });
+ const userPrompt = userMessage?.message.content;
+ const queries = [{ text: userPrompt, boost: 3 }, { text: screenDescription }].filter(
+ ({ text }) => text
+ ) as Array<{ text: string; boost?: number }>;
+ const suggestions = await retrieveSuggestions({ client, queries });
if (suggestions.length === 0) {
- return {
- content,
- };
+ return { content };
}
try {
const { relevantDocuments, scores } = await scoreSuggestions({
suggestions,
- queries: queriesOrUserPrompt,
+ screenDescription,
+ userPrompt,
messages,
chat,
signal,
@@ -125,7 +92,7 @@ export function registerContextFunction({
});
analytics.reportEvent(RecallRankingEventType, {
- prompt: queriesOrUserPrompt.join('|'),
+ prompt: queries.map((query) => query.text).join('|'),
scoredDocuments: suggestions.map((suggestion) => {
const llmScore = scores.find((score) => score.id === suggestion.id);
return {
@@ -178,15 +145,12 @@ export function registerContextFunction({
async function retrieveSuggestions({
queries,
client,
- categories,
}: {
- queries: string[];
+ queries: Array<{ text: string; boost?: number }>;
client: ObservabilityAIAssistantClient;
- categories: Array<'apm' | 'lens'>;
}) {
const recallResponse = await client.recall({
queries,
- categories,
});
return recallResponse.entries.map((entry) => omit(entry, 'labels', 'is_correction'));
@@ -208,14 +172,16 @@ const scoreFunctionArgumentsRt = t.type({
async function scoreSuggestions({
suggestions,
messages,
- queries,
+ userPrompt,
+ screenDescription,
chat,
signal,
logger,
}: {
suggestions: Awaited>;
messages: Message[];
- queries: string[];
+ userPrompt: string | undefined;
+ screenDescription: string;
chat: FunctionCallChatFunction;
signal: AbortSignal;
logger: Logger;
@@ -237,7 +203,10 @@ async function scoreSuggestions({
- The document contains new information not mentioned before in the conversation
Question:
- ${queries.join('\n')}
+ ${userPrompt}
+
+ Screen description:
+ ${screenDescription}
Documents:
${JSON.stringify(indexedSuggestions, null, 2)}`);
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/functions/route.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/functions/route.ts
index 8d509271c1e3..52be33c2a372 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/functions/route.ts
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/functions/route.ts
@@ -65,7 +65,16 @@ const functionRecallRoute = createObservabilityAIAssistantServerRoute({
params: t.type({
body: t.intersection([
t.type({
- queries: t.array(nonEmptyStringRt),
+ queries: t.array(
+ t.intersection([
+ t.type({
+ text: t.string,
+ }),
+ t.partial({
+ boost: t.number,
+ }),
+ ])
+ ),
}),
t.partial({
categories: t.array(t.string),
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/get_context_function_request_if_needed.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/get_context_function_request_if_needed.ts
index 74cc19d8aa15..e5ea0ad0ff82 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/get_context_function_request_if_needed.ts
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/get_context_function_request_if_needed.ts
@@ -28,9 +28,5 @@ export function getContextFunctionRequestIfNeeded(
return createFunctionRequestMessage({
name: CONTEXT_FUNCTION_NAME,
- args: {
- queries: [],
- categories: [],
- },
});
}
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts
index 4ffc8dc926fc..0349d597b7ba 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts
@@ -1232,7 +1232,6 @@ describe('Observability AI Assistant client', () => {
role: MessageRole.Assistant,
function_call: {
name: CONTEXT_FUNCTION_NAME,
- arguments: JSON.stringify({ queries: [], categories: [] }),
trigger: MessageRole.Assistant,
},
},
@@ -1456,7 +1455,6 @@ describe('Observability AI Assistant client', () => {
role: MessageRole.Assistant,
function_call: {
name: CONTEXT_FUNCTION_NAME,
- arguments: JSON.stringify({ queries: [], categories: [] }),
trigger: MessageRole.Assistant,
},
},
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts
index 803e0e904223..9739a5912501 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts
@@ -694,7 +694,7 @@ export class ObservabilityAIAssistantClient {
queries,
categories,
}: {
- queries: string[];
+ queries: Array<{ text: string; boost?: number }>;
categories?: string[];
}): Promise<{ entries: RecalledEntry[] }> => {
return this.dependencies.knowledgeBaseService.recall({
@@ -757,11 +757,9 @@ export class ObservabilityAIAssistantClient {
};
fetchUserInstructions = async () => {
- const userInstructions = await this.dependencies.knowledgeBaseService.getUserInstructions(
+ return this.dependencies.knowledgeBaseService.getUserInstructions(
this.dependencies.namespace,
this.dependencies.user
);
-
- return userInstructions;
};
}
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts
index 576fd8dc5552..7c504aa43c38 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts
@@ -303,7 +303,7 @@ export class KnowledgeBaseService {
user,
modelId,
}: {
- queries: string[];
+ queries: Array<{ text: string; boost?: number }>;
categories?: string[];
namespace: string;
user?: { name: string };
@@ -311,11 +311,12 @@ export class KnowledgeBaseService {
}): Promise {
const query = {
bool: {
- should: queries.map((text) => ({
+ should: queries.map(({ text, boost = 1 }) => ({
text_expansion: {
'ml.tokens': {
model_text: text,
model_id: modelId,
+ boost,
},
},
})),
@@ -385,7 +386,7 @@ export class KnowledgeBaseService {
uiSettingsClient,
modelId,
}: {
- queries: string[];
+ queries: Array<{ text: string; boost?: number }>;
asCurrentUser: ElasticsearchClient;
uiSettingsClient: IUiSettingsClient;
modelId: string;
@@ -414,15 +415,16 @@ export class KnowledgeBaseService {
const vectorField = `${ML_INFERENCE_PREFIX}${field}_expanded.predicted_value`;
const modelField = `${ML_INFERENCE_PREFIX}${field}_expanded.model_id`;
- return queries.map((query) => {
+ return queries.map(({ text, boost = 1 }) => {
return {
bool: {
should: [
{
text_expansion: {
[vectorField]: {
- model_text: query,
+ model_text: text,
model_id: modelId,
+ boost,
},
},
},
@@ -470,7 +472,7 @@ export class KnowledgeBaseService {
asCurrentUser,
uiSettingsClient,
}: {
- queries: string[];
+ queries: Array<{ text: string; boost?: number }>;
categories?: string[];
user?: { name: string };
namespace: string;
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.test.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.test.tsx
index e39bcf5d1891..65ac65264f30 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.test.tsx
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.test.tsx
@@ -40,7 +40,7 @@ describe('', () => {
role: 'assistant',
function_call: {
name: CONTEXT_FUNCTION_NAME,
- arguments: '{"queries":[],"categories":[]}',
+ arguments: '{}',
trigger: 'assistant',
},
content: '',
@@ -88,7 +88,7 @@ describe('', () => {
role: 'assistant',
function_call: {
name: CONTEXT_FUNCTION_NAME,
- arguments: '{"queries":[],"categories":[]}',
+ arguments: '{}',
trigger: 'assistant',
},
content: '',
diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts
index 01f6e8cdd7bc..eb5ed07d3ea0 100644
--- a/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts
+++ b/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts
@@ -193,7 +193,6 @@ export default function ApiTest({ getService }: FtrProviderContext) {
role: MessageRole.Assistant,
function_call: {
name: 'context',
- arguments: JSON.stringify({ queries: [], categories: [] }),
trigger: MessageRole.Assistant,
},
},
diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/public_complete/public_complete.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/public_complete/public_complete.spec.ts
index ac2fa36f6b0f..f496e42868ac 100644
--- a/x-pack/test/observability_ai_assistant_api_integration/tests/public_complete/public_complete.spec.ts
+++ b/x-pack/test/observability_ai_assistant_api_integration/tests/public_complete/public_complete.spec.ts
@@ -72,6 +72,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
format,
})
.set('kbn-xsrf', 'foo')
+ .set('elastic-api-version', '2023-10-31')
.send({
messages,
connectorId,
@@ -83,13 +84,20 @@ export default function ApiTest({ getService }: FtrProviderContext) {
if (err) {
return reject(err);
}
+ if (response.status !== 200) {
+ return reject(new Error(`${response.status}: ${JSON.stringify(response.body)}`));
+ }
return resolve(response);
});
});
- const [conversationSimulator, titleSimulator] = await Promise.all([
- conversationInterceptor.waitForIntercept(),
- titleInterceptor.waitForIntercept(),
+ const [conversationSimulator, titleSimulator] = await Promise.race([
+ Promise.all([
+ conversationInterceptor.waitForIntercept(),
+ titleInterceptor.waitForIntercept(),
+ ]),
+ // make sure any request failures (like 400s) are properly propagated
+ responsePromise.then(() => []),
]);
await titleSimulator.status(200);
diff --git a/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts b/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts
index b7c33db0a412..3e766877c5bc 100644
--- a/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts
+++ b/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts
@@ -94,7 +94,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte
content: '',
function_call: {
name: 'context',
- arguments: '{"queries":[],"categories":[]}',
+ arguments: '{}',
trigger: MessageRole.Assistant,
},
},
@@ -290,7 +290,6 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte
expect(pick(contextRequest.function_call, 'name', 'arguments')).to.eql({
name: 'context',
- arguments: JSON.stringify({ queries: [], categories: [] }),
});
expect(contextResponse.name).to.eql('context');
@@ -354,7 +353,6 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte
expect(pick(contextRequest.function_call, 'name', 'arguments')).to.eql({
name: 'context',
- arguments: JSON.stringify({ queries: [], categories: [] }),
});
expect(contextResponse.name).to.eql('context');
From 622115d52493a6cae8cf293cd43bfed02840055e Mon Sep 17 00:00:00 2001
From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Date: Sun, 9 Jun 2024 14:59:43 +1000
Subject: [PATCH 12/23] [api-docs] 2024-06-09 Daily api_docs build (#185208)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/732
---
api_docs/actions.mdx | 2 +-
api_docs/advanced_settings.mdx | 2 +-
.../ai_assistant_management_selection.mdx | 2 +-
api_docs/aiops.mdx | 2 +-
api_docs/alerting.mdx | 2 +-
api_docs/apm.mdx | 2 +-
api_docs/apm_data_access.mdx | 2 +-
api_docs/asset_manager.mdx | 2 +-
api_docs/assets_data_access.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_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.mdx | 2 +-
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 | 4 +-
api_docs/data_quality.mdx | 2 +-
api_docs/data_query.mdx | 4 +-
api_docs/data_search.devdocs.json | 128 +
api_docs/data_search.mdx | 4 +-
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/dataset_quality.mdx | 2 +-
api_docs/deprecations_by_api.mdx | 4 +-
api_docs/deprecations_by_plugin.mdx | 3 +-
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/discover_shared.mdx | 2 +-
api_docs/ecs_data_quality_dashboard.mdx | 2 +-
api_docs/elastic_assistant.mdx | 2 +-
api_docs/embeddable.devdocs.json | 4 -
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/esql_data_grid.mdx | 2 +-
api_docs/event_annotation.mdx | 2 +-
api_docs/event_annotation_listing.mdx | 2 +-
api_docs/event_log.mdx | 2 +-
api_docs/exploratory_view.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/fields_metadata.mdx | 2 +-
api_docs/file_upload.mdx | 2 +-
api_docs/files.mdx | 2 +-
api_docs/files_management.mdx | 2 +-
api_docs/fleet.mdx | 2 +-
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/ingest_pipelines.mdx | 2 +-
api_docs/inspector.mdx | 2 +-
api_docs/interactive_setup.mdx | 2 +-
api_docs/investigate.devdocs.json | 8904 +++++++++++++++++
api_docs/investigate.mdx | 64 +
api_docs/kbn_ace.mdx | 2 +-
api_docs/kbn_actions_types.mdx | 2 +-
api_docs/kbn_aiops_components.mdx | 2 +-
api_docs/kbn_aiops_log_pattern_analysis.mdx | 2 +-
api_docs/kbn_aiops_log_rate_analysis.mdx | 2 +-
.../kbn_alerting_api_integration_helpers.mdx | 2 +-
api_docs/kbn_alerting_comparators.mdx | 2 +-
api_docs/kbn_alerting_state_types.mdx | 2 +-
api_docs/kbn_alerting_types.mdx | 2 +-
api_docs/kbn_alerts_as_data_utils.mdx | 2 +-
api_docs/kbn_alerts_ui_shared.mdx | 2 +-
api_docs/kbn_analytics.mdx | 2 +-
api_docs/kbn_analytics_client.mdx | 2 +-
api_docs/kbn_analytics_collection_utils.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_apm_config_loader.mdx | 2 +-
api_docs/kbn_apm_data_view.mdx | 2 +-
api_docs/kbn_apm_synthtrace.mdx | 2 +-
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_bfetch_error.mdx | 2 +-
api_docs/kbn_calculate_auto.mdx | 2 +-
.../kbn_calculate_width_from_char_count.mdx | 2 +-
api_docs/kbn_cases_components.mdx | 2 +-
api_docs/kbn_cell_actions.mdx | 2 +-
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_mock.mdx | 2 +-
api_docs/kbn_code_owners.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 +-
...tent_management_tabbed_table_list_view.mdx | 2 +-
...kbn_content_management_table_list_view.mdx | 2 +-
...tent_management_table_list_view_common.mdx | 2 +-
...ntent_management_table_list_view_table.mdx | 2 +-
api_docs/kbn_content_management_utils.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 +-
.../kbn_core_plugins_contracts_browser.mdx | 2 +-
.../kbn_core_plugins_contracts_server.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 +-
...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 +-
...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_security_browser.mdx | 2 +-
.../kbn_core_security_browser_internal.mdx | 2 +-
api_docs/kbn_core_security_browser_mocks.mdx | 2 +-
api_docs/kbn_core_security_common.mdx | 2 +-
api_docs/kbn_core_security_server.mdx | 2 +-
.../kbn_core_security_server_internal.mdx | 2 +-
api_docs/kbn_core_security_server_mocks.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 +-
.../kbn_core_test_helpers_model_versions.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_mocks.mdx | 2 +-
api_docs/kbn_core_ui_settings_browser.mdx | 2 +-
.../kbn_core_ui_settings_browser_internal.mdx | 2 +-
.../kbn_core_ui_settings_browser_mocks.mdx | 2 +-
api_docs/kbn_core_ui_settings_common.mdx | 2 +-
api_docs/kbn_core_ui_settings_server.mdx | 2 +-
.../kbn_core_ui_settings_server_internal.mdx | 2 +-
.../kbn_core_ui_settings_server_mocks.mdx | 2 +-
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_core_user_profile_browser.mdx | 2 +-
...kbn_core_user_profile_browser_internal.mdx | 2 +-
.../kbn_core_user_profile_browser_mocks.mdx | 2 +-
api_docs/kbn_core_user_profile_common.mdx | 2 +-
api_docs/kbn_core_user_profile_server.mdx | 2 +-
.../kbn_core_user_profile_server_internal.mdx | 2 +-
.../kbn_core_user_profile_server_mocks.mdx | 2 +-
api_docs/kbn_core_user_settings_server.mdx | 2 +-
.../kbn_core_user_settings_server_mocks.mdx | 2 +-
api_docs/kbn_crypto.mdx | 2 +-
api_docs/kbn_crypto_browser.mdx | 2 +-
api_docs/kbn_custom_icons.mdx | 2 +-
api_docs/kbn_custom_integrations.mdx | 2 +-
api_docs/kbn_cypress_config.mdx | 2 +-
api_docs/kbn_data_forge.mdx | 2 +-
api_docs/kbn_data_service.mdx | 2 +-
api_docs/kbn_data_stream_adapter.mdx | 2 +-
api_docs/kbn_data_view_utils.mdx | 2 +-
api_docs/kbn_datemath.mdx | 2 +-
api_docs/kbn_deeplinks_analytics.mdx | 2 +-
api_docs/kbn_deeplinks_devtools.mdx | 2 +-
api_docs/kbn_deeplinks_fleet.mdx | 2 +-
api_docs/kbn_deeplinks_management.mdx | 2 +-
api_docs/kbn_deeplinks_ml.mdx | 2 +-
api_docs/kbn_deeplinks_observability.mdx | 2 +-
api_docs/kbn_deeplinks_search.mdx | 2 +-
api_docs/kbn_deeplinks_security.mdx | 2 +-
api_docs/kbn_deeplinks_shared.mdx | 2 +-
api_docs/kbn_default_nav_analytics.mdx | 2 +-
api_docs/kbn_default_nav_devtools.mdx | 2 +-
api_docs/kbn_default_nav_management.mdx | 2 +-
api_docs/kbn_default_nav_ml.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_discover_utils.mdx | 2 +-
api_docs/kbn_doc_links.mdx | 2 +-
api_docs/kbn_docs_utils.mdx | 2 +-
api_docs/kbn_dom_drag_drop.mdx | 2 +-
api_docs/kbn_ebt_tools.mdx | 2 +-
api_docs/kbn_ecs_data_quality_dashboard.mdx | 2 +-
api_docs/kbn_elastic_agent_utils.mdx | 2 +-
api_docs/kbn_elastic_assistant.mdx | 2 +-
api_docs/kbn_elastic_assistant_common.mdx | 2 +-
api_docs/kbn_entities_schema.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_esql_ast.mdx | 2 +-
api_docs/kbn_esql_utils.mdx | 2 +-
api_docs/kbn_esql_validation_autocomplete.mdx | 2 +-
api_docs/kbn_event_annotation_common.mdx | 2 +-
api_docs/kbn_event_annotation_components.mdx | 2 +-
api_docs/kbn_expandable_flyout.mdx | 2 +-
api_docs/kbn_field_types.mdx | 2 +-
api_docs/kbn_field_utils.mdx | 2 +-
api_docs/kbn_find_used_node_modules.mdx | 2 +-
api_docs/kbn_formatters.mdx | 2 +-
.../kbn_ftr_common_functional_services.mdx | 2 +-
.../kbn_ftr_common_functional_ui_services.mdx | 2 +-
api_docs/kbn_generate.mdx | 2 +-
api_docs/kbn_generate_console_definitions.mdx | 2 +-
api_docs/kbn_generate_csv.mdx | 2 +-
api_docs/kbn_grouping.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_index_management.mdx | 2 +-
api_docs/kbn_inference_integration_flyout.mdx | 2 +-
api_docs/kbn_infra_forge.mdx | 2 +-
api_docs/kbn_interpreter.mdx | 2 +-
api_docs/kbn_io_ts_utils.mdx | 2 +-
api_docs/kbn_ipynb.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_lens_embeddable_utils.mdx | 2 +-
api_docs/kbn_lens_formula_docs.mdx | 2 +-
api_docs/kbn_logging.mdx | 2 +-
api_docs/kbn_logging_mocks.mdx | 2 +-
api_docs/kbn_managed_content_badge.mdx | 2 +-
api_docs/kbn_managed_vscode_config.mdx | 2 +-
api_docs/kbn_management_cards_navigation.mdx | 2 +-
.../kbn_management_settings_application.mdx | 2 +-
...ent_settings_components_field_category.mdx | 2 +-
...gement_settings_components_field_input.mdx | 2 +-
...nagement_settings_components_field_row.mdx | 2 +-
...bn_management_settings_components_form.mdx | 2 +-
...n_management_settings_field_definition.mdx | 2 +-
api_docs/kbn_management_settings_ids.mdx | 2 +-
...n_management_settings_section_registry.mdx | 2 +-
api_docs/kbn_management_settings_types.mdx | 2 +-
.../kbn_management_settings_utilities.mdx | 2 +-
api_docs/kbn_management_storybook_config.mdx | 2 +-
api_docs/kbn_mapbox_gl.mdx | 2 +-
api_docs/kbn_maps_vector_tile_utils.mdx | 2 +-
api_docs/kbn_ml_agg_utils.mdx | 2 +-
api_docs/kbn_ml_anomaly_utils.mdx | 2 +-
api_docs/kbn_ml_cancellable_search.mdx | 2 +-
api_docs/kbn_ml_category_validator.mdx | 2 +-
api_docs/kbn_ml_chi2test.mdx | 2 +-
.../kbn_ml_data_frame_analytics_utils.mdx | 2 +-
api_docs/kbn_ml_data_grid.mdx | 2 +-
api_docs/kbn_ml_date_picker.mdx | 2 +-
api_docs/kbn_ml_date_utils.mdx | 2 +-
api_docs/kbn_ml_error_utils.mdx | 2 +-
api_docs/kbn_ml_in_memory_table.mdx | 2 +-
api_docs/kbn_ml_is_defined.mdx | 2 +-
api_docs/kbn_ml_is_populated_object.mdx | 2 +-
api_docs/kbn_ml_kibana_theme.mdx | 2 +-
api_docs/kbn_ml_local_storage.mdx | 2 +-
api_docs/kbn_ml_nested_property.mdx | 2 +-
api_docs/kbn_ml_number_utils.mdx | 2 +-
api_docs/kbn_ml_query_utils.mdx | 2 +-
api_docs/kbn_ml_random_sampler_utils.mdx | 2 +-
api_docs/kbn_ml_route_utils.mdx | 2 +-
api_docs/kbn_ml_runtime_field_utils.mdx | 2 +-
api_docs/kbn_ml_string_hash.mdx | 2 +-
api_docs/kbn_ml_time_buckets.mdx | 2 +-
api_docs/kbn_ml_trained_models_utils.mdx | 2 +-
api_docs/kbn_ml_ui_actions.mdx | 2 +-
api_docs/kbn_ml_url_state.mdx | 2 +-
api_docs/kbn_mock_idp_utils.mdx | 2 +-
api_docs/kbn_monaco.mdx | 2 +-
api_docs/kbn_object_versioning.mdx | 2 +-
api_docs/kbn_observability_alert_details.mdx | 2 +-
.../kbn_observability_alerting_test_data.mdx | 2 +-
...ility_get_padded_alert_time_range_util.mdx | 2 +-
api_docs/kbn_openapi_bundler.devdocs.json | 12 +-
api_docs/kbn_openapi_bundler.mdx | 2 +-
api_docs/kbn_openapi_generator.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 +-
api_docs/kbn_panel_loader.mdx | 2 +-
..._performance_testing_dataset_extractor.mdx | 2 +-
api_docs/kbn_plugin_check.mdx | 2 +-
api_docs/kbn_plugin_generator.mdx | 2 +-
api_docs/kbn_plugin_helpers.mdx | 2 +-
api_docs/kbn_presentation_containers.mdx | 2 +-
api_docs/kbn_presentation_publishing.mdx | 2 +-
api_docs/kbn_profiling_utils.mdx | 2 +-
api_docs/kbn_random_sampling.mdx | 2 +-
api_docs/kbn_react_field.mdx | 2 +-
api_docs/kbn_react_hooks.mdx | 2 +-
api_docs/kbn_react_kibana_context_common.mdx | 2 +-
api_docs/kbn_react_kibana_context_render.mdx | 2 +-
api_docs/kbn_react_kibana_context_root.mdx | 2 +-
api_docs/kbn_react_kibana_context_styled.mdx | 2 +-
api_docs/kbn_react_kibana_context_theme.mdx | 2 +-
api_docs/kbn_react_kibana_mount.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_reporting_common.mdx | 2 +-
api_docs/kbn_reporting_csv_share_panel.mdx | 2 +-
api_docs/kbn_reporting_export_types_csv.mdx | 2 +-
.../kbn_reporting_export_types_csv_common.mdx | 2 +-
api_docs/kbn_reporting_export_types_pdf.mdx | 2 +-
.../kbn_reporting_export_types_pdf_common.mdx | 2 +-
api_docs/kbn_reporting_export_types_png.mdx | 2 +-
.../kbn_reporting_export_types_png_common.mdx | 2 +-
api_docs/kbn_reporting_mocks_server.mdx | 2 +-
api_docs/kbn_reporting_public.mdx | 2 +-
api_docs/kbn_reporting_server.mdx | 2 +-
api_docs/kbn_resizable_layout.mdx | 2 +-
api_docs/kbn_rison.mdx | 2 +-
api_docs/kbn_router_to_openapispec.mdx | 2 +-
api_docs/kbn_router_utils.mdx | 2 +-
api_docs/kbn_rrule.mdx | 2 +-
api_docs/kbn_rule_data_utils.mdx | 2 +-
api_docs/kbn_saved_objects_settings.mdx | 2 +-
api_docs/kbn_search_api_panels.mdx | 2 +-
api_docs/kbn_search_connectors.mdx | 2 +-
api_docs/kbn_search_errors.mdx | 2 +-
api_docs/kbn_search_index_documents.mdx | 2 +-
api_docs/kbn_search_response_warnings.mdx | 2 +-
api_docs/kbn_search_types.mdx | 2 +-
api_docs/kbn_security_hardening.mdx | 2 +-
api_docs/kbn_security_plugin_types_common.mdx | 2 +-
api_docs/kbn_security_plugin_types_public.mdx | 2 +-
api_docs/kbn_security_plugin_types_server.mdx | 2 +-
api_docs/kbn_security_solution_features.mdx | 2 +-
api_docs/kbn_security_solution_navigation.mdx | 2 +-
api_docs/kbn_security_solution_side_nav.mdx | 2 +-
...kbn_security_solution_storybook_config.mdx | 2 +-
.../kbn_securitysolution_autocomplete.mdx | 2 +-
api_docs/kbn_securitysolution_data_table.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_serverless_common_settings.mdx | 2 +-
.../kbn_serverless_observability_settings.mdx | 2 +-
api_docs/kbn_serverless_project_switcher.mdx | 2 +-
api_docs/kbn_serverless_search_settings.mdx | 2 +-
api_docs/kbn_serverless_security_settings.mdx | 2 +-
api_docs/kbn_serverless_storybook_config.mdx | 2 +-
api_docs/kbn_shared_svg.mdx | 2 +-
api_docs/kbn_shared_ux_avatar_solution.mdx | 2 +-
.../kbn_shared_ux_button_exit_full_screen.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_chrome_navigation.mdx | 2 +-
api_docs/kbn_shared_ux_error_boundary.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_types.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_tabbed_modal.mdx | 2 +-
api_docs/kbn_shared_ux_utility.mdx | 2 +-
api_docs/kbn_slo_schema.devdocs.json | 1392 +--
api_docs/kbn_slo_schema.mdx | 2 +-
api_docs/kbn_some_dev_log.mdx | 2 +-
api_docs/kbn_sort_predicates.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_eui_helpers.mdx | 2 +-
api_docs/kbn_test_jest_helpers.mdx | 2 +-
api_docs/kbn_test_subj_selector.mdx | 2 +-
api_docs/kbn_text_based_editor.mdx | 2 +-
api_docs/kbn_timerange.mdx | 2 +-
api_docs/kbn_tooling_log.mdx | 2 +-
api_docs/kbn_triggers_actions_ui_types.mdx | 2 +-
api_docs/kbn_try_in_console.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_unified_data_table.mdx | 2 +-
api_docs/kbn_unified_doc_viewer.mdx | 2 +-
api_docs/kbn_unified_field_list.mdx | 2 +-
api_docs/kbn_unsaved_changes_badge.mdx | 2 +-
.../kbn_unsaved_changes_prompt.devdocs.json | 61 +
api_docs/kbn_unsaved_changes_prompt.mdx | 30 +
api_docs/kbn_use_tracked_promise.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_visualization_ui_components.mdx | 2 +-
api_docs/kbn_visualization_utils.mdx | 2 +-
api_docs/kbn_xstate_utils.mdx | 2 +-
api_docs/kbn_yarn_lock_validator.mdx | 2 +-
api_docs/kbn_zod_helpers.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/links.mdx | 2 +-
api_docs/lists.mdx | 2 +-
api_docs/logs_data_access.mdx | 2 +-
api_docs/logs_explorer.mdx | 2 +-
api_docs/logs_shared.devdocs.json | 156 +-
api_docs/logs_shared.mdx | 4 +-
api_docs/management.mdx | 2 +-
api_docs/maps.mdx | 2 +-
api_docs/maps_ems.mdx | 2 +-
api_docs/metrics_data_access.mdx | 2 +-
api_docs/ml.mdx | 2 +-
api_docs/mock_idp_plugin.mdx | 2 +-
api_docs/monitoring.mdx | 2 +-
api_docs/monitoring_collection.mdx | 2 +-
api_docs/navigation.mdx | 2 +-
api_docs/newsfeed.mdx | 2 +-
api_docs/no_data_page.mdx | 2 +-
api_docs/notifications.mdx | 2 +-
api_docs/observability.devdocs.json | 4 +-
api_docs/observability.mdx | 2 +-
.../observability_a_i_assistant.devdocs.json | 195 +-
api_docs/observability_a_i_assistant.mdx | 4 +-
api_docs/observability_a_i_assistant_app.mdx | 2 +-
.../observability_ai_assistant_management.mdx | 2 +-
api_docs/observability_logs_explorer.mdx | 2 +-
api_docs/observability_onboarding.mdx | 2 +-
api_docs/observability_shared.mdx | 2 +-
api_docs/osquery.mdx | 2 +-
api_docs/painless_lab.mdx | 2 +-
api_docs/plugin_directory.mdx | 16 +-
api_docs/presentation_panel.mdx | 2 +-
api_docs/presentation_util.mdx | 2 +-
api_docs/profiling.mdx | 2 +-
api_docs/profiling_data_access.mdx | 2 +-
api_docs/remote_clusters.mdx | 2 +-
api_docs/reporting.mdx | 2 +-
api_docs/rollup.mdx | 2 +-
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/search_connectors.mdx | 2 +-
api_docs/search_notebooks.mdx | 2 +-
api_docs/search_playground.mdx | 2 +-
api_docs/security.mdx | 2 +-
api_docs/security_solution.mdx | 2 +-
api_docs/security_solution_ess.mdx | 2 +-
api_docs/security_solution_serverless.mdx | 2 +-
api_docs/serverless.mdx | 2 +-
api_docs/serverless_observability.mdx | 2 +-
api_docs/serverless_search.mdx | 2 +-
api_docs/session_view.mdx | 2 +-
api_docs/share.mdx | 2 +-
api_docs/slo.devdocs.json | 22 +-
api_docs/slo.mdx | 4 +-
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/text_based_languages.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 | 4 +-
api_docs/triggers_actions_ui.mdx | 2 +-
api_docs/ui_actions.mdx | 2 +-
api_docs/ui_actions_enhanced.mdx | 2 +-
api_docs/unified_doc_viewer.mdx | 2 +-
api_docs/unified_histogram.mdx | 2 +-
api_docs/unified_search.mdx | 2 +-
api_docs/unified_search_autocomplete.mdx | 2 +-
api_docs/uptime.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 +-
707 files changed, 10809 insertions(+), 1584 deletions(-)
create mode 100644 api_docs/investigate.devdocs.json
create mode 100644 api_docs/investigate.mdx
create mode 100644 api_docs/kbn_unsaved_changes_prompt.devdocs.json
create mode 100644 api_docs/kbn_unsaved_changes_prompt.mdx
diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx
index 36eba9ab62c4..9943a5ac9091 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx
index e94be3f94f41..d55ae963162c 100644
--- a/api_docs/advanced_settings.mdx
+++ b/api_docs/advanced_settings.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
description: API docs for the advancedSettings plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx
index 35c04ebbb6c2..de10ba4af625 100644
--- a/api_docs/ai_assistant_management_selection.mdx
+++ b/api_docs/ai_assistant_management_selection.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection
title: "aiAssistantManagementSelection"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiAssistantManagementSelection plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection']
---
import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json';
diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx
index e58a869f8fba..9075df5e8ce8 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx
index 1d0d844b67b1..f6b4e99f2b5e 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
---
import alertingObj from './alerting.devdocs.json';
diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx
index 5a3f4e2b0876..d098501122ab 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
---
import apmObj from './apm.devdocs.json';
diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx
index 504c8c334329..dc57cb53eebe 100644
--- a/api_docs/apm_data_access.mdx
+++ b/api_docs/apm_data_access.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess
title: "apmDataAccess"
image: https://source.unsplash.com/400x175/?github
description: API docs for the apmDataAccess plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess']
---
import apmDataAccessObj from './apm_data_access.devdocs.json';
diff --git a/api_docs/asset_manager.mdx b/api_docs/asset_manager.mdx
index f310627f96ca..345243d484bc 100644
--- a/api_docs/asset_manager.mdx
+++ b/api_docs/asset_manager.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetManager
title: "assetManager"
image: https://source.unsplash.com/400x175/?github
description: API docs for the assetManager plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager']
---
import assetManagerObj from './asset_manager.devdocs.json';
diff --git a/api_docs/assets_data_access.mdx b/api_docs/assets_data_access.mdx
index dd9081157a3d..1cedb1e4aab9 100644
--- a/api_docs/assets_data_access.mdx
+++ b/api_docs/assets_data_access.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetsDataAccess
title: "assetsDataAccess"
image: https://source.unsplash.com/400x175/?github
description: API docs for the assetsDataAccess plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetsDataAccess']
---
import assetsDataAccessObj from './assets_data_access.devdocs.json';
diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx
index 1d0c1e17cf9b..6616530eb007 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: 2024-06-07
+date: 2024-06-09
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 fc5232d10e84..10ce7f737c4d 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: 2024-06-07
+date: 2024-06-09
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 0785f60e0d9c..97db81ee2bbc 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: 2024-06-07
+date: 2024-06-09
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 38195c61b751..6416662de348 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: 2024-06-07
+date: 2024-06-09
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 8cefd83cc3bc..eab6f8b27f18 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: 2024-06-07
+date: 2024-06-09
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 78a58d4345aa..d0f6e9b5ddb1 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud']
---
import cloudObj from './cloud.devdocs.json';
diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx
index ce663b0f7ce6..269dd82ce00b 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: 2024-06-07
+date: 2024-06-09
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 1723dcbd5418..5000568c30f7 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: 2024-06-07
+date: 2024-06-09
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 dc809e8d17aa..20e6537e3388 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: 2024-06-07
+date: 2024-06-09
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 5ed34b08e853..decdaf04be75 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: 2024-06-07
+date: 2024-06-09
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 b052c84c249b..df65584132e0 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console']
---
import consoleObj from './console.devdocs.json';
diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx
index eeb1f7984e8c..d44bb65328d3 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement']
---
import contentManagementObj from './content_management.devdocs.json';
diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx
index 6e0ca332c82e..383f0b2fcc8c 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: 2024-06-07
+date: 2024-06-09
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 416290145531..889805453eb7 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: 2024-06-07
+date: 2024-06-09
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 003b10584ad0..a7f24cb3d850 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: 2024-06-07
+date: 2024-06-09
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 b98b3854f762..1c1cb32c7416 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: 2024-06-07
+date: 2024-06-09
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 1246a7fec0b1..b2a57487254e 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data']
---
import dataObj from './data.devdocs.json';
@@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3194 | 31 | 2585 | 24 |
+| 3199 | 31 | 2590 | 24 |
## Client
diff --git a/api_docs/data_quality.mdx b/api_docs/data_quality.mdx
index 7ac54c4a7bca..868d9821ef37 100644
--- a/api_docs/data_quality.mdx
+++ b/api_docs/data_quality.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataQuality
title: "dataQuality"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dataQuality plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataQuality']
---
import dataQualityObj from './data_quality.devdocs.json';
diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx
index a4cc593641e3..36363475ce29 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query']
---
import dataQueryObj from './data_query.devdocs.json';
@@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3194 | 31 | 2585 | 24 |
+| 3199 | 31 | 2590 | 24 |
## Client
diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json
index a9e4a675758c..3e3047831b93 100644
--- a/api_docs/data_search.devdocs.json
+++ b/api_docs/data_search.devdocs.json
@@ -16864,6 +16864,134 @@
"returnComment": [],
"initialIsOpen": false
},
+ {
+ "parentPluginId": "data",
+ "id": "def-common.queryToFields",
+ "type": "Function",
+ "tags": [],
+ "label": "queryToFields",
+ "description": [],
+ "signature": [
+ "({\n dataView,\n sort,\n request,\n}: { dataView: ",
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewLazy",
+ "text": "DataViewLazy"
+ },
+ "; sort?: ",
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.EsQuerySortValue",
+ "text": "EsQuerySortValue"
+ },
+ " | ",
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.EsQuerySortValue",
+ "text": "EsQuerySortValue"
+ },
+ "[] | undefined; request: ",
+ "SearchRequest",
+ "; }) => Promise>"
+ ],
+ "path": "src/plugins/data/common/search/search_source/query_to_fields.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "data",
+ "id": "def-common.queryToFields.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n dataView,\n sort,\n request,\n}",
+ "description": [],
+ "path": "src/plugins/data/common/search/search_source/query_to_fields.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "data",
+ "id": "def-common.queryToFields.$1.dataView",
+ "type": "Object",
+ "tags": [],
+ "label": "dataView",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "dataViews",
+ "scope": "common",
+ "docId": "kibDataViewsPluginApi",
+ "section": "def-common.DataViewLazy",
+ "text": "DataViewLazy"
+ }
+ ],
+ "path": "src/plugins/data/common/search/search_source/query_to_fields.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "data",
+ "id": "def-common.queryToFields.$1.sort",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "sort",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.EsQuerySortValue",
+ "text": "EsQuerySortValue"
+ },
+ " | ",
+ {
+ "pluginId": "data",
+ "scope": "common",
+ "docId": "kibDataSearchPluginApi",
+ "section": "def-common.EsQuerySortValue",
+ "text": "EsQuerySortValue"
+ },
+ "[] | undefined"
+ ],
+ "path": "src/plugins/data/common/search/search_source/query_to_fields.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "data",
+ "id": "def-common.queryToFields.$1.request",
+ "type": "Object",
+ "tags": [],
+ "label": "request",
+ "description": [],
+ "signature": [
+ "{ [x: string]: any; }"
+ ],
+ "path": "src/plugins/data/common/search/search_source/query_to_fields.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
{
"parentPluginId": "data",
"id": "def-common.splitStringInterval",
diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx
index 2ed012e24869..cff3b15809f3 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search']
---
import dataSearchObj from './data_search.devdocs.json';
@@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k
| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
-| 3194 | 31 | 2585 | 24 |
+| 3199 | 31 | 2590 | 24 |
## Client
diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx
index 4e830303a9d0..e23184e4a431 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: 2024-06-07
+date: 2024-06-09
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 9740857cf2d2..3717f7b039d1 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: 2024-06-07
+date: 2024-06-09
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 fe32d081dd51..f0fcbfb118e0 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: 2024-06-07
+date: 2024-06-09
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 f061290d8534..99de68695fad 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: 2024-06-07
+date: 2024-06-09
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 e4da3820ddd2..dff783792e3c 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer']
---
import dataVisualizerObj from './data_visualizer.devdocs.json';
diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx
index e5be501a8137..a9b109ec03c8 100644
--- a/api_docs/dataset_quality.mdx
+++ b/api_docs/dataset_quality.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/datasetQuality
title: "datasetQuality"
image: https://source.unsplash.com/400x175/?github
description: API docs for the datasetQuality plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality']
---
import datasetQualityObj from './dataset_quality.devdocs.json';
diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx
index 31ac4dda7a78..842d96f673ae 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -65,7 +65,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | @kbn/monaco, securitySolution | - |
| | fleet, cloudSecurityPosture, exploratoryView, osquery, synthetics | - |
| | actions, alerting | - |
-| | visualizations, lens, controls, dashboard, maps, discover, infra, profiling, links | - |
+| | visualizations, lens, controls, dashboard, maps, discover, profiling, links | - |
| | discover, @kbn/reporting-public | - |
| | data, discover, imageEmbeddable, embeddable | - |
| | @kbn/core-plugins-browser-internal, @kbn/core-root-browser-internal, home, savedObjects, unifiedSearch, visualizations, fileUpload, dashboardEnhanced, transform, dashboard, discover, dataVisualizer | - |
diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx
index 30792ef53f83..665dbca27df1 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -931,7 +931,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
| | [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [validation_errors.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/public/pages/logs/settings/validation_errors.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [index_patterns.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/common/dependency_mocks/index_patterns.ts#:~:text=title), [use_waffle_filters.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/hooks/use_waffle_filters.test.ts#:~:text=title) | - |
-| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/public/plugin.ts#:~:text=registerEmbeddableFactory) | - |
| | [saved_object_type.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/infra/server/lib/sources/saved_object_type.ts#:~:text=migrations) | - |
diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx
index 133406d897c6..55723af7a067 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx
index a3375e790429..715f165736c2 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: 2024-06-07
+date: 2024-06-09
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 fa7271d82f93..ad91704bd2c7 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: 2024-06-07
+date: 2024-06-09
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 fcdc1ef0a921..9d47a144d4b2 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced']
---
import discoverEnhancedObj from './discover_enhanced.devdocs.json';
diff --git a/api_docs/discover_shared.mdx b/api_docs/discover_shared.mdx
index 6424fbd84f9f..3e23a9ec7dd2 100644
--- a/api_docs/discover_shared.mdx
+++ b/api_docs/discover_shared.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverShared
title: "discoverShared"
image: https://source.unsplash.com/400x175/?github
description: API docs for the discoverShared plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverShared']
---
import discoverSharedObj from './discover_shared.devdocs.json';
diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx
index ec760f8f4577..b04c83fcf525 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard']
---
import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json';
diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx
index 9afa2d4e8ea8..25d88edcf796 100644
--- a/api_docs/elastic_assistant.mdx
+++ b/api_docs/elastic_assistant.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/elasticAssistant
title: "elasticAssistant"
image: https://source.unsplash.com/400x175/?github
description: API docs for the elasticAssistant plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant']
---
import elasticAssistantObj from './elastic_assistant.devdocs.json';
diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json
index 929b5fdefe5e..01c91c22b075 100644
--- a/api_docs/embeddable.devdocs.json
+++ b/api_docs/embeddable.devdocs.json
@@ -14302,10 +14302,6 @@
"plugin": "discover",
"path": "src/plugins/discover/public/plugin.tsx"
},
- {
- "plugin": "infra",
- "path": "x-pack/plugins/observability_solution/infra/public/plugin.ts"
- },
{
"plugin": "profiling",
"path": "x-pack/plugins/observability_solution/profiling/public/embeddables/register_embeddables.ts"
diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx
index bd58da487c5b..de4c5a767408 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable']
---
import embeddableObj from './embeddable.devdocs.json';
diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx
index cbb5998b2228..61a42bc57f61 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced']
---
import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json';
diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx
index 4f1fac82d8cd..3128ab3e5946 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects']
---
import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json';
diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx
index 760ff174bb1f..2a3bba48bada 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch']
---
import enterpriseSearchObj from './enterprise_search.devdocs.json';
diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx
index 0d9fcd2eb95d..b3538db59ee9 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared']
---
import esUiSharedObj from './es_ui_shared.devdocs.json';
diff --git a/api_docs/esql_data_grid.mdx b/api_docs/esql_data_grid.mdx
index 2dd8ae639b00..e78b7621bb2f 100644
--- a/api_docs/esql_data_grid.mdx
+++ b/api_docs/esql_data_grid.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esqlDataGrid
title: "esqlDataGrid"
image: https://source.unsplash.com/400x175/?github
description: API docs for the esqlDataGrid plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esqlDataGrid']
---
import esqlDataGridObj from './esql_data_grid.devdocs.json';
diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx
index 005c548e1b63..1ee995dba019 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation']
---
import eventAnnotationObj from './event_annotation.devdocs.json';
diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx
index b513cd16b12c..e62bb9d5ff80 100644
--- a/api_docs/event_annotation_listing.mdx
+++ b/api_docs/event_annotation_listing.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotationListing
title: "eventAnnotationListing"
image: https://source.unsplash.com/400x175/?github
description: API docs for the eventAnnotationListing plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing']
---
import eventAnnotationListingObj from './event_annotation_listing.devdocs.json';
diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx
index 52f4393dd47c..820dbfa7e1ec 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog']
---
import eventLogObj from './event_log.devdocs.json';
diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx
index 6012cb0c3ab1..d84b539b44a0 100644
--- a/api_docs/exploratory_view.mdx
+++ b/api_docs/exploratory_view.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView
title: "exploratoryView"
image: https://source.unsplash.com/400x175/?github
description: API docs for the exploratoryView plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView']
---
import exploratoryViewObj from './exploratory_view.devdocs.json';
diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx
index fdfba4df8796..3f35211d1cbb 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError']
---
import expressionErrorObj from './expression_error.devdocs.json';
diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx
index 5137833ef746..5a2bf6ca6244 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge']
---
import expressionGaugeObj from './expression_gauge.devdocs.json';
diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx
index f868ce7f0e90..c73d823fd44a 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap']
---
import expressionHeatmapObj from './expression_heatmap.devdocs.json';
diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx
index f6ef6203b793..93110d2ab41c 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage']
---
import expressionImageObj from './expression_image.devdocs.json';
diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx
index 7ae4d6140f15..7e9e60f7dd05 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis']
---
import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json';
diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx
index 86271a820f3d..2da47ebe19cc 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric']
---
import expressionMetricObj from './expression_metric.devdocs.json';
diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx
index 7355a1e61f49..e86cf7f2b2ab 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis']
---
import expressionMetricVisObj from './expression_metric_vis.devdocs.json';
diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx
index db23d38c936e..bd5f348ccfcc 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis']
---
import expressionPartitionVisObj from './expression_partition_vis.devdocs.json';
diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx
index d2b2c138350a..8122cfccbfcb 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage']
---
import expressionRepeatImageObj from './expression_repeat_image.devdocs.json';
diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx
index 7fc935f9ff7d..c75076257eb3 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage']
---
import expressionRevealImageObj from './expression_reveal_image.devdocs.json';
diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx
index 3a99f4d9df32..4dbfd70f3fa6 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape']
---
import expressionShapeObj from './expression_shape.devdocs.json';
diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx
index f762dbd2e225..f8e17f29c0b0 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud']
---
import expressionTagcloudObj from './expression_tagcloud.devdocs.json';
diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx
index a24fc6fd26bf..b277563fccea 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY']
---
import expressionXYObj from './expression_x_y.devdocs.json';
diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx
index d0c870700afb..3b2a2e90f012 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions']
---
import expressionsObj from './expressions.devdocs.json';
diff --git a/api_docs/features.mdx b/api_docs/features.mdx
index 73c9b4df9763..0599b1ee27a1 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features']
---
import featuresObj from './features.devdocs.json';
diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx
index 9d6eb91908f5..c5c4435bdf43 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats']
---
import fieldFormatsObj from './field_formats.devdocs.json';
diff --git a/api_docs/fields_metadata.mdx b/api_docs/fields_metadata.mdx
index 4b330327b4ef..9f679f164075 100644
--- a/api_docs/fields_metadata.mdx
+++ b/api_docs/fields_metadata.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldsMetadata
title: "fieldsMetadata"
image: https://source.unsplash.com/400x175/?github
description: API docs for the fieldsMetadata plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldsMetadata']
---
import fieldsMetadataObj from './fields_metadata.devdocs.json';
diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx
index 8b4f442cee49..54f40d083292 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload']
---
import fileUploadObj from './file_upload.devdocs.json';
diff --git a/api_docs/files.mdx b/api_docs/files.mdx
index a3a03f3afb89..fcc8d1075f70 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files']
---
import filesObj from './files.devdocs.json';
diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx
index e80a1cf6d00a..b1de172e0768 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement']
---
import filesManagementObj from './files_management.devdocs.json';
diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx
index c889f38ff3df..a15901488f3f 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet']
---
import fleetObj from './fleet.devdocs.json';
diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx
index efe0f229c9b6..9efe2e9626b6 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch']
---
import globalSearchObj from './global_search.devdocs.json';
diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx
index d55bf4843512..c6612b960c27 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding']
---
import guidedOnboardingObj from './guided_onboarding.devdocs.json';
diff --git a/api_docs/home.mdx b/api_docs/home.mdx
index 3f2668d78364..e441fa46aca6 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: 2024-06-07
+date: 2024-06-09
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 7ba2a712c87f..bb0087213d78 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: 2024-06-07
+date: 2024-06-09
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 b3a87c35321d..86a7cc593b65 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement']
---
import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json';
diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx
index 2ecc67bbf92f..79dee9bb31ba 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement']
---
import indexManagementObj from './index_management.devdocs.json';
diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx
index 2d80cf05594c..ddfac4502fa4 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra']
---
import infraObj from './infra.devdocs.json';
diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx
index 57579155970d..b5222004f44f 100644
--- a/api_docs/ingest_pipelines.mdx
+++ b/api_docs/ingest_pipelines.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines
title: "ingestPipelines"
image: https://source.unsplash.com/400x175/?github
description: API docs for the ingestPipelines plugin
-date: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines']
---
import ingestPipelinesObj from './ingest_pipelines.devdocs.json';
diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx
index 50eeb8554533..bb4260b93c63 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector']
---
import inspectorObj from './inspector.devdocs.json';
diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx
index 1f6c397edadd..17ead3c7b0e7 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: 2024-06-07
+date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup']
---
import interactiveSetupObj from './interactive_setup.devdocs.json';
diff --git a/api_docs/investigate.devdocs.json b/api_docs/investigate.devdocs.json
new file mode 100644
index 000000000000..aef706f88429
--- /dev/null
+++ b/api_docs/investigate.devdocs.json
@@ -0,0 +1,8904 @@
+{
+ "id": "investigate",
+ "client": {
+ "classes": [],
+ "functions": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.createEsqlWidget",
+ "type": "Function",
+ "tags": [],
+ "label": "createEsqlWidget",
+ "description": [],
+ "signature": [
+ ", PredefinedKeys>>(widgetCreate: T) => Pick<",
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidgetCreate",
+ "text": "InvestigateWidgetCreate"
+ },
+ "<",
+ {
+ "pluginId": "investigate",
+ "scope": "public",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-public.EsqlWidgetParameters",
+ "text": "EsqlWidgetParameters"
+ },
+ ">, PredefinedKeys> & Omit & { parameters: T[\"parameters\"] & ",
+ "_DeepPartialObject",
+ "<",
+ "GlobalWidgetParameters",
+ ">; }"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/esql_widget/create_esql_widget.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.createEsqlWidget.$1",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "widgetCreate",
+ "description": [],
+ "signature": [
+ "T"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/create_widget.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.createWidgetFactory",
+ "type": "Function",
+ "tags": [],
+ "label": "createWidgetFactory",
+ "description": [],
+ "signature": [
+ "(type: string, defaults: Pick>, AllowedDefaultKeys> | undefined) => ",
+ "WidgetFactory",
+ ""
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/create_widget.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.createWidgetFactory.$1",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/create_widget.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.createWidgetFactory.$2",
+ "type": "Object",
+ "tags": [],
+ "label": "defaults",
+ "description": [],
+ "signature": [
+ "Pick>, AllowedDefaultKeys> | undefined"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/create_widget.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": false
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.getEsFilterFromGlobalParameters",
+ "type": "Function",
+ "tags": [],
+ "label": "getEsFilterFromGlobalParameters",
+ "description": [],
+ "signature": [
+ "({\n query,\n filters,\n timeRange,\n}: Partial<",
+ "GlobalWidgetParameters",
+ ">) => { bool: ",
+ {
+ "pluginId": "@kbn/es-query",
+ "scope": "common",
+ "docId": "kibKbnEsQueryPluginApi",
+ "section": "def-common.BoolQuery",
+ "text": "BoolQuery"
+ },
+ "; }"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/util/get_es_filters_from_global_parameters.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.getEsFilterFromGlobalParameters.$1",
+ "type": "Object",
+ "tags": [],
+ "label": "{\n query,\n filters,\n timeRange,\n}",
+ "description": [],
+ "signature": [
+ "Partial<",
+ "GlobalWidgetParameters",
+ ">"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/util/get_es_filters_from_global_parameters.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": [],
+ "initialIsOpen": false
+ }
+ ],
+ "interfaces": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.EsqlWidgetParameters",
+ "type": "Interface",
+ "tags": [],
+ "label": "EsqlWidgetParameters",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/public/esql_widget/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.EsqlWidgetParameters.esql",
+ "type": "string",
+ "tags": [],
+ "label": "esql",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/public/esql_widget/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.EsqlWidgetParameters.suggestion",
+ "type": "Object",
+ "tags": [],
+ "label": "suggestion",
+ "description": [],
+ "signature": [
+ "Suggestion | undefined"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/esql_widget/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.EsqlWidgetParameters.predefined",
+ "type": "Object",
+ "tags": [],
+ "label": "predefined",
+ "description": [],
+ "signature": [
+ "Partial<",
+ "GlobalWidgetParameters",
+ "> | undefined"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/esql_widget/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.GlobalWidgetParameters",
+ "type": "Interface",
+ "tags": [],
+ "label": "GlobalWidgetParameters",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.GlobalWidgetParameters.timeRange",
+ "type": "Object",
+ "tags": [],
+ "label": "timeRange",
+ "description": [],
+ "signature": [
+ "{ from: string; to: string; }"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.GlobalWidgetParameters.query",
+ "type": "Object",
+ "tags": [],
+ "label": "query",
+ "description": [],
+ "signature": [
+ "{ query: string; language: \"kuery\"; }"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.GlobalWidgetParameters.filters",
+ "type": "Array",
+ "tags": [],
+ "label": "filters",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "@kbn/es-query",
+ "scope": "common",
+ "docId": "kibKbnEsQueryPluginApi",
+ "section": "def-common.Filter",
+ "text": "Filter"
+ },
+ "[]"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateTimeline",
+ "type": "Interface",
+ "tags": [],
+ "label": "InvestigateTimeline",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateTimeline.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateTimeline.title",
+ "type": "string",
+ "tags": [],
+ "label": "title",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateTimeline.timestamp",
+ "type": "number",
+ "tags": [],
+ "label": "'@timestamp'",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateTimeline.user",
+ "type": "Object",
+ "tags": [],
+ "label": "user",
+ "description": [],
+ "signature": [
+ "InvestigateUser"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateTimeline.items",
+ "type": "Array",
+ "tags": [],
+ "label": "items",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidget",
+ "text": "InvestigateWidget"
+ },
+ "<{}, {}>[]"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateUser",
+ "type": "Interface",
+ "tags": [],
+ "label": "InvestigateUser",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateUser.name",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget",
+ "type": "Interface",
+ "tags": [],
+ "label": "InvestigateWidget",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidget",
+ "text": "InvestigateWidget"
+ },
+ ""
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.created",
+ "type": "number",
+ "tags": [],
+ "label": "created",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.last_updated",
+ "type": "number",
+ "tags": [],
+ "label": "last_updated",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.type",
+ "type": "string",
+ "tags": [],
+ "label": "type",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.user",
+ "type": "Object",
+ "tags": [],
+ "label": "user",
+ "description": [],
+ "signature": [
+ "InvestigateUser"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.parameters",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "parameters",
+ "description": [],
+ "signature": [
+ "GlobalWidgetParameters",
+ " & TParameters"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.data",
+ "type": "Uncategorized",
+ "tags": [],
+ "label": "data",
+ "description": [],
+ "signature": [
+ "TData"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.title",
+ "type": "string",
+ "tags": [],
+ "label": "title",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.columns",
+ "type": "Enum",
+ "tags": [],
+ "label": "columns",
+ "description": [],
+ "signature": [
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidgetColumnSpan",
+ "text": "InvestigateWidgetColumnSpan"
+ }
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.rows",
+ "type": "number",
+ "tags": [],
+ "label": "rows",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidget.locked",
+ "type": "boolean",
+ "tags": [],
+ "label": "locked",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WidgetRenderAPI",
+ "type": "Interface",
+ "tags": [],
+ "label": "WidgetRenderAPI",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WidgetRenderAPI.onDelete",
+ "type": "Function",
+ "tags": [],
+ "label": "onDelete",
+ "description": [],
+ "signature": [
+ "() => void"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WidgetRenderAPI.onWidgetAdd",
+ "type": "Function",
+ "tags": [],
+ "label": "onWidgetAdd",
+ "description": [],
+ "signature": [
+ "(create: ",
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidgetCreate",
+ "text": "InvestigateWidgetCreate"
+ },
+ "<{}>) => Promise"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WidgetRenderAPI.onWidgetAdd.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "create",
+ "description": [],
+ "signature": [
+ "Pick<",
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidget",
+ "text": "InvestigateWidget"
+ },
+ "<{}, {}>, \"type\" | \"title\" | \"description\" | \"rows\" | \"columns\" | \"locked\"> & { parameters: ",
+ "_DeepPartialObject",
+ "<",
+ "GlobalWidgetParameters",
+ ">; }"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ]
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WidgetRenderAPI.blocks",
+ "type": "Object",
+ "tags": [],
+ "label": "blocks",
+ "description": [],
+ "signature": [
+ "{ publish: (blocks: ",
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.WorkflowBlock",
+ "text": "WorkflowBlock"
+ },
+ "[]) => UnregisterFunction; }"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WorkflowBlock",
+ "type": "Interface",
+ "tags": [],
+ "label": "WorkflowBlock",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WorkflowBlock.id",
+ "type": "string",
+ "tags": [],
+ "label": "id",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WorkflowBlock.content",
+ "type": "string",
+ "tags": [],
+ "label": "content",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WorkflowBlock.description",
+ "type": "string",
+ "tags": [],
+ "label": "description",
+ "description": [],
+ "signature": [
+ "string | undefined"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WorkflowBlock.loading",
+ "type": "boolean",
+ "tags": [],
+ "label": "loading",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WorkflowBlock.onClick",
+ "type": "Function",
+ "tags": [],
+ "label": "onClick",
+ "description": [],
+ "signature": [
+ "(() => void) | undefined"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "returnComment": []
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WorkflowBlock.color",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "color",
+ "description": [],
+ "signature": [
+ "\"link\" | \"text\" | \"title\" | \"warning\" | \"disabled\" | \"success\" | \"body\" | \"highlight\" | \"primary\" | \"accent\" | \"danger\" | \"primaryText\" | \"accentText\" | \"successText\" | \"warningText\" | \"dangerText\" | \"emptyShade\" | \"lightestShade\" | \"lightShade\" | \"mediumShade\" | \"darkShade\" | \"darkestShade\" | \"fullShade\" | \"disabledText\" | \"shadow\" | \"subduedText\" | \"ghost\" | \"ink\" | undefined"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.WorkflowBlock.children",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "children",
+ "description": [],
+ "signature": [
+ "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "enums": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.ChromeOption",
+ "type": "Enum",
+ "tags": [],
+ "label": "ChromeOption",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidgetColumnSpan",
+ "type": "Enum",
+ "tags": [],
+ "label": "InvestigateWidgetColumnSpan",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ }
+ ],
+ "misc": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.ESQL_WIDGET_NAME",
+ "type": "string",
+ "tags": [],
+ "label": "ESQL_WIDGET_NAME",
+ "description": [],
+ "signature": [
+ "\"esql\""
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/esql_widget/constants.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigateWidgetCreate",
+ "type": "Type",
+ "tags": [],
+ "label": "InvestigateWidgetCreate",
+ "description": [],
+ "signature": [
+ "Pick<",
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidget",
+ "text": "InvestigateWidget"
+ },
+ "<{}, {}>, \"type\" | \"title\" | \"description\" | \"rows\" | \"columns\" | \"locked\"> & { parameters: ",
+ "_DeepPartialObject",
+ "<",
+ "GlobalWidgetParameters",
+ "> & TParameters; }"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/common/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.OnWidgetAdd",
+ "type": "Type",
+ "tags": [],
+ "label": "OnWidgetAdd",
+ "description": [],
+ "signature": [
+ "(create: ",
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidgetCreate",
+ "text": "InvestigateWidgetCreate"
+ },
+ "<{}>) => Promise"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.OnWidgetAdd.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "create",
+ "description": [],
+ "signature": [
+ "Pick<",
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidget",
+ "text": "InvestigateWidget"
+ },
+ "<{}, {}>, \"type\" | \"title\" | \"description\" | \"rows\" | \"columns\" | \"locked\"> & { parameters: ",
+ "_DeepPartialObject",
+ "<",
+ "GlobalWidgetParameters",
+ ">; }"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ }
+ ],
+ "initialIsOpen": false
+ }
+ ],
+ "objects": [],
+ "setup": {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigatePublicSetup",
+ "type": "Interface",
+ "tags": [],
+ "label": "InvestigatePublicSetup",
+ "description": [],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigatePublicSetup.registerWidget",
+ "type": "Function",
+ "tags": [],
+ "label": "registerWidget",
+ "description": [],
+ "signature": [
+ ">(definition: Omit & { schema: TSchema; }, generateCallback: GenerateCallback, renderCallback: (options: WidgetRenderOptions<",
+ {
+ "pluginId": "investigate",
+ "scope": "common",
+ "docId": "kibInvestigatePluginApi",
+ "section": "def-common.InvestigateWidget",
+ "text": "InvestigateWidget"
+ },
+ ", TData>>) => React.ReactNode) => void"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "returnComment": [],
+ "children": [
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigatePublicSetup.registerWidget.$1",
+ "type": "CompoundType",
+ "tags": [],
+ "label": "definition",
+ "description": [],
+ "signature": [
+ "Omit & { schema: TSchema; }"
+ ],
+ "path": "x-pack/plugins/observability_solution/investigate/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false
+ },
+ {
+ "parentPluginId": "investigate",
+ "id": "def-public.InvestigatePublicSetup.registerWidget.$2",
+ "type": "Function",
+ "tags": [],
+ "label": "generateCallback",
+ "description": [],
+ "signature": [
+ "(options: { parameters: (TSchema extends ",
+ "CompatibleJSONSchema",
+ " ? ",
+ "node_modules/ts-algebra/lib/meta-types/resolve",
+ "$Resolve<",
+ "JSONSchema7",
+ " extends (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema) ? ",
+ "Any",
+ " : (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema) extends string | true ? ",
+ "Any",
+ " : (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema) extends false ? ",
+ "Never",
+ " : (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema) extends ",
+ "NullableSchema",
+ " ? ",
+ "ParseNullableSchema",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, ",
+ "JSONSchema7",
+ " extends Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\"> ? ",
+ "Any",
+ " : Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\"> extends string | true ? ",
+ "Any",
+ " : Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\"> extends false ? ",
+ "Never",
+ " : Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\"> extends ",
+ "NullableSchema",
+ " ? ",
+ "ParseNullableSchema",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, ",
+ "JSONSchema7",
+ " extends Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> ? ",
+ "Any",
+ " : Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> extends string | true ? ",
+ "Any",
+ " : Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> extends false ? ",
+ "Never",
+ " : Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> extends ",
+ "NullableSchema",
+ " ? ",
+ "ParseNullableSchema",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, ",
+ "Any",
+ "> | ",
+ "ParseNullableSchema",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, ",
+ "Any",
+ "> | ",
+ "ParseNullableSchema",
+ " & { const?: unknown; enum?: unknown; items?: ",
+ "JSONSchema7",
+ " | ",
+ "JSONSchema7",
+ "[] | undefined; additionalItems?: ",
+ "JSONSchema7",
+ " | undefined; contains?: ",
+ "JSONSchema7",
+ " | undefined; properties?: Record | undefined; patternProperties?: Record | undefined; additionalProperties?: ",
+ "JSONSchema7",
+ " | undefined; dependencies?: { [key: string]: string[] | ",
+ "JSONSchema7",
+ "; } | undefined; propertyNames?: ",
+ "JSONSchema7",
+ " | undefined; if?: ",
+ "JSONSchema7",
+ " | undefined; then?: ",
+ "JSONSchema7",
+ " | undefined; else?: ",
+ "JSONSchema7",
+ " | undefined; allOf?: ",
+ "JSONSchema7",
+ "[] | undefined; anyOf?: ",
+ "JSONSchema7",
+ "[] | undefined; oneOf?: ",
+ "JSONSchema7",
+ "[] | undefined; not?: ",
+ "JSONSchema7",
+ " | undefined; nullable?: boolean | undefined; definitions?: { [key: string]: ",
+ "JSONSchema7",
+ "; } | undefined; examples?: unknown[] | undefined; default?: unknown; [$JSONSchema7]?: typeof ",
+ "node_modules/json-schema-to-ts/lib/types/definitions/jsonSchema7",
+ "$JSONSchema7 | undefined; } & { nullable: boolean; } & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, ",
+ "Any",
+ "> : Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> extends ",
+ "ReferenceSchema",
+ " ? ",
+ "ParseReferenceSchema",
+ "<",
+ "ReferenceSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, RecSplit<(",
+ "ReferenceSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"$ref\"], \"#\">> : Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> extends ",
+ "AllOfSchema",
+ " ? RecurseOnAllOfSchema<(",
+ "AllOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"allOf\"], ",
+ "AllOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, ",
+ "Any",
+ "> : Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> extends ",
+ "OneOfSchema",
+ " ? ",
+ "If",
+ "<",
+ "IsNever",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"oneOf\"], ",
+ "OneOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, never>>, ",
+ "Never",
+ ", ",
+ "DoesExtend",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"oneOf\"], ",
+ "OneOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, never>, ",
+ "Never",
+ "> extends true ? ",
+ "Never",
+ " : { type: \"union\"; values: RecurseOnOneOfSchema<(",
+ "OneOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"oneOf\"], ",
+ "OneOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, never>; }> : Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> extends ",
+ "AnyOfSchema",
+ " ? ",
+ "If",
+ "<",
+ "IsNever",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"anyOf\"], ",
+ "AnyOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, never>>, ",
+ "Never",
+ ", ",
+ "DoesExtend",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"anyOf\"], ",
+ "AnyOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, never>, ",
+ "Never",
+ "> extends true ? ",
+ "Never",
+ " : { type: \"union\"; values: RecurseOnAnyOfSchema<(",
+ "AnyOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"anyOf\"], ",
+ "AnyOfSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">, never>; }> : Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> extends ",
+ "EnumSchema",
+ " ? ",
+ "node_modules/ts-algebra/lib/meta-types/intersection/index",
+ "$Intersect<",
+ "If",
+ "<",
+ "IsNever",
+ "<",
+ "Compute",
+ "<(",
+ "EnumSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"enum\"][number], never>>, ",
+ "Never",
+ ", { type: \"enum\"; values: ",
+ "Compute",
+ "<(",
+ "EnumSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">)[\"enum\"][number], never>; isSerialized: false; deserialized: never; }>, ",
+ "Any",
+ "> : Omit<",
+ "NullableSchema",
+ " & Omit<",
+ "NullableSchema",
+ " & (TSchema extends Record ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\"> extends ",
+ "ConstSchema",
+ " ? ",
+ "ParseConstSchema",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">> | ",
+ "ParseConstSchema",
+ " ? ",
+ "DeepWritable",
+ " : TSchema), \"nullable\">, \"nullable\">, ",
+ "ParseOptions",
+ " ? ",
+ "DeepWritable",
+ " : TSchema, ",
+ "FromSchemaDefaultOptions",
+ ">> | ",
+ "ParseConstSchema",
+ " & { const?: unknown; enum?: unknown; items?: ",
+ "JSONSchema7",
+ " | ",
+ "JSONSchema7",
+ "[] | undefined; additionalItems?: ",
+ "JSONSchema7",
+ " | undefined; contains?: ",
+ "JSONSchema7",
+ " | undefined; properties?: Record