, 'isServerless'> {
newsfeedApi: NewsfeedApi;
hasCustomBranding$: Observable;
}
-export const NewsfeedNavButton = ({ newsfeedApi, hasCustomBranding$ }: Props) => {
+export const NewsfeedNavButton = ({ newsfeedApi, hasCustomBranding$, isServerless }: Props) => {
const [flyoutVisible, setFlyoutVisible] = useState(false);
const [newsFetchResult, setNewsFetchResult] = useState(null);
const hasCustomBranding = useObservable(hasCustomBranding$, false);
@@ -78,6 +78,7 @@ export const NewsfeedNavButton = ({ newsfeedApi, hasCustomBranding$ }: Props) =>
{flyoutVisible ? (
diff --git a/src/plugins/newsfeed/public/plugin.tsx b/src/plugins/newsfeed/public/plugin.tsx
index fc2cc452d2170..3719914192dfe 100644
--- a/src/plugins/newsfeed/public/plugin.tsx
+++ b/src/plugins/newsfeed/public/plugin.tsx
@@ -24,11 +24,13 @@ export type NewsfeedPublicPluginStart = ReturnType
{
+ private readonly isServerless: boolean;
private readonly kibanaVersion: string;
private readonly config: NewsfeedPluginBrowserConfig;
private readonly stop$ = new Rx.ReplaySubject(1);
constructor(initializerContext: PluginInitializerContext) {
+ this.isServerless = initializerContext.env.packageInfo.buildFlavor === 'serverless';
this.kibanaVersion = initializerContext.env.packageInfo.version;
const config = initializerContext.config.get();
this.config = Object.freeze({
@@ -89,7 +91,11 @@ export class NewsfeedPublicPlugin
const hasCustomBranding$ = core.customBranding.hasCustomBranding$;
ReactDOM.render(
-
+
,
targetDomElement
);
From 8a79173c4e01e0ab0d489098c5ad96bfa07df3ad Mon Sep 17 00:00:00 2001
From: Tre
Date: Fri, 20 Sep 2024 14:16:08 +0100
Subject: [PATCH 10/42] [Test Owners] Add script to get owners for files
(#193277)
## Summary
Node script to report ownership of a given file in our repo.
The script's source of truth is `.github/CODEOWNERS`, which is generated
by `@kbn/generate`
In order to reach the goal of have zero files without code ownership,
this is one small step along the way.
### To Test
#### Happy Path
`node scripts/get_owners_for_file.js --file
packages/kbn-ace/src/ace/modes/index.ts`
```
succ elastic/kibana-management
```
#### Unknown Path
`node scripts/get_owners_for_file.js --file some-file.txt`
```
ERROR Ownership of file [some-file.txt] is UNKNOWN
```
#### Error Path
`node scripts/get_owners_for_file.js`
```
ERROR Missing --flag argument
node scripts/get_owners_for_file.js
Report file ownership from GitHub CODEOWNERS file.
Options:
--file Required, path to the file to report owners for.
--verbose, -v Log verbosely
--debug Log debug messages (less than verbose)
--quiet Only log errors
--silent Don't log anything
--help Show this message
```
### Notes
Along with this small pr, next will be to ensure owners are assigned to
all ES and KBN Archives. See more info in the link below:
Contributes to: https://github.com/elastic/kibana/issues/192979
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
---
packages/kbn-code-owners/index.ts | 6 ++-
.../kbn-code-owners/src/file_code_owner.ts | 40 +++++++++++++++++--
packages/kbn-code-owners/tsconfig.json | 3 +-
scripts/get_owners_for_file.js | 11 +++++
4 files changed, 54 insertions(+), 6 deletions(-)
create mode 100644 scripts/get_owners_for_file.js
diff --git a/packages/kbn-code-owners/index.ts b/packages/kbn-code-owners/index.ts
index b4e83b6194c54..8966b92834089 100644
--- a/packages/kbn-code-owners/index.ts
+++ b/packages/kbn-code-owners/index.ts
@@ -8,4 +8,8 @@
*/
export type { PathWithOwners } from './src/file_code_owner';
-export { getPathsWithOwnersReversed, getCodeOwnersForFile } from './src/file_code_owner';
+export {
+ getPathsWithOwnersReversed,
+ getCodeOwnersForFile,
+ runGetOwnersForFileCli,
+} from './src/file_code_owner';
diff --git a/packages/kbn-code-owners/src/file_code_owner.ts b/packages/kbn-code-owners/src/file_code_owner.ts
index 34f7970ca0d82..f413d7f975df0 100644
--- a/packages/kbn-code-owners/src/file_code_owner.ts
+++ b/packages/kbn-code-owners/src/file_code_owner.ts
@@ -8,9 +8,10 @@
*/
import { REPO_ROOT } from '@kbn/repo-info';
-import { createFailError } from '@kbn/dev-cli-errors';
+import { createFailError, createFlagError } from '@kbn/dev-cli-errors';
import { join as joinPath } from 'path';
import { existsSync, readFileSync } from 'fs';
+import { run } from '@kbn/dev-cli-runner';
import type { Ignore } from 'ignore';
import ignore from 'ignore';
@@ -20,6 +21,10 @@ export interface PathWithOwners {
teams: string;
ignorePattern: Ignore;
}
+const existOrThrow = (targetFile: string) => {
+ if (existsSync(targetFile) === false)
+ throw createFailError(`Unable to determine code owners: file ${targetFile} Not Found`);
+};
/**
* Get the .github/CODEOWNERS entries, prepared for path matching.
@@ -29,9 +34,7 @@ export interface PathWithOwners {
*/
export function getPathsWithOwnersReversed(): PathWithOwners[] {
const codeownersPath = joinPath(REPO_ROOT, '.github', 'CODEOWNERS');
- if (existsSync(codeownersPath) === false) {
- throw createFailError(`Unable to determine code owners: file ${codeownersPath} not found`);
- }
+ existOrThrow(codeownersPath);
const codeownersContent = readFileSync(codeownersPath, { encoding: 'utf8', flag: 'r' });
const codeownersLines = codeownersContent.split(/\r?\n/);
const codeowners = codeownersLines
@@ -66,3 +69,32 @@ export function getCodeOwnersForFile(
return match?.teams;
}
+
+/**
+ * Run the getCodeOwnersForFile() method above.
+ * Report back to the cli with either success and the owner(s), or a failure.
+ *
+ * This function depends on a --file param being passed on the cli, like this:
+ * $ node scripts/get_owners_for_file.js --file SOME-FILE
+ */
+export async function runGetOwnersForFileCli() {
+ run(
+ async ({ flags, log }) => {
+ const targetFile = flags.file as string;
+ if (!targetFile) throw createFlagError(`Missing --flag argument`);
+ existOrThrow(targetFile); // This call is duplicated in getPathsWithOwnersReversed(), so this is a short circuit
+ const result = getCodeOwnersForFile(targetFile);
+ if (result) log.success(result);
+ else log.error(`Ownership of file [${targetFile}] is UNKNOWN`);
+ },
+ {
+ description: 'Report file ownership from GitHub CODEOWNERS file.',
+ flags: {
+ string: ['file'],
+ help: `
+ --file Required, path to the file to report owners for.
+ `,
+ },
+ }
+ );
+}
diff --git a/packages/kbn-code-owners/tsconfig.json b/packages/kbn-code-owners/tsconfig.json
index e97f927147d73..955d0568ca3ce 100644
--- a/packages/kbn-code-owners/tsconfig.json
+++ b/packages/kbn-code-owners/tsconfig.json
@@ -15,6 +15,7 @@
],
"kbn_references": [
"@kbn/repo-info",
- "@kbn/dev-cli-errors"
+ "@kbn/dev-cli-errors",
+ "@kbn/dev-cli-runner"
]
}
diff --git a/scripts/get_owners_for_file.js b/scripts/get_owners_for_file.js
new file mode 100644
index 0000000000000..f5a07b76ee04c
--- /dev/null
+++ b/scripts/get_owners_for_file.js
@@ -0,0 +1,11 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the "Elastic License
+ * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
+ * License v3.0 only", or the "Server Side Public License, v 1".
+ */
+
+require('../src/setup_node_env');
+require('@kbn/code-owners').runGetOwnersForFileCli();
From 682afb7d8cf2712c2a4d3c64820e4baf2af100bf Mon Sep 17 00:00:00 2001
From: Thomas Neirynck
Date: Fri, 20 Sep 2024 09:24:19 -0400
Subject: [PATCH 11/42] [Lens] Add ES-request time telemetry to Lens embeddable
(#192743)
## Summary
Similar to https://github.com/elastic/kibana/pull/192245, this adds
request-time to the Lens Embeddable. This would allow to track these
metrics anywhere where Lens is embedded.
This is particularly important for Lens embedded in a Dashboard since
all performance journeys are written against Dashboards.
### Checklist
Delete any items that are not applicable to this PR.
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### For maintainers
- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello
---
.../workspace_panel/workspace_panel.tsx | 13 +++----
.../lens/public/embeddable/embeddable.tsx | 14 ++++++++
.../public/report_performance_metric_util.ts | 36 +++++++++++++++++++
3 files changed, 54 insertions(+), 9 deletions(-)
create mode 100644 x-pack/plugins/lens/public/report_performance_metric_util.ts
diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
index c38bfb2cc86f0..68c63f1da52dd 100644
--- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
+++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
@@ -28,7 +28,7 @@ import { DropIllustration } from '@kbn/chart-icons';
import { useDragDropContext, DragDropIdentifier, Droppable } from '@kbn/dom-drag-drop';
import { reportPerformanceMetricEvent } from '@kbn/ebt-tools';
import { ChartSizeSpec, isChartSizeEvent } from '@kbn/chart-expressions-common';
-import { estypes } from '@elastic/elasticsearch';
+import { getSuccessfulRequestTimings } from '../../../report_performance_metric_util';
import { trackUiCounterEvents } from '../../../lens_ui_telemetry';
import { getSearchWarningMessages } from '../../../utils';
import {
@@ -205,8 +205,7 @@ export const InnerWorkspacePanel = React.memo(function InnerWorkspacePanel({
eventName: 'lensVisualizationRenderTime',
duration: currentTime - visualizationRenderStartTime.current,
key1: 'time_to_data',
- value1:
- dataReceivedTime.current - visualizationRenderStartTime.current - esTookTime.current,
+ value1: dataReceivedTime.current - visualizationRenderStartTime.current,
key2: 'time_to_render',
value2: currentTime - dataReceivedTime.current,
key3: 'es_took',
@@ -268,13 +267,9 @@ export const InnerWorkspacePanel = React.memo(function InnerWorkspacePanel({
searchService: plugins.data.search,
}
);
- esTookTime.current = adapters.requests.getRequests().reduce((maxTime, { response }) => {
- const took =
- (response?.json as { rawResponse: estypes.SearchResponse | undefined } | undefined)
- ?.rawResponse?.took ?? 0;
- return Math.max(maxTime, took);
- }, 0);
+ const timings = getSuccessfulRequestTimings(adapters);
+ esTookTime.current = timings ? timings.esTookTotal : 0;
}
if (requestWarnings.length) {
diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.tsx
index 6c758abb81cff..51bcbb4fed635 100644
--- a/x-pack/plugins/lens/public/embeddable/embeddable.tsx
+++ b/x-pack/plugins/lens/public/embeddable/embeddable.tsx
@@ -12,6 +12,7 @@ import { css } from '@emotion/react';
import { i18n } from '@kbn/i18n';
import { render, unmountComponentAtNode } from 'react-dom';
import { ENABLE_ESQL } from '@kbn/esql-utils';
+import { reportPerformanceMetricEvent } from '@kbn/ebt-tools';
import {
DataViewBase,
EsQueryConfig,
@@ -86,6 +87,7 @@ import { DataViewSpec } from '@kbn/data-views-plugin/common';
import { FormattedMessage } from '@kbn/i18n-react';
import { useEuiFontSize, useEuiTheme, EuiEmptyPrompt } from '@elastic/eui';
import { canTrackContentfulRender } from '@kbn/presentation-containers';
+import { getSuccessfulRequestTimings } from '../report_performance_metric_util';
import { getExecutionContextEvents, trackUiCounterEvents } from '../lens_ui_telemetry';
import { Document } from '../persistence';
import { ExpressionWrapper, ExpressionWrapperProps } from './expression_wrapper';
@@ -1076,6 +1078,18 @@ export class Embeddable
...this.getOutput(),
rendered: true,
});
+
+ const inspectorAdapters = this.getInspectorAdapters();
+ const timings = getSuccessfulRequestTimings(inspectorAdapters);
+ if (timings) {
+ const esRequestMetrics = {
+ eventName: 'lens_chart_es_request_totals',
+ duration: timings.requestTimeTotal,
+ key1: 'es_took_total',
+ value1: timings.esTookTotal,
+ };
+ reportPerformanceMetricEvent(this.deps.coreStart.analytics, esRequestMetrics);
+ }
};
getExecutionContext() {
diff --git a/x-pack/plugins/lens/public/report_performance_metric_util.ts b/x-pack/plugins/lens/public/report_performance_metric_util.ts
new file mode 100644
index 0000000000000..64465e8d20a18
--- /dev/null
+++ b/x-pack/plugins/lens/public/report_performance_metric_util.ts
@@ -0,0 +1,36 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { RequestStatus } from '@kbn/inspector-plugin/common';
+import type { Adapters } from '@kbn/inspector-plugin/public';
+import { estypes } from '@elastic/elasticsearch';
+
+export interface ILensRequestPerformance {
+ requestTimeTotal: number;
+ esTookTotal: number;
+}
+
+export function getSuccessfulRequestTimings(
+ inspectorAdapters: Adapters
+): ILensRequestPerformance | null {
+ const requests = inspectorAdapters.requests?.getRequests() || [];
+
+ let esTookTotal = 0;
+ let requestTimeTotal = 0;
+ for (let i = 0; i < requests.length; i++) {
+ const request = requests[i];
+ if (request.status !== RequestStatus.OK) {
+ return null;
+ }
+ esTookTotal +=
+ (request.response?.json as { rawResponse: estypes.SearchResponse | undefined } | undefined)
+ ?.rawResponse?.took ?? 0;
+ requestTimeTotal += request.time || 0;
+ }
+
+ return { requestTimeTotal, esTookTotal };
+}
From 52aa453003a331fc83ab42a73d7dacea96070404 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Yulia=20=C4=8Cech?=
<6585477+yuliacech@users.noreply.github.com>
Date: Fri, 20 Sep 2024 15:28:02 +0200
Subject: [PATCH 12/42] [Console] Allow mixed case methods (#193445)
## Summary
Fixes https://github.com//elastic/kibana/issues/186774
This PR is re-opened from https://github.com/elastic/kibana/pull/190527
after too many merge conflicts.
This PR adds a new function to the parser to allow mixed case methods
like GeT, posT etc
### 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)
---
packages/kbn-monaco/src/console/parser.js | 101 ++++++------------
.../kbn-monaco/src/console/parser.test.ts | 45 ++++++++
test/functional/apps/console/_console.ts | 10 ++
3 files changed, 90 insertions(+), 66 deletions(-)
diff --git a/packages/kbn-monaco/src/console/parser.js b/packages/kbn-monaco/src/console/parser.js
index be0d5cbd27f68..014e579ac3477 100644
--- a/packages/kbn-monaco/src/console/parser.js
+++ b/packages/kbn-monaco/src/console/parser.js
@@ -67,6 +67,14 @@ export const createParser = () => {
at += 1;
return ch;
},
+ nextOneOf = function (chars) {
+ if (chars && !chars.includes(ch)) {
+ error('Expected one of ' + chars + ' instead of \'' + ch + '\'');
+ }
+ ch = text.charAt(at);
+ at += 1;
+ return ch;
+ },
nextUpTo = function (upTo, errorMessage) {
let currentAt = at,
i = text.indexOf(upTo, currentAt);
@@ -221,84 +229,45 @@ export const createParser = () => {
},
// parses and returns the method
method = function () {
- switch (ch) {
- case 'g':
- next('g');
- next('e');
- next('t');
- return 'get';
+ const upperCaseChar = ch.toUpperCase();
+ switch (upperCaseChar) {
case 'G':
- next('G');
- next('E');
- next('T');
+ nextOneOf(['G', 'g']);
+ nextOneOf(['E', 'e']);
+ nextOneOf(['T', 't']);
return 'GET';
- case 'h':
- next('h');
- next('e');
- next('a');
- next('d');
- return 'head';
case 'H':
- next('H');
- next('E');
- next('A');
- next('D');
+ nextOneOf(['H', 'h']);
+ nextOneOf(['E', 'e']);
+ nextOneOf(['A', 'a']);
+ nextOneOf(['D', 'd']);
return 'HEAD';
- case 'd':
- next('d');
- next('e');
- next('l');
- next('e');
- next('t');
- next('e');
- return 'delete';
case 'D':
- next('D');
- next('E');
- next('L');
- next('E');
- next('T');
- next('E');
+ nextOneOf(['D', 'd']);
+ nextOneOf(['E', 'e']);
+ nextOneOf(['L', 'l']);
+ nextOneOf(['E', 'e']);
+ nextOneOf(['T', 't']);
+ nextOneOf(['E', 'e']);
return 'DELETE';
- case 'p':
- next('p');
- switch (ch) {
- case 'a':
- next('a');
- next('t');
- next('c');
- next('h');
- return 'patch';
- case 'u':
- next('u');
- next('t');
- return 'put';
- case 'o':
- next('o');
- next('s');
- next('t');
- return 'post';
- default:
- error('Unexpected \'' + ch + '\'');
- }
- break;
case 'P':
- next('P');
- switch (ch) {
+ nextOneOf(['P', 'p']);
+ const nextUpperCaseChar = ch.toUpperCase();
+ switch (nextUpperCaseChar) {
case 'A':
- next('A');
- next('T');
- next('C');
- next('H');
+ nextOneOf(['A', 'a']);
+ nextOneOf(['T', 't']);
+ nextOneOf(['C', 'c']);
+ nextOneOf(['H', 'h']);
return 'PATCH';
case 'U':
- next('U');
- next('T');
+ nextOneOf(['U', 'u']);
+ nextOneOf(['T', 't']);
return 'PUT';
case 'O':
- next('O');
- next('S');
- next('T');
+ nextOneOf(['O', 'o']);
+ nextOneOf(['S', 's']);
+ nextOneOf(['T', 't']);
return 'POST';
default:
error('Unexpected \'' + ch + '\'');
diff --git a/packages/kbn-monaco/src/console/parser.test.ts b/packages/kbn-monaco/src/console/parser.test.ts
index 2c4417bdcd8a6..f9e9f3516c542 100644
--- a/packages/kbn-monaco/src/console/parser.test.ts
+++ b/packages/kbn-monaco/src/console/parser.test.ts
@@ -52,4 +52,49 @@ describe('console parser', () => {
expect(startOffset).toBe(0);
expect(endOffset).toBe(52);
});
+
+ describe('case insensitive methods', () => {
+ const expectedRequests = [
+ {
+ startOffset: 0,
+ endOffset: 11,
+ },
+ {
+ startOffset: 12,
+ endOffset: 24,
+ },
+ {
+ startOffset: 25,
+ endOffset: 38,
+ },
+ {
+ startOffset: 39,
+ endOffset: 50,
+ },
+ {
+ startOffset: 51,
+ endOffset: 63,
+ },
+ ];
+ it('allows upper case methods', () => {
+ const input = 'GET _search\nPOST _search\nPATCH _search\nPUT _search\nHEAD _search';
+ const { requests, errors } = parser(input) as ConsoleParserResult;
+ expect(errors.length).toBe(0);
+ expect(requests).toEqual(expectedRequests);
+ });
+
+ it('allows lower case methods', () => {
+ const input = 'get _search\npost _search\npatch _search\nput _search\nhead _search';
+ const { requests, errors } = parser(input) as ConsoleParserResult;
+ expect(errors.length).toBe(0);
+ expect(requests).toEqual(expectedRequests);
+ });
+
+ it('allows mixed case methods', () => {
+ const input = 'GeT _search\npOSt _search\nPaTch _search\nPut _search\nheAD _search';
+ const { requests, errors } = parser(input) as ConsoleParserResult;
+ expect(errors.length).toBe(0);
+ expect(requests).toEqual(expectedRequests);
+ });
+ });
});
diff --git a/test/functional/apps/console/_console.ts b/test/functional/apps/console/_console.ts
index 64d71ddbfc82d..27339c408de85 100644
--- a/test/functional/apps/console/_console.ts
+++ b/test/functional/apps/console/_console.ts
@@ -142,6 +142,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
});
+ it('should send request with mixed case methods', async () => {
+ await PageObjects.console.clearEditorText();
+ await PageObjects.console.enterText('Get /');
+ await PageObjects.console.clickPlay();
+ await retry.try(async () => {
+ const status = await PageObjects.console.getResponseStatus();
+ expect(status).to.eql(200);
+ });
+ });
+
describe('with kbn: prefix in request', () => {
before(async () => {
await PageObjects.console.clearEditorText();
From c8ff7ea27ab02548c25c3c295bbd988e3adfbba4 Mon Sep 17 00:00:00 2001
From: Jill Guyonnet
Date: Fri, 20 Sep 2024 14:28:23 +0100
Subject: [PATCH 13/42] =?UTF-8?q?[Fleet]=20Add=20@custom=20component?=
=?UTF-8?q?=20template=20to=20integrations=20index=20te=E2=80=A6=20(#19273?=
=?UTF-8?q?1)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
Relates https://github.com/elastic/kibana/issues/190730
This PR adds a `@custom `component template to integrations index
template's `composed_of` array.
### Testing
Integration install/update should be tested.
From my manual testing, Fleet seems to behave normally and the new
component template is added to the `composed_of` array. For example, the
output of `GET /_index_template/logs-system.auth` is:
```json
{
"index_templates": [
{
"name": "logs-system.auth",
"index_template": {
"index_patterns": [
"logs-system.auth-*"
],
"template": {
"settings": {},
"mappings": {
"_meta": {
"package": {
"name": "system"
},
"managed_by": "fleet",
"managed": true
}
}
},
"composed_of": [
"logs@mappings",
"logs@settings",
"logs-system.auth@package",
"logs@custom",
"logs-system.auth@custom",
"ecs@mappings",
".fleet_globals-1",
".fleet_agent_id_verification-1"
],
"priority": 200,
"_meta": {
"package": {
"name": "system"
},
"managed_by": "fleet",
"managed": true
},
"data_stream": {
"hidden": false,
"allow_custom_routing": false,
"failure_store": false
},
"ignore_missing_component_templates": [
"logs@custom",
"logs-system.auth@custom"
]
}
}
]
}
```
### Screenshot
### Checklist
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
---
.../fleet/server/constants/fleet_es_assets.ts | 2 +-
.../services/epm/elasticsearch/template/install.ts | 14 ++++++++++++++
.../steps/step_save_system_object.test.ts | 4 ++--
.../apis/epm/__snapshots__/bulk_get_assets.snap | 12 ++++++++++++
.../apis/epm/install_by_upload.ts | 6 +++---
.../apis/epm/install_overrides.ts | 1 +
.../apis/epm/install_remove_assets.ts | 8 ++++++++
.../apis/epm/update_assets.ts | 9 +++++++++
.../package_policy/input_package_create_upgrade.ts | 1 +
.../apis/package_policy/update.ts | 1 +
.../apis/package_policy/upgrade.ts | 2 ++
11 files changed, 54 insertions(+), 6 deletions(-)
diff --git a/x-pack/plugins/fleet/server/constants/fleet_es_assets.ts b/x-pack/plugins/fleet/server/constants/fleet_es_assets.ts
index 83c283591a9bd..55e6493c77891 100644
--- a/x-pack/plugins/fleet/server/constants/fleet_es_assets.ts
+++ b/x-pack/plugins/fleet/server/constants/fleet_es_assets.ts
@@ -11,7 +11,7 @@ import { getESAssetMetadata } from '../services/epm/elasticsearch/meta';
const meta = getESAssetMetadata();
-export const FLEET_INSTALL_FORMAT_VERSION = '1.2.0';
+export const FLEET_INSTALL_FORMAT_VERSION = '1.3.0';
export const FLEET_AGENT_POLICIES_SCHEMA_VERSION = '1.1.1';
diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts
index 2ee8477e04f42..2a17768ac1f9c 100644
--- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts
+++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts
@@ -319,6 +319,7 @@ export function buildComponentTemplates(params: {
experimentalDataStreamFeature?: ExperimentalDataStreamFeature;
lifecycle?: IndexTemplate['template']['lifecycle'];
fieldCount?: number;
+ type?: string;
}) {
const {
templateName,
@@ -330,6 +331,7 @@ export function buildComponentTemplates(params: {
experimentalDataStreamFeature,
lifecycle,
fieldCount,
+ type,
} = params;
const packageTemplateName = `${templateName}${PACKAGE_TEMPLATE_SUFFIX}`;
const userSettingsTemplateName = `${templateName}${USER_SETTINGS_TEMPLATE_SUFFIX}`;
@@ -417,6 +419,17 @@ export function buildComponentTemplates(params: {
_meta,
};
+ // Stub custom template
+ if (type) {
+ const customTemplateName = `${type}${USER_SETTINGS_TEMPLATE_SUFFIX}`;
+ templatesMap[customTemplateName] = {
+ template: {
+ settings: {},
+ },
+ _meta,
+ };
+ }
+
// return empty/stub template
templatesMap[userSettingsTemplateName] = {
template: {
@@ -580,6 +593,7 @@ export function prepareTemplate({
experimentalDataStreamFeature,
lifecycle: lifecyle,
fieldCount: countFields(validFields),
+ type: dataStream.type,
});
const template = getTemplate({
diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_save_system_object.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_save_system_object.test.ts
index e91826c99793c..aecdd0b2552c4 100644
--- a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_save_system_object.test.ts
+++ b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_save_system_object.test.ts
@@ -91,7 +91,7 @@ describe('updateLatestExecutedState', () => {
'epm-packages',
'test-integration',
{
- install_format_schema_version: '1.2.0',
+ install_format_schema_version: '1.3.0',
install_status: 'installed',
install_version: '1.0.0',
latest_install_failed_attempts: [],
@@ -157,7 +157,7 @@ describe('updateLatestExecutedState', () => {
'epm-packages',
'test-integration',
{
- install_format_schema_version: '1.2.0',
+ install_format_schema_version: '1.3.0',
install_status: 'installed',
install_version: '1.0.0',
latest_install_failed_attempts: [],
diff --git a/x-pack/test/fleet_api_integration/apis/epm/__snapshots__/bulk_get_assets.snap b/x-pack/test/fleet_api_integration/apis/epm/__snapshots__/bulk_get_assets.snap
index 5fd219958c319..37c7882fff203 100644
--- a/x-pack/test/fleet_api_integration/apis/epm/__snapshots__/bulk_get_assets.snap
+++ b/x-pack/test/fleet_api_integration/apis/epm/__snapshots__/bulk_get_assets.snap
@@ -62,6 +62,12 @@ Array [
"id": "logs-all_assets.test_logs@package",
"type": "component_template",
},
+ Object {
+ "appLink": "/app/management/data/index_management/component_templates/logs@custom",
+ "attributes": Object {},
+ "id": "logs@custom",
+ "type": "component_template",
+ },
Object {
"appLink": "/app/management/data/index_management/component_templates/logs-all_assets.test_logs@custom",
"attributes": Object {},
@@ -80,6 +86,12 @@ Array [
"id": "metrics-all_assets.test_metrics@package",
"type": "component_template",
},
+ Object {
+ "appLink": "/app/management/data/index_management/component_templates/metrics@custom",
+ "attributes": Object {},
+ "id": "metrics@custom",
+ "type": "component_template",
+ },
Object {
"appLink": "/app/management/data/index_management/component_templates/metrics-all_assets.test_metrics@custom",
"attributes": Object {},
diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts b/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts
index 30b2eacce0fb7..331cae3058bf1 100644
--- a/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts
+++ b/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts
@@ -97,7 +97,7 @@ export default function (providerContext: FtrProviderContext) {
it('should install a tar archive correctly', async function () {
const res = await uploadPackage();
- expect(res.body.items.length).to.be(30);
+ expect(res.body.items.length).to.be(32);
});
it('should upgrade when uploading a newer zip archive', async () => {
@@ -111,7 +111,7 @@ export default function (providerContext: FtrProviderContext) {
.type('application/zip')
.send(buf)
.expect(200);
- expect(res.body.items.length).to.be(30);
+ expect(res.body.items.length).to.be(32);
expect(res.body.items.some((item: any) => item.id.includes(testPkgNewVersion)));
await deletePackage(testPkgName, testPkgNewVersion);
@@ -182,7 +182,7 @@ export default function (providerContext: FtrProviderContext) {
.type('application/zip')
.send(buf)
.expect(200);
- expect(res.body.items.length).to.be(30);
+ expect(res.body.items.length).to.be(32);
});
it('should throw an error if the archive is zip but content type is gzip', async function () {
diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts b/x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts
index 36f98fb3434b3..8b85502bdf5ad 100644
--- a/x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts
+++ b/x-pack/test/fleet_api_integration/apis/epm/install_overrides.ts
@@ -61,6 +61,7 @@ export default function (providerContext: FtrProviderContext) {
`logs@mappings`,
`logs@settings`,
`${templateName}@package`,
+ 'logs@custom',
`${templateName}@custom`,
`ecs@mappings`,
'.fleet_globals-1',
diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts b/x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts
index 24564014633f2..fc8225e9df02d 100644
--- a/x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts
+++ b/x-pack/test/fleet_api_integration/apis/epm/install_remove_assets.ts
@@ -599,6 +599,10 @@ const expectAssetsInstalled = ({
id: 'logs-all_assets.test_logs@package',
type: 'component_template',
},
+ {
+ id: 'logs@custom',
+ type: 'component_template',
+ },
{
id: 'logs-all_assets.test_logs@custom',
type: 'component_template',
@@ -607,6 +611,10 @@ const expectAssetsInstalled = ({
id: 'metrics-all_assets.test_metrics@package',
type: 'component_template',
},
+ {
+ id: 'metrics@custom',
+ type: 'component_template',
+ },
{
id: 'metrics-all_assets.test_metrics@custom',
type: 'component_template',
diff --git a/x-pack/test/fleet_api_integration/apis/epm/update_assets.ts b/x-pack/test/fleet_api_integration/apis/epm/update_assets.ts
index 69aedb72947bd..17d54786245af 100644
--- a/x-pack/test/fleet_api_integration/apis/epm/update_assets.ts
+++ b/x-pack/test/fleet_api_integration/apis/epm/update_assets.ts
@@ -417,6 +417,10 @@ export default function (providerContext: FtrProviderContext) {
id: 'logs-all_assets.test_logs@package',
type: 'component_template',
},
+ {
+ id: 'logs@custom',
+ type: 'component_template',
+ },
{
id: 'logs-all_assets.test_logs@custom',
type: 'component_template',
@@ -441,6 +445,11 @@ export default function (providerContext: FtrProviderContext) {
id: 'metrics-all_assets.test_metrics@package',
type: 'component_template',
},
+
+ {
+ id: 'metrics@custom',
+ type: 'component_template',
+ },
{
id: 'metrics-all_assets.test_metrics@custom',
type: 'component_template',
diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts
index 77aeadcae93a7..481f4e09c68d9 100644
--- a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts
+++ b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts
@@ -207,6 +207,7 @@ export default function (providerContext: FtrProviderContext) {
{ id: 'logs-dataset1', type: 'index_template' },
{ id: 'logs-dataset1@package', type: 'component_template' },
{ id: 'logs-dataset1@custom', type: 'component_template' },
+ { id: 'logs@custom', type: 'component_template' },
]);
// now check the package component template was created correctly
diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/update.ts b/x-pack/test/fleet_api_integration/apis/package_policy/update.ts
index 971ed42b578df..273f051dfcec6 100644
--- a/x-pack/test/fleet_api_integration/apis/package_policy/update.ts
+++ b/x-pack/test/fleet_api_integration/apis/package_policy/update.ts
@@ -948,6 +948,7 @@ export default function (providerContext: FtrProviderContext) {
{ id: 'logs-somedataset', type: 'index_template' },
{ id: 'logs-somedataset@package', type: 'component_template' },
{ id: 'logs-somedataset@custom', type: 'component_template' },
+ { id: 'logs@custom', type: 'component_template' },
]);
const dataset3PkgComponentTemplate = await getComponentTemplate('logs-somedataset@package');
diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts b/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts
index 6982878c7d111..021eebcdcc0c1 100644
--- a/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts
+++ b/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts
@@ -1317,6 +1317,8 @@ export default function (providerContext: FtrProviderContext) {
for (let i = 0; i < POLICY_COUNT; i++) {
await createPackagePolicy(i.toString());
}
+
+ expectedAssets.push({ id: 'logs@custom', type: 'component_template' });
});
afterEach(async function () {
From c3617a61240ea785b7cde85d89b2840d362ab7ea Mon Sep 17 00:00:00 2001
From: Rudolf Meijering
Date: Fri, 20 Sep 2024 15:37:41 +0200
Subject: [PATCH 14/42] Stricter byte size validation (#193529)
## Summary
This makes byte size validation stricter by ensuring that the string
starts and ends with valid values so it won't match on e.g. `a1234b` or
`1234ba`.
This has a slight chance to fail validation on an existing kibana.yml if
users had a typo that we previously ignored. As such it would be safer
to not backport to 8.x
### 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)
---
.../src/byte_size_value/index.test.ts | 29 +++++++++++++++++++
.../src/byte_size_value/index.ts | 6 +++-
2 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/packages/kbn-config-schema/src/byte_size_value/index.test.ts b/packages/kbn-config-schema/src/byte_size_value/index.test.ts
index 4fc682c30a71f..8bc31f1f872bf 100644
--- a/packages/kbn-config-schema/src/byte_size_value/index.test.ts
+++ b/packages/kbn-config-schema/src/byte_size_value/index.test.ts
@@ -36,11 +36,40 @@ describe('parsing units', () => {
expect(ByteSizeValue.parse('1Mb').getValueInBytes()).toBe(1024 * 1024);
});
+ test('parses the max safe integer', () => {
+ expect(ByteSizeValue.parse('9007199254740991').getValueInBytes()).toBe(9007199254740991);
+ expect(ByteSizeValue.parse('9007199254740991b').getValueInBytes()).toBe(9007199254740991);
+ });
+
test('throws an error when unsupported unit specified', () => {
expect(() => ByteSizeValue.parse('1tb')).toThrowErrorMatchingInlineSnapshot(
`"Failed to parse value as byte value. Value must be either number of bytes, or follow the format [b|kb|mb|gb] (e.g., '1024kb', '200mb', '1gb'), where the number is a safe positive integer."`
);
});
+
+ test('throws an error when unsafe integer', () => {
+ expect(() => ByteSizeValue.parse('9007199254740992')).toThrowErrorMatchingInlineSnapshot(
+ `"Value in bytes is expected to be a safe positive integer."`
+ );
+ });
+
+ test('throws an error on unusually long input', () => {
+ expect(() => ByteSizeValue.parse('19007199254740991kb')).toThrowErrorMatchingInlineSnapshot(
+ `"Value in bytes is expected to be a safe positive integer."`
+ );
+ });
+
+ test('throws when string does not start with a digit', () => {
+ expect(() => ByteSizeValue.parse(' 1kb')).toThrowErrorMatchingInlineSnapshot(
+ `"Failed to parse value as byte value. Value must be either number of bytes, or follow the format [b|kb|mb|gb] (e.g., '1024kb', '200mb', '1gb'), where the number is a safe positive integer."`
+ );
+ });
+
+ test('throws when string does not end with a digit or unit', () => {
+ expect(() => ByteSizeValue.parse('1kb ')).toThrowErrorMatchingInlineSnapshot(
+ `"Failed to parse value as byte value. Value must be either number of bytes, or follow the format [b|kb|mb|gb] (e.g., '1024kb', '200mb', '1gb'), where the number is a safe positive integer."`
+ );
+ });
});
describe('#constructor', () => {
diff --git a/packages/kbn-config-schema/src/byte_size_value/index.ts b/packages/kbn-config-schema/src/byte_size_value/index.ts
index 7479762d15a25..c2a7e75148e85 100644
--- a/packages/kbn-config-schema/src/byte_size_value/index.ts
+++ b/packages/kbn-config-schema/src/byte_size_value/index.ts
@@ -23,7 +23,11 @@ function renderUnit(value: number, unit: string) {
export class ByteSizeValue {
public static parse(text: string): ByteSizeValue {
- const match = /([1-9][0-9]*)(b|kb|mb|gb)/i.exec(text);
+ if (text.length > 18) {
+ // Exit early on large input where uses more than 16 digits and is therefore larger than Number.MAX_SAFE_INTEGER
+ throw new Error('Value in bytes is expected to be a safe positive integer.');
+ }
+ const match = /(^[1-9]\d*)(b|kb|mb|gb)$/i.exec(text);
if (!match) {
const number = Number(text);
if (typeof number !== 'number' || isNaN(number)) {
From 2a98d1af37ca8aca570b3c44728087b6271c3444 Mon Sep 17 00:00:00 2001
From: Philippe Oberti
Date: Fri, 20 Sep 2024 15:38:05 +0200
Subject: [PATCH 15/42] [Security Solution][Notes] - fix column width on events
table on host, user and network pages (#193460)
---
.../components/events_tab/events_query_tab_body.tsx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx
index 368fda2500fe1..92c94549ca891 100644
--- a/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx
+++ b/x-pack/plugins/security_solution/public/common/components/events_tab/events_query_tab_body.tsx
@@ -12,6 +12,7 @@ import { EuiCheckbox } from '@elastic/eui';
import type { Filter } from '@kbn/es-query';
import { dataTableActions } from '@kbn/securitysolution-data-table';
import type { TableId } from '@kbn/securitysolution-data-table';
+import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_features';
import type { CustomBulkAction } from '../../../../common/types';
import { RowRendererValues } from '../../../../common/api/timeline';
import { StatefulEventsViewer } from '../events_viewer';
@@ -73,7 +74,13 @@ const EventsQueryTabBodyComponent: React.FC =
const { globalFullScreen } = useGlobalFullScreen();
const [defaultNumberFormat] = useUiSetting$(DEFAULT_NUMBER_FORMAT);
const isEnterprisePlus = useLicense().isEnterprise();
- const ACTION_BUTTON_COUNT = isEnterprisePlus ? 5 : 4;
+ let ACTION_BUTTON_COUNT = isEnterprisePlus ? 6 : 5;
+ const securitySolutionNotesEnabled = useIsExperimentalFeatureEnabled(
+ 'securitySolutionNotesEnabled'
+ );
+ if (!securitySolutionNotesEnabled) {
+ ACTION_BUTTON_COUNT--;
+ }
const leadingControlColumns = useMemo(
() => getDefaultControlColumn(ACTION_BUTTON_COUNT),
[ACTION_BUTTON_COUNT]
From 96dd4c78637cfdff4c33391eebc68587985312b7 Mon Sep 17 00:00:00 2001
From: Maryam Saeidi
Date: Fri, 20 Sep 2024 15:40:13 +0200
Subject: [PATCH 16/42] [Alert details page] Add related alerts tab to the
alert details page (#193263)
Closes #188014
## Summary
This PR adds a related alerts tab to the alert details page and saves
the filters in the URL. The logic for filtering alerts:
- Alerts that have tags similar to the existing alert (one or more)
- Alerts for similar group by/source fields ("or" logic)
- Either at the root level (e.g. host.hostname: 'host-1'), or have this
information available in `kibana.alert.group.value`.
By default, we filter to only show active alerts.
|Alert|Related alerts|
|---|---|
|![image](https://github.com/user-attachments/assets/2117d41b-85d6-4d09-836f-d0a0858f0f89)|![image](https://github.com/user-attachments/assets/df3cb061-122e-451c-94e5-1bbcda74cabc)|
|![image](https://github.com/user-attachments/assets/4308afdf-5940-49b6-80a3-bfe9de23c805)|![image](https://github.com/user-attachments/assets/43011507-1148-4188-aa12-f8692c0e6ccf)|
#### Follow-up work
I will create some follow-up tickets for these topics.
- Selecting `Rule name` as the default group by and opening the first
group
- Considering adding an event timeline to this tab
- Showing the number of active alerts in the tab
---
.../alert_search_bar_with_url_sync.tsx | 5 +-
.../alert_search_bar/containers/index.tsx | 2 +-
.../containers/state_container.tsx | 16 +-
.../use_alert_search_bar_state_container.tsx | 20 ++-
.../components/alert_search_bar/types.ts | 3 +-
.../alerts_table}/grouping/constants.ts | 0
.../get_aggregations_by_grouping_field.ts | 0
.../grouping/get_group_stats.tsx | 2 +-
.../grouping/render_group_panel.tsx | 4 +-
.../observability/public/constants.ts | 2 +
.../alert_details/alert_details.test.tsx | 5 +-
.../pages/alert_details/alert_details.tsx | 60 ++++++-
.../components/related_alerts.tsx | 150 ++++++++++++++++++
.../helpers/get_related_alerts_query.test.ts | 48 ++++++
.../helpers/get_related_alerts_query.ts | 32 ++++
.../public/pages/alerts/alerts.tsx | 19 ++-
16 files changed, 327 insertions(+), 41 deletions(-)
rename x-pack/plugins/observability_solution/observability/public/{pages/alerts => components/alerts_table}/grouping/constants.ts (100%)
rename x-pack/plugins/observability_solution/observability/public/{pages/alerts => components/alerts_table}/grouping/get_aggregations_by_grouping_field.ts (100%)
rename x-pack/plugins/observability_solution/observability/public/{pages/alerts => components/alerts_table}/grouping/get_group_stats.tsx (94%)
rename x-pack/plugins/observability_solution/observability/public/{pages/alerts => components/alerts_table}/grouping/render_group_panel.tsx (95%)
create mode 100644 x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/related_alerts.tsx
create mode 100644 x-pack/plugins/observability_solution/observability/public/pages/alert_details/helpers/get_related_alerts_query.test.ts
create mode 100644 x-pack/plugins/observability_solution/observability/public/pages/alert_details/helpers/get_related_alerts_query.ts
diff --git a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar_with_url_sync.tsx b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar_with_url_sync.tsx
index 1abb2a865ccce..609bc5e94c510 100644
--- a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar_with_url_sync.tsx
+++ b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar_with_url_sync.tsx
@@ -10,6 +10,7 @@ import {
alertSearchBarStateContainer,
Provider,
useAlertSearchBarStateContainer,
+ DEFAULT_STATE,
} from './containers';
import { ObservabilityAlertSearchBar } from './alert_search_bar';
import { AlertSearchBarWithUrlSyncProps } from './types';
@@ -17,8 +18,8 @@ import { useKibana } from '../../utils/kibana_react';
import { useToasts } from '../../hooks/use_toast';
function AlertSearchbarWithUrlSync(props: AlertSearchBarWithUrlSyncProps) {
- const { urlStorageKey, ...searchBarProps } = props;
- const stateProps = useAlertSearchBarStateContainer(urlStorageKey);
+ const { urlStorageKey, defaultState = DEFAULT_STATE, ...searchBarProps } = props;
+ const stateProps = useAlertSearchBarStateContainer(urlStorageKey, undefined, defaultState);
const {
data: {
query: {
diff --git a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/index.tsx b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/index.tsx
index edffc97a57fa2..66c798495da28 100644
--- a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/index.tsx
+++ b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/index.tsx
@@ -5,5 +5,5 @@
* 2.0.
*/
-export { Provider, alertSearchBarStateContainer } from './state_container';
+export { Provider, alertSearchBarStateContainer, DEFAULT_STATE } from './state_container';
export { useAlertSearchBarStateContainer } from './use_alert_search_bar_state_container';
diff --git a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/state_container.tsx b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/state_container.tsx
index a7aa8c15a6472..a23f8da36c59d 100644
--- a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/state_container.tsx
+++ b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/state_container.tsx
@@ -12,15 +12,7 @@ import {
} from '@kbn/kibana-utils-plugin/public';
import { AlertStatus } from '../../../../common/typings';
import { ALL_ALERTS } from '../constants';
-
-interface AlertSearchBarContainerState {
- rangeFrom: string;
- rangeTo: string;
- kuery: string;
- status: AlertStatus;
- filters: Filter[];
- savedQueryId?: string;
-}
+import { AlertSearchBarContainerState } from '../types';
interface AlertSearchBarStateTransitions {
setRangeFrom: (
@@ -43,7 +35,7 @@ interface AlertSearchBarStateTransitions {
) => (savedQueryId?: string) => AlertSearchBarContainerState;
}
-const defaultState: AlertSearchBarContainerState = {
+const DEFAULT_STATE: AlertSearchBarContainerState = {
rangeFrom: 'now-24h',
rangeTo: 'now',
kuery: '',
@@ -60,13 +52,13 @@ const transitions: AlertSearchBarStateTransitions = {
setSavedQueryId: (state) => (savedQueryId) => ({ ...state, savedQueryId }),
};
-const alertSearchBarStateContainer = createStateContainer(defaultState, transitions);
+const alertSearchBarStateContainer = createStateContainer(DEFAULT_STATE, transitions);
type AlertSearchBarStateContainer = typeof alertSearchBarStateContainer;
const { Provider, useContainer } = createStateContainerReactHelpers();
-export { Provider, alertSearchBarStateContainer, useContainer, defaultState };
+export { Provider, alertSearchBarStateContainer, useContainer, DEFAULT_STATE };
export type {
AlertSearchBarStateContainer,
AlertSearchBarContainerState,
diff --git a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/use_alert_search_bar_state_container.tsx b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/use_alert_search_bar_state_container.tsx
index 5237ab1f17c2a..2938f6c60bbfe 100644
--- a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/use_alert_search_bar_state_container.tsx
+++ b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/containers/use_alert_search_bar_state_container.tsx
@@ -24,7 +24,7 @@ import { useTimefilterService } from '../../../hooks/use_timefilter_service';
import {
useContainer,
- defaultState,
+ DEFAULT_STATE,
AlertSearchBarStateContainer,
AlertSearchBarContainerState,
} from './state_container';
@@ -42,12 +42,13 @@ export const alertSearchBarState = t.partial({
export function useAlertSearchBarStateContainer(
urlStorageKey: string,
- { replace }: { replace?: boolean } = {}
+ { replace }: { replace?: boolean } = {},
+ defaultState: AlertSearchBarContainerState = DEFAULT_STATE
) {
const [savedQuery, setSavedQuery] = useState();
const stateContainer = useContainer();
- useUrlStateSyncEffect(stateContainer, urlStorageKey, replace);
+ useUrlStateSyncEffect(stateContainer, urlStorageKey, replace, defaultState);
const { setRangeFrom, setRangeTo, setKuery, setStatus, setFilters, setSavedQueryId } =
stateContainer.transitions;
@@ -105,7 +106,8 @@ export function useAlertSearchBarStateContainer(
function useUrlStateSyncEffect(
stateContainer: AlertSearchBarStateContainer,
urlStorageKey: string,
- replace: boolean = true
+ replace: boolean = true,
+ defaultState: AlertSearchBarContainerState = DEFAULT_STATE
) {
const history = useHistory();
const timefilterService = useTimefilterService();
@@ -127,12 +129,14 @@ function useUrlStateSyncEffect(
timefilterService,
stateContainer,
urlStateStorage,
- urlStorageKey
+ urlStorageKey,
+ defaultState
);
start();
return stop;
+ // eslint-disable-next-line react-hooks/exhaustive-deps
}, [stateContainer, history, timefilterService, urlStorageKey, replace]);
}
@@ -140,7 +144,8 @@ function setupUrlStateSync(
stateContainer: AlertSearchBarStateContainer,
urlStateStorage: IKbnUrlStateStorage,
urlStorageKey: string,
- replace: boolean = true
+ replace: boolean = true,
+ defaultState: AlertSearchBarContainerState = DEFAULT_STATE
) {
// This handles filling the state when an incomplete URL set is provided
const setWithDefaults = (changedState: Partial | null) => {
@@ -165,7 +170,8 @@ function initializeUrlAndStateContainer(
timefilterService: TimefilterContract,
stateContainer: AlertSearchBarStateContainer,
urlStateStorage: IKbnUrlStateStorage,
- urlStorageKey: string
+ urlStorageKey: string,
+ defaultState: AlertSearchBarContainerState
) {
const urlState = alertSearchBarState.decode(
urlStateStorage.get>(urlStorageKey)
diff --git a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/types.ts b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/types.ts
index a0774e72ae936..eb9afc0345bc9 100644
--- a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/types.ts
+++ b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/types.ts
@@ -19,6 +19,7 @@ export interface AlertStatusFilterProps {
export interface AlertSearchBarWithUrlSyncProps extends CommonAlertSearchBarProps {
urlStorageKey: string;
+ defaultState?: AlertSearchBarContainerState;
}
export interface Dependencies {
@@ -49,7 +50,7 @@ export interface ObservabilityAlertSearchBarProps
services: Services;
}
-interface AlertSearchBarContainerState {
+export interface AlertSearchBarContainerState {
rangeFrom: string;
rangeTo: string;
kuery: string;
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/constants.ts b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/constants.ts
similarity index 100%
rename from x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/constants.ts
rename to x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/constants.ts
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/get_aggregations_by_grouping_field.ts b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/get_aggregations_by_grouping_field.ts
similarity index 100%
rename from x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/get_aggregations_by_grouping_field.ts
rename to x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/get_aggregations_by_grouping_field.ts
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/get_group_stats.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/get_group_stats.tsx
similarity index 94%
rename from x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/get_group_stats.tsx
rename to x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/get_group_stats.tsx
index 3fe0a6d006825..566add6be934b 100644
--- a/x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/get_group_stats.tsx
+++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/get_group_stats.tsx
@@ -7,7 +7,7 @@
import { GetGroupStats } from '@kbn/grouping/src';
import { ALERT_INSTANCE_ID, ALERT_RULE_NAME } from '@kbn/rule-data-utils';
-import { AlertsByGroupingAgg } from '../../../components/alerts_table/types';
+import { AlertsByGroupingAgg } from '../types';
export const getGroupStats: GetGroupStats = (selectedGroup, bucket) => {
const defaultBadges = [
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/render_group_panel.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/render_group_panel.tsx
similarity index 95%
rename from x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/render_group_panel.tsx
rename to x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/render_group_panel.tsx
index 17e674eb0a44e..b6c48cb6e90ef 100644
--- a/x-pack/plugins/observability_solution/observability/public/pages/alerts/grouping/render_group_panel.tsx
+++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/grouping/render_group_panel.tsx
@@ -10,8 +10,8 @@ import { isArray } from 'lodash/fp';
import { EuiFlexGroup, EuiIconTip, EuiFlexItem, EuiText, EuiTitle } from '@elastic/eui';
import { firstNonNullValue, GroupPanelRenderer } from '@kbn/grouping/src';
import { FormattedMessage } from '@kbn/i18n-react';
-import { AlertsByGroupingAgg } from '../../../components/alerts_table/types';
-import { Tags } from '../../../components/tags';
+import { AlertsByGroupingAgg } from '../types';
+import { Tags } from '../../tags';
import { ungrouped } from './constants';
export const renderGroupPanel: GroupPanelRenderer = (
diff --git a/x-pack/plugins/observability_solution/observability/public/constants.ts b/x-pack/plugins/observability_solution/observability/public/constants.ts
index 768094ec8a66b..7af5d9380f6cc 100644
--- a/x-pack/plugins/observability_solution/observability/public/constants.ts
+++ b/x-pack/plugins/observability_solution/observability/public/constants.ts
@@ -10,3 +10,5 @@ export const DEFAULT_DATE_FORMAT = 'YYYY-MM-DD HH:mm';
export const ALERTS_PAGE_ALERTS_TABLE_CONFIG_ID = `alerts-page-alerts-table`;
export const RULE_DETAILS_ALERTS_TABLE_CONFIG_ID = `rule-details-alerts-table`;
+
+export const SEARCH_BAR_URL_STORAGE_KEY = 'searchBarParams';
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.test.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.test.tsx
index 4706bed7f5635..1089bb52b7ed4 100644
--- a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.test.tsx
+++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.test.tsx
@@ -15,7 +15,7 @@ import { ruleTypeRegistryMock } from '@kbn/triggers-actions-ui-plugin/public/app
import { waitFor } from '@testing-library/react';
import { Chance } from 'chance';
import React, { Fragment } from 'react';
-import { useLocation, useParams } from 'react-router-dom';
+import { useHistory, useLocation, useParams } from 'react-router-dom';
import { from } from 'rxjs';
import { useFetchAlertDetail } from '../../hooks/use_fetch_alert_detail';
import { ConfigSchema } from '../../plugin';
@@ -30,6 +30,7 @@ jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useParams: jest.fn(),
useLocation: jest.fn(),
+ useHistory: jest.fn(),
}));
jest.mock('../../utils/kibana_react');
@@ -85,6 +86,7 @@ jest.mock('@kbn/observability-shared-plugin/public');
const useFetchAlertDetailMock = useFetchAlertDetail as jest.Mock;
const useParamsMock = useParams as jest.Mock;
const useLocationMock = useLocation as jest.Mock;
+const useHistoryMock = useHistory as jest.Mock;
const useBreadcrumbsMock = useBreadcrumbs as jest.Mock;
const chance = new Chance();
@@ -110,6 +112,7 @@ describe('Alert details', () => {
jest.clearAllMocks();
useParamsMock.mockReturnValue(params);
useLocationMock.mockReturnValue({ pathname: '/alerts/uuid', search: '', state: '', hash: '' });
+ useHistoryMock.mockReturnValue({ replace: jest.fn() });
useBreadcrumbsMock.mockReturnValue([]);
ruleTypeRegistry.list.mockReturnValue([ruleType]);
ruleTypeRegistry.get.mockReturnValue(ruleType);
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.tsx
index e17fc1666e061..00dd03734b9b0 100644
--- a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.tsx
+++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.tsx
@@ -7,7 +7,7 @@
import React, { useEffect, useState } from 'react';
import { i18n } from '@kbn/i18n';
-import { useParams } from 'react-router-dom';
+import { useHistory, useLocation, useParams } from 'react-router-dom';
import {
EuiEmptyPrompt,
EuiPanel,
@@ -23,6 +23,7 @@ import {
ALERT_RULE_UUID,
ALERT_STATUS,
ALERT_STATUS_UNTRACKED,
+ ALERT_GROUP,
} from '@kbn/rule-data-utils';
import { RuleTypeModel } from '@kbn/triggers-actions-ui-plugin/public';
import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public';
@@ -30,6 +31,9 @@ import dedent from 'dedent';
import { AlertFieldsTable } from '@kbn/alerts-ui-shared';
import { css } from '@emotion/react';
import { omit } from 'lodash';
+import type { Group } from '../../../common/typings';
+import { observabilityFeatureId } from '../../../common';
+import { RelatedAlerts } from './components/related_alerts';
import { useKibana } from '../../utils/kibana_react';
import { useFetchRule } from '../../hooks/use_fetch_rule';
import { usePluginContext } from '../../hooks/use_plugin_context';
@@ -40,7 +44,6 @@ import { AlertSummary, AlertSummaryField } from './components/alert_summary';
import { CenterJustifiedSpinner } from '../../components/center_justified_spinner';
import { getTimeZone } from '../../utils/get_time_zone';
import { isAlertDetailsEnabledPerApp } from '../../utils/is_alert_details_enabled';
-import { observabilityFeatureId } from '../../../common';
import { paths } from '../../../common/locators/paths';
import { HeaderMenu } from '../overview/components/header_menu/header_menu';
import { AlertOverview } from '../../components/alert_overview/alert_overview';
@@ -61,6 +64,12 @@ export const LOG_DOCUMENT_COUNT_RULE_TYPE_ID = 'logs.alert.document.count';
export const METRIC_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.threshold';
export const METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.inventory.threshold';
+const OVERVIEW_TAB_ID = 'overview';
+const METADATA_TAB_ID = 'metadata';
+const RELATED_ALERTS_TAB_ID = 'related_alerts';
+const ALERT_DETAILS_TAB_URL_STORAGE_KEY = 'tabId';
+type TabId = typeof OVERVIEW_TAB_ID | typeof METADATA_TAB_ID | typeof RELATED_ALERTS_TAB_ID;
+
export function AlertDetails() {
const {
cases: {
@@ -73,6 +82,8 @@ export function AlertDetails() {
uiSettings,
} = useKibana().services;
+ const { search } = useLocation();
+ const history = useHistory();
const { ObservabilityPageTemplate, config } = usePluginContext();
const { alertId } = useParams();
const [isLoading, alertDetail] = useFetchAlertDetail(alertId);
@@ -87,6 +98,27 @@ export function AlertDetails() {
const [alertStatus, setAlertStatus] = useState();
const { euiTheme } = useEuiTheme();
+ const [activeTabId, setActiveTabId] = useState(() => {
+ const searchParams = new URLSearchParams(search);
+ const urlTabId = searchParams.get(ALERT_DETAILS_TAB_URL_STORAGE_KEY);
+
+ return urlTabId && [OVERVIEW_TAB_ID, METADATA_TAB_ID, RELATED_ALERTS_TAB_ID].includes(urlTabId)
+ ? (urlTabId as TabId)
+ : OVERVIEW_TAB_ID;
+ });
+ const handleSetTabId = async (tabId: TabId) => {
+ setActiveTabId(tabId);
+
+ let searchParams = new URLSearchParams(search);
+ if (tabId === RELATED_ALERTS_TAB_ID) {
+ searchParams.set(ALERT_DETAILS_TAB_URL_STORAGE_KEY, tabId);
+ } else {
+ searchParams = new URLSearchParams();
+ searchParams.set(ALERT_DETAILS_TAB_URL_STORAGE_KEY, tabId);
+ }
+ history.replace({ search: searchParams.toString() });
+ };
+
useEffect(() => {
if (!alertDetail || !observabilityAIAssistant) {
return;
@@ -162,9 +194,6 @@ export function AlertDetails() {
const AlertDetailsAppSection = ruleTypeModel ? ruleTypeModel.alertDetailsAppSection : null;
const timeZone = getTimeZone(uiSettings);
- const OVERVIEW_TAB_ID = 'overview';
- const METADATA_TAB_ID = 'metadata';
-
const overviewTab = alertDetail ? (
AlertDetailsAppSection &&
/*
@@ -229,6 +258,20 @@ export function AlertDetails() {
'data-test-subj': 'metadataTab',
content: metadataTab,
},
+ {
+ id: RELATED_ALERTS_TAB_ID,
+ name: i18n.translate('xpack.observability.alertDetails.tab.relatedAlertsLabel', {
+ defaultMessage: 'Related Alerts',
+ }),
+ 'data-test-subj': 'relatedAlertsTab',
+ content: (
+
+ ),
+ },
];
return (
@@ -266,7 +309,12 @@ export function AlertDetails() {
data-test-subj="alertDetails"
>
-
+ tab.id === activeTabId)}
+ onTabClick={(tab) => handleSetTabId(tab.id as TabId)}
+ />
);
}
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/related_alerts.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/related_alerts.tsx
new file mode 100644
index 0000000000000..c74a4558d47f7
--- /dev/null
+++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/related_alerts.tsx
@@ -0,0 +1,150 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React, { useState, useRef, useEffect } from 'react';
+import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui';
+import { getPaddedAlertTimeRange } from '@kbn/observability-get-padded-alert-time-range-util';
+import { ALERT_END, ALERT_START, ALERT_UUID } from '@kbn/rule-data-utils';
+import { BoolQuery, Filter, type Query } from '@kbn/es-query';
+import { AlertsGrouping } from '@kbn/alerts-grouping';
+
+import { observabilityAlertFeatureIds } from '../../../../common/constants';
+import { TopAlert } from '../../..';
+import {
+ AlertSearchBarContainerState,
+ DEFAULT_STATE,
+} from '../../../components/alert_search_bar/containers/state_container';
+import type { Group } from '../../../../common/typings';
+import { ObservabilityAlertSearchbarWithUrlSync } from '../../../components/alert_search_bar/alert_search_bar_with_url_sync';
+import { renderGroupPanel } from '../../../components/alerts_table/grouping/render_group_panel';
+import { getGroupStats } from '../../../components/alerts_table/grouping/get_group_stats';
+import { getAggregationsByGroupingField } from '../../../components/alerts_table/grouping/get_aggregations_by_grouping_field';
+import { DEFAULT_GROUPING_OPTIONS } from '../../../components/alerts_table/grouping/constants';
+import { ALERT_STATUS_FILTER } from '../../../components/alert_search_bar/constants';
+import { AlertsByGroupingAgg } from '../../../components/alerts_table/types';
+import {
+ alertSearchBarStateContainer,
+ Provider,
+ useAlertSearchBarStateContainer,
+} from '../../../components/alert_search_bar/containers';
+import { ALERTS_PAGE_ALERTS_TABLE_CONFIG_ID, SEARCH_BAR_URL_STORAGE_KEY } from '../../../constants';
+import { usePluginContext } from '../../../hooks/use_plugin_context';
+import { useKibana } from '../../../utils/kibana_react';
+import { buildEsQuery } from '../../../utils/build_es_query';
+import { mergeBoolQueries } from '../../alerts/helpers/merge_bool_queries';
+import { getRelatedAlertKuery } from '../helpers/get_related_alerts_query';
+
+const ALERTS_PER_PAGE = 50;
+const RELATED_ALERTS_SEARCH_BAR_ID = 'related-alerts-search-bar-o11y';
+const ALERTS_TABLE_ID = 'xpack.observability.related.alerts.table';
+
+interface Props {
+ alert?: TopAlert;
+ groups?: Group[];
+ tags?: string[];
+}
+
+const defaultState: AlertSearchBarContainerState = { ...DEFAULT_STATE, status: 'active' };
+const DEFAULT_FILTERS: Filter[] = [];
+
+export function InternalRelatedAlerts({ alert, groups, tags }: Props) {
+ const kibanaServices = useKibana().services;
+ const {
+ http,
+ notifications,
+ dataViews,
+ triggersActionsUi: { alertsTableConfigurationRegistry, getAlertsStateTable: AlertsStateTable },
+ } = kibanaServices;
+ const { observabilityRuleTypeRegistry } = usePluginContext();
+ const alertSearchBarStateProps = useAlertSearchBarStateContainer(SEARCH_BAR_URL_STORAGE_KEY, {
+ replace: false,
+ });
+
+ const [esQuery, setEsQuery] = useState<{ bool: BoolQuery }>();
+ const alertStart = alert?.fields[ALERT_START];
+ const alertEnd = alert?.fields[ALERT_END];
+ const alertId = alert?.fields[ALERT_UUID];
+
+ const defaultQuery = useRef([
+ { query: `not kibana.alert.uuid: ${alertId}`, language: 'kuery' },
+ ]);
+
+ useEffect(() => {
+ if (alertStart) {
+ const defaultTimeRange = getPaddedAlertTimeRange(alertStart, alertEnd);
+ alertSearchBarStateProps.onRangeFromChange(defaultTimeRange.from);
+ alertSearchBarStateProps.onRangeToChange(defaultTimeRange.to);
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [alertStart, alertEnd]);
+
+ return (
+
+
+
+
+
+
+ {esQuery && (
+
+ featureIds={observabilityAlertFeatureIds}
+ defaultFilters={ALERT_STATUS_FILTER[alertSearchBarStateProps.status] ?? DEFAULT_FILTERS}
+ from={alertSearchBarStateProps.rangeFrom}
+ to={alertSearchBarStateProps.rangeTo}
+ globalFilters={alertSearchBarStateProps.filters ?? DEFAULT_FILTERS}
+ globalQuery={{ query: alertSearchBarStateProps.kuery, language: 'kuery' }}
+ groupingId={ALERTS_PAGE_ALERTS_TABLE_CONFIG_ID}
+ defaultGroupingOptions={DEFAULT_GROUPING_OPTIONS}
+ getAggregationsByGroupingField={getAggregationsByGroupingField}
+ renderGroupPanel={renderGroupPanel}
+ getGroupStats={getGroupStats}
+ services={{
+ notifications,
+ dataViews,
+ http,
+ }}
+ >
+ {(groupingFilters) => {
+ const groupQuery = buildEsQuery({
+ filters: groupingFilters,
+ });
+ return (
+
+ );
+ }}
+
+ )}
+
+
+ );
+}
+
+export function RelatedAlerts(props: Props) {
+ return (
+
+
+
+ );
+}
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/helpers/get_related_alerts_query.test.ts b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/helpers/get_related_alerts_query.test.ts
new file mode 100644
index 0000000000000..b7b8d138f471a
--- /dev/null
+++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/helpers/get_related_alerts_query.test.ts
@@ -0,0 +1,48 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { getRelatedAlertKuery } from './get_related_alerts_query';
+import { fromKueryExpression } from '@kbn/es-query';
+
+describe('getRelatedAlertKuery', () => {
+ const tags = ['tag1:v', 'tag2'];
+ const groups = [
+ { field: 'group1Field', value: 'group1Value' },
+ { field: 'group2Field', value: 'group2:Value' },
+ ];
+ const tagsKuery = '(tags: "tag1:v" or tags: "tag2")';
+ const groupsKuery =
+ '(group1Field: "group1Value" or kibana.alert.group.value: "group1Value") or (group2Field: "group2:Value" or kibana.alert.group.value: "group2:Value")';
+
+ it('should generate correct query with no tags or groups', () => {
+ expect(getRelatedAlertKuery()).toBeUndefined();
+ });
+
+ it('should generate correct query for tags', () => {
+ const kuery = getRelatedAlertKuery(tags);
+ expect(kuery).toEqual(tagsKuery);
+
+ // Should be able to parse keury without throwing error
+ fromKueryExpression(kuery!);
+ });
+
+ it('should generate correct query for groups', () => {
+ const kuery = getRelatedAlertKuery(undefined, groups);
+ expect(kuery).toEqual(groupsKuery);
+
+ // Should be able to parse keury without throwing error
+ fromKueryExpression(kuery!);
+ });
+
+ it('should generate correct query for tags and groups', () => {
+ const kuery = getRelatedAlertKuery(tags, groups);
+ expect(kuery).toEqual(`${tagsKuery} or ${groupsKuery}`);
+
+ // Should be able to parse keury without throwing error
+ fromKueryExpression(kuery!);
+ });
+});
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/helpers/get_related_alerts_query.ts b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/helpers/get_related_alerts_query.ts
new file mode 100644
index 0000000000000..c319af70db13f
--- /dev/null
+++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/helpers/get_related_alerts_query.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { Group } from '../../../../common/typings';
+
+export interface Query {
+ query: string;
+ language: string;
+}
+
+export const getRelatedAlertKuery = (tags?: string[], groups?: Group[]): string | undefined => {
+ const tagKueries: string[] =
+ tags?.map((tag) => {
+ return `tags: "${tag}"`;
+ }) ?? [];
+ const groupKueries =
+ (groups &&
+ groups.map(({ field, value }) => {
+ return `(${field}: "${value}" or kibana.alert.group.value: "${value}")`;
+ })) ??
+ [];
+
+ const tagKueriesStr = tagKueries.length > 0 ? [`(${tagKueries.join(' or ')})`] : [];
+ const groupKueriesStr = groupKueries.length > 0 ? [`${groupKueries.join(' or ')}`] : [];
+ const kueries = [...tagKueriesStr, ...groupKueriesStr];
+
+ return kueries.length ? kueries.join(' or ') : undefined;
+};
diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alerts/alerts.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alerts/alerts.tsx
index c1d14165f5f6e..ef883f40f4902 100644
--- a/x-pack/plugins/observability_solution/observability/public/pages/alerts/alerts.tsx
+++ b/x-pack/plugins/observability_solution/observability/public/pages/alerts/alerts.tsx
@@ -8,7 +8,7 @@
import React, { useEffect, useMemo, useState } from 'react';
import { BrushEndListener, XYBrushEvent } from '@elastic/charts';
import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
-import { BoolQuery } from '@kbn/es-query';
+import { BoolQuery, Filter } from '@kbn/es-query';
import { i18n } from '@kbn/i18n';
import { loadRuleAggregations } from '@kbn/triggers-actions-ui-plugin/public';
import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public';
@@ -16,9 +16,12 @@ import { MaintenanceWindowCallout } from '@kbn/alerts-ui-shared';
import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common';
import { AlertsGrouping } from '@kbn/alerts-grouping';
-import { renderGroupPanel } from './grouping/render_group_panel';
import { rulesLocatorID } from '../../../common';
import { ALERT_STATUS_FILTER } from '../../components/alert_search_bar/constants';
+import { renderGroupPanel } from '../../components/alerts_table/grouping/render_group_panel';
+import { getGroupStats } from '../../components/alerts_table/grouping/get_group_stats';
+import { getAggregationsByGroupingField } from '../../components/alerts_table/grouping/get_aggregations_by_grouping_field';
+import { DEFAULT_GROUPING_OPTIONS } from '../../components/alerts_table/grouping/constants';
import { AlertsByGroupingAgg } from '../../components/alerts_table/types';
import { ObservabilityAlertSearchBar } from '../../components/alert_search_bar/alert_search_bar';
import { useGetFilteredRuleTypes } from '../../hooks/use_get_filtered_rule_types';
@@ -37,13 +40,10 @@ import { getAlertSummaryTimeRange } from '../../utils/alert_summary_widget';
import { observabilityAlertFeatureIds } from '../../../common/constants';
import { ALERTS_URL_STORAGE_KEY } from '../../../common/constants';
import { ALERTS_PAGE_ALERTS_TABLE_CONFIG_ID } from '../../constants';
-import { HeaderMenu } from '../overview/components/header_menu/header_menu';
import { useGetAvailableRulesWithDescriptions } from '../../hooks/use_get_available_rules_with_descriptions';
+import { HeaderMenu } from '../overview/components/header_menu/header_menu';
import { buildEsQuery } from '../../utils/build_es_query';
import { renderRuleStats, RuleStatsState } from './components/rule_stats';
-import { getGroupStats } from './grouping/get_group_stats';
-import { getAggregationsByGroupingField } from './grouping/get_aggregations_by_grouping_field';
-import { DEFAULT_GROUPING_OPTIONS } from './grouping/constants';
import { mergeBoolQueries } from './helpers/merge_bool_queries';
const ALERTS_SEARCH_BAR_ID = 'alerts-search-bar-o11y';
@@ -52,6 +52,7 @@ const ALERTS_TABLE_ID = 'xpack.observability.alerts.alert.table';
const DEFAULT_INTERVAL = '60s';
const DEFAULT_DATE_FORMAT = 'YYYY-MM-DD HH:mm';
+const DEFAULT_FILTERS: Filter[] = [];
function InternalAlertsPage() {
const kibanaServices = useKibana().services;
@@ -255,10 +256,12 @@ function InternalAlertsPage() {
{esQuery && (
featureIds={observabilityAlertFeatureIds}
- defaultFilters={ALERT_STATUS_FILTER[alertSearchBarStateProps.status] ?? []}
+ defaultFilters={
+ ALERT_STATUS_FILTER[alertSearchBarStateProps.status] ?? DEFAULT_FILTERS
+ }
from={alertSearchBarStateProps.rangeFrom}
to={alertSearchBarStateProps.rangeTo}
- globalFilters={alertSearchBarStateProps.filters}
+ globalFilters={alertSearchBarStateProps.filters ?? DEFAULT_FILTERS}
globalQuery={{ query: alertSearchBarStateProps.kuery, language: 'kuery' }}
groupingId={ALERTS_PAGE_ALERTS_TABLE_CONFIG_ID}
defaultGroupingOptions={DEFAULT_GROUPING_OPTIONS}
From bddeac062a7fc1c87cacca0ef2c94ea2bd22f5c3 Mon Sep 17 00:00:00 2001
From: Rudolf Meijering
Date: Fri, 20 Sep 2024 15:44:52 +0200
Subject: [PATCH 17/42] Removes kbn-std/unset as it's not used anywhere
(#193298)
## Summary
Removes unset as it's not used anywhere. Underscore includes an unset
function which most plugins seem to prefer.
---
packages/kbn-std/index.ts | 1 -
packages/kbn-std/src/unset.test.ts | 94 ------------------------------
packages/kbn-std/src/unset.ts | 39 -------------
3 files changed, 134 deletions(-)
delete mode 100644 packages/kbn-std/src/unset.test.ts
delete mode 100644 packages/kbn-std/src/unset.ts
diff --git a/packages/kbn-std/index.ts b/packages/kbn-std/index.ts
index 294c168fdd0db..82467cc93d61d 100644
--- a/packages/kbn-std/index.ts
+++ b/packages/kbn-std/index.ts
@@ -19,7 +19,6 @@ export type { URLMeaningfulParts } from './src/url';
export { isRelativeUrl, modifyUrl, getUrlOrigin } from './src/url';
export { isInternalURL } from './src/is_internal_url';
export { parseNextURL } from './src/parse_next_url';
-export { unset } from './src/unset';
export { getFlattenedObject } from './src/get_flattened_object';
export { ensureNoUnsafeProperties } from './src/ensure_no_unsafe_properties';
export {
diff --git a/packages/kbn-std/src/unset.test.ts b/packages/kbn-std/src/unset.test.ts
deleted file mode 100644
index 6165423d8539e..0000000000000
--- a/packages/kbn-std/src/unset.test.ts
+++ /dev/null
@@ -1,94 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { unset } from './unset';
-
-describe('unset', () => {
- it('deletes a property from an object', () => {
- const obj = {
- a: 'a',
- b: 'b',
- c: 'c',
- };
- unset(obj, 'a');
- expect(obj).toEqual({
- b: 'b',
- c: 'c',
- });
- });
-
- it('does nothing if the property is not present', () => {
- const obj = {
- a: 'a',
- b: 'b',
- c: 'c',
- };
- unset(obj, 'd');
- expect(obj).toEqual({
- a: 'a',
- b: 'b',
- c: 'c',
- });
- });
-
- it('handles nested paths', () => {
- const obj = {
- foo: {
- bar: {
- one: 'one',
- two: 'two',
- },
- hello: 'dolly',
- },
- some: {
- things: 'here',
- },
- };
- unset(obj, 'foo.bar.one');
- expect(obj).toEqual({
- foo: {
- bar: {
- two: 'two',
- },
- hello: 'dolly',
- },
- some: {
- things: 'here',
- },
- });
- });
-
- it('does nothing if nested paths does not exist', () => {
- const obj = {
- foo: {
- bar: {
- one: 'one',
- two: 'two',
- },
- hello: 'dolly',
- },
- some: {
- things: 'here',
- },
- };
- unset(obj, 'foo.nothere.baz');
- expect(obj).toEqual({
- foo: {
- bar: {
- one: 'one',
- two: 'two',
- },
- hello: 'dolly',
- },
- some: {
- things: 'here',
- },
- });
- });
-});
diff --git a/packages/kbn-std/src/unset.ts b/packages/kbn-std/src/unset.ts
deleted file mode 100644
index f18fce5175533..0000000000000
--- a/packages/kbn-std/src/unset.ts
+++ /dev/null
@@ -1,39 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { get } from './get';
-
-/**
- * Unset a (potentially nested) key from given object.
- * This mutates the original object.
- *
- * @example
- * ```
- * unset(myObj, 'someRootProperty');
- * unset(myObj, 'some.nested.path');
- * ```
- */
-export function unset(obj: OBJ, atPath: string) {
- const paths = atPath
- .split('.')
- .map((s) => s.trim())
- .filter((v) => v !== '');
- if (paths.length === 0) {
- return;
- }
- if (paths.length === 1) {
- delete obj[paths[0]];
- return;
- }
- const property = paths.pop() as string;
- const parent = get(obj, paths as any) as any;
- if (parent !== undefined) {
- delete parent[property];
- }
-}
From 463a63603fb05997ec2e44d50d83a7b852db02b2 Mon Sep 17 00:00:00 2001
From: Dai Sugimori
Date: Fri, 20 Sep 2024 22:45:29 +0900
Subject: [PATCH 18/42] [DOCS] Remove "Save changes" statement from the query
page of the Playground (#192945)
## Summary
On the ["View and modify queries"
page](https://www.elastic.co/guide/en/kibana/8.15/playground-query.html)
under the Playground documentation, there is a statement "Click Save
changes." But there is no such button on Kibana 8.15.1 and changes are
applied automatically, so this statement is not needed.
I can see "Save changes" button on 8.14.0, so I believe it disappears
from 8.15.0.
---
docs/playground/playground-query.asciidoc | 1 -
1 file changed, 1 deletion(-)
diff --git a/docs/playground/playground-query.asciidoc b/docs/playground/playground-query.asciidoc
index 9a3f34e800017..0d98e13204284 100644
--- a/docs/playground/playground-query.asciidoc
+++ b/docs/playground/playground-query.asciidoc
@@ -12,7 +12,6 @@ The {x} UI enables you to view and modify these queries.
* Click *View query* to open the visual query editor.
* Modify the query by selecting fields to query per index.
-* Click *Save changes*.
[TIP]
====
From e2798def07d50595806748dd64cccaa216c5e234 Mon Sep 17 00:00:00 2001
From: Ying Mao
Date: Fri, 20 Sep 2024 09:55:48 -0400
Subject: [PATCH 19/42] [Response Ops][Event Log] Updating event log mappings
if data stream and index template already exist (#193205)
Resolves https://github.com/elastic/kibana/issues/192682
## Summary
As of 8.8, we started writing all event log documents to the
`.kibana-event-log-ds` index. Prior to this, we created a new index
template and data stream for every version (`.kibana-event-log-8.7` for
example) so any mapping updates that were added for the version were
created in the new index on upgrade.
With the static index name and serverless, we need a way to update
mappings in existing indices. This PR uses the same mechanism that we
use for the alerts index to update the index template mappings and the
mappings for the concrete backing indices of a datastream.
## To Verify
Run ES and Kibana in `main` to test the upgrade path for serverless
a. Check out `main`, run ES: `yarn es snapshot --license trial --ssl -E
path.data=../test_el_upgrade` and Kibana `yarn start --ssl`
b. Create a rule and let it run to populate the event log index
c. Switch to this PR branch. Make a mapping update to the event log
index:
```
--- a/x-pack/plugins/event_log/generated/mappings.json
+++ b/x-pack/plugins/event_log/generated/mappings.json
@@ -172,6 +172,9 @@
},
"rule": {
"properties": {
+ "test": {
+ "type": "keyword"
+ },
"author": {
"ignore_above": 1024,
"type": "keyword",
```
d. Start ES and Kibana with the same commands as above
e. Verify that the `.kibana-event-log-ds` index is created and has the
updated mapping:
-
https://localhost:5601/app/management/data/index_management/templates/.kibana-event-log-template
-
https://localhost:5601/app/management/data/index_management/indices/index_details?indexName=.ds-.kibana-event-log-ds-2024.09.17-000001&filter=.kibana-&includeHiddenIndices=true&tab=mappings
I also verified the following:
1. Run ES and Kibana in 8.7 to test the upgrade path from 8.7 (when
event log indices were versioned) to now
2. Run ES and Kibana in 8.15 to test the upgrade path from the previous
release to now
However, I had to create an 8.x branch and cherry pick this commit
because `main` is now on 9.0 and we can't upgrade directly from older
8.x version to 9.0!
---------
Co-authored-by: Elastic Machine
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
---
.../event_log/jest.integration.config.js | 12 ++
.../server/es/cluster_client_adapter.mock.ts | 2 +
.../server/es/cluster_client_adapter.test.ts | 202 +++++++++++++++++-
.../server/es/cluster_client_adapter.ts | 43 +++-
.../plugins/event_log/server/es/init.test.ts | 10 +-
x-pack/plugins/event_log/server/es/init.ts | 19 +-
.../event_log_update_mappings.test.ts | 173 +++++++++++++++
.../lib/setup_test_servers.ts | 76 +++++++
x-pack/plugins/event_log/tsconfig.json | 1 +
9 files changed, 523 insertions(+), 15 deletions(-)
create mode 100644 x-pack/plugins/event_log/jest.integration.config.js
create mode 100644 x-pack/plugins/event_log/server/integration_tests/event_log_update_mappings.test.ts
create mode 100644 x-pack/plugins/event_log/server/integration_tests/lib/setup_test_servers.ts
diff --git a/x-pack/plugins/event_log/jest.integration.config.js b/x-pack/plugins/event_log/jest.integration.config.js
new file mode 100644
index 0000000000000..c05b67e314755
--- /dev/null
+++ b/x-pack/plugins/event_log/jest.integration.config.js
@@ -0,0 +1,12 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+module.exports = {
+ preset: '@kbn/test/jest_integration',
+ rootDir: '../../..',
+ roots: ['/x-pack/plugins/event_log'],
+};
diff --git a/x-pack/plugins/event_log/server/es/cluster_client_adapter.mock.ts b/x-pack/plugins/event_log/server/es/cluster_client_adapter.mock.ts
index 2a5582347db74..c416fcb0f7bf6 100644
--- a/x-pack/plugins/event_log/server/es/cluster_client_adapter.mock.ts
+++ b/x-pack/plugins/event_log/server/es/cluster_client_adapter.mock.ts
@@ -13,8 +13,10 @@ const createClusterClientMock = () => {
indexDocuments: jest.fn(),
doesIndexTemplateExist: jest.fn(),
createIndexTemplate: jest.fn(),
+ updateIndexTemplate: jest.fn(),
doesDataStreamExist: jest.fn(),
createDataStream: jest.fn(),
+ updateConcreteIndices: jest.fn(),
getExistingLegacyIndexTemplates: jest.fn(),
setLegacyIndexTemplateToHidden: jest.fn(),
getExistingIndices: jest.fn(),
diff --git a/x-pack/plugins/event_log/server/es/cluster_client_adapter.test.ts b/x-pack/plugins/event_log/server/es/cluster_client_adapter.test.ts
index c984946574a1a..eb76b90f0556a 100644
--- a/x-pack/plugins/event_log/server/es/cluster_client_adapter.test.ts
+++ b/x-pack/plugins/event_log/server/es/cluster_client_adapter.test.ts
@@ -215,6 +215,117 @@ describe('createIndexTemplate', () => {
});
});
+describe('updateIndexTemplate', () => {
+ test('should call cluster with given template', async () => {
+ clusterClient.indices.simulateTemplate.mockImplementationOnce(async () => ({
+ template: {
+ aliases: {
+ alias_name_1: {
+ is_hidden: true,
+ },
+ alias_name_2: {
+ is_hidden: true,
+ },
+ },
+ settings: {
+ hidden: true,
+ number_of_shards: 1,
+ auto_expand_replicas: '0-1',
+ },
+ mappings: { dynamic: false, properties: { '@timestamp': { type: 'date' } } },
+ },
+ }));
+
+ await clusterClientAdapter.updateIndexTemplate('foo', { args: true });
+
+ expect(clusterClient.indices.simulateTemplate).toHaveBeenCalledWith({
+ name: 'foo',
+ body: { args: true },
+ });
+ expect(clusterClient.indices.putIndexTemplate).toHaveBeenCalledWith({
+ name: 'foo',
+ body: { args: true },
+ });
+ });
+
+ test(`should throw error if simulate mappings response is empty`, async () => {
+ clusterClient.indices.simulateTemplate.mockImplementationOnce(async () => ({
+ template: {
+ aliases: {
+ alias_name_1: {
+ is_hidden: true,
+ },
+ alias_name_2: {
+ is_hidden: true,
+ },
+ },
+ settings: {
+ hidden: true,
+ number_of_shards: 1,
+ auto_expand_replicas: '0-1',
+ },
+ mappings: {},
+ },
+ }));
+
+ await expect(() =>
+ clusterClientAdapter.updateIndexTemplate('foo', { name: 'template', args: true })
+ ).rejects.toThrowErrorMatchingInlineSnapshot(
+ `"No mappings would be generated for template, possibly due to failed/misconfigured bootstrapping"`
+ );
+
+ expect(logger.error).toHaveBeenCalledWith(
+ `Error updating index template foo: No mappings would be generated for template, possibly due to failed/misconfigured bootstrapping`
+ );
+ });
+
+ test(`should throw error if simulateTemplate throws error`, async () => {
+ clusterClient.indices.simulateTemplate.mockImplementationOnce(() => {
+ throw new Error('failed to simulate');
+ });
+
+ await expect(() =>
+ clusterClientAdapter.updateIndexTemplate('foo', { name: 'template', args: true })
+ ).rejects.toThrowErrorMatchingInlineSnapshot(`"failed to simulate"`);
+
+ expect(logger.error).toHaveBeenCalledWith(
+ `Error updating index template foo: failed to simulate`
+ );
+ });
+
+ test(`should throw error if putIndexTemplate throws error`, async () => {
+ clusterClient.indices.simulateTemplate.mockImplementationOnce(async () => ({
+ template: {
+ aliases: {
+ alias_name_1: {
+ is_hidden: true,
+ },
+ alias_name_2: {
+ is_hidden: true,
+ },
+ },
+ settings: {
+ hidden: true,
+ number_of_shards: 1,
+ auto_expand_replicas: '0-1',
+ },
+ mappings: { dynamic: false, properties: { '@timestamp': { type: 'date' } } },
+ },
+ }));
+ clusterClient.indices.putIndexTemplate.mockImplementationOnce(() => {
+ throw new Error('failed to update index template');
+ });
+
+ await expect(() =>
+ clusterClientAdapter.updateIndexTemplate('foo', { name: 'template', args: true })
+ ).rejects.toThrowErrorMatchingInlineSnapshot(`"failed to update index template"`);
+
+ expect(logger.error).toHaveBeenCalledWith(
+ `Error updating index template foo: failed to update index template`
+ );
+ });
+});
+
describe('getExistingLegacyIndexTemplates', () => {
test('should call cluster with given index template pattern', async () => {
await clusterClientAdapter.getExistingLegacyIndexTemplates('foo*');
@@ -497,7 +608,7 @@ describe('doesDataStreamExist', () => {
});
});
-describe('createIndex', () => {
+describe('createDataStream', () => {
test('should call cluster with proper arguments', async () => {
await clusterClientAdapter.createDataStream('foo');
expect(clusterClient.indices.createDataStream).toHaveBeenCalledWith({
@@ -526,6 +637,95 @@ describe('createIndex', () => {
});
});
+describe('updateConcreteIndices', () => {
+ test('should call cluster with proper arguments', async () => {
+ clusterClient.indices.simulateIndexTemplate.mockImplementationOnce(async () => ({
+ template: {
+ aliases: { alias_name_1: { is_hidden: true } },
+ settings: {
+ hidden: true,
+ number_of_shards: 1,
+ auto_expand_replicas: '0-1',
+ },
+ mappings: { dynamic: false, properties: { '@timestamp': { type: 'date' } } },
+ },
+ }));
+
+ await clusterClientAdapter.updateConcreteIndices('foo');
+ expect(clusterClient.indices.simulateIndexTemplate).toHaveBeenCalledWith({
+ name: 'foo',
+ });
+ expect(clusterClient.indices.putMapping).toHaveBeenCalledWith({
+ index: 'foo',
+ body: { dynamic: false, properties: { '@timestamp': { type: 'date' } } },
+ });
+ });
+
+ test('should not update mapping if simulate response does not contain mappings', async () => {
+ // @ts-ignore
+ clusterClient.indices.simulateIndexTemplate.mockImplementationOnce(async () => ({
+ template: {
+ aliases: { alias_name_1: { is_hidden: true } },
+ settings: {
+ hidden: true,
+ number_of_shards: 1,
+ auto_expand_replicas: '0-1',
+ },
+ },
+ }));
+
+ await clusterClientAdapter.updateConcreteIndices('foo');
+ expect(clusterClient.indices.simulateIndexTemplate).toHaveBeenCalledWith({
+ name: 'foo',
+ });
+ expect(clusterClient.indices.putMapping).not.toHaveBeenCalled();
+ });
+
+ test('should throw error if simulateIndexTemplate throws error', async () => {
+ clusterClient.indices.simulateIndexTemplate.mockImplementationOnce(() => {
+ throw new Error('failed to simulate');
+ });
+
+ await expect(() =>
+ clusterClientAdapter.updateConcreteIndices('foo')
+ ).rejects.toThrowErrorMatchingInlineSnapshot(`"failed to simulate"`);
+
+ expect(clusterClient.indices.putMapping).not.toHaveBeenCalled();
+ expect(logger.error).toHaveBeenCalledWith(
+ `Error updating index mappings for foo: failed to simulate`
+ );
+ });
+
+ test('should throw error if putMapping throws error', async () => {
+ clusterClient.indices.simulateIndexTemplate.mockImplementationOnce(async () => ({
+ template: {
+ aliases: { alias_name_1: { is_hidden: true } },
+ settings: {
+ hidden: true,
+ number_of_shards: 1,
+ auto_expand_replicas: '0-1',
+ },
+ mappings: { dynamic: false, properties: { '@timestamp': { type: 'date' } } },
+ },
+ }));
+ clusterClient.indices.putMapping.mockImplementationOnce(() => {
+ throw new Error('failed to put mappings');
+ });
+
+ await expect(() =>
+ clusterClientAdapter.updateConcreteIndices('foo')
+ ).rejects.toThrowErrorMatchingInlineSnapshot(`"failed to put mappings"`);
+
+ expect(clusterClient.indices.putMapping).toHaveBeenCalledWith({
+ index: 'foo',
+ body: { dynamic: false, properties: { '@timestamp': { type: 'date' } } },
+ });
+ expect(logger.error).toHaveBeenCalledWith(
+ `Error updating index mappings for foo: failed to put mappings`
+ );
+ });
+});
+
describe('queryEventsBySavedObject', () => {
const DEFAULT_OPTIONS = queryOptionsSchema.validate({});
diff --git a/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts b/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts
index 25e67c6857154..7076336c0c760 100644
--- a/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts
+++ b/x-pack/plugins/event_log/server/es/cluster_client_adapter.ts
@@ -7,7 +7,7 @@
import { Subject } from 'rxjs';
import { bufferTime, filter as rxFilter, concatMap } from 'rxjs';
-import { reject, isUndefined, isNumber, pick } from 'lodash';
+import { reject, isUndefined, isNumber, pick, isEmpty, get } from 'lodash';
import type { PublicMethodsOf } from '@kbn/utility-types';
import { Logger, ElasticsearchClient } from '@kbn/core/server';
import util from 'util';
@@ -213,6 +213,28 @@ export class ClusterClientAdapter): Promise {
+ this.logger.info(`Updating index template ${name}`);
+
+ try {
+ const esClient = await this.elasticsearchClientPromise;
+
+ // Simulate the index template to proactively identify any issues with the mappings
+ const simulateResponse = await esClient.indices.simulateTemplate({ name, body: template });
+ const mappings: estypes.MappingTypeMapping = simulateResponse.template.mappings;
+
+ if (isEmpty(mappings)) {
+ throw new Error(
+ `No mappings would be generated for ${template.name}, possibly due to failed/misconfigured bootstrapping`
+ );
+ }
+ await esClient.indices.putIndexTemplate({ name, body: template });
+ } catch (err) {
+ this.logger.error(`Error updating index template ${name}: ${err.message}`);
+ throw err;
+ }
+ }
+
public async getExistingLegacyIndexTemplates(
indexTemplatePattern: string
): Promise {
@@ -335,7 +357,7 @@ export class ClusterClientAdapter = {}): Promise {
+ public async createDataStream(name: string): Promise {
this.logger.info(`Creating datastream ${name}`);
try {
const esClient = await this.elasticsearchClientPromise;
@@ -347,6 +369,23 @@ export class ClusterClientAdapter {
+ this.logger.info(`Updating concrete index mappings for ${name}`);
+ try {
+ const esClient = await this.elasticsearchClientPromise;
+ const simulatedIndexMapping = await esClient.indices.simulateIndexTemplate({ name });
+ const simulatedMapping = get(simulatedIndexMapping, ['template', 'mappings']);
+
+ if (simulatedMapping != null) {
+ await esClient.indices.putMapping({ index: name, body: simulatedMapping });
+ this.logger.debug(`Successfully updated concrete index mappings for ${name}`);
+ }
+ } catch (err) {
+ this.logger.error(`Error updating index mappings for ${name}: ${err.message}`);
+ throw err;
+ }
+ }
+
public async queryEventsBySavedObjects(
queryOptions: FindEventsOptionsBySavedObjectFilter
): Promise {
diff --git a/x-pack/plugins/event_log/server/es/init.test.ts b/x-pack/plugins/event_log/server/es/init.test.ts
index bf9121b353d2c..c9d624edf82e4 100644
--- a/x-pack/plugins/event_log/server/es/init.test.ts
+++ b/x-pack/plugins/event_log/server/es/init.test.ts
@@ -18,7 +18,7 @@ describe('initializeEs', () => {
esContext.esAdapter.getExistingIndexAliases.mockResolvedValue({});
});
- test(`should update existing index templates if any exist and are not hidden`, async () => {
+ test(`should update existing index templates to hidden if any exist and are not hidden`, async () => {
const testTemplate = {
order: 0,
index_patterns: ['foo-bar-*'],
@@ -393,14 +393,16 @@ describe('initializeEs', () => {
await initializeEs(esContext);
expect(esContext.esAdapter.doesIndexTemplateExist).toHaveBeenCalled();
expect(esContext.esAdapter.createIndexTemplate).toHaveBeenCalled();
+ expect(esContext.esAdapter.updateIndexTemplate).not.toHaveBeenCalled();
});
- test(`shouldn't create index template if it already exists`, async () => {
+ test(`should update index template if it already exists`, async () => {
esContext.esAdapter.doesIndexTemplateExist.mockResolvedValue(true);
await initializeEs(esContext);
expect(esContext.esAdapter.doesIndexTemplateExist).toHaveBeenCalled();
expect(esContext.esAdapter.createIndexTemplate).not.toHaveBeenCalled();
+ expect(esContext.esAdapter.updateIndexTemplate).toHaveBeenCalled();
});
test(`should create data stream if it doesn't exist`, async () => {
@@ -409,14 +411,16 @@ describe('initializeEs', () => {
await initializeEs(esContext);
expect(esContext.esAdapter.doesDataStreamExist).toHaveBeenCalled();
expect(esContext.esAdapter.createDataStream).toHaveBeenCalled();
+ expect(esContext.esAdapter.updateConcreteIndices).not.toHaveBeenCalled();
});
- test(`shouldn't create data stream if it already exists`, async () => {
+ test(`should update indices of data stream if it already exists`, async () => {
esContext.esAdapter.doesDataStreamExist.mockResolvedValue(true);
await initializeEs(esContext);
expect(esContext.esAdapter.doesDataStreamExist).toHaveBeenCalled();
expect(esContext.esAdapter.createDataStream).not.toHaveBeenCalled();
+ expect(esContext.esAdapter.updateConcreteIndices).toHaveBeenCalled();
});
});
diff --git a/x-pack/plugins/event_log/server/es/init.ts b/x-pack/plugins/event_log/server/es/init.ts
index 37f20a5bf424f..cd9b460b34553 100644
--- a/x-pack/plugins/event_log/server/es/init.ts
+++ b/x-pack/plugins/event_log/server/es/init.ts
@@ -216,12 +216,17 @@ class EsInitializationSteps {
const exists = await this.esContext.esAdapter.doesIndexTemplateExist(
this.esContext.esNames.indexTemplate
);
+ const templateBody = getIndexTemplate(this.esContext.esNames);
if (!exists) {
- const templateBody = getIndexTemplate(this.esContext.esNames);
await this.esContext.esAdapter.createIndexTemplate(
this.esContext.esNames.indexTemplate,
templateBody
);
+ } else {
+ await this.esContext.esAdapter.updateIndexTemplate(
+ this.esContext.esNames.indexTemplate,
+ templateBody
+ );
}
}
@@ -230,14 +235,10 @@ class EsInitializationSteps {
this.esContext.esNames.dataStream
);
if (!exists) {
- await this.esContext.esAdapter.createDataStream(this.esContext.esNames.dataStream, {
- aliases: {
- [this.esContext.esNames.dataStream]: {
- is_write_index: true,
- is_hidden: true,
- },
- },
- });
+ await this.esContext.esAdapter.createDataStream(this.esContext.esNames.dataStream);
+ } else {
+ // apply current mappings to existing data stream
+ await this.esContext.esAdapter.updateConcreteIndices(this.esContext.esNames.dataStream);
}
}
}
diff --git a/x-pack/plugins/event_log/server/integration_tests/event_log_update_mappings.test.ts b/x-pack/plugins/event_log/server/integration_tests/event_log_update_mappings.test.ts
new file mode 100644
index 0000000000000..22d3b80479971
--- /dev/null
+++ b/x-pack/plugins/event_log/server/integration_tests/event_log_update_mappings.test.ts
@@ -0,0 +1,173 @@
+/*
+ * Copyright 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 ElasticsearchClient } from '@kbn/core/server';
+import { setupKibanaServer, setupTestServers } from './lib/setup_test_servers';
+import { IEvent } from '../types';
+import { EsContextCtorParams } from '../es/context';
+
+const { createEsContext: createEsContextMock } = jest.requireMock('../es');
+jest.mock('../es', () => {
+ const actual = jest.requireActual('../es');
+ return {
+ ...actual,
+ createEsContext: jest.fn().mockImplementation((opts) => {
+ return new actual.createEsContext(opts);
+ }),
+ };
+});
+
+describe('update existing event log mappings on startup', () => {
+ it('should update mappings for existing event log indices', async () => {
+ const setupResult = await setupTestServers();
+ const esServer = setupResult.esServer;
+ let kibanaServer = setupResult.kibanaServer;
+
+ expect(createEsContextMock).toHaveBeenCalledTimes(1);
+ let createEsContextOpts: EsContextCtorParams = createEsContextMock.mock.calls[0][0];
+ let infoLogSpy = jest.spyOn(createEsContextOpts.logger, 'info');
+
+ await retry(async () => {
+ expect(infoLogSpy).toHaveBeenCalledWith(`Creating datastream .kibana-event-log-ds`);
+ expect(infoLogSpy).not.toHaveBeenCalledWith(
+ `Updating concrete index mappings for .kibana-event-log-ds`
+ );
+ });
+
+ await injectEventLogDoc(kibanaServer.coreStart.elasticsearch.client.asInternalUser, {
+ '@timestamp': '2024-09-19T20:38:47.124Z',
+ event: {
+ provider: 'alerting',
+ action: 'execute',
+ kind: 'alert',
+ category: ['AlertingExample'],
+ start: '2024-09-19T20:38:46.963Z',
+ outcome: 'success',
+ end: '2024-09-19T20:38:47.124Z',
+ duration: '161000000',
+ },
+ kibana: {
+ alert: {
+ rule: {
+ rule_type_id: 'example.always-firing',
+ consumer: 'alerts',
+ execution: {
+ uuid: '578f0ca3-aa08-4700-aed0-236c888c6cae',
+ metrics: {
+ number_of_triggered_actions: 0,
+ number_of_generated_actions: 0,
+ alert_counts: {
+ active: 5,
+ new: 5,
+ recovered: 5,
+ },
+ number_of_delayed_alerts: 0,
+ number_of_searches: 0,
+ es_search_duration_ms: 0,
+ total_search_duration_ms: 0,
+ claim_to_start_duration_ms: 26,
+ total_run_duration_ms: 187,
+ prepare_rule_duration_ms: 18,
+ rule_type_run_duration_ms: 0,
+ process_alerts_duration_ms: 1,
+ persist_alerts_duration_ms: 64,
+ trigger_actions_duration_ms: 0,
+ process_rule_duration_ms: 69,
+ },
+ },
+ },
+ },
+ saved_objects: [
+ {
+ rel: 'primary',
+ type: 'alert',
+ id: '3389d834-edc2-4245-a319-3ff689f5bf3b',
+ type_id: 'example.always-firing',
+ },
+ ],
+ space_ids: ['default'],
+ task: {
+ scheduled: '2024-09-19T20:38:46.797Z',
+ schedule_delay: 166000000,
+ },
+ alerting: {
+ outcome: 'success',
+ status: 'active',
+ },
+ server_uuid: '5b2de169-2785-441b-ae8c-186a1936b17d',
+ version: '9.0.0',
+ },
+ rule: {
+ id: '3389d834-edc2-4245-a319-3ff689f5bf3b',
+ license: 'basic',
+ category: 'example.always-firing',
+ ruleset: 'AlertingExample',
+ name: 'e',
+ },
+ message: "rule executed: example.always-firing:3389d834-edc2-4245-a319-3ff689f5bf3b: 'e'",
+ ecs: {
+ version: '1.8.0',
+ },
+ });
+
+ if (kibanaServer) {
+ await kibanaServer.stop();
+ }
+ infoLogSpy.mockRestore();
+
+ const restartKb = await setupKibanaServer();
+ kibanaServer = restartKb.kibanaServer;
+
+ expect(createEsContextMock).toHaveBeenCalledTimes(2);
+ createEsContextOpts = createEsContextMock.mock.calls[1][0];
+ infoLogSpy = jest.spyOn(createEsContextOpts.logger, 'info');
+ const debugLogSpy = jest.spyOn(createEsContextOpts.logger, 'debug');
+
+ await retry(async () => {
+ expect(infoLogSpy).toHaveBeenCalledWith(
+ `Updating concrete index mappings for .kibana-event-log-ds`
+ );
+ expect(debugLogSpy).toHaveBeenCalledWith(
+ `Successfully updated concrete index mappings for .kibana-event-log-ds`
+ );
+ });
+
+ if (kibanaServer) {
+ await kibanaServer.stop();
+ }
+ if (esServer) {
+ await esServer.stop();
+ }
+ });
+});
+
+async function injectEventLogDoc(esClient: ElasticsearchClient, doc: IEvent) {
+ await esClient.index({
+ index: '.kibana-event-log-ds',
+ document: doc,
+ });
+}
+
+interface RetryOpts {
+ times: number;
+ intervalMs: number;
+}
+
+async function retry(cb: () => Promise, options: RetryOpts = { times: 60, intervalMs: 500 }) {
+ let attempt = 1;
+ while (true) {
+ try {
+ return await cb();
+ } catch (e) {
+ if (attempt >= options.times) {
+ throw e;
+ }
+ }
+ attempt++;
+ await new Promise((resolve) => setTimeout(resolve, options.intervalMs));
+ }
+}
diff --git a/x-pack/plugins/event_log/server/integration_tests/lib/setup_test_servers.ts b/x-pack/plugins/event_log/server/integration_tests/lib/setup_test_servers.ts
new file mode 100644
index 0000000000000..126b89b70992a
--- /dev/null
+++ b/x-pack/plugins/event_log/server/integration_tests/lib/setup_test_servers.ts
@@ -0,0 +1,76 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import deepmerge from 'deepmerge';
+import { createTestServers, createRootWithCorePlugins } from '@kbn/core-test-helpers-kbn-server';
+
+function createRoot(settings = {}) {
+ return createRootWithCorePlugins(
+ deepmerge(
+ {
+ logging: {
+ root: {
+ level: 'warn',
+ },
+ loggers: [
+ {
+ name: 'plugins.eventLog',
+ level: 'all',
+ },
+ ],
+ },
+ },
+ settings
+ ),
+ { oss: false }
+ );
+}
+export async function setupTestServers(settings = {}) {
+ const { startES } = createTestServers({
+ adjustTimeout: (t) => jest.setTimeout(t),
+ settings: {
+ es: {
+ license: 'trial',
+ },
+ },
+ });
+
+ const esServer = await startES();
+
+ const root = createRoot(settings);
+
+ await root.preboot();
+ const coreSetup = await root.setup();
+ const coreStart = await root.start();
+
+ return {
+ esServer,
+ kibanaServer: {
+ root,
+ coreSetup,
+ coreStart,
+ stop: async () => await root.shutdown(),
+ },
+ };
+}
+
+export async function setupKibanaServer(settings = {}) {
+ const root = createRoot(settings);
+
+ await root.preboot();
+ const coreSetup = await root.setup();
+ const coreStart = await root.start();
+
+ return {
+ kibanaServer: {
+ root,
+ coreSetup,
+ coreStart,
+ stop: async () => await root.shutdown(),
+ },
+ };
+}
diff --git a/x-pack/plugins/event_log/tsconfig.json b/x-pack/plugins/event_log/tsconfig.json
index cec36c8f2b785..65ccb4cf3b11c 100644
--- a/x-pack/plugins/event_log/tsconfig.json
+++ b/x-pack/plugins/event_log/tsconfig.json
@@ -21,6 +21,7 @@
"@kbn/std",
"@kbn/safer-lodash-set",
"@kbn/serverless",
+ "@kbn/core-test-helpers-kbn-server",
],
"exclude": [
"target/**/*",
From d30b9c8bc4202d4a2850c89395144ff520993336 Mon Sep 17 00:00:00 2001
From: Tre
Date: Fri, 20 Sep 2024 15:53:53 +0100
Subject: [PATCH 20/42] [FTR][Ownership] add @elastic/response-ops to es
archives (#193449)
## Summary
Modify code owner declarations for @elastic/response-ops team in
`.github/CODEOWNERS`
### Update for Reviewers
With the merge of [this](https://github.com/elastic/kibana/pull/193277),
you can now do this:
`node scripts/get_owners_for_file.js --file
x-pack/test/functional/es_archives/action_task_params`
```
succ elastic/response-ops
```
_So, you can use this script to see if the code owners file is reporting
erroneously_
### For Reviewers
Added these lines:
```
/x-pack/test/functional/es_archives/actions @elastic/response-ops
/x-pack/test/functional/es_archives/alerting @elastic/response-ops
/x-pack/test/functional/es_archives/alerts @elastic/response-ops
/x-pack/test/functional/es_archives/alerts_legacy @elastic/response-ops
/x-pack/test/functional/es_archives/observability/alerts @elastic/response-ops
/x-pack/test/functional/es_archives/actions @elastic/response-ops
/x-pack/test/functional/es_archives/rules_scheduled_task_id @elastic/response-ops
/x-pack/test/functional/es_archives/alerting/8_2_0 @elastic/response-ops
```
Most of these changes come from searching for `esArchiver.load`, within
`x-pack/test/alerting_api_integration`
Obviously this can easily be erroneous, so please keep me honest.
#### Notes
This is a best guess effort, as we march towards having zero files
within `test` && `x-pack/test` && `x-pack/test_serverless` without a
code owner.
In the end, this will contribute to better reporting.
Contribues to: https://github.com/elastic/kibana/issues/192979
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine
---
.github/CODEOWNERS | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 11ec7ca1cdd0b..df5562fad8a32 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1418,6 +1418,15 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/test_serverless/functional/test_suites/security/screenshot_creation/response_ops_docs @elastic/response-ops
/x-pack/test_serverless/functional/test_suites/observability/screenshot_creation/response_ops_docs @elastic/response-ops
/x-pack/test_serverless/api_integration/test_suites/common/alerting/ @elastic/response-ops
+/x-pack/test/functional/es_archives/action_task_params @elastic/response-ops
+/x-pack/test/functional/es_archives/actions @elastic/response-ops
+/x-pack/test/functional/es_archives/alerting @elastic/response-ops
+/x-pack/test/functional/es_archives/alerts @elastic/response-ops
+/x-pack/test/functional/es_archives/alerts_legacy @elastic/response-ops
+/x-pack/test/functional/es_archives/observability/alerts @elastic/response-ops
+/x-pack/test/functional/es_archives/actions @elastic/response-ops
+/x-pack/test/functional/es_archives/rules_scheduled_task_id @elastic/response-ops
+/x-pack/test/functional/es_archives/alerting/8_2_0 @elastic/response-ops
# Enterprise Search
/x-pack/test/functional_enterprise_search/ @elastic/search-kibana
From ac29d0fc4811ce850353b1f3ec766f4b4778af0b Mon Sep 17 00:00:00 2001
From: Rudolf Meijering
Date: Fri, 20 Sep 2024 17:17:20 +0200
Subject: [PATCH 21/42] Attempt to get rid of SavedObjectClass (#192265)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
Another step towards getting rid of the savedobjects plugin which was
scheduled for removal since 2019 😓
https://github.com/elastic/kibana/issues/46435
### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
---
.../saved_objects_tagging.stub.ts | 1 -
.../saved_objects_tagging_service.ts | 2 -
.../services/saved_objects_tagging/types.ts | 1 -
src/plugins/saved_objects/kibana.jsonc | 3 -
src/plugins/saved_objects/public/index.ts | 6 -
src/plugins/saved_objects/public/mocks.ts | 19 +-
src/plugins/saved_objects/public/plugin.ts | 44 +-
.../public/saved_object/decorators/index.ts | 12 -
.../saved_object/decorators/registry.mock.ts | 25 -
.../saved_object/decorators/registry.test.ts | 126 ---
.../saved_object/decorators/registry.ts | 50 -
.../public/saved_object/decorators/types.ts | 34 -
.../helpers/build_saved_object.ts | 135 ---
.../public/saved_object/index.ts | 7 -
.../public/saved_object/saved_object.test.ts | 888 ------------------
.../public/saved_object/saved_object.ts | 51 -
src/plugins/saved_objects/tsconfig.json | 1 -
.../public/api.mock.ts | 2 -
.../saved_objects_tagging_oss/public/api.ts | 14 -
.../decorator/decorate_config.test.mocks.ts | 18 -
.../public/decorator/decorate_config.test.ts | 133 ---
.../public/decorator/decorate_config.ts | 36 -
.../public/decorator/decorate_object.test.ts | 41 -
.../public/decorator/decorate_object.ts | 22 -
.../decorator/extract_tag_references.test.ts | 101 --
.../decorator/extract_tag_references.ts | 34 -
.../public/decorator/factory.ts | 25 -
.../public/decorator/index.ts | 20 -
.../decorator/inject_tag_references.test.ts | 60 --
.../public/decorator/inject_tag_references.ts | 25 -
.../public/decorator/types.ts | 25 -
.../saved_objects_tagging_oss/public/index.ts | 3 -
.../public/plugin.test.ts | 25 +-
.../public/plugin.ts | 15 +-
.../saved_objects_tagging_oss/tsconfig.json | 1 -
src/plugins/visualizations/public/mocks.ts | 2 -
src/plugins/visualizations/public/plugin.ts | 2 -
.../public/ui_api/has_tag_decoration.ts | 17 -
.../public/ui_api/index.ts | 2 -
.../public/app/__mocks__/app_dependencies.tsx | 2 -
.../transform/public/app/app_dependencies.tsx | 2 -
.../public/app/mount_management_section.ts | 1 -
x-pack/plugins/transform/public/plugin.ts | 2 -
x-pack/plugins/transform/tsconfig.json | 1 -
44 files changed, 10 insertions(+), 2026 deletions(-)
delete mode 100644 src/plugins/saved_objects/public/saved_object/decorators/index.ts
delete mode 100644 src/plugins/saved_objects/public/saved_object/decorators/registry.mock.ts
delete mode 100644 src/plugins/saved_objects/public/saved_object/decorators/registry.test.ts
delete mode 100644 src/plugins/saved_objects/public/saved_object/decorators/registry.ts
delete mode 100644 src/plugins/saved_objects/public/saved_object/decorators/types.ts
delete mode 100644 src/plugins/saved_objects/public/saved_object/helpers/build_saved_object.ts
delete mode 100644 src/plugins/saved_objects/public/saved_object/saved_object.test.ts
delete mode 100644 src/plugins/saved_objects/public/saved_object/saved_object.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.test.mocks.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.test.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/decorate_object.test.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/decorate_object.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/factory.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/index.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.test.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.ts
delete mode 100644 src/plugins/saved_objects_tagging_oss/public/decorator/types.ts
delete mode 100644 x-pack/plugins/saved_objects_tagging/public/ui_api/has_tag_decoration.ts
diff --git a/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging.stub.ts b/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging.stub.ts
index 5c04a7c5c4890..ed8e4e5486dad 100644
--- a/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging.stub.ts
+++ b/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging.stub.ts
@@ -21,7 +21,6 @@ export const savedObjectsTaggingServiceFactory: SavedObjectsTaggingServiceFactor
// I'm not defining components so that I don't have to update the snapshot of `save_modal.test`
// However, if it's ever necessary, it can be done via: `components: pluginMock.components`,
- hasTagDecoration: pluginMock.hasTagDecoration,
parseSearchQuery: pluginMock.parseSearchQuery,
getSearchBarFilter: pluginMock.getSearchBarFilter,
getTagIdsFromReferences: pluginMock.getTagIdsFromReferences,
diff --git a/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging_service.ts b/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging_service.ts
index 2eb49f79169ed..4440ee069d2bc 100644
--- a/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging_service.ts
+++ b/src/plugins/dashboard/public/services/saved_objects_tagging/saved_objects_tagging_service.ts
@@ -29,7 +29,6 @@ export const savedObjectsTaggingServiceFactory: SavedObjectsTaggingServiceFactor
ui: {
components,
parseSearchQuery,
- hasTagDecoration,
getSearchBarFilter,
updateTagsReferences,
getTagIdsFromReferences,
@@ -42,7 +41,6 @@ export const savedObjectsTaggingServiceFactory: SavedObjectsTaggingServiceFactor
hasApi: true,
api: taggingApi,
components,
- hasTagDecoration,
parseSearchQuery,
getSearchBarFilter,
updateTagsReferences,
diff --git a/src/plugins/dashboard/public/services/saved_objects_tagging/types.ts b/src/plugins/dashboard/public/services/saved_objects_tagging/types.ts
index 340849a3b9406..f08aa7c6c28f2 100644
--- a/src/plugins/dashboard/public/services/saved_objects_tagging/types.ts
+++ b/src/plugins/dashboard/public/services/saved_objects_tagging/types.ts
@@ -13,7 +13,6 @@ export interface DashboardSavedObjectsTaggingService {
hasApi: boolean; // remove this once the entire service is optional
api?: SavedObjectsTaggingApi;
components?: SavedObjectsTaggingApi['ui']['components'];
- hasTagDecoration?: SavedObjectsTaggingApi['ui']['hasTagDecoration'];
parseSearchQuery?: SavedObjectsTaggingApi['ui']['parseSearchQuery'];
getSearchBarFilter?: SavedObjectsTaggingApi['ui']['getSearchBarFilter'];
updateTagsReferences?: SavedObjectsTaggingApi['ui']['updateTagsReferences'];
diff --git a/src/plugins/saved_objects/kibana.jsonc b/src/plugins/saved_objects/kibana.jsonc
index aa1c9aae31194..1f063a7cdfa59 100644
--- a/src/plugins/saved_objects/kibana.jsonc
+++ b/src/plugins/saved_objects/kibana.jsonc
@@ -9,9 +9,6 @@
"requiredPlugins": [
"data",
"dataViews"
- ],
- "requiredBundles": [
- "kibanaUtils"
]
}
}
diff --git a/src/plugins/saved_objects/public/index.ts b/src/plugins/saved_objects/public/index.ts
index 4ce1d679c743f..6d7a013cf59ca 100644
--- a/src/plugins/saved_objects/public/index.ts
+++ b/src/plugins/saved_objects/public/index.ts
@@ -11,13 +11,7 @@ import { SavedObjectsPublicPlugin } from './plugin';
export type { OnSaveProps, OriginSaveModalProps, SaveModalState, SaveResult } from './save_modal';
export { SavedObjectSaveModal, SavedObjectSaveModalOrigin, showSaveModal } from './save_modal';
-export type {
- SavedObjectDecorator,
- SavedObjectDecoratorFactory,
- SavedObjectDecoratorConfig,
-} from './saved_object';
export { checkForDuplicateTitle, saveWithConfirmation, isErrorNonFatal } from './saved_object';
export type { SavedObjectSaveOpts, SavedObject, SavedObjectConfig } from './types';
-export type { SavedObjectsStart, SavedObjectSetup } from './plugin';
export const plugin = () => new SavedObjectsPublicPlugin();
diff --git a/src/plugins/saved_objects/public/mocks.ts b/src/plugins/saved_objects/public/mocks.ts
index 124f9bcd2d659..5d15efcb0b22f 100644
--- a/src/plugins/saved_objects/public/mocks.ts
+++ b/src/plugins/saved_objects/public/mocks.ts
@@ -7,21 +7,4 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import { SavedObjectsStart, SavedObjectSetup } from './plugin';
-
-const createStartContract = (): SavedObjectsStart => {
- return {
- SavedObjectClass: jest.fn(),
- };
-};
-
-const createSetupContract = (): jest.Mocked => {
- return {
- registerDecorator: jest.fn(),
- };
-};
-
-export const savedObjectsPluginMock = {
- createStartContract,
- createSetupContract,
-};
+export const savedObjectsPluginMock = {};
diff --git a/src/plugins/saved_objects/public/plugin.ts b/src/plugins/saved_objects/public/plugin.ts
index cbf3a5e69cf7f..fd67e783fab75 100644
--- a/src/plugins/saved_objects/public/plugin.ts
+++ b/src/plugins/saved_objects/public/plugin.ts
@@ -12,55 +12,19 @@ import { CoreStart, Plugin } from '@kbn/core/public';
import './index.scss';
import { DataPublicPluginStart } from '@kbn/data-plugin/public';
import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
-import {
- createSavedObjectClass,
- SavedObjectDecoratorRegistry,
- SavedObjectDecoratorConfig,
-} from './saved_object';
-import { SavedObject } from './types';
import { setStartServices } from './kibana_services';
-export interface SavedObjectSetup {
- registerDecorator: (config: SavedObjectDecoratorConfig) => void;
-}
-
-export interface SavedObjectsStart {
- /**
- * @deprecated
- * @removeBy 8.8.0
- */
- SavedObjectClass: new (raw: Record) => SavedObject;
-}
-
export interface SavedObjectsStartDeps {
data: DataPublicPluginStart;
dataViews: DataViewsPublicPluginStart;
}
-export class SavedObjectsPublicPlugin
- implements Plugin
-{
- private decoratorRegistry = new SavedObjectDecoratorRegistry();
-
- public setup(): SavedObjectSetup {
- return {
- registerDecorator: (config) => this.decoratorRegistry.register(config),
- };
+export class SavedObjectsPublicPlugin implements Plugin<{}, {}, object, SavedObjectsStartDeps> {
+ public setup() {
+ return {};
}
public start(core: CoreStart, { data, dataViews }: SavedObjectsStartDeps) {
setStartServices(core);
- return {
- SavedObjectClass: createSavedObjectClass(
- {
- dataViews,
- savedObjectsClient: core.savedObjects.client,
- search: data.search,
- chrome: core.chrome,
- overlays: core.overlays,
- },
- core,
- this.decoratorRegistry
- ),
- };
+ return {};
}
}
diff --git a/src/plugins/saved_objects/public/saved_object/decorators/index.ts b/src/plugins/saved_objects/public/saved_object/decorators/index.ts
deleted file mode 100644
index 62f4f27bd2590..0000000000000
--- a/src/plugins/saved_objects/public/saved_object/decorators/index.ts
+++ /dev/null
@@ -1,12 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-export type { ISavedObjectDecoratorRegistry, SavedObjectDecoratorConfig } from './registry';
-export { SavedObjectDecoratorRegistry } from './registry';
-export type { SavedObjectDecorator, SavedObjectDecoratorFactory } from './types';
diff --git a/src/plugins/saved_objects/public/saved_object/decorators/registry.mock.ts b/src/plugins/saved_objects/public/saved_object/decorators/registry.mock.ts
deleted file mode 100644
index ad292b65e4e51..0000000000000
--- a/src/plugins/saved_objects/public/saved_object/decorators/registry.mock.ts
+++ /dev/null
@@ -1,25 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { ISavedObjectDecoratorRegistry } from './registry';
-
-const createRegistryMock = () => {
- const mock: jest.Mocked = {
- register: jest.fn(),
- getOrderedDecorators: jest.fn(),
- };
-
- mock.getOrderedDecorators.mockReturnValue([]);
-
- return mock;
-};
-
-export const savedObjectsDecoratorRegistryMock = {
- create: createRegistryMock,
-};
diff --git a/src/plugins/saved_objects/public/saved_object/decorators/registry.test.ts b/src/plugins/saved_objects/public/saved_object/decorators/registry.test.ts
deleted file mode 100644
index 590e2717c48ff..0000000000000
--- a/src/plugins/saved_objects/public/saved_object/decorators/registry.test.ts
+++ /dev/null
@@ -1,126 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObjectDecoratorRegistry } from './registry';
-
-const mockDecorator = (id: string = 'foo') => {
- return {
- getId: () => id,
- decorateConfig: () => undefined,
- decorateObject: () => undefined,
- };
-};
-
-describe('SavedObjectDecoratorRegistry', () => {
- let registry: SavedObjectDecoratorRegistry;
-
- beforeEach(() => {
- registry = new SavedObjectDecoratorRegistry();
- });
-
- describe('register', () => {
- it('allow to register a decorator', () => {
- expect(() => {
- registry.register({
- id: 'foo',
- priority: 9000,
- factory: () => mockDecorator(),
- });
- }).not.toThrow();
- });
-
- it('throws when trying to register the same id twice', () => {
- registry.register({
- id: 'foo',
- priority: 9000,
- factory: () => mockDecorator(),
- });
-
- expect(() => {
- registry.register({
- id: 'foo',
- priority: 42,
- factory: () => mockDecorator(),
- });
- }).toThrowErrorMatchingInlineSnapshot(`"A decorator is already registered for id foo"`);
- });
-
- it('throws when trying to register multiple decorators with the same priority', () => {
- registry.register({
- id: 'foo',
- priority: 100,
- factory: () => mockDecorator(),
- });
-
- expect(() => {
- registry.register({
- id: 'bar',
- priority: 100,
- factory: () => mockDecorator(),
- });
- }).toThrowErrorMatchingInlineSnapshot(`"A decorator is already registered for priority 100"`);
- });
- });
-
- describe('getOrderedDecorators', () => {
- it('returns the decorators in correct order', () => {
- registry.register({
- id: 'A',
- priority: 1000,
- factory: () => mockDecorator('A'),
- });
- registry.register({
- id: 'B',
- priority: 100,
- factory: () => mockDecorator('B'),
- });
- registry.register({
- id: 'C',
- priority: 2000,
- factory: () => mockDecorator('C'),
- });
-
- const decorators = registry.getOrderedDecorators({} as any);
- expect(decorators.map((d) => d.getId())).toEqual(['B', 'A', 'C']);
- });
-
- it('invoke the decorators factory with the provided services', () => {
- const services = Symbol('services');
-
- const decorator = {
- id: 'foo',
- priority: 9000,
- factory: jest.fn(),
- };
- registry.register(decorator);
- registry.getOrderedDecorators(services as any);
-
- expect(decorator.factory).toHaveBeenCalledTimes(1);
- expect(decorator.factory).toHaveBeenCalledWith(services);
- });
-
- it('invoke the factory each time the method is called', () => {
- const services = Symbol('services');
-
- const decorator = {
- id: 'foo',
- priority: 9000,
- factory: jest.fn(),
- };
- registry.register(decorator);
- registry.getOrderedDecorators(services as any);
-
- expect(decorator.factory).toHaveBeenCalledTimes(1);
-
- registry.getOrderedDecorators(services as any);
-
- expect(decorator.factory).toHaveBeenCalledTimes(2);
- });
- });
-});
diff --git a/src/plugins/saved_objects/public/saved_object/decorators/registry.ts b/src/plugins/saved_objects/public/saved_object/decorators/registry.ts
deleted file mode 100644
index 816ba2a84c1ae..0000000000000
--- a/src/plugins/saved_objects/public/saved_object/decorators/registry.ts
+++ /dev/null
@@ -1,50 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { PublicMethodsOf } from '@kbn/utility-types';
-import { SavedObjectDecoratorFactory } from './types';
-import { SavedObjectKibanaServices, SavedObject } from '../../types';
-
-export interface SavedObjectDecoratorConfig {
- /**
- * The id of the decorator
- */
- id: string;
- /**
- * Highest priority will be called **last**
- * (the decoration will be at the highest level)
- */
- priority: number;
- /**
- * The factory to use to create the decorator
- */
- factory: SavedObjectDecoratorFactory;
-}
-
-export type ISavedObjectDecoratorRegistry = PublicMethodsOf;
-
-export class SavedObjectDecoratorRegistry {
- private readonly registry = new Map>();
-
- public register(config: SavedObjectDecoratorConfig) {
- if (this.registry.has(config.id)) {
- throw new Error(`A decorator is already registered for id ${config.id}`);
- }
- if ([...this.registry.values()].find(({ priority }) => priority === config.priority)) {
- throw new Error(`A decorator is already registered for priority ${config.priority}`);
- }
- this.registry.set(config.id, config);
- }
-
- public getOrderedDecorators(services: SavedObjectKibanaServices) {
- return [...this.registry.values()]
- .sort((a, b) => a.priority - b.priority)
- .map(({ factory }) => factory(services));
- }
-}
diff --git a/src/plugins/saved_objects/public/saved_object/decorators/types.ts b/src/plugins/saved_objects/public/saved_object/decorators/types.ts
deleted file mode 100644
index 8f992a46a8fb9..0000000000000
--- a/src/plugins/saved_objects/public/saved_object/decorators/types.ts
+++ /dev/null
@@ -1,34 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObject, SavedObjectKibanaServices, SavedObjectConfig } from '../../types';
-
-export interface SavedObjectDecorator {
- /**
- * Id of the decorator
- */
- getId(): string;
-
- /**
- * Decorate the saved object provided config. This can be used to enhance or alter the object's provided
- * configuration.
- */
- decorateConfig: (config: SavedObjectConfig) => void;
- /**
- * Decorate the saved object instance. Can be used to add additional methods to it.
- *
- * @remarks This will be called before the internal constructor of the object, meaning that
- * wrapping existing methods is not possible (and is not a desired pattern).
- */
- decorateObject: (object: T) => void;
-}
-
-export type SavedObjectDecoratorFactory = (
- services: SavedObjectKibanaServices
-) => SavedObjectDecorator;
diff --git a/src/plugins/saved_objects/public/saved_object/helpers/build_saved_object.ts b/src/plugins/saved_objects/public/saved_object/helpers/build_saved_object.ts
deleted file mode 100644
index 388f84fcd524d..0000000000000
--- a/src/plugins/saved_objects/public/saved_object/helpers/build_saved_object.ts
+++ /dev/null
@@ -1,135 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { once } from 'lodash';
-import { hydrateIndexPattern } from './hydrate_index_pattern';
-import { intializeSavedObject } from './initialize_saved_object';
-import { serializeSavedObject } from './serialize_saved_object';
-
-import {
- EsResponse,
- SavedObject,
- SavedObjectConfig,
- SavedObjectKibanaServices,
- SavedObjectSaveOpts,
- StartServices,
-} from '../../types';
-import { applyESResp } from './apply_es_resp';
-import { saveSavedObject } from './save_saved_object';
-import { SavedObjectDecorator } from '../decorators';
-
-const applyDecorators = (
- object: SavedObject,
- config: SavedObjectConfig,
- decorators: SavedObjectDecorator[]
-) => {
- decorators.forEach((decorator) => {
- decorator.decorateConfig(config);
- decorator.decorateObject(object);
- });
-};
-
-export function buildSavedObject(
- savedObject: SavedObject,
- config: SavedObjectConfig,
- services: SavedObjectKibanaServices,
- startServices: StartServices,
- decorators: SavedObjectDecorator[] = []
-) {
- applyDecorators(savedObject, config, decorators);
-
- const { dataViews, savedObjectsClient } = services;
- // type name for this object, used as the ES-type
- const esType = config.type || '';
-
- savedObject.getDisplayName = () => esType;
-
- // NOTE: this.type (not set in this file, but somewhere else) is the sub type, e.g. 'area' or
- // 'data table', while esType is the more generic type - e.g. 'visualization' or 'saved search'.
- savedObject.getEsType = () => esType;
-
- /**
- * Flips to true during a save operation, and back to false once the save operation
- * completes.
- * @type {boolean}
- */
- savedObject.isSaving = false;
- savedObject.defaults = config.defaults || {};
- // optional search source which this object configures
- savedObject.searchSource = config.searchSource
- ? services.search.searchSource.createEmpty()
- : undefined;
- // the id of the document
- savedObject.id = config.id || void 0;
- // the migration version of the document, should only be set on imports
- savedObject.migrationVersion = config.migrationVersion;
- // Whether to create a copy when the object is saved. This should eventually go away
- // in favor of a better rename/save flow.
- savedObject.copyOnSave = false;
-
- /**
- * After creation or fetching from ES, ensure that the searchSources index indexPattern
- * is an bonafide IndexPattern object.
- *
- * @return {Promise}
- */
- savedObject.hydrateIndexPattern = (id?: string) =>
- hydrateIndexPattern(id || '', savedObject, dataViews, config);
- /**
- * Asynchronously initialize this object - will only run
- * once even if called multiple times.
- *
- * @return {Promise}
- * @resolved {SavedObject}
- */
- savedObject.init = once(() => intializeSavedObject(savedObject, savedObjectsClient, config));
-
- savedObject.applyESResp = (resp: EsResponse) => applyESResp(resp, savedObject, config, services);
-
- /**
- * Serialize this object
- * @return {Object}
- */
- savedObject._serialize = () => serializeSavedObject(savedObject, config);
-
- /**
- * Returns true if the object's original title has been changed. New objects return false.
- * @return {boolean}
- */
- savedObject.isTitleChanged = () =>
- savedObject._source && savedObject._source.title !== savedObject.title;
-
- savedObject.creationOpts = (opts: Record = {}) => ({
- id: savedObject.id,
- migrationVersion: savedObject.migrationVersion,
- ...opts,
- });
-
- savedObject.save = async (opts: SavedObjectSaveOpts) => {
- try {
- const result = await saveSavedObject(savedObject, config, opts, services, startServices);
- return Promise.resolve(result);
- } catch (e) {
- return Promise.reject(e);
- }
- };
-
- savedObject.destroy = () => {};
-
- /**
- * Delete this object from Elasticsearch
- * @return {promise}
- */
- savedObject.delete = () => {
- if (!savedObject.id) {
- return Promise.reject(new Error('Deleting a saved Object requires type and id'));
- }
- return savedObjectsClient.delete(esType, savedObject.id);
- };
-}
diff --git a/src/plugins/saved_objects/public/saved_object/index.ts b/src/plugins/saved_objects/public/saved_object/index.ts
index 89cfa263093b1..560178fdf4f36 100644
--- a/src/plugins/saved_objects/public/saved_object/index.ts
+++ b/src/plugins/saved_objects/public/saved_object/index.ts
@@ -7,13 +7,6 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-export { createSavedObjectClass } from './saved_object';
export { checkForDuplicateTitle } from './helpers/check_for_duplicate_title';
export { saveWithConfirmation } from './helpers/save_with_confirmation';
export { isErrorNonFatal } from './helpers/save_saved_object';
-export type {
- SavedObjectDecoratorFactory,
- SavedObjectDecorator,
- SavedObjectDecoratorConfig,
-} from './decorators';
-export { SavedObjectDecoratorRegistry } from './decorators';
diff --git a/src/plugins/saved_objects/public/saved_object/saved_object.test.ts b/src/plugins/saved_objects/public/saved_object/saved_object.test.ts
deleted file mode 100644
index 645ae855b277b..0000000000000
--- a/src/plugins/saved_objects/public/saved_object/saved_object.test.ts
+++ /dev/null
@@ -1,888 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { createSavedObjectClass } from './saved_object';
-import {
- SavedObject,
- SavedObjectConfig,
- SavedObjectKibanaServices,
- SavedObjectSaveOpts,
-} from '../types';
-import { SavedObjectDecorator } from './decorators';
-
-import {
- analyticsServiceMock,
- coreMock,
- i18nServiceMock,
- themeServiceMock,
-} from '@kbn/core/public/mocks';
-import { dataPluginMock, createSearchSourceMock } from '@kbn/data-plugin/public/mocks';
-import { createStubIndexPattern } from '@kbn/data-plugin/common/stubs';
-import { SavedObjectAttributes, SimpleSavedObject } from '@kbn/core/public';
-import { DataView } from '@kbn/data-plugin/common';
-import { savedObjectsDecoratorRegistryMock } from './decorators/registry.mock';
-
-describe('Saved Object', () => {
- const startMock = coreMock.createStart();
- const dataStartMock = dataPluginMock.createStartContract();
- const saveOptionsMock = {} as SavedObjectSaveOpts;
- const savedObjectsClientStub = startMock.savedObjects.client;
- const startServices = {
- analytics: analyticsServiceMock.createAnalyticsServiceStart(),
- i18n: i18nServiceMock.createStartContract(),
- theme: themeServiceMock.createStartContract(),
- };
- let decoratorRegistry: ReturnType;
-
- let SavedObjectClass: new (config: SavedObjectConfig) => SavedObject;
-
- /**
- * Returns a fake doc response with the given index and id, of type dashboard
- * that can be used to stub es calls.
- * @param indexPatternId
- * @param additionalOptions - object that will be assigned to the mocked doc response.
- * @returns {{attributes: {}, type: string, id: *, _version: string}}
- */
- function getMockedDocResponse(indexPatternId: string, additionalOptions = {}) {
- return {
- type: 'dashboard',
- id: indexPatternId,
- _version: 'foo',
- attributes: {},
- ...additionalOptions,
- } as SimpleSavedObject;
- }
-
- /**
- * Stubs some of the es retrieval calls so it returns the given response.
- * @param {Object} mockDocResponse
- */
- function stubESResponse(mockDocResponse: SimpleSavedObject) {
- // Stub out search for duplicate title:
- savedObjectsClientStub.get = jest.fn().mockReturnValue(Promise.resolve(mockDocResponse));
- savedObjectsClientStub.update = jest.fn().mockReturnValue(Promise.resolve(mockDocResponse));
-
- savedObjectsClientStub.find = jest
- .fn()
- .mockReturnValue(Promise.resolve({ savedObjects: [], total: 0 }));
-
- savedObjectsClientStub.bulkGet = jest
- .fn()
- .mockReturnValue(Promise.resolve({ savedObjects: [mockDocResponse] }));
- }
-
- function stubSavedObjectsClientCreate(
- resp: SimpleSavedObject | string,
- resolve = true
- ) {
- savedObjectsClientStub.create = jest
- .fn()
- .mockReturnValue(resolve ? Promise.resolve(resp) : Promise.reject(resp));
- }
-
- /**
- * Creates a new saved object with the given configuration and initializes it.
- * Returns the promise that will be completed when the initialization finishes.
- *
- * @param {Object} config
- * @returns {Promise} A promise that resolves with an instance of
- * SavedObject
- */
- function createInitializedSavedObject(config: SavedObjectConfig = { type: 'dashboard' }) {
- const savedObject = new SavedObjectClass(config);
- savedObject.title = 'my saved object';
-
- return savedObject.init!();
- }
-
- const initSavedObjectClass = () => {
- SavedObjectClass = createSavedObjectClass(
- {
- savedObjectsClient: savedObjectsClientStub,
- indexPatterns: dataStartMock.indexPatterns,
- search: {
- ...dataStartMock.search,
- searchSource: {
- ...dataStartMock.search.searchSource,
- create: createSearchSourceMock,
- createEmpty: createSearchSourceMock,
- },
- },
- } as unknown as SavedObjectKibanaServices,
- startServices,
- decoratorRegistry
- );
- };
-
- beforeEach(() => {
- decoratorRegistry = savedObjectsDecoratorRegistryMock.create();
- initSavedObjectClass();
- });
-
- describe('decorators', () => {
- it('calls the decorators during construct', () => {
- const decorA = {
- getId: () => 'A',
- decorateConfig: jest.fn(),
- decorateObject: jest.fn(),
- };
- const decorB = {
- getId: () => 'B',
- decorateConfig: jest.fn(),
- decorateObject: jest.fn(),
- };
-
- decoratorRegistry.getOrderedDecorators.mockReturnValue([decorA, decorB]);
-
- initSavedObjectClass();
- createInitializedSavedObject();
-
- expect(decorA.decorateConfig).toHaveBeenCalledTimes(1);
- expect(decorA.decorateObject).toHaveBeenCalledTimes(1);
- });
-
- it('calls the decorators in correct order', () => {
- const decorA = {
- getId: () => 'A',
- decorateConfig: jest.fn(),
- decorateObject: jest.fn(),
- };
- const decorB = {
- getId: () => 'B',
- decorateConfig: jest.fn(),
- decorateObject: jest.fn(),
- };
-
- decoratorRegistry.getOrderedDecorators.mockReturnValue([decorA, decorB]);
-
- initSavedObjectClass();
- createInitializedSavedObject();
-
- expect(decorA.decorateConfig.mock.invocationCallOrder[0]).toBeLessThan(
- decorB.decorateConfig.mock.invocationCallOrder[0]
- );
- expect(decorA.decorateObject.mock.invocationCallOrder[0]).toBeLessThan(
- decorB.decorateObject.mock.invocationCallOrder[0]
- );
- });
-
- it('passes the mutated config and object down the decorator chain', () => {
- expect.assertions(2);
-
- const newMappingValue = 'string';
- const newObjectMethod = jest.fn();
-
- const decorA: SavedObjectDecorator = {
- getId: () => 'A',
- decorateConfig: (config) => {
- config.mapping = {
- ...config.mapping,
- addedFromA: newMappingValue,
- };
- },
- decorateObject: (object) => {
- (object as any).newMethod = newObjectMethod;
- },
- };
- const decorB: SavedObjectDecorator = {
- getId: () => 'B',
- decorateConfig: (config) => {
- expect(config.mapping!.addedFromA).toBe(newMappingValue);
- },
- decorateObject: (object) => {
- expect((object as any).newMethod).toBe(newObjectMethod);
- },
- };
-
- decoratorRegistry.getOrderedDecorators.mockReturnValue([decorA, decorB]);
-
- initSavedObjectClass();
- createInitializedSavedObject();
- });
- });
-
- describe('save', () => {
- describe('with confirmOverwrite', () => {
- it('when false does not request overwrite', () => {
- stubESResponse(getMockedDocResponse('myId'));
-
- return createInitializedSavedObject({ type: 'dashboard', id: 'myId' }).then(
- (savedObject) => {
- stubSavedObjectsClientCreate({
- id: 'myId',
- } as SimpleSavedObject);
-
- return savedObject.save({ confirmOverwrite: false }).then(() => {
- expect(startMock.overlays.openModal).not.toHaveBeenCalled();
- });
- }
- );
- });
- });
-
- describe('with copyOnSave', () => {
- it('as true creates a copy on save success', () => {
- stubESResponse(getMockedDocResponse('myId'));
-
- return createInitializedSavedObject({ type: 'dashboard', id: 'myId' }).then(
- (savedObject) => {
- stubSavedObjectsClientCreate({
- type: 'dashboard',
- id: 'newUniqueId',
- } as SimpleSavedObject);
- savedObject.copyOnSave = true;
-
- return savedObject.save(saveOptionsMock).then((id) => {
- expect(id).toBe('newUniqueId');
- });
- }
- );
- });
-
- it('as true does not create a copy when save fails', () => {
- const originalId = 'id1';
- stubESResponse(getMockedDocResponse(originalId));
-
- return createInitializedSavedObject({ type: 'dashboard', id: originalId }).then(
- (savedObject) => {
- stubSavedObjectsClientCreate('simulated error', false);
- savedObject.copyOnSave = true;
-
- return savedObject
- .save(saveOptionsMock)
- .then(() => {
- expect(false).toBe(true);
- })
- .catch(() => {
- expect(savedObject.id).toBe(originalId);
- });
- }
- );
- });
-
- it('as false does not create a copy', () => {
- const myId = 'myId';
- stubESResponse(getMockedDocResponse(myId));
-
- return createInitializedSavedObject({ type: 'dashboard', id: myId }).then((savedObject) => {
- savedObjectsClientStub.create = jest.fn().mockImplementation(() => {
- expect(savedObject.id).toBe(myId);
- return Promise.resolve({ id: myId });
- });
- savedObject.copyOnSave = false;
-
- return savedObject.save(saveOptionsMock).then((id) => {
- expect(id).toBe(myId);
- });
- });
- });
- });
-
- it('returns id from server on success', () => {
- return createInitializedSavedObject({ type: 'dashboard' }).then((savedObject) => {
- stubESResponse(getMockedDocResponse('myId'));
- stubSavedObjectsClientCreate({
- type: 'dashboard',
- id: 'myId',
- _version: 'foo',
- } as SimpleSavedObject);
-
- return savedObject.save(saveOptionsMock).then((id) => {
- expect(id).toBe('myId');
- });
- });
- });
-
- describe('updates isSaving variable', () => {
- it('on success', () => {
- const id = 'id';
- stubESResponse(getMockedDocResponse(id));
-
- return createInitializedSavedObject({ type: 'dashboard', id }).then((savedObject) => {
- savedObjectsClientStub.create = jest.fn().mockImplementation(() => {
- expect(savedObject.isSaving).toBe(true);
- return Promise.resolve({
- type: 'dashboard',
- id,
- _version: 'foo',
- });
- });
-
- expect(savedObject.isSaving).toBe(false);
- return savedObject.save(saveOptionsMock).then(() => {
- expect(savedObject.isSaving).toBe(false);
- });
- });
- });
-
- it('on failure', () => {
- stubESResponse(getMockedDocResponse('id'));
- return createInitializedSavedObject({ type: 'dashboard' }).then((savedObject) => {
- savedObjectsClientStub.create = jest.fn().mockImplementation(() => {
- expect(savedObject.isSaving).toBe(true);
- return Promise.reject('');
- });
-
- expect(savedObject.isSaving).toBe(false);
- return savedObject.save(saveOptionsMock).catch(() => {
- expect(savedObject.isSaving).toBe(false);
- });
- });
- });
- });
-
- describe('to extract references', () => {
- it('when "extractReferences" function when passed in', async () => {
- const id = '123';
- stubESResponse(getMockedDocResponse(id));
- const extractReferences: SavedObjectConfig['extractReferences'] = ({
- attributes,
- references,
- }) => {
- references.push({
- name: 'test',
- type: 'index-pattern',
- id: 'my-index',
- });
- return { attributes, references };
- };
- return createInitializedSavedObject({ type: 'dashboard', extractReferences }).then(
- (savedObject) => {
- stubSavedObjectsClientCreate({
- id,
- _version: 'foo',
- type: 'dashboard',
- } as SimpleSavedObject);
-
- return savedObject.save(saveOptionsMock).then(() => {
- const { references } = (savedObjectsClientStub.create as jest.Mock).mock.calls[0][2];
- expect(references).toHaveLength(1);
- expect(references[0]).toEqual({
- name: 'test',
- type: 'index-pattern',
- id: 'my-index',
- });
- });
- }
- );
- });
-
- it('when search source references saved object', () => {
- const id = '123';
- stubESResponse(getMockedDocResponse(id));
- return createInitializedSavedObject({ type: 'dashboard', searchSource: true }).then(
- (savedObject) => {
- stubSavedObjectsClientCreate({
- id,
- _version: '2',
- type: 'dashboard',
- } as SimpleSavedObject);
-
- const indexPattern = createStubIndexPattern({
- spec: { id: 'my-index', title: 'my-index', version: '1' },
- });
- savedObject.searchSource!.setField('index', indexPattern);
- return savedObject.save(saveOptionsMock).then(() => {
- const args = (savedObjectsClientStub.create as jest.Mock).mock.calls[0];
- expect(args[1]).toEqual({
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- indexRefName: 'kibanaSavedObjectMeta.searchSourceJSON.index',
- }),
- },
- });
-
- expect(args[2].references).toHaveLength(1);
- expect(args[2].references[0]).toEqual({
- name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
- type: 'index-pattern',
- id: 'my-index',
- });
- });
- }
- );
- });
-
- it('when index in searchSourceJSON is not found', () => {
- const id = '123';
- stubESResponse(getMockedDocResponse(id));
- return createInitializedSavedObject({ type: 'dashboard', searchSource: true }).then(
- (savedObject) => {
- stubSavedObjectsClientCreate({
- id,
- _version: '2',
- type: 'dashboard',
- } as SimpleSavedObject);
-
- const indexPattern = createStubIndexPattern({
- spec: {
- id: 'non-existant-index',
- version: '1',
- },
- });
-
- savedObject.searchSource!.setField('index', indexPattern);
- return savedObject.save(saveOptionsMock).then(() => {
- const args = (savedObjectsClientStub.create as jest.Mock).mock.calls[0];
- expect(args[1]).toEqual({
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- indexRefName: 'kibanaSavedObjectMeta.searchSourceJSON.index',
- }),
- },
- });
- expect(args[2].references).toHaveLength(1);
- expect(args[2].references[0]).toEqual({
- name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
- type: 'index-pattern',
- id: 'non-existant-index',
- });
- });
- }
- );
- });
-
- it('when indexes exists in filter of searchSourceJSON', () => {
- const id = '123';
- stubESResponse(getMockedDocResponse(id));
- return createInitializedSavedObject({ type: 'dashboard', searchSource: true }).then(
- (savedObject) => {
- stubSavedObjectsClientCreate({
- id,
- _version: '2',
- type: 'dashboard',
- } as SimpleSavedObject);
-
- savedObject.searchSource!.setField('filter', [
- {
- meta: {
- index: 'my-index',
- },
- },
- ] as any);
- return savedObject.save(saveOptionsMock).then(() => {
- const args = (savedObjectsClientStub.create as jest.Mock).mock.calls[0];
- expect(args[1]).toEqual({
- kibanaSavedObjectMeta: {
- searchSourceJSON: JSON.stringify({
- filter: [
- {
- meta: {
- indexRefName:
- 'kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index',
- },
- },
- ],
- }),
- },
- });
- expect(args[2].references).toHaveLength(1);
- expect(args[2].references[0]).toEqual({
- name: 'kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index',
- type: 'index-pattern',
- id: 'my-index',
- });
- });
- }
- );
- });
- });
- });
-
- describe('applyESResp', () => {
- it('throws error if not found', () => {
- return createInitializedSavedObject({ type: 'dashboard' }).then((savedObject) => {
- const response = { _source: {} };
- try {
- savedObject.applyESResp(response);
- expect(true).toBe(false);
- } catch (err) {
- expect(!!err).toBe(true);
- }
- });
- });
-
- it('preserves original defaults if not overridden', () => {
- const id = 'anid';
- const preserveMeValue = 'here to stay!';
- const config = {
- defaults: {
- preserveMe: preserveMeValue,
- },
- type: 'dashboard',
- id,
- };
-
- const mockDocResponse = getMockedDocResponse(id);
- stubESResponse(mockDocResponse);
-
- const savedObject = new SavedObjectClass(config);
- return savedObject.init!()
- .then(() => {
- expect(savedObject._source.preserveMe).toEqual(preserveMeValue);
- const response = { found: true, _source: {} };
- return savedObject.applyESResp(response);
- })
- .then(() => {
- expect(savedObject._source.preserveMe).toEqual(preserveMeValue);
- });
- });
-
- it('overrides defaults', () => {
- const id = 'anid';
- const config = {
- defaults: {
- flower: 'rose',
- },
- type: 'dashboard',
- id,
- };
-
- stubESResponse(getMockedDocResponse(id));
-
- const savedObject = new SavedObjectClass(config);
- return savedObject.init!()
- .then(() => {
- expect(savedObject._source.flower).toEqual('rose');
- const response = {
- found: true,
- _source: {
- flower: 'orchid',
- },
- };
- return savedObject.applyESResp(response);
- })
- .then(() => {
- expect(savedObject._source.flower).toEqual('orchid');
- });
- });
-
- it('overrides previous _source and default values', () => {
- const id = 'anid';
- const config = {
- defaults: {
- dinosaurs: {
- tRex: 'is the scariest',
- },
- },
- type: 'dashboard',
- id,
- };
-
- const mockDocResponse = getMockedDocResponse(id, {
- attributes: { dinosaurs: { tRex: 'is not so bad' } },
- });
- stubESResponse(mockDocResponse);
-
- const savedObject = new SavedObjectClass(config);
- return savedObject.init!()
- .then(() => {
- const response = {
- found: true,
- _source: { dinosaurs: { tRex: 'has big teeth' } },
- };
-
- return savedObject.applyESResp(response);
- })
- .then(() => {
- expect((savedObject._source as any).dinosaurs.tRex).toEqual('has big teeth');
- });
- });
-
- it('does not inject references when references array is missing', async () => {
- const injectReferences = jest.fn();
- const config = {
- type: 'dashboard',
- injectReferences,
- };
- const savedObject = new SavedObjectClass(config);
- return savedObject.init!()
- .then(() => {
- const response = {
- found: true,
- _source: {
- dinosaurs: { tRex: 'has big teeth' },
- },
- };
- return savedObject.applyESResp(response);
- })
- .then(() => {
- expect(injectReferences).not.toHaveBeenCalled();
- });
- });
-
- it('does not inject references when references array is empty', async () => {
- const injectReferences = jest.fn();
- const config = {
- type: 'dashboard',
- injectReferences,
- };
- const savedObject = new SavedObjectClass(config);
- return savedObject.init!()
- .then(() => {
- const response = {
- found: true,
- _source: {
- dinosaurs: { tRex: 'has big teeth' },
- },
- references: [],
- };
- return savedObject.applyESResp(response);
- })
- .then(() => {
- expect(injectReferences).not.toHaveBeenCalled();
- });
- });
-
- it('injects references when function is provided and references exist', async () => {
- const injectReferences = jest.fn();
- const config = {
- type: 'dashboard',
- injectReferences,
- };
- const savedObject = new SavedObjectClass(config);
- return savedObject.init!()
- .then(() => {
- const response = {
- found: true,
- _source: {
- dinosaurs: { tRex: 'has big teeth' },
- },
- references: [{}],
- };
- return savedObject.applyESResp(response);
- })
- .then(() => {
- expect(injectReferences).toHaveBeenCalledTimes(1);
- });
- });
-
- it('passes references to search source parsing function', async () => {
- SavedObjectClass = createSavedObjectClass(
- {
- savedObjectsClient: savedObjectsClientStub,
- indexPatterns: dataStartMock.indexPatterns,
- search: {
- ...dataStartMock.search,
- },
- } as unknown as SavedObjectKibanaServices,
- startServices,
- decoratorRegistry
- );
- const savedObject = new SavedObjectClass({ type: 'dashboard', searchSource: true });
- return savedObject.init!().then(async () => {
- const searchSourceJSON = JSON.stringify({
- indexRefName: 'kibanaSavedObjectMeta.searchSourceJSON.index',
- filter: [
- {
- meta: {
- indexRefName: 'kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index',
- },
- },
- ],
- });
- const response = {
- found: true,
- _source: {
- kibanaSavedObjectMeta: {
- searchSourceJSON,
- },
- },
- references: [
- {
- name: 'kibanaSavedObjectMeta.searchSourceJSON.index',
- type: 'index-pattern',
- id: 'my-index-1',
- },
- {
- name: 'kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index',
- type: 'index-pattern',
- id: 'my-index-2',
- },
- ],
- };
- await savedObject.applyESResp(response);
- expect(dataStartMock.search.searchSource.create).toBeCalledWith({
- filter: [{ meta: { index: 'my-index-2' } }],
- index: 'my-index-1',
- });
- });
- });
- });
-
- describe('config', () => {
- it('afterESResp is called', () => {
- const afterESRespCallback = jest.fn();
- const config = {
- type: 'dashboard',
- afterESResp: afterESRespCallback,
- };
-
- return createInitializedSavedObject(config).then(() => {
- expect(afterESRespCallback).toHaveBeenCalled();
- });
- });
-
- describe('searchSource', () => {
- it('when true, creates index', () => {
- const indexPatternId = 'testIndexPattern';
- const afterESRespCallback = jest.fn();
-
- const config: SavedObjectConfig = {
- type: 'dashboard',
- afterESResp: afterESRespCallback,
- searchSource: true,
- indexPattern: { id: indexPatternId } as DataView,
- };
-
- stubESResponse(
- getMockedDocResponse(indexPatternId, {
- attributes: {
- title: 'testIndexPattern',
- },
- })
- );
-
- const savedObject = new SavedObjectClass(config);
- savedObject.hydrateIndexPattern = jest.fn().mockImplementation(() => {
- const indexPattern = createStubIndexPattern({
- spec: {
- id: indexPatternId,
- title: indexPatternId,
- },
- });
- savedObject.searchSource!.setField('index', indexPattern);
- return Promise.resolve(indexPattern);
- });
- expect(!!savedObject.searchSource!.getField('index')).toBe(false);
-
- return savedObject.init!().then(() => {
- expect(afterESRespCallback).toHaveBeenCalled();
- const index = savedObject.searchSource!.getField('index');
- expect(index instanceof DataView).toBe(true);
- expect(index!.id).toEqual(indexPatternId);
- });
- });
-
- it('when false, does not create index', () => {
- const indexPatternId = 'testIndexPattern';
- const afterESRespCallback = jest.fn();
-
- const config: SavedObjectConfig = {
- type: 'dashboard',
- afterESResp: afterESRespCallback,
- searchSource: false,
- indexPattern: { id: indexPatternId } as DataView,
- };
-
- stubESResponse(getMockedDocResponse(indexPatternId));
-
- const savedObject = new SavedObjectClass(config);
- expect(!!savedObject.searchSource).toBe(false);
-
- return savedObject.init!().then(() => {
- expect(afterESRespCallback).toHaveBeenCalled();
- expect(!!savedObject.searchSource).toBe(false);
- });
- });
- });
-
- describe('type', () => {
- it('that is not specified throws an error', (done) => {
- const config = {};
-
- const savedObject = new SavedObjectClass(config);
- savedObject.init!().catch(() => {
- done();
- });
- });
-
- it('that is invalid invalid throws an error', () => {
- const config = { type: 'notypeexists' };
-
- const savedObject = new SavedObjectClass(config);
- try {
- savedObject.init!();
- expect(false).toBe(true);
- } catch (err) {
- expect(err).not.toBeNull();
- }
- });
-
- it('that is valid passes', () => {
- const config = { type: 'dashboard' };
- return new SavedObjectClass(config).init!();
- });
- });
-
- describe('defaults', () => {
- function getTestDefaultConfig(extraOptions: object = {}) {
- return {
- defaults: { testDefault: 'hi' },
- type: 'dashboard',
- ...extraOptions,
- };
- }
-
- function expectDefaultApplied(config: SavedObjectConfig) {
- return createInitializedSavedObject(config).then((savedObject) => {
- expect(savedObject.defaults).toBe(config.defaults);
- });
- }
-
- describe('applied to object when id', () => {
- it('is not specified', () => {
- expectDefaultApplied(getTestDefaultConfig());
- });
-
- it('is undefined', () => {
- expectDefaultApplied(getTestDefaultConfig({ id: undefined }));
- });
-
- it('is 0', () => {
- expectDefaultApplied(getTestDefaultConfig({ id: 0 }));
- });
-
- it('is false', () => {
- expectDefaultApplied(getTestDefaultConfig({ id: false }));
- });
- });
-
- it('applied to source if an id is given', () => {
- const myId = 'myid';
- const customDefault = 'hi';
- const initialOverwriteMeValue = 'this should get overwritten by the server response';
-
- const config = {
- defaults: {
- overwriteMe: initialOverwriteMeValue,
- customDefault,
- },
- type: 'dashboard',
- id: myId,
- };
-
- const serverValue = 'this should override the initial default value given';
-
- const mockDocResponse = getMockedDocResponse(myId, {
- attributes: { overwriteMe: serverValue },
- });
-
- stubESResponse(mockDocResponse);
-
- return createInitializedSavedObject(config).then((savedObject) => {
- expect(!!savedObject._source).toBe(true);
- expect(savedObject.defaults).toBe(config.defaults);
- expect(savedObject._source.overwriteMe).toBe(serverValue);
- expect(savedObject._source.customDefault).toBe(customDefault);
- });
- });
- });
- });
-});
diff --git a/src/plugins/saved_objects/public/saved_object/saved_object.ts b/src/plugins/saved_objects/public/saved_object/saved_object.ts
deleted file mode 100644
index cb83021582b2e..0000000000000
--- a/src/plugins/saved_objects/public/saved_object/saved_object.ts
+++ /dev/null
@@ -1,51 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-/**
- * @name SavedObject
- *
- * NOTE: SavedObject seems to track a reference to an object in ES,
- * and surface methods for CRUD functionality (save and delete). This seems
- * similar to how Backbone Models work.
- *
- * This class seems to interface with ES primarily through the es Angular
- * service and the saved object api.
- */
-import { SavedObject, SavedObjectConfig, SavedObjectKibanaServices, StartServices } from '../types';
-import { ISavedObjectDecoratorRegistry } from './decorators';
-import { buildSavedObject } from './helpers/build_saved_object';
-
-export function createSavedObjectClass(
- services: SavedObjectKibanaServices,
- startServices: StartServices,
- decoratorRegistry: ISavedObjectDecoratorRegistry
-) {
- /**
- * The SavedObject class is a base class for saved objects loaded from the server and
- * provides additional functionality besides loading/saving/deleting/etc.
- *
- * It is overloaded and configured to provide type-aware functionality.
- * @param {*} config
- */
- class SavedObjectClass {
- constructor(config: SavedObjectConfig = {}) {
- // @ts-ignore
- const self: SavedObject = this;
- buildSavedObject(
- self,
- config,
- services,
- startServices,
- decoratorRegistry.getOrderedDecorators(services)
- );
- }
- }
-
- return SavedObjectClass as new (config: SavedObjectConfig) => SavedObject;
-}
diff --git a/src/plugins/saved_objects/tsconfig.json b/src/plugins/saved_objects/tsconfig.json
index 4dbced6ac31a7..ccec7b43ad9f1 100644
--- a/src/plugins/saved_objects/tsconfig.json
+++ b/src/plugins/saved_objects/tsconfig.json
@@ -11,7 +11,6 @@
"@kbn/i18n",
"@kbn/data-views-plugin",
"@kbn/i18n-react",
- "@kbn/utility-types",
"@kbn/ui-theme",
"@kbn/react-kibana-mount",
"@kbn/test-jest-helpers",
diff --git a/src/plugins/saved_objects_tagging_oss/public/api.mock.ts b/src/plugins/saved_objects_tagging_oss/public/api.mock.ts
index 09655c6d28108..07539956c1485 100644
--- a/src/plugins/saved_objects_tagging_oss/public/api.mock.ts
+++ b/src/plugins/saved_objects_tagging_oss/public/api.mock.ts
@@ -55,8 +55,6 @@ type SavedObjectsTaggingApiUiMock = Omit,
const createApiUiMock = () => {
const mock: SavedObjectsTaggingApiUiMock = {
components: createApiUiComponentsMock(),
- // TS is very picky with type guards
- hasTagDecoration: jest.fn() as any,
getSearchBarFilter: jest.fn(),
getTableColumnDefinition: jest.fn(),
convertNameToReference: jest.fn(),
diff --git a/src/plugins/saved_objects_tagging_oss/public/api.ts b/src/plugins/saved_objects_tagging_oss/public/api.ts
index f211250532094..fa7f3665ac023 100644
--- a/src/plugins/saved_objects_tagging_oss/public/api.ts
+++ b/src/plugins/saved_objects_tagging_oss/public/api.ts
@@ -12,8 +12,6 @@ import { SearchFilterConfig, EuiTableFieldDataColumnType, EuiComboBoxProps } fro
import type { FunctionComponent } from 'react';
import { SavedObject, SavedObjectReference } from '@kbn/core/types';
import { SavedObjectsFindOptionsReference } from '@kbn/core/public';
-import { SavedObject as SavedObjectClass } from '@kbn/saved-objects-plugin/public';
-import { TagDecoratedSavedObject } from './decorator';
import { ITagsClient, Tag, TagWithOptionalId } from '../common';
/**
@@ -50,11 +48,6 @@ export interface ITagsCache {
getState$(params?: { waitForInitialization?: boolean }): Observable;
}
-/**
- * @public
- */
-export type SavedObjectTagDecoratorTypeGuard = SavedObjectsTaggingApiUi['hasTagDecoration'];
-
/**
* React components and utility methods to use the SO tagging feature
*
@@ -72,13 +65,6 @@ export interface SavedObjectsTaggingApiUi {
*/
getTagList(): Tag[];
- /**
- * Type-guard to safely manipulate tag-enhanced `SavedObject` from the `savedObject` plugin.
- *
- * @param object
- */
- hasTagDecoration(object: SavedObjectClass): object is TagDecoratedSavedObject;
-
/**
* Return a filter that can be used to filter by tag with `EuiSearchBar` or EUI tables using `EuiSearchBar`.
*
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.test.mocks.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.test.mocks.ts
deleted file mode 100644
index 5ca655b8a667d..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.test.mocks.ts
+++ /dev/null
@@ -1,18 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-export const injectTagReferencesMock = jest.fn();
-jest.doMock('./inject_tag_references', () => ({
- injectTagReferences: injectTagReferencesMock,
-}));
-
-export const extractTagReferencesMock = jest.fn();
-jest.doMock('./extract_tag_references', () => ({
- extractTagReferences: extractTagReferencesMock,
-}));
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.test.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.test.ts
deleted file mode 100644
index 37536804e6c87..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.test.ts
+++ /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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { extractTagReferencesMock, injectTagReferencesMock } from './decorate_config.test.mocks';
-
-import { SavedObjectConfig } from '@kbn/saved-objects-plugin/public';
-import { decorateConfig } from './decorate_config';
-
-describe('decorateConfig', () => {
- afterEach(() => {
- extractTagReferencesMock.mockReset();
- injectTagReferencesMock.mockReset();
- });
-
- describe('mapping', () => {
- it('adds the `__tags` key to the config mapping', () => {
- const config: SavedObjectConfig = {
- mapping: {
- someText: 'text',
- someNum: 'number',
- },
- };
-
- decorateConfig(config);
-
- expect(config.mapping).toEqual({
- __tags: 'text',
- someText: 'text',
- someNum: 'number',
- });
- });
-
- it('adds mapping to the config if missing', () => {
- const config: SavedObjectConfig = {};
-
- decorateConfig(config);
-
- expect(config.mapping).toEqual({
- __tags: 'text',
- });
- });
- });
-
- describe('injectReferences', () => {
- it('decorates to only call `injectTagReferences` when not present on the config', () => {
- const config: SavedObjectConfig = {};
-
- decorateConfig(config);
-
- const object: any = Symbol('object');
- const references: any = Symbol('referebces');
-
- config.injectReferences!(object, references);
-
- expect(injectTagReferencesMock).toHaveBeenCalledTimes(1);
- expect(injectTagReferencesMock).toHaveBeenCalledWith(object, references);
- });
-
- it('decorates to call both functions when present on the config', () => {
- const initialInjectReferences = jest.fn();
-
- const config: SavedObjectConfig = {
- injectReferences: initialInjectReferences,
- };
-
- decorateConfig(config);
-
- const object: any = Symbol('object');
- const references: any = Symbol('references');
-
- config.injectReferences!(object, references);
-
- expect(initialInjectReferences).toHaveBeenCalledTimes(1);
- expect(initialInjectReferences).toHaveBeenCalledWith(object, references);
-
- expect(injectTagReferencesMock).toHaveBeenCalledTimes(1);
- expect(injectTagReferencesMock).toHaveBeenCalledWith(object, references);
- });
- });
-
- describe('extractReferences', () => {
- it('decorates to only call `extractTagReference` when not present on the config', () => {
- const config: SavedObjectConfig = {};
-
- decorateConfig(config);
-
- const params: any = Symbol('params');
- const expectedReturn = Symbol('return-from-extractTagReferences');
-
- extractTagReferencesMock.mockReturnValue(expectedReturn);
-
- const result = config.extractReferences!(params);
-
- expect(result).toBe(expectedReturn);
-
- expect(extractTagReferencesMock).toHaveBeenCalledTimes(1);
- expect(extractTagReferencesMock).toHaveBeenCalledWith(params);
- });
-
- it('decorates to call both functions in order when present on the config', () => {
- const initialExtractReferences = jest.fn();
-
- const config: SavedObjectConfig = {
- extractReferences: initialExtractReferences,
- };
-
- decorateConfig(config);
-
- const params: any = Symbol('initial-params');
- const initialReturn = Symbol('return-from-initial-extractReferences');
- const tagReturn = Symbol('return-from-extractTagReferences');
-
- initialExtractReferences.mockReturnValue(initialReturn);
- extractTagReferencesMock.mockReturnValue(tagReturn);
-
- const result = config.extractReferences!(params);
-
- expect(initialExtractReferences).toHaveBeenCalledTimes(1);
- expect(initialExtractReferences).toHaveBeenCalledWith(params);
-
- expect(extractTagReferencesMock).toHaveBeenCalledTimes(1);
- expect(extractTagReferencesMock).toHaveBeenCalledWith(initialReturn);
-
- expect(result).toBe(tagReturn);
- });
- });
-});
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.ts
deleted file mode 100644
index 8cdb6a4229d44..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_config.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObjectConfig } from '@kbn/saved-objects-plugin/public';
-import { injectTagReferences } from './inject_tag_references';
-import { extractTagReferences } from './extract_tag_references';
-
-export const decorateConfig = (config: SavedObjectConfig) => {
- config.mapping = {
- ...config.mapping,
- __tags: 'text',
- };
-
- const initialExtractReferences = config.extractReferences;
- const initialInjectReferences = config.injectReferences;
-
- config.injectReferences = (object, references) => {
- if (initialInjectReferences) {
- initialInjectReferences(object, references);
- }
- injectTagReferences(object, references);
- };
-
- config.extractReferences = (attrsAndRefs) => {
- if (initialExtractReferences) {
- attrsAndRefs = initialExtractReferences(attrsAndRefs);
- }
- return extractTagReferences(attrsAndRefs);
- };
-};
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_object.test.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_object.test.ts
deleted file mode 100644
index a997e7c2591a3..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_object.test.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { InternalTagDecoratedSavedObject } from './types';
-import { decorateObject } from './decorate_object';
-
-const createObject = (): InternalTagDecoratedSavedObject => {
- // we really just need TS not to complain here.
- return {} as InternalTagDecoratedSavedObject;
-};
-
-describe('decorateObject', () => {
- it('adds the `getTags` method', () => {
- const object = createObject();
- object.__tags = ['foo', 'bar'];
-
- decorateObject(object);
-
- expect(object.getTags).toBeDefined();
- expect(object.getTags()).toEqual(['foo', 'bar']);
- });
-
- it('adds the `setTags` method', () => {
- const object = createObject();
- object.__tags = ['foo', 'bar'];
-
- decorateObject(object);
-
- expect(object.setTags).toBeDefined();
-
- object.setTags(['hello', 'dolly']);
-
- expect(object.getTags()).toEqual(['hello', 'dolly']);
- });
-});
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_object.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_object.ts
deleted file mode 100644
index 0c03863b55ea9..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/decorate_object.ts
+++ /dev/null
@@ -1,22 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { InternalTagDecoratedSavedObject } from './types';
-
-/**
- * Enhance the object with tag accessors
- */
-export const decorateObject = (object: InternalTagDecoratedSavedObject) => {
- object.getTags = () => {
- return object.__tags ?? [];
- };
- object.setTags = (tagIds) => {
- object.__tags = tagIds;
- };
-};
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts
deleted file mode 100644
index 2ac4c4d0db8c2..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts
+++ /dev/null
@@ -1,101 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObjectReference } from '@kbn/core/public';
-import { extractTagReferences } from './extract_tag_references';
-
-const ref = (type: string, id: string, name = `ref-to-${type}-${id}`): SavedObjectReference => ({
- id,
- type,
- name,
-});
-
-const tagRef = (id: string): SavedObjectReference => ref('tag', id, `tag-${id}`);
-
-describe('extractTagReferences', () => {
- it('generate tag references from the attributes', () => {
- const attributes = {
- __tags: ['tag-id-1', 'tag-id-2'],
- };
- const references: SavedObjectReference[] = [];
-
- const { references: resultRefs } = extractTagReferences({
- attributes,
- references,
- });
-
- expect(resultRefs).toEqual([tagRef('tag-id-1'), tagRef('tag-id-2')]);
- });
-
- it('removes the `__tag` property from the attributes', () => {
- const attributes = {
- someString: 'foo',
- someNumber: 42,
- __tags: ['tag-id-1', 'tag-id-2'],
- };
- const references: SavedObjectReference[] = [];
-
- const { attributes: resultAttrs } = extractTagReferences({
- attributes,
- references,
- });
-
- expect(resultAttrs).toEqual({ someString: 'foo', someNumber: 42 });
- });
-
- it('preserves the other references', () => {
- const attributes = {
- __tags: ['tag-id-1'],
- };
-
- const refA = ref('dashboard', 'dash-1');
- const refB = ref('visualization', 'vis-1');
-
- const { references: resultRefs } = extractTagReferences({
- attributes,
- references: [refA, refB],
- });
-
- expect(resultRefs).toEqual([refA, refB, tagRef('tag-id-1')]);
- });
-
- it('does not fail if `attributes` does not contain `__tags`', () => {
- const attributes = {
- someString: 'foo',
- someNumber: 42,
- };
-
- const refA = ref('dashboard', 'dash-1');
- const refB = ref('visualization', 'vis-1');
-
- const { attributes: resultAttrs, references: resultRefs } = extractTagReferences({
- attributes,
- references: [refA, refB],
- });
-
- expect(resultRefs).toEqual([refA, refB]);
- expect(resultAttrs).toEqual({ someString: 'foo', someNumber: 42 });
- });
-
- it('removes duplicated tags', () => {
- const attributes = {
- __tags: ['tag-id-1', 'tag-id-1', 'tag-id-1', 'tag-id-1', 'tag-id-2'],
- };
-
- const { references: resultRefs } = extractTagReferences({
- attributes,
- references: [] as SavedObjectReference[],
- });
-
- expect(resultRefs).toEqual([
- { id: 'tag-id-1', name: 'tag-tag-id-1', type: 'tag' },
- { id: 'tag-id-2', name: 'tag-tag-id-2', type: 'tag' },
- ]);
- });
-});
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.ts
deleted file mode 100644
index 35ee2a75a8803..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.ts
+++ /dev/null
@@ -1,34 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObjectConfig } from '@kbn/saved-objects-plugin/public';
-
-/**
- * Extract the tag references from the object's attribute
- *
- * (`extractReferences` is used when persisting the saved object to the backend)
- */
-export const extractTagReferences: Required['extractReferences'] = ({
- attributes,
- references,
-}) => {
- const { __tags, ...otherAttributes } = attributes;
- const tags = [...new Set(__tags as string[])] ?? [];
- return {
- attributes: otherAttributes,
- references: [
- ...references,
- ...tags.map((tagId) => ({
- id: tagId,
- type: 'tag',
- name: `tag-${tagId}`,
- })),
- ],
- };
-};
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/factory.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/factory.ts
deleted file mode 100644
index 003fa5c626b09..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/factory.ts
+++ /dev/null
@@ -1,25 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObjectDecoratorFactory } from '@kbn/saved-objects-plugin/public';
-import { InternalTagDecoratedSavedObject } from './types';
-import { decorateConfig } from './decorate_config';
-import { decorateObject } from './decorate_object';
-
-export const decoratorId = 'tag';
-
-export const tagDecoratorFactory: SavedObjectDecoratorFactory<
- InternalTagDecoratedSavedObject
-> = () => {
- return {
- getId: () => decoratorId,
- decorateConfig,
- decorateObject,
- };
-};
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/index.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/index.ts
deleted file mode 100644
index e2c9f0dcf14cf..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/index.ts
+++ /dev/null
@@ -1,20 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObjectDecoratorConfig } from '@kbn/saved-objects-plugin/public';
-import { tagDecoratorFactory, decoratorId } from './factory';
-import { InternalTagDecoratedSavedObject } from './types';
-
-export type { TagDecoratedSavedObject } from './types';
-
-export const tagDecoratorConfig: SavedObjectDecoratorConfig = {
- id: decoratorId,
- priority: 100,
- factory: tagDecoratorFactory,
-};
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.test.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.test.ts
deleted file mode 100644
index 2eb3db3937b86..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.test.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObjectReference } from '@kbn/core/public';
-import { injectTagReferences } from './inject_tag_references';
-import { InternalTagDecoratedSavedObject } from './types';
-
-const ref = (type: string, id: string): SavedObjectReference => ({
- id,
- type,
- name: `ref-to-${type}-${id}`,
-});
-
-const tagRef = (id: string) => ref('tag', id);
-
-const createObject = (): InternalTagDecoratedSavedObject => {
- // we really just need TS not to complain here.
- return {} as InternalTagDecoratedSavedObject;
-};
-
-describe('injectTagReferences', () => {
- let object: InternalTagDecoratedSavedObject;
-
- beforeEach(() => {
- object = createObject();
- });
-
- it('injects the `tag` references to the `__tags` field', () => {
- const references = [tagRef('tag-id-1'), tagRef('tag-id-2')];
-
- injectTagReferences(object, references);
-
- expect(object.__tags).toEqual(['tag-id-1', 'tag-id-2']);
- });
-
- it('only process the tag references', () => {
- const references = [
- tagRef('tag-id-1'),
- ref('dashboard', 'foo'),
- tagRef('tag-id-2'),
- ref('dashboard', 'baz'),
- ];
-
- injectTagReferences(object, references);
-
- expect(object.__tags).toEqual(['tag-id-1', 'tag-id-2']);
- });
-
- it('injects an empty list when not tag references are present', () => {
- injectTagReferences(object, [ref('dashboard', 'foo'), ref('dashboard', 'baz')]);
-
- expect(object.__tags).toEqual([]);
- });
-});
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.ts
deleted file mode 100644
index fd550a81837f9..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.ts
+++ /dev/null
@@ -1,25 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObjectConfig } from '@kbn/saved-objects-plugin/public';
-import { InternalTagDecoratedSavedObject } from './types';
-
-/**
- * Inject the tags back into the object's references
- *
- * (`injectReferences`) is used when fetching the object from the backend
- */
-export const injectTagReferences: Required['injectReferences'] = (
- object,
- references = []
-) => {
- (object as unknown as InternalTagDecoratedSavedObject).__tags = references
- .filter(({ type }) => type === 'tag')
- .map(({ id }) => id);
-};
diff --git a/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts b/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts
deleted file mode 100644
index b50f1b183ae39..0000000000000
--- a/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts
+++ /dev/null
@@ -1,25 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-import { SavedObject } from '@kbn/saved-objects-plugin/public';
-
-/**
- * @public
- */
-export type TagDecoratedSavedObject = SavedObject & {
- getTags(): string[];
- setTags(tags: string[]): void;
-};
-
-/**
- * @internal
- */
-export type InternalTagDecoratedSavedObject = TagDecoratedSavedObject & {
- __tags: string[];
-};
diff --git a/src/plugins/saved_objects_tagging_oss/public/index.ts b/src/plugins/saved_objects_tagging_oss/public/index.ts
index 58dce1bd20842..b754d763427c8 100644
--- a/src/plugins/saved_objects_tagging_oss/public/index.ts
+++ b/src/plugins/saved_objects_tagging_oss/public/index.ts
@@ -23,11 +23,8 @@ export type {
ParsedSearchQuery,
ParseSearchQueryOptions,
SavedObjectSaveModalTagSelectorComponentProps,
- SavedObjectTagDecoratorTypeGuard,
GetTableColumnDefinitionOptions,
} from './api';
-export type { TagDecoratedSavedObject } from './decorator';
-
export const plugin = (initializerContext: PluginInitializerContext) =>
new SavedObjectTaggingOssPlugin(initializerContext);
diff --git a/src/plugins/saved_objects_tagging_oss/public/plugin.test.ts b/src/plugins/saved_objects_tagging_oss/public/plugin.test.ts
index 7c26f5a9a8289..bb3f0f0e78f83 100644
--- a/src/plugins/saved_objects_tagging_oss/public/plugin.test.ts
+++ b/src/plugins/saved_objects_tagging_oss/public/plugin.test.ts
@@ -8,8 +8,6 @@
*/
import { coreMock } from '@kbn/core/public/mocks';
-import { savedObjectsPluginMock } from '@kbn/saved-objects-plugin/public/mocks';
-import { tagDecoratorConfig } from './decorator';
import { taggingApiMock } from './api.mock';
import { SavedObjectTaggingOssPlugin } from './plugin';
@@ -22,23 +20,6 @@ describe('SavedObjectTaggingOssPlugin', () => {
plugin = new SavedObjectTaggingOssPlugin(coreMock.createPluginInitializerContext());
});
- describe('#setup', () => {
- it('registers the tag SO decorator if the `savedObjects` plugin is present', () => {
- const savedObjects = savedObjectsPluginMock.createSetupContract();
-
- plugin.setup(coreSetup, { savedObjects });
-
- expect(savedObjects.registerDecorator).toHaveBeenCalledTimes(1);
- expect(savedObjects.registerDecorator).toHaveBeenCalledWith(tagDecoratorConfig);
- });
-
- it('does not fail if the `savedObjects` plugin is not present', () => {
- expect(() => {
- plugin.setup(coreSetup, {});
- }).not.toThrow();
- });
- });
-
describe('#start', () => {
let coreStart: ReturnType;
@@ -54,7 +35,7 @@ describe('SavedObjectTaggingOssPlugin', () => {
it('returns the tagging API if registered', async () => {
const taggingApi = taggingApiMock.create();
- const { registerTaggingApi } = plugin.setup(coreSetup, {});
+ const { registerTaggingApi } = plugin.setup(coreSetup);
registerTaggingApi(Promise.resolve(taggingApi));
@@ -66,7 +47,7 @@ describe('SavedObjectTaggingOssPlugin', () => {
expect(getTaggingApi()).toStrictEqual(taggingApi);
});
it('does not return the tagging API if not registered', async () => {
- plugin.setup(coreSetup, {});
+ plugin.setup(coreSetup);
await nextTick();
@@ -76,7 +57,7 @@ describe('SavedObjectTaggingOssPlugin', () => {
expect(getTaggingApi()).toBeUndefined();
});
it('does not return the tagging API if resolution promise rejects', async () => {
- const { registerTaggingApi } = plugin.setup(coreSetup, {});
+ const { registerTaggingApi } = plugin.setup(coreSetup);
registerTaggingApi(Promise.reject(new Error('something went bad')));
diff --git a/src/plugins/saved_objects_tagging_oss/public/plugin.ts b/src/plugins/saved_objects_tagging_oss/public/plugin.ts
index 94a77dcdf2610..c6097b447ade7 100644
--- a/src/plugins/saved_objects_tagging_oss/public/plugin.ts
+++ b/src/plugins/saved_objects_tagging_oss/public/plugin.ts
@@ -8,29 +8,18 @@
*/
import { CoreSetup, CoreStart, PluginInitializerContext, Plugin } from '@kbn/core/public';
-import { SavedObjectSetup } from '@kbn/saved-objects-plugin/public';
import { SavedObjectTaggingOssPluginSetup, SavedObjectTaggingOssPluginStart } from './types';
import { SavedObjectsTaggingApi } from './api';
-import { tagDecoratorConfig } from './decorator';
-
-interface SetupDeps {
- savedObjects?: SavedObjectSetup;
-}
export class SavedObjectTaggingOssPlugin
- implements
- Plugin
+ implements Plugin
{
private apiRegistered = false;
private api?: SavedObjectsTaggingApi;
constructor(context: PluginInitializerContext) {}
- public setup({}: CoreSetup, { savedObjects }: SetupDeps) {
- if (savedObjects) {
- savedObjects.registerDecorator(tagDecoratorConfig);
- }
-
+ public setup({}: CoreSetup) {
return {
registerTaggingApi: (provider: Promise) => {
if (this.apiRegistered) {
diff --git a/src/plugins/saved_objects_tagging_oss/tsconfig.json b/src/plugins/saved_objects_tagging_oss/tsconfig.json
index 6b98cba4cbd12..fa0436bab9161 100644
--- a/src/plugins/saved_objects_tagging_oss/tsconfig.json
+++ b/src/plugins/saved_objects_tagging_oss/tsconfig.json
@@ -9,7 +9,6 @@
],
"kbn_references": [
"@kbn/core",
- "@kbn/saved-objects-plugin",
],
"exclude": [
"target/**/*",
diff --git a/src/plugins/visualizations/public/mocks.ts b/src/plugins/visualizations/public/mocks.ts
index fbc61c871bd59..626bab7b9e0ed 100644
--- a/src/plugins/visualizations/public/mocks.ts
+++ b/src/plugins/visualizations/public/mocks.ts
@@ -17,7 +17,6 @@ import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks';
import { indexPatternEditorPluginMock } from '@kbn/data-view-editor-plugin/public/mocks';
import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks';
import { inspectorPluginMock } from '@kbn/inspector-plugin/public/mocks';
-import { savedObjectsPluginMock } from '@kbn/saved-objects-plugin/public/mocks';
import { urlForwardingPluginMock } from '@kbn/url-forwarding-plugin/public/mocks';
import { navigationPluginMock } from '@kbn/navigation-plugin/public/mocks';
import { presentationUtilPluginMock } from '@kbn/presentation-util-plugin/public/mocks';
@@ -77,7 +76,6 @@ const createInstance = async () => {
embeddable: embeddablePluginMock.createStartContract(),
spaces: spacesPluginMock.createStartContract(),
savedObjectsClient: coreMock.createStart().savedObjects.client,
- savedObjects: savedObjectsPluginMock.createStartContract(),
savedObjectsTaggingOss: savedObjectTaggingOssPluginMock.createStart(),
savedSearch: savedSearchPluginMock.createStartContract(),
navigation: navigationPluginMock.createStartContract(),
diff --git a/src/plugins/visualizations/public/plugin.ts b/src/plugins/visualizations/public/plugin.ts
index 24a2c488e0f79..fcb3dc5137161 100644
--- a/src/plugins/visualizations/public/plugin.ts
+++ b/src/plugins/visualizations/public/plugin.ts
@@ -38,7 +38,6 @@ import type {
SavedObjectsClientContract,
} from '@kbn/core/public';
import { UiActionsStart, UiActionsSetup, ADD_PANEL_TRIGGER } from '@kbn/ui-actions-plugin/public';
-import type { SavedObjectsStart } from '@kbn/saved-objects-plugin/public';
import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public';
import type {
Setup as InspectorSetup,
@@ -166,7 +165,6 @@ export interface VisualizationsStartDeps {
application: ApplicationStart;
navigation: NavigationStart;
presentationUtil: PresentationUtilPluginStart;
- savedObjects: SavedObjectsStart;
savedObjectsClient: SavedObjectsClientContract;
savedSearch: SavedSearchPublicPluginStart;
spaces?: SpacesPluginStart;
diff --git a/x-pack/plugins/saved_objects_tagging/public/ui_api/has_tag_decoration.ts b/x-pack/plugins/saved_objects_tagging/public/ui_api/has_tag_decoration.ts
deleted file mode 100644
index 6dccf97f0a672..0000000000000
--- a/x-pack/plugins/saved_objects_tagging/public/ui_api/has_tag_decoration.ts
+++ /dev/null
@@ -1,17 +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 {
- SavedObjectsTaggingApiUi,
- TagDecoratedSavedObject,
-} from '@kbn/saved-objects-tagging-oss-plugin/public';
-
-export const hasTagDecoration: SavedObjectsTaggingApiUi['hasTagDecoration'] = (
- object
-): object is TagDecoratedSavedObject => {
- return 'getTags' in object && 'setTags' in object;
-};
diff --git a/x-pack/plugins/saved_objects_tagging/public/ui_api/index.ts b/x-pack/plugins/saved_objects_tagging/public/ui_api/index.ts
index d25b04dd1002c..635e2e5af0440 100644
--- a/x-pack/plugins/saved_objects_tagging/public/ui_api/index.ts
+++ b/x-pack/plugins/saved_objects_tagging/public/ui_api/index.ts
@@ -21,7 +21,6 @@ import { buildGetSearchBarFilter } from './get_search_bar_filter';
import { buildParseSearchQuery } from './parse_search_query';
import { buildConvertNameToReference } from './convert_name_to_reference';
import { buildGetTagList } from './get_tag_list';
-import { hasTagDecoration } from './has_tag_decoration';
interface GetUiApiOptions extends StartServices {
capabilities: TagsCapabilities;
@@ -50,7 +49,6 @@ export const getUiApi = ({
getSearchBarFilter: buildGetSearchBarFilter({ getTagList }),
parseSearchQuery: buildParseSearchQuery({ cache }),
convertNameToReference: buildConvertNameToReference({ cache }),
- hasTagDecoration,
getTagIdsFromReferences,
getTagIdFromName: (tagName: string) => convertTagNameToId(tagName, cache.getState()),
updateTagsReferences,
diff --git a/x-pack/plugins/transform/public/app/__mocks__/app_dependencies.tsx b/x-pack/plugins/transform/public/app/__mocks__/app_dependencies.tsx
index 0feb3b2c9fc21..6af01088b70db 100644
--- a/x-pack/plugins/transform/public/app/__mocks__/app_dependencies.tsx
+++ b/x-pack/plugins/transform/public/app/__mocks__/app_dependencies.tsx
@@ -16,7 +16,6 @@ import type { ScopedHistory } from '@kbn/core/public';
import { coreMock, themeServiceMock } from '@kbn/core/public/mocks';
import { dataPluginMock } from '@kbn/data-plugin/public/mocks';
import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks';
-import { savedObjectsPluginMock } from '@kbn/saved-objects-plugin/public/mocks';
import { chartPluginMock } from '@kbn/charts-plugin/public/mocks';
import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks';
import type { SharePluginStart } from '@kbn/share-plugin/public';
@@ -88,7 +87,6 @@ const appDependencies: AppDependencies = {
theme: themeServiceMock.createStartContract(),
http: coreSetup.http,
history: {} as ScopedHistory,
- savedObjectsPlugin: savedObjectsPluginMock.createStartContract(),
share: { urlGenerators: { getUrlGenerator: jest.fn() } } as unknown as SharePluginStart,
ml: {} as GetMlSharedImportsReturnType,
triggersActionsUi: {} as jest.Mocked,
diff --git a/x-pack/plugins/transform/public/app/app_dependencies.tsx b/x-pack/plugins/transform/public/app/app_dependencies.tsx
index ebb65f58a4093..1f8b2373f0f7d 100644
--- a/x-pack/plugins/transform/public/app/app_dependencies.tsx
+++ b/x-pack/plugins/transform/public/app/app_dependencies.tsx
@@ -19,7 +19,6 @@ import type {
ScopedHistory,
ThemeServiceStart,
} from '@kbn/core/public';
-import type { SavedObjectsStart as SavedObjectsPluginStart } from '@kbn/saved-objects-plugin/public';
import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import type { SharePluginStart } from '@kbn/share-plugin/public';
@@ -60,7 +59,6 @@ export interface AppDependencies {
overlays: OverlayStart;
theme: ThemeServiceStart;
history: ScopedHistory;
- savedObjectsPlugin: SavedObjectsPluginStart;
share: SharePluginStart;
ml: GetMlSharedImportsReturnType;
spaces?: SpacesPluginStart;
diff --git a/x-pack/plugins/transform/public/app/mount_management_section.ts b/x-pack/plugins/transform/public/app/mount_management_section.ts
index e28275d203990..8d59c9ce2d0f2 100644
--- a/x-pack/plugins/transform/public/app/mount_management_section.ts
+++ b/x-pack/plugins/transform/public/app/mount_management_section.ts
@@ -85,7 +85,6 @@ export async function mountManagementSection(
uiSettings,
settings,
history,
- savedObjectsPlugin: plugins.savedObjects,
share,
spaces,
ml: await getMlSharedImports(),
diff --git a/x-pack/plugins/transform/public/plugin.ts b/x-pack/plugins/transform/public/plugin.ts
index f1677bbcb7c78..07bda2b5400b1 100644
--- a/x-pack/plugins/transform/public/plugin.ts
+++ b/x-pack/plugins/transform/public/plugin.ts
@@ -11,7 +11,6 @@ import type { CoreSetup } from '@kbn/core/public';
import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import type { HomePublicPluginSetup } from '@kbn/home-plugin/public';
-import type { SavedObjectsStart } from '@kbn/saved-objects-plugin/public';
import type { ManagementSetup } from '@kbn/management-plugin/public';
import type { SharePluginStart } from '@kbn/share-plugin/public';
import type { SpacesApi } from '@kbn/spaces-plugin/public';
@@ -37,7 +36,6 @@ export interface PluginsDependencies {
dataViews: DataViewsPublicPluginStart;
management: ManagementSetup;
home: HomePublicPluginSetup;
- savedObjects: SavedObjectsStart;
savedSearch: SavedSearchPublicPluginStart;
share: SharePluginStart;
spaces?: SpacesApi;
diff --git a/x-pack/plugins/transform/tsconfig.json b/x-pack/plugins/transform/tsconfig.json
index 9b1abbd589a83..e3ccb0cc1d403 100644
--- a/x-pack/plugins/transform/tsconfig.json
+++ b/x-pack/plugins/transform/tsconfig.json
@@ -24,7 +24,6 @@
"@kbn/alerting-plugin",
"@kbn/data-views-plugin",
"@kbn/home-plugin",
- "@kbn/saved-objects-plugin",
"@kbn/management-plugin",
"@kbn/share-plugin",
"@kbn/spaces-plugin",
From 9b4ace8343f15fb73f79d05e0ff7b4212866ebb9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cau=C3=AA=20Marcondes?=
<55978943+cauemarcondes@users.noreply.github.com>
Date: Fri, 20 Sep 2024 16:18:11 +0100
Subject: [PATCH 22/42] [Inventory][ECO] API error handler (#193560)
closes https://github.com/elastic/kibana/issues/193547
---
.../hooks/use_inventory_abortable_async.ts | 36 +++++++++++++++++++
.../public/pages/inventory_page/index.tsx | 8 ++---
.../inventory/tsconfig.json | 3 +-
3 files changed, 42 insertions(+), 5 deletions(-)
create mode 100644 x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_abortable_async.ts
diff --git a/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_abortable_async.ts b/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_abortable_async.ts
new file mode 100644
index 0000000000000..60b2fca72e721
--- /dev/null
+++ b/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_abortable_async.ts
@@ -0,0 +1,36 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+import { useAbortableAsync } from '@kbn/observability-utils/hooks/use_abortable_async';
+import { i18n } from '@kbn/i18n';
+import { IHttpFetchError, ResponseErrorBody } from '@kbn/core-http-browser';
+import { useKibana } from './use_kibana';
+
+const getDetailsFromErrorResponse = (error: IHttpFetchError) =>
+ error.body?.message ?? error.response?.statusText;
+
+export function useInventoryAbortableAsync(...args: Parameters>) {
+ const {
+ core: { notifications },
+ } = useKibana();
+ const response = useAbortableAsync(...args);
+
+ if (response.error) {
+ const errorMessage =
+ 'response' in response.error
+ ? getDetailsFromErrorResponse(response.error as IHttpFetchError)
+ : response.error.message;
+
+ notifications.toasts.addDanger({
+ title: i18n.translate('xpack.inventory.apiCall.error.title', {
+ defaultMessage: `Error while fetching resource`,
+ }),
+ text: errorMessage,
+ });
+ }
+
+ return response;
+}
diff --git a/x-pack/plugins/observability_solution/inventory/public/pages/inventory_page/index.tsx b/x-pack/plugins/observability_solution/inventory/public/pages/inventory_page/index.tsx
index e77b46b26dc79..be54ff531ca44 100644
--- a/x-pack/plugins/observability_solution/inventory/public/pages/inventory_page/index.tsx
+++ b/x-pack/plugins/observability_solution/inventory/public/pages/inventory_page/index.tsx
@@ -4,13 +4,13 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
-import React from 'react';
-import { useAbortableAsync } from '@kbn/observability-utils/hooks/use_abortable_async';
import { EuiDataGridSorting } from '@elastic/eui';
+import React from 'react';
import { EntitiesGrid } from '../../components/entities_grid';
-import { useKibana } from '../../hooks/use_kibana';
+import { useInventoryAbortableAsync } from '../../hooks/use_inventory_abortable_async';
import { useInventoryParams } from '../../hooks/use_inventory_params';
import { useInventoryRouter } from '../../hooks/use_inventory_router';
+import { useKibana } from '../../hooks/use_kibana';
export function InventoryPage() {
const {
@@ -20,7 +20,7 @@ export function InventoryPage() {
const { sortDirection, sortField, pageIndex } = query;
const inventoryRoute = useInventoryRouter();
- const { value = { entities: [] }, loading } = useAbortableAsync(
+ const { value = { entities: [] }, loading } = useInventoryAbortableAsync(
({ signal }) => {
return inventoryAPIClient.fetch('GET /internal/inventory/entities', {
params: {
diff --git a/x-pack/plugins/observability_solution/inventory/tsconfig.json b/x-pack/plugins/observability_solution/inventory/tsconfig.json
index e5e530ce1233f..5c17e404701d5 100644
--- a/x-pack/plugins/observability_solution/inventory/tsconfig.json
+++ b/x-pack/plugins/observability_solution/inventory/tsconfig.json
@@ -37,6 +37,7 @@
"@kbn/es-types",
"@kbn/entities-schema",
"@kbn/i18n-react",
- "@kbn/io-ts-utils"
+ "@kbn/io-ts-utils",
+ "@kbn/core-http-browser"
]
}
From 4172226750c64241d98e4cac4ce9a7c5c40162ba Mon Sep 17 00:00:00 2001
From: Tre
Date: Fri, 20 Sep 2024 16:32:20 +0100
Subject: [PATCH 23/42] [FTR] Fixup err msg for
`scripts/get_owners_for_file.js` (#193581)
## Summary
Follow up of [incorrect
wording](https://github.com/elastic/kibana/pull/193277#discussion_r1768630448)
---
packages/kbn-code-owners/src/file_code_owner.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/kbn-code-owners/src/file_code_owner.ts b/packages/kbn-code-owners/src/file_code_owner.ts
index f413d7f975df0..525a2964c7338 100644
--- a/packages/kbn-code-owners/src/file_code_owner.ts
+++ b/packages/kbn-code-owners/src/file_code_owner.ts
@@ -81,7 +81,7 @@ export async function runGetOwnersForFileCli() {
run(
async ({ flags, log }) => {
const targetFile = flags.file as string;
- if (!targetFile) throw createFlagError(`Missing --flag argument`);
+ if (!targetFile) throw createFlagError(`Missing --file argument`);
existOrThrow(targetFile); // This call is duplicated in getPathsWithOwnersReversed(), so this is a short circuit
const result = getCodeOwnersForFile(targetFile);
if (result) log.success(result);
From f1a7835cbbf44277b0625a6531576913d123fe90 Mon Sep 17 00:00:00 2001
From: Elena Shostak <165678770+elena-shostak@users.noreply.github.com>
Date: Fri, 20 Sep 2024 18:06:15 +0200
Subject: [PATCH 24/42] Deleted no_unsafe_js_yaml eslint rule (#193588)
## Summary
Since js-yaml update has been merged in
https://github.com/elastic/kibana/pull/190678 we don't need
`no_unsafe_js_yaml ` anymore
---
packages/kbn-eslint-plugin-eslint/index.js | 1 -
.../rules/no_unsafe_js_yaml.js | 91 ---------------
.../rules/no_unsafe_js_yaml.test.js | 105 ------------------
3 files changed, 197 deletions(-)
delete mode 100644 packages/kbn-eslint-plugin-eslint/rules/no_unsafe_js_yaml.js
delete mode 100644 packages/kbn-eslint-plugin-eslint/rules/no_unsafe_js_yaml.test.js
diff --git a/packages/kbn-eslint-plugin-eslint/index.js b/packages/kbn-eslint-plugin-eslint/index.js
index dadeb85832da7..1b9c04a2b7918 100644
--- a/packages/kbn-eslint-plugin-eslint/index.js
+++ b/packages/kbn-eslint-plugin-eslint/index.js
@@ -19,6 +19,5 @@ module.exports = {
no_constructor_args_in_property_initializers: require('./rules/no_constructor_args_in_property_initializers'),
no_this_in_property_initializers: require('./rules/no_this_in_property_initializers'),
no_unsafe_console: require('./rules/no_unsafe_console'),
- no_unsafe_js_yaml: require('./rules/no_unsafe_js_yaml'),
},
};
diff --git a/packages/kbn-eslint-plugin-eslint/rules/no_unsafe_js_yaml.js b/packages/kbn-eslint-plugin-eslint/rules/no_unsafe_js_yaml.js
deleted file mode 100644
index 74dc20df93af6..0000000000000
--- a/packages/kbn-eslint-plugin-eslint/rules/no_unsafe_js_yaml.js
+++ /dev/null
@@ -1,91 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-module.exports = {
- meta: {
- fixable: 'code',
- schema: [],
- },
- create(context) {
- const sourceCode = context.getSourceCode();
- const jsYamlIdentifiers = new Set();
- const isUnsafeMethod = (node) => node.name === 'load' || node.name === 'dump';
-
- return {
- ImportDeclaration(node) {
- if (node.source.value === 'js-yaml') {
- node.specifiers.forEach((specifier) => {
- jsYamlIdentifiers.add(specifier.local.name);
-
- if (specifier.imported && isUnsafeMethod(specifier.imported)) {
- context.report({
- node: specifier,
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- fix(fixer) {
- const replacement =
- specifier.imported.name === 'load'
- ? fixer.replaceText(specifier.imported, 'safeLoad')
- : fixer.replaceText(specifier.imported, 'safeDump');
- return replacement;
- },
- });
- }
- });
- }
- },
- CallExpression(node) {
- const callee = node.callee;
-
- if (isUnsafeMethod(callee)) {
- const scope = sourceCode.getScope(node);
- const variable = scope.variables.find((v) => v.name === callee.name);
-
- if (variable && variable.defs.length) {
- const [def] = variable.defs;
-
- if (def?.parent?.source?.value === 'js-yaml') {
- context.report({
- node: callee,
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- fix(fixer) {
- const replacement =
- callee.name === 'load'
- ? fixer.replaceText(callee, 'safeLoad')
- : fixer.replaceText(callee, 'safeDump');
- return replacement;
- },
- });
- }
- }
- }
-
- if (
- callee.type === 'MemberExpression' &&
- isUnsafeMethod(callee.property) &&
- jsYamlIdentifiers.has(callee.object.name)
- ) {
- context.report({
- node: callee.property,
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- fix(fixer) {
- const replacement =
- callee.property.name === 'load'
- ? fixer.replaceText(callee.property, 'safeLoad')
- : fixer.replaceText(callee.property, 'safeDump');
- return replacement;
- },
- });
- }
- },
- };
- },
-};
diff --git a/packages/kbn-eslint-plugin-eslint/rules/no_unsafe_js_yaml.test.js b/packages/kbn-eslint-plugin-eslint/rules/no_unsafe_js_yaml.test.js
deleted file mode 100644
index 960bc0b0c23d1..0000000000000
--- a/packages/kbn-eslint-plugin-eslint/rules/no_unsafe_js_yaml.test.js
+++ /dev/null
@@ -1,105 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
- * License v3.0 only", or the "Server Side Public License, v 1".
- */
-
-const { RuleTester } = require('eslint');
-const rule = require('./no_unsafe_js_yaml');
-
-const ruleTester = new RuleTester({
- parser: require.resolve('@typescript-eslint/parser'),
- parserOptions: {
- sourceType: 'module',
- ecmaVersion: 2018,
- },
-});
-
-ruleTester.run('no_unsafe_js_yaml', rule, {
- valid: [
- "import { safeLoad } from 'js-yaml'; const data = safeLoad(yamlString);",
- "import { safeDump } from 'js-yaml'; const yaml = safeDump(data);",
- "import * as yaml from 'js-yaml'; const data = yaml.safeLoad(yamlString);",
- "import yaml from 'js-yaml'; yaml.safeLoad('yamlString');",
- ],
- invalid: [
- {
- code: "import { load } from 'js-yaml'; const data = load(yamlString);",
- errors: [
- {
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- line: 1,
- column: 10,
- endLine: 1,
- endColumn: 14,
- },
- {
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- line: 1,
- column: 46,
- endLine: 1,
- endColumn: 50,
- },
- ],
- output: "import { safeLoad } from 'js-yaml'; const data = safeLoad(yamlString);",
- },
- {
- code: "import { dump } from 'js-yaml'; const yaml = dump(data);",
- errors: [
- {
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- line: 1,
- column: 10,
- endLine: 1,
- endColumn: 14,
- },
- {
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- line: 1,
- column: 46,
- endLine: 1,
- endColumn: 50,
- },
- ],
- output: "import { safeDump } from 'js-yaml'; const yaml = safeDump(data);",
- },
- {
- code: "import * as yaml from 'js-yaml'; const data = yaml.load(yamlString);",
- errors: [
- {
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- },
- ],
- output: "import * as yaml from 'js-yaml'; const data = yaml.safeLoad(yamlString);",
- },
- {
- code: "import yaml from 'js-yaml'; yaml.load('someYAMLContent')",
- errors: [
- {
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- },
- ],
- output: "import yaml from 'js-yaml'; yaml.safeLoad('someYAMLContent')",
- },
- {
- code: "import yaml, { safeDump } from 'js-yaml'; safeDump(data); yaml.load('someYAMLContent');",
- errors: [
- {
- message:
- 'Use `safeLoad` instead of `load` and `safeDump` instead of `dump` from `js-yaml`.',
- },
- ],
- output:
- "import yaml, { safeDump } from 'js-yaml'; safeDump(data); yaml.safeLoad('someYAMLContent');",
- },
- ],
-});
From 0b1bf2727b565c5dc1b824c9b076e6bc0514f2a9 Mon Sep 17 00:00:00 2001
From: Kevin Delemme
Date: Fri, 20 Sep 2024 12:34:23 -0400
Subject: [PATCH 25/42] feat(rca): add header details (#193600)
---
.../investigation_tag/investigation_tag.tsx | 21 +++++
.../alert_details_button.tsx | 41 ++++++++++
.../investigation_header.tsx | 78 ++++++++++++-------
.../details/hooks/use_fetch_alert.tsx} | 2 +-
.../list/components/investigation_list.tsx | 7 +-
.../services/delete_investigation_item.ts | 4 +-
6 files changed, 118 insertions(+), 35 deletions(-)
create mode 100644 x-pack/plugins/observability_solution/investigate_app/public/components/investigation_tag/investigation_tag.tsx
create mode 100644 x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_header/alert_details_button.tsx
rename x-pack/plugins/observability_solution/investigate_app/public/{hooks/use_get_alert_details.tsx => pages/details/hooks/use_fetch_alert.tsx} (96%)
diff --git a/x-pack/plugins/observability_solution/investigate_app/public/components/investigation_tag/investigation_tag.tsx b/x-pack/plugins/observability_solution/investigate_app/public/components/investigation_tag/investigation_tag.tsx
new file mode 100644
index 0000000000000..938f4ce434c82
--- /dev/null
+++ b/x-pack/plugins/observability_solution/investigate_app/public/components/investigation_tag/investigation_tag.tsx
@@ -0,0 +1,21 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { EuiFlexItem, EuiBadge } from '@elastic/eui';
+import React from 'react';
+
+interface Props {
+ tag: string;
+}
+
+export function InvestigationTag({ tag }: Props) {
+ return (
+
+ {tag}
+
+ );
+}
diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_header/alert_details_button.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_header/alert_details_button.tsx
new file mode 100644
index 0000000000000..ff33ca7949f75
--- /dev/null
+++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_header/alert_details_button.tsx
@@ -0,0 +1,41 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { EuiButtonEmpty, EuiText } from '@elastic/eui';
+import { alertOriginSchema } from '@kbn/investigation-shared';
+import { ALERT_RULE_CATEGORY } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names';
+import React from 'react';
+import { useKibana } from '../../../../hooks/use_kibana';
+import { useInvestigation } from '../../contexts/investigation_context';
+import { useFetchAlert } from '../../hooks/use_fetch_alert';
+
+export function AlertDetailsButton() {
+ const {
+ core: {
+ http: { basePath },
+ },
+ } = useKibana();
+ const { investigation } = useInvestigation();
+
+ const alertOriginInvestigation = alertOriginSchema.safeParse(investigation?.origin);
+ const alertId = alertOriginInvestigation.success ? alertOriginInvestigation.data.id : undefined;
+ const { data: alertDetails } = useFetchAlert({ id: alertId });
+
+ if (!alertDetails) {
+ return null;
+ }
+ return (
+
+ {`[Alert] ${alertDetails?.[ALERT_RULE_CATEGORY]} breached`}
+
+ );
+}
diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_header/investigation_header.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_header/investigation_header.tsx
index 1987777de4968..339f2ce1be8e7 100644
--- a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_header/investigation_header.tsx
+++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_header/investigation_header.tsx
@@ -5,40 +5,64 @@
* 2.0.
*/
-import { EuiButtonEmpty, EuiText } from '@elastic/eui';
-import { alertOriginSchema } from '@kbn/investigation-shared';
-import { ALERT_RULE_CATEGORY } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names';
+import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui';
+// eslint-disable-next-line import/no-extraneous-dependencies
+import { formatDistance } from 'date-fns';
+import { FormattedMessage } from '@kbn/i18n-react';
import React from 'react';
-import { useFetchAlert } from '../../../../hooks/use_get_alert_details';
-import { useKibana } from '../../../../hooks/use_kibana';
+import { InvestigationStatusBadge } from '../../../../components/investigation_status_badge/investigation_status_badge';
+import { InvestigationTag } from '../../../../components/investigation_tag/investigation_tag';
import { useInvestigation } from '../../contexts/investigation_context';
+import { AlertDetailsButton } from './alert_details_button';
export function InvestigationHeader() {
- const {
- core: {
- http: { basePath },
- },
- } = useKibana();
-
const { investigation } = useInvestigation();
- const alertOriginInvestigation = alertOriginSchema.safeParse(investigation?.origin);
- const alertId = alertOriginInvestigation.success ? alertOriginInvestigation.data.id : undefined;
- const { data: alertDetails } = useFetchAlert({ id: alertId });
+ if (!investigation) {
+ return null;
+ }
return (
- <>
- {alertDetails && (
-
- {`[Alert] ${alertDetails?.[ALERT_RULE_CATEGORY]} breached`}
-
- )}
- {investigation && {investigation.title}
}
- >
+
+
+
+
+
+ {investigation.title}
+
+
+
+
+
+
+ {investigation.tags.length > 0 && (
+
+
+ {investigation.tags.map((tag) => (
+
+ ))}
+
+
+ )}
+
+
+
+
+
+
+
);
}
diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_get_alert_details.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/hooks/use_fetch_alert.tsx
similarity index 96%
rename from x-pack/plugins/observability_solution/investigate_app/public/hooks/use_get_alert_details.tsx
rename to x-pack/plugins/observability_solution/investigate_app/public/pages/details/hooks/use_fetch_alert.tsx
index 0c0cda89d3eb8..85246b33bf70d 100644
--- a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_get_alert_details.tsx
+++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/hooks/use_fetch_alert.tsx
@@ -7,7 +7,7 @@
import { useQuery } from '@tanstack/react-query';
import { BASE_RAC_ALERTS_API_PATH, EcsFieldsResponse } from '@kbn/rule-registry-plugin/common';
-import { useKibana } from './use_kibana';
+import { useKibana } from '../../../hooks/use_kibana';
export interface AlertParams {
id?: string;
diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/list/components/investigation_list.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/list/components/investigation_list.tsx
index a65eb12001342..8ad2957b27ac8 100644
--- a/x-pack/plugins/observability_solution/investigate_app/public/pages/list/components/investigation_list.tsx
+++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/list/components/investigation_list.tsx
@@ -7,11 +7,9 @@
import {
Criteria,
EuiAvatar,
- EuiBadge,
EuiBasicTable,
EuiBasicTableColumn,
EuiFlexGroup,
- EuiFlexItem,
EuiLink,
EuiLoadingSpinner,
EuiText,
@@ -22,6 +20,7 @@ import moment from 'moment';
import React, { useState } from 'react';
import { paths } from '../../../../common/paths';
import { InvestigationStatusBadge } from '../../../components/investigation_status_badge/investigation_status_badge';
+import { InvestigationTag } from '../../../components/investigation_tag/investigation_tag';
import { useFetchInvestigationList } from '../../../hooks/use_fetch_investigation_list';
import { useFetchUserProfiles } from '../../../hooks/use_fetch_user_profiles';
import { useKibana } from '../../../hooks/use_kibana';
@@ -114,9 +113,7 @@ export function InvestigationList() {
return (
{value.map((tag) => (
-
- {tag}
-
+
))}
);
diff --git a/x-pack/plugins/observability_solution/investigate_app/server/services/delete_investigation_item.ts b/x-pack/plugins/observability_solution/investigate_app/server/services/delete_investigation_item.ts
index a9856cc0eaa99..29728404068be 100644
--- a/x-pack/plugins/observability_solution/investigate_app/server/services/delete_investigation_item.ts
+++ b/x-pack/plugins/observability_solution/investigate_app/server/services/delete_investigation_item.ts
@@ -16,11 +16,11 @@ export async function deleteInvestigationItem(
const investigation = await repository.findById(investigationId);
const item = investigation.items.find((currItem) => currItem.id === itemId);
if (!item) {
- throw new Error('Note not found');
+ throw new Error('Item not found');
}
if (item.createdBy !== user.profile_uid) {
- throw new Error('User does not have permission to delete note');
+ throw new Error('User does not have permission to delete item');
}
investigation.items = investigation.items.filter((currItem) => currItem.id !== itemId);
From 486b16e56f76ba0124b80b564f8516e2e22bc37b Mon Sep 17 00:00:00 2001
From: "Quynh Nguyen (Quinn)" <43350163+qn895@users.noreply.github.com>
Date: Fri, 20 Sep 2024 11:45:22 -0500
Subject: [PATCH 26/42] [ML] Add border to text editor for ES|QL data
visualizer (#192726)
## Summary
This PR adds border to text editor for ES|QL data visualizer so make it
more clear where the boundaries for the editor is.
Also fixes the content of the top values overflowing.
https://github.com/user-attachments/assets/19c90cb3-2d35-41df-aea4-889a00e6ebdb
Fixes https://github.com/elastic/kibana/issues/192788
Fixes https://github.com/elastic/kibana/issues/192637
---------
Co-authored-by: Elastic Machine
---
.../components/top_values/top_values.tsx | 8 ++++++
.../index_data_visualizer_esql.tsx | 28 +++++++++++++------
2 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx
index 0d7d6b4c480e9..5d263135389eb 100644
--- a/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx
@@ -14,6 +14,8 @@ import {
EuiText,
EuiButtonIcon,
EuiSpacer,
+ useEuiTheme,
+ euiScrollBarStyles,
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
@@ -69,6 +71,7 @@ export const TopValues: FC = ({
data: { fieldFormats },
},
} = useDataVisualizerKibana();
+ const euiTheme = useEuiTheme();
if (stats === undefined || !stats.topValues) return null;
const { fieldName, sampleCount, approximate } = stats;
@@ -169,6 +172,10 @@ export const TopValues: FC = ({
{showSampledValues ? (
@@ -215,6 +222,7 @@ export const TopValues: FC = ({
onAddFilter !== undefined ? (
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_esql.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_esql.tsx
index 8e3d48c47c789..d50ee4c8916f1 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_esql.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/components/index_data_visualizer_view/index_data_visualizer_esql.tsx
@@ -259,15 +259,25 @@ export const IndexDataVisualizerESQL: FC
= (dataVi
-
+
+
+
From 4437337dd165c4470edb5fc8a8223d48efcaa377 Mon Sep 17 00:00:00 2001
From: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
Date: Fri, 20 Sep 2024 19:05:03 +0200
Subject: [PATCH 27/42] [Fleet] allow optional statusCode and error in generic
error response schema (#193604)
Relates https://github.com/elastic/kibana/issues/184685
Make statusCode and error optional in genericErrorResponse, sometimes it
seems to be missing.
Saw this screenshot in another issue:
![image](https://github.com/user-attachments/assets/f2cdf0a4-9067-4c36-a98f-65dc302a4e55)
---
x-pack/plugins/fleet/server/routes/schema/errors.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/x-pack/plugins/fleet/server/routes/schema/errors.ts b/x-pack/plugins/fleet/server/routes/schema/errors.ts
index 1d8f0f5d5b92d..09dc90d55ff45 100644
--- a/x-pack/plugins/fleet/server/routes/schema/errors.ts
+++ b/x-pack/plugins/fleet/server/routes/schema/errors.ts
@@ -10,8 +10,8 @@ import { schema } from '@kbn/config-schema';
export const genericErrorResponse = () =>
schema.object(
{
- statusCode: schema.number(),
- error: schema.string(),
+ statusCode: schema.maybe(schema.number()),
+ error: schema.maybe(schema.string()),
message: schema.string(),
},
{
From 3dbf11e00bd0e7635f3dc27b66802bc25180cfa9 Mon Sep 17 00:00:00 2001
From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Date: Sat, 21 Sep 2024 03:23:09 +1000
Subject: [PATCH 28/42] skip failing test suite (#165745)
---
test/functional/apps/dashboard/group4/dashboard_empty.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/test/functional/apps/dashboard/group4/dashboard_empty.ts b/test/functional/apps/dashboard/group4/dashboard_empty.ts
index 574181b614d01..e07f3d75fd0b0 100644
--- a/test/functional/apps/dashboard/group4/dashboard_empty.ts
+++ b/test/functional/apps/dashboard/group4/dashboard_empty.ts
@@ -19,6 +19,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const dataViews = getService('dataViews');
const { common, dashboard, header } = getPageObjects(['common', 'dashboard', 'header']);
+ // Failing: See https://github.com/elastic/kibana/issues/165745
// Failing: See https://github.com/elastic/kibana/issues/165745
describe.skip('dashboard empty state', () => {
const kbnDirectory = 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana';
From 1a192bcc002bdaf31733a3a8f3ec3b62d3b5b8ef Mon Sep 17 00:00:00 2001
From: Carlos Crespo
Date: Fri, 20 Sep 2024 19:31:54 +0200
Subject: [PATCH 29/42] [Inventory][ECO] Create header action menu (#193398)
closes [#192326](https://github.com/elastic/kibana/issues/192326)
## Summary
This PR introduces the "Add data" item to the header menu:
https://github.com/user-attachments/assets/78ea3667-4ef1-4f02-a513-76e7ca896e67
>[!NOTE]
>I have refactored` plugin.ts`, moving the `ReactDOM.render` call to
`application.tsx`. I've also created a new component to render the
context providers.
>
>`useKibana` and `InventoryKibanaContext` were simplified.
>
>Besides, the analytics events created for the EEM Service Inventory
'Add data' button were replicated for this button.
### How to test
- Add `xpack.inventory.enabled: true` to kibana.dev.yml
- Start ES and Kibana locally
- Navigate to Observability -> Inventory
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
---
.../.storybook/get_mock_inventory_context.tsx | 24 ++--
.../inventory/kibana.jsonc | 3 +-
.../inventory/public/application.tsx | 76 +++++------
.../add_data_action_menu.tsx | 120 ++++++++++++++++++
.../app_root/header_action_menu/index.tsx | 18 +++
.../public/components/app_root/index.tsx | 66 ++++++++++
.../inventory_page_template/index.tsx | 4 +-
.../hooks/use_inventory_abortable_async.ts | 2 +-
.../public/hooks/use_inventory_router.ts | 2 +-
.../inventory/public/hooks/use_kibana.tsx | 12 +-
.../public/{plugin.tsx => plugin.ts} | 43 +++----
.../services/telemetry/telemetry_client.ts | 17 +++
.../services/telemetry/telemetry_events.ts | 28 ++++
.../telemetry/telemetry_service.test.ts | 76 +++++++++++
.../services/telemetry/telemetry_service.ts | 35 +++++
.../public/services/telemetry/types.ts | 32 +++++
.../inventory/public/services/types.ts | 2 +
.../inventory/public/types.ts | 2 +
.../inventory/tsconfig.json | 7 +-
19 files changed, 462 insertions(+), 107 deletions(-)
create mode 100644 x-pack/plugins/observability_solution/inventory/public/components/app_root/header_action_menu/add_data_action_menu.tsx
create mode 100644 x-pack/plugins/observability_solution/inventory/public/components/app_root/header_action_menu/index.tsx
create mode 100644 x-pack/plugins/observability_solution/inventory/public/components/app_root/index.tsx
rename x-pack/plugins/observability_solution/inventory/public/{plugin.tsx => plugin.ts} (77%)
create mode 100644 x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_client.ts
create mode 100644 x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_events.ts
create mode 100644 x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts
create mode 100644 x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.ts
create mode 100644 x-pack/plugins/observability_solution/inventory/public/services/telemetry/types.ts
diff --git a/x-pack/plugins/observability_solution/inventory/.storybook/get_mock_inventory_context.tsx b/x-pack/plugins/observability_solution/inventory/.storybook/get_mock_inventory_context.tsx
index 1c5e2fd1f205b..da59f29c57842 100644
--- a/x-pack/plugins/observability_solution/inventory/.storybook/get_mock_inventory_context.tsx
+++ b/x-pack/plugins/observability_solution/inventory/.storybook/get_mock_inventory_context.tsx
@@ -8,24 +8,22 @@
import { coreMock } from '@kbn/core/public/mocks';
import type { ObservabilitySharedPluginStart } from '@kbn/observability-shared-plugin/public';
import type { InferencePublicStart } from '@kbn/inference-plugin/public';
+import type { SharePluginStart } from '@kbn/share-plugin/public';
import type { InventoryKibanaContext } from '../public/hooks/use_kibana';
+import type { ITelemetryClient } from '../public/services/telemetry/types';
export function getMockInventoryContext(): InventoryKibanaContext {
- const core = coreMock.createStart();
+ const coreStart = coreMock.createStart();
return {
- core,
- dependencies: {
- start: {
- observabilityShared: {} as unknown as ObservabilitySharedPluginStart,
- inference: {} as unknown as InferencePublicStart,
- },
- },
- services: {
- inventoryAPIClient: {
- fetch: jest.fn(),
- stream: jest.fn(),
- },
+ ...coreStart,
+ observabilityShared: {} as unknown as ObservabilitySharedPluginStart,
+ inference: {} as unknown as InferencePublicStart,
+ share: {} as unknown as SharePluginStart,
+ telemetry: {} as unknown as ITelemetryClient,
+ inventoryAPIClient: {
+ fetch: jest.fn(),
+ stream: jest.fn(),
},
};
}
diff --git a/x-pack/plugins/observability_solution/inventory/kibana.jsonc b/x-pack/plugins/observability_solution/inventory/kibana.jsonc
index ced0f412ab935..9262e111c401f 100644
--- a/x-pack/plugins/observability_solution/inventory/kibana.jsonc
+++ b/x-pack/plugins/observability_solution/inventory/kibana.jsonc
@@ -11,7 +11,8 @@
"observabilityShared",
"entityManager",
"inference",
- "dataViews"
+ "dataViews",
+ "share"
],
"requiredBundles": [
"kibanaReact"
diff --git a/x-pack/plugins/observability_solution/inventory/public/application.tsx b/x-pack/plugins/observability_solution/inventory/public/application.tsx
index 5b235c15e7c4f..d34be920d68ff 100644
--- a/x-pack/plugins/observability_solution/inventory/public/application.tsx
+++ b/x-pack/plugins/observability_solution/inventory/public/application.tsx
@@ -4,64 +4,46 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
-import type { CoreStart, CoreTheme } from '@kbn/core/public';
-import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
-import type { History } from 'history';
-import React, { useMemo } from 'react';
-import type { Observable } from 'rxjs';
-import { RouteRenderer, RouterProvider } from '@kbn/typed-react-router-config';
+import React from 'react';
+import ReactDOM from 'react-dom';
+import { APP_WRAPPER_CLASS, type AppMountParameters, type CoreStart } from '@kbn/core/public';
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
+import { css } from '@emotion/css';
import type { InventoryStartDependencies } from './types';
-import { inventoryRouter } from './routes/config';
-import { InventoryKibanaContext } from './hooks/use_kibana';
import { InventoryServices } from './services/types';
-import { InventoryContextProvider } from './components/inventory_context_provider';
+import { AppRoot } from './components/app_root';
-function Application({
+export const renderApp = ({
coreStart,
- history,
pluginsStart,
- theme$,
services,
+ appMountParameters,
}: {
coreStart: CoreStart;
- history: History;
pluginsStart: InventoryStartDependencies;
- theme$: Observable;
services: InventoryServices;
-}) {
- const theme = useMemo(() => {
- return { theme$ };
- }, [theme$]);
+} & { appMountParameters: AppMountParameters }) => {
+ const { element } = appMountParameters;
- const context: InventoryKibanaContext = useMemo(
- () => ({
- core: coreStart,
- dependencies: {
- start: pluginsStart,
- },
- services,
- }),
- [coreStart, pluginsStart, services]
- );
+ const appWrapperClassName = css`
+ overflow: auto;
+ `;
+ const appWrapperElement = document.getElementsByClassName(APP_WRAPPER_CLASS)[1];
+ appWrapperElement.classList.add(appWrapperClassName);
- return (
-
-
-
-
-
-
-
-
-
-
-
+ ReactDOM.render(
+
+
+ ,
+ element
);
-}
-
-export { Application };
+ return () => {
+ ReactDOM.unmountComponentAtNode(element);
+ appWrapperElement.classList.remove(APP_WRAPPER_CLASS);
+ };
+};
diff --git a/x-pack/plugins/observability_solution/inventory/public/components/app_root/header_action_menu/add_data_action_menu.tsx b/x-pack/plugins/observability_solution/inventory/public/components/app_root/header_action_menu/add_data_action_menu.tsx
new file mode 100644
index 0000000000000..ca4bc06df648a
--- /dev/null
+++ b/x-pack/plugins/observability_solution/inventory/public/components/app_root/header_action_menu/add_data_action_menu.tsx
@@ -0,0 +1,120 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React, { useState } from 'react';
+import {
+ EuiContextMenu,
+ EuiContextMenuPanelDescriptor,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiHeaderLink,
+ EuiIcon,
+ EuiPopover,
+} from '@elastic/eui';
+import { i18n } from '@kbn/i18n';
+import {
+ OBSERVABILITY_ONBOARDING_LOCATOR,
+ ObservabilityOnboardingLocatorParams,
+} from '@kbn/deeplinks-observability';
+import { useKibana } from '../../../hooks/use_kibana';
+import type { InventoryAddDataParams } from '../../../services/telemetry/types';
+
+const addDataTitle = i18n.translate('xpack.inventory.addDataContextMenu.link', {
+ defaultMessage: 'Add data',
+});
+const addDataItem = i18n.translate('xpack.inventory.add.apm.agent.button.', {
+ defaultMessage: 'Add data',
+});
+
+const associateServiceLogsItem = i18n.translate('xpack.inventory.associate.service.logs.button', {
+ defaultMessage: 'Associate existing service logs',
+});
+
+const ASSOCIATE_LOGS_LINK = 'https://ela.st/new-experience-associate-service-logs';
+
+export function AddDataContextMenu() {
+ const [popoverOpen, setPopoverOpen] = useState(false);
+ const {
+ services: { share, telemetry },
+ } = useKibana();
+
+ const onboardingLocator = share.url.locators.get(
+ OBSERVABILITY_ONBOARDING_LOCATOR
+ );
+
+ const button = (
+ setPopoverOpen((prevState) => !prevState)}
+ data-test-subj="inventoryAddDataHeaderContextMenu"
+ >
+
+ {addDataTitle}
+
+
+
+
+
+ );
+
+ function reportButtonClick(journey: InventoryAddDataParams['journey']) {
+ telemetry.reportInventoryAddData({
+ view: 'add_data_button',
+ journey,
+ });
+ }
+
+ const panels: EuiContextMenuPanelDescriptor[] = [
+ {
+ id: 0,
+ title: addDataTitle,
+ items: [
+ {
+ name: (
+
+ {associateServiceLogsItem}
+
+
+
+
+ ),
+ key: 'associateServiceLogs',
+ href: ASSOCIATE_LOGS_LINK,
+ 'data-test-subj': 'inventoryHeaderMenuAddDataAssociateServiceLogs',
+ target: '_blank',
+ onClick: () => {
+ reportButtonClick('associate_existing_service_logs');
+ },
+ },
+ {
+ name: addDataItem,
+ key: 'addData',
+ href: onboardingLocator?.getRedirectUrl({ category: '' }),
+ icon: 'plusInCircle',
+ 'data-test-subj': 'inventoryHeaderMenuAddData',
+ onClick: () => {
+ reportButtonClick('add_data');
+ },
+ },
+ ],
+ },
+ ];
+
+ return (
+
+ );
+}
diff --git a/x-pack/plugins/observability_solution/inventory/public/components/app_root/header_action_menu/index.tsx b/x-pack/plugins/observability_solution/inventory/public/components/app_root/header_action_menu/index.tsx
new file mode 100644
index 0000000000000..5ae0f4dd24574
--- /dev/null
+++ b/x-pack/plugins/observability_solution/inventory/public/components/app_root/header_action_menu/index.tsx
@@ -0,0 +1,18 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import React from 'react';
+import { EuiHeaderLinks } from '@elastic/eui';
+import { AddDataContextMenu } from './add_data_action_menu';
+
+export function HeaderActionMenuItems() {
+ return (
+
+
+
+ );
+}
diff --git a/x-pack/plugins/observability_solution/inventory/public/components/app_root/index.tsx b/x-pack/plugins/observability_solution/inventory/public/components/app_root/index.tsx
new file mode 100644
index 0000000000000..80fc8cbe3d604
--- /dev/null
+++ b/x-pack/plugins/observability_solution/inventory/public/components/app_root/index.tsx
@@ -0,0 +1,66 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app';
+import React from 'react';
+import { type AppMountParameters, type CoreStart } from '@kbn/core/public';
+import { RouteRenderer, RouterProvider } from '@kbn/typed-react-router-config';
+import { HeaderMenuPortal } from '@kbn/observability-shared-plugin/public';
+import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
+import { InventoryContextProvider } from '../inventory_context_provider';
+import { inventoryRouter } from '../../routes/config';
+import { HeaderActionMenuItems } from './header_action_menu';
+import { InventoryStartDependencies } from '../../types';
+import { InventoryServices } from '../../services/types';
+
+export function AppRoot({
+ coreStart,
+ pluginsStart,
+ services,
+ appMountParameters,
+}: {
+ coreStart: CoreStart;
+ pluginsStart: InventoryStartDependencies;
+ services: InventoryServices;
+} & { appMountParameters: AppMountParameters }) {
+ const { history } = appMountParameters;
+
+ const context = {
+ ...coreStart,
+ ...pluginsStart,
+ ...services,
+ };
+
+ return (
+
+
+
+
+
+
+
+
+ );
+}
+
+export function InventoryHeaderActionMenu({
+ appMountParameters,
+}: {
+ appMountParameters: AppMountParameters;
+}) {
+ const { setHeaderActionMenu, theme$ } = appMountParameters;
+
+ return (
+
+
+
+
+
+
+
+ );
+}
diff --git a/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/index.tsx b/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/index.tsx
index 4dd8eaf3899ee..7c5d94fe26449 100644
--- a/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/index.tsx
+++ b/x-pack/plugins/observability_solution/inventory/public/components/inventory_page_template/index.tsx
@@ -10,9 +10,7 @@ import { useKibana } from '../../hooks/use_kibana';
export function InventoryPageTemplate({ children }: { children: React.ReactNode }) {
const {
- dependencies: {
- start: { observabilityShared },
- },
+ services: { observabilityShared },
} = useKibana();
const { PageTemplate: ObservabilityPageTemplate } = observabilityShared.navigation;
diff --git a/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_abortable_async.ts b/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_abortable_async.ts
index 60b2fca72e721..84cef842488e0 100644
--- a/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_abortable_async.ts
+++ b/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_abortable_async.ts
@@ -14,7 +14,7 @@ const getDetailsFromErrorResponse = (error: IHttpFetchError)
export function useInventoryAbortableAsync(...args: Parameters>) {
const {
- core: { notifications },
+ services: { notifications },
} = useKibana();
const response = useAbortableAsync(...args);
diff --git a/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_router.ts b/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_router.ts
index 5c968eaf852ed..a917daf576ded 100644
--- a/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_router.ts
+++ b/x-pack/plugins/observability_solution/inventory/public/hooks/use_inventory_router.ts
@@ -24,7 +24,7 @@ interface StatefulInventoryRouter extends InventoryRouter {
export function useInventoryRouter(): StatefulInventoryRouter {
const {
- core: {
+ services: {
http,
application: { navigateToApp },
},
diff --git a/x-pack/plugins/observability_solution/inventory/public/hooks/use_kibana.tsx b/x-pack/plugins/observability_solution/inventory/public/hooks/use_kibana.tsx
index 2b75cc513b241..0baf2acbc32b8 100644
--- a/x-pack/plugins/observability_solution/inventory/public/hooks/use_kibana.tsx
+++ b/x-pack/plugins/observability_solution/inventory/public/hooks/use_kibana.tsx
@@ -5,19 +5,13 @@
* 2.0.
*/
-import { useKibana } from '@kbn/kibana-react-plugin/public';
import type { CoreStart } from '@kbn/core/public';
+import { type KibanaReactContextValue, useKibana } from '@kbn/kibana-react-plugin/public';
import type { InventoryStartDependencies } from '../types';
import type { InventoryServices } from '../services/types';
-export interface InventoryKibanaContext {
- core: CoreStart;
- dependencies: { start: InventoryStartDependencies };
- services: InventoryServices;
-}
+export type InventoryKibanaContext = CoreStart & InventoryStartDependencies & InventoryServices;
-const useTypedKibana = () => {
- return useKibana().services;
-};
+const useTypedKibana = useKibana as () => KibanaReactContextValue;
export { useTypedKibana as useKibana };
diff --git a/x-pack/plugins/observability_solution/inventory/public/plugin.tsx b/x-pack/plugins/observability_solution/inventory/public/plugin.ts
similarity index 77%
rename from x-pack/plugins/observability_solution/inventory/public/plugin.tsx
rename to x-pack/plugins/observability_solution/inventory/public/plugin.ts
index 0cb7df9552c74..c196ed41ae5f3 100644
--- a/x-pack/plugins/observability_solution/inventory/public/plugin.tsx
+++ b/x-pack/plugins/observability_solution/inventory/public/plugin.ts
@@ -4,13 +4,11 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
-import React from 'react';
-import ReactDOM from 'react-dom';
+
import { i18n } from '@kbn/i18n';
import { from, map } from 'rxjs';
import {
AppMountParameters,
- APP_WRAPPER_CLASS,
CoreSetup,
CoreStart,
DEFAULT_APP_CATEGORIES,
@@ -19,7 +17,6 @@ import {
} from '@kbn/core/public';
import type { Logger } from '@kbn/logging';
import { INVENTORY_APP_ID } from '@kbn/deeplinks-observability/constants';
-import { css } from '@emotion/css';
import type {
ConfigSchema,
InventoryPublicSetup,
@@ -29,6 +26,7 @@ import type {
} from './types';
import { InventoryServices } from './services/types';
import { createCallInventoryAPI } from './api';
+import { TelemetryService } from './services/telemetry/telemetry_service';
export class InventoryPlugin
implements
@@ -40,15 +38,18 @@ export class InventoryPlugin
>
{
logger: Logger;
+ telemetry: TelemetryService;
constructor(context: PluginInitializerContext) {
this.logger = context.logger.get();
+ this.telemetry = new TelemetryService();
}
setup(
coreSetup: CoreSetup,
pluginsSetup: InventorySetupDependencies
): InventoryPublicSetup {
const inventoryAPIClient = createCallInventoryAPI(coreSetup);
+ this.telemetry.setup({ analytics: coreSetup.analytics });
pluginsSetup.observabilityShared.navigation.registerSections(
from(coreSetup.getStartServices()).pipe(
@@ -75,6 +76,8 @@ export class InventoryPlugin
)
);
+ const telemetry = this.telemetry.start();
+
coreSetup.application.register({
id: INVENTORY_APP_ID,
title: i18n.translate('xpack.inventory.appTitle', {
@@ -96,38 +99,22 @@ export class InventoryPlugin
],
mount: async (appMountParameters: AppMountParameters) => {
// Load application bundle and Get start services
- const [{ Application }, [coreStart, pluginsStart]] = await Promise.all([
+ const [{ renderApp }, [coreStart, pluginsStart]] = await Promise.all([
import('./application'),
coreSetup.getStartServices(),
]);
const services: InventoryServices = {
inventoryAPIClient,
+ telemetry,
};
- ReactDOM.render(
- ,
- appMountParameters.element
- );
-
- const appWrapperClassName = css`
- overflow: auto;
- `;
-
- const appWrapperElement = document.getElementsByClassName(APP_WRAPPER_CLASS)[1];
-
- appWrapperElement.classList.add(appWrapperClassName);
-
- return () => {
- ReactDOM.unmountComponentAtNode(appMountParameters.element);
- appWrapperElement.classList.remove(appWrapperClassName);
- };
+ return renderApp({
+ coreStart,
+ pluginsStart,
+ services,
+ appMountParameters,
+ });
},
});
diff --git a/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_client.ts b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_client.ts
new file mode 100644
index 0000000000000..1e36e8d6649ae
--- /dev/null
+++ b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_client.ts
@@ -0,0 +1,17 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import { AnalyticsServiceSetup } from '@kbn/core-analytics-browser';
+import { type ITelemetryClient, TelemetryEventTypes, type InventoryAddDataParams } from './types';
+
+export class TelemetryClient implements ITelemetryClient {
+ constructor(private analytics: AnalyticsServiceSetup) {}
+
+ public reportInventoryAddData = (params: InventoryAddDataParams) => {
+ this.analytics.reportEvent(TelemetryEventTypes.INVENTORY_ADD_DATA_CLICKED, params);
+ };
+}
diff --git a/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_events.ts b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_events.ts
new file mode 100644
index 0000000000000..c1509499e694b
--- /dev/null
+++ b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_events.ts
@@ -0,0 +1,28 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+import { TelemetryEventTypes, TelemetryEvent } from './types';
+
+const inventoryAddDataEventType: TelemetryEvent = {
+ eventType: TelemetryEventTypes.INVENTORY_ADD_DATA_CLICKED,
+ schema: {
+ view: {
+ type: 'keyword',
+ _meta: {
+ description: 'Where the action was initiated (add_data_button)',
+ },
+ },
+ journey: {
+ type: 'keyword',
+ _meta: {
+ optional: true,
+ description: 'Which action was performed (add_data or associate_existing_service_logs)',
+ },
+ },
+ },
+};
+
+export const inventoryTelemetryEventBasedTypes = [inventoryAddDataEventType];
diff --git a/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts
new file mode 100644
index 0000000000000..ffa05ffbff9a2
--- /dev/null
+++ b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts
@@ -0,0 +1,76 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+import { coreMock } from '@kbn/core/server/mocks';
+import { inventoryTelemetryEventBasedTypes } from './telemetry_events';
+
+import { TelemetryService } from './telemetry_service';
+import { TelemetryEventTypes } from './types';
+
+describe('TelemetryService', () => {
+ let service: TelemetryService;
+
+ beforeEach(() => {
+ service = new TelemetryService();
+ });
+
+ const getSetupParams = () => {
+ const mockCoreStart = coreMock.createSetup();
+ return {
+ analytics: mockCoreStart.analytics,
+ };
+ };
+
+ describe('#setup()', () => {
+ it('should register all the custom events', () => {
+ const setupParams = getSetupParams();
+ service.setup(setupParams);
+
+ expect(setupParams.analytics.registerEventType).toHaveBeenCalledTimes(
+ inventoryTelemetryEventBasedTypes.length
+ );
+
+ inventoryTelemetryEventBasedTypes.forEach((eventConfig, pos) => {
+ expect(setupParams.analytics.registerEventType).toHaveBeenNthCalledWith(
+ pos + 1,
+ eventConfig
+ );
+ });
+ });
+ });
+
+ describe('#start()', () => {
+ it('should return all the available tracking methods', () => {
+ const setupParams = getSetupParams();
+ service.setup(setupParams);
+ const telemetry = service.start();
+
+ expect(telemetry).toHaveProperty('reportInventoryAddData');
+ });
+ });
+
+ describe('#reportInventoryAddData', () => {
+ it('should report inventory add data clicked with properties', async () => {
+ const setupParams = getSetupParams();
+ service.setup(setupParams);
+ const telemetry = service.start();
+
+ telemetry.reportInventoryAddData({
+ view: 'add_data_button',
+ journey: 'add_data',
+ });
+
+ expect(setupParams.analytics.reportEvent).toHaveBeenCalledTimes(1);
+ expect(setupParams.analytics.reportEvent).toHaveBeenCalledWith(
+ TelemetryEventTypes.INVENTORY_ADD_DATA_CLICKED,
+ {
+ view: 'add_data_button',
+ journey: 'add_data',
+ }
+ );
+ });
+ });
+});
diff --git a/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.ts b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.ts
new file mode 100644
index 0000000000000..fa416f76b3c16
--- /dev/null
+++ b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.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 { AnalyticsServiceSetup } from '@kbn/core-analytics-browser';
+import type { TelemetryServiceSetupParams, ITelemetryClient, TelemetryEventParams } from './types';
+import { inventoryTelemetryEventBasedTypes } from './telemetry_events';
+import { TelemetryClient } from './telemetry_client';
+
+/**
+ * Service that interacts with the Core's analytics module
+ */
+export class TelemetryService {
+ constructor(private analytics: AnalyticsServiceSetup | null = null) {}
+
+ public setup({ analytics }: TelemetryServiceSetupParams) {
+ this.analytics = analytics;
+
+ inventoryTelemetryEventBasedTypes.forEach((eventConfig) =>
+ analytics.registerEventType(eventConfig)
+ );
+ }
+
+ public start(): ITelemetryClient {
+ if (!this.analytics) {
+ throw new Error(
+ 'The TelemetryService.setup() method has not been invoked, be sure to call it during the plugin setup.'
+ );
+ }
+
+ return new TelemetryClient(this.analytics);
+ }
+}
diff --git a/x-pack/plugins/observability_solution/inventory/public/services/telemetry/types.ts b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/types.ts
new file mode 100644
index 0000000000000..494391aa1a7c1
--- /dev/null
+++ b/x-pack/plugins/observability_solution/inventory/public/services/telemetry/types.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import type { AnalyticsServiceSetup, RootSchema } from '@kbn/core/public';
+
+export interface TelemetryServiceSetupParams {
+ analytics: AnalyticsServiceSetup;
+}
+
+export interface InventoryAddDataParams {
+ view: 'add_data_button';
+ journey?: 'add_data' | 'associate_existing_service_logs';
+}
+
+export type TelemetryEventParams = InventoryAddDataParams;
+
+export interface ITelemetryClient {
+ reportInventoryAddData(params: InventoryAddDataParams): void;
+}
+
+export enum TelemetryEventTypes {
+ INVENTORY_ADD_DATA_CLICKED = 'inventory_add_data_clicked',
+}
+
+export interface TelemetryEvent {
+ eventType: TelemetryEventTypes;
+ schema: RootSchema;
+}
diff --git a/x-pack/plugins/observability_solution/inventory/public/services/types.ts b/x-pack/plugins/observability_solution/inventory/public/services/types.ts
index 008437fbf8895..d0cc176e7b53f 100644
--- a/x-pack/plugins/observability_solution/inventory/public/services/types.ts
+++ b/x-pack/plugins/observability_solution/inventory/public/services/types.ts
@@ -6,7 +6,9 @@
*/
import type { InventoryAPIClient } from '../api';
+import type { ITelemetryClient } from './telemetry/types';
export interface InventoryServices {
inventoryAPIClient: InventoryAPIClient;
+ telemetry: ITelemetryClient;
}
diff --git a/x-pack/plugins/observability_solution/inventory/public/types.ts b/x-pack/plugins/observability_solution/inventory/public/types.ts
index 66c0789650a08..88a3188c45a57 100644
--- a/x-pack/plugins/observability_solution/inventory/public/types.ts
+++ b/x-pack/plugins/observability_solution/inventory/public/types.ts
@@ -9,6 +9,7 @@ import type {
ObservabilitySharedPluginSetup,
} from '@kbn/observability-shared-plugin/public';
import type { InferencePublicStart, InferencePublicSetup } from '@kbn/inference-plugin/public';
+import type { SharePluginStart } from '@kbn/share-plugin/public';
/* eslint-disable @typescript-eslint/no-empty-interface*/
@@ -22,6 +23,7 @@ export interface InventorySetupDependencies {
export interface InventoryStartDependencies {
observabilityShared: ObservabilitySharedPluginStart;
inference: InferencePublicStart;
+ share: SharePluginStart;
}
export interface InventoryPublicSetup {}
diff --git a/x-pack/plugins/observability_solution/inventory/tsconfig.json b/x-pack/plugins/observability_solution/inventory/tsconfig.json
index 5c17e404701d5..324dc1d08cdb9 100644
--- a/x-pack/plugins/observability_solution/inventory/tsconfig.json
+++ b/x-pack/plugins/observability_solution/inventory/tsconfig.json
@@ -12,10 +12,7 @@
"server/**/*",
".storybook/**/*"
],
- "exclude": [
- "target/**/*",
- ".storybook/**/*.js"
- ],
+ "exclude": ["target/**/*", ".storybook/**/*.js"],
"kbn_references": [
"@kbn/core",
"@kbn/logging",
@@ -32,12 +29,14 @@
"@kbn/licensing-plugin",
"@kbn/inference-plugin",
"@kbn/data-views-plugin",
+ "@kbn/share-plugin",
"@kbn/server-route-repository-client",
"@kbn/react-kibana-context-render",
"@kbn/es-types",
"@kbn/entities-schema",
"@kbn/i18n-react",
"@kbn/io-ts-utils",
+ "@kbn/core-analytics-browser",
"@kbn/core-http-browser"
]
}
From cf6e8b5ba971fffe2a57e1a7c573e60cc2fbe280 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mike=20C=C3=B4t=C3=A9?=
Date: Fri, 20 Sep 2024 13:52:26 -0400
Subject: [PATCH 30/42] Fix memory leak in task manager task runner (#193612)
In this PR, I'm fixing a memory leak that was introduced in
https://github.com/elastic/kibana/pull/190093 where every task runner
class object wouldn't free up in memory because it subscribed to the
`pollIntervalConfiguration$` observable. To fix this, I moved the
observable up a class into `TaskPollingLifecycle` which only gets
created once on plugin start and then pass down the pollInterval value
via a function call the task runner class can call.
---
.../task_manager/server/polling_lifecycle.ts | 9 ++++++---
.../server/task_running/task_runner.test.ts | 3 +--
.../server/task_running/task_runner.ts | 14 +++++---------
3 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/x-pack/plugins/task_manager/server/polling_lifecycle.ts b/x-pack/plugins/task_manager/server/polling_lifecycle.ts
index 81a65009391f6..4176f7a03312f 100644
--- a/x-pack/plugins/task_manager/server/polling_lifecycle.ts
+++ b/x-pack/plugins/task_manager/server/polling_lifecycle.ts
@@ -84,7 +84,6 @@ export class TaskPollingLifecycle implements ITaskEventEmitter;
private logger: Logger;
public pool: TaskPool;
@@ -95,6 +94,7 @@ export class TaskPollingLifecycle implements ITaskEventEmitter {
+ this.currentPollInterval = pollInterval;
+ });
const emitEvent = (event: TaskLifecycleEvent) => this.events$.next(event);
@@ -225,7 +228,7 @@ export class TaskPollingLifecycle implements ITaskEventEmitter this.currentPollInterval,
});
};
diff --git a/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts b/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts
index 4f21bf35619ef..d9016395b6cc2 100644
--- a/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts
+++ b/x-pack/plugins/task_manager/server/task_running/task_runner.test.ts
@@ -9,7 +9,6 @@ import _ from 'lodash';
import sinon from 'sinon';
import { secondsFromNow } from '../lib/intervals';
import { asOk, asErr } from '../lib/result_type';
-import { BehaviorSubject } from 'rxjs';
import {
createTaskRunError,
TaskErrorSource,
@@ -2502,7 +2501,7 @@ describe('TaskManagerRunner', () => {
}),
allowReadingInvalidState: opts.allowReadingInvalidState || false,
strategy: opts.strategy ?? CLAIM_STRATEGY_UPDATE_BY_QUERY,
- pollIntervalConfiguration$: new BehaviorSubject(500),
+ getPollInterval: () => 500,
});
if (stage === TaskRunningStage.READY_TO_RUN) {
diff --git a/x-pack/plugins/task_manager/server/task_running/task_runner.ts b/x-pack/plugins/task_manager/server/task_running/task_runner.ts
index 32b48c5caf58b..b68cbe1c85e53 100644
--- a/x-pack/plugins/task_manager/server/task_running/task_runner.ts
+++ b/x-pack/plugins/task_manager/server/task_running/task_runner.ts
@@ -11,7 +11,6 @@
* rescheduling, middleware application, etc.
*/
-import { Observable } from 'rxjs';
import apm from 'elastic-apm-node';
import { v4 as uuidv4 } from 'uuid';
import { withSpan } from '@kbn/apm-utils';
@@ -113,7 +112,7 @@ type Opts = {
config: TaskManagerConfig;
allowReadingInvalidState: boolean;
strategy: string;
- pollIntervalConfiguration$: Observable;
+ getPollInterval: () => number;
} & Pick;
export enum TaskRunResult {
@@ -166,7 +165,7 @@ export class TaskManagerRunner implements TaskRunner {
private config: TaskManagerConfig;
private readonly taskValidator: TaskValidator;
private readonly claimStrategy: string;
- private currentPollInterval: number;
+ private getPollInterval: () => number;
/**
* Creates an instance of TaskManagerRunner.
@@ -192,7 +191,7 @@ export class TaskManagerRunner implements TaskRunner {
config,
allowReadingInvalidState,
strategy,
- pollIntervalConfiguration$,
+ getPollInterval,
}: Opts) {
this.instance = asPending(sanitizeInstance(instance));
this.definitions = definitions;
@@ -212,10 +211,7 @@ export class TaskManagerRunner implements TaskRunner {
allowReadingInvalidState,
});
this.claimStrategy = strategy;
- this.currentPollInterval = config.poll_interval;
- pollIntervalConfiguration$.subscribe((pollInterval) => {
- this.currentPollInterval = pollInterval;
- });
+ this.getPollInterval = getPollInterval;
}
/**
@@ -656,7 +652,7 @@ export class TaskManagerRunner implements TaskRunner {
startedAt: this.instance.task.startedAt,
schedule: updatedTaskSchedule,
},
- this.currentPollInterval
+ this.getPollInterval()
),
state,
schedule: updatedTaskSchedule,
From 374351af564030dc047ea9ef4d780b67b976ac79 Mon Sep 17 00:00:00 2001
From: Pierre Gayvallet
Date: Fri, 20 Sep 2024 20:07:54 +0200
Subject: [PATCH 31/42] [Simulated function calling] specify that only one tool
call can be performed at a time (#193556)
## Summary
Title.
Co-authored-by: Elastic Machine
---
.../simulated_function_calling/get_system_instructions.ts | 3 +++
.../get_system_message_instructions.ts | 3 +++
2 files changed, 6 insertions(+)
diff --git a/x-pack/plugins/inference/server/chat_complete/simulated_function_calling/get_system_instructions.ts b/x-pack/plugins/inference/server/chat_complete/simulated_function_calling/get_system_instructions.ts
index 848b8d1f44f07..abfc48dfa2ef2 100644
--- a/x-pack/plugins/inference/server/chat_complete/simulated_function_calling/get_system_instructions.ts
+++ b/x-pack/plugins/inference/server/chat_complete/simulated_function_calling/get_system_instructions.ts
@@ -32,6 +32,9 @@ export function getSystemMessageInstructions({
IMPORTANT: make sure you start and end a tool call with the ${TOOL_USE_START} and ${TOOL_USE_END} markers, it MUST
be included in the tool call.
+ You can only call A SINGLE TOOL at a time. Do not call multiple tools, or multiple times the same tool, in the same
+ response.
+
You may call tools like this:
${TOOL_USE_START}
diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/get_system_message_instructions.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/get_system_message_instructions.ts
index c80ac022ca6c0..eaf89233a2bcd 100644
--- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/get_system_message_instructions.ts
+++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/simulate_function_calling/get_system_message_instructions.ts
@@ -33,6 +33,9 @@ export function getSystemMessageInstructions({
IMPORTANT: make sure you start and end a tool call with the ${TOOL_USE_START} and ${TOOL_USE_END} markers, it MUST
be included in the tool call.
+ You can only call A SINGLE TOOL at a time. Do not call multiple tools, or multiple times the same tool, in the same
+ response.
+
You may call tools like this:
${TOOL_USE_START}
From 35edfd0edc1f809f07b368117affa98bc83aac7e Mon Sep 17 00:00:00 2001
From: Nathan L Smith
Date: Fri, 20 Sep 2024 13:12:20 -0500
Subject: [PATCH 32/42] Fix code scanning alert #419: Incomplete string
escaping or encoding (#193365)
Fixes
[https://github.com/elastic/kibana/security/code-scanning/419](https://github.com/elastic/kibana/security/code-scanning/419)
_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
---
.../metrics_explorer/components/helpers/create_tsvb_link.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts
index ee64069cea737..c4ad0cdcf812c 100644
--- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts
+++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts
@@ -114,7 +114,7 @@ export const createFilterFromOptions = (
filters.push(options.filterQuery);
}
if (options.groupBy) {
- const id = series.id.replace('"', '\\"');
+ const id = series.id.replace(/"/g, '\\"');
const groupByFilters = Array.isArray(options.groupBy)
? options.groupBy
.map((field, index) => {
@@ -125,7 +125,7 @@ export const createFilterFromOptions = (
if (!value) {
return null;
}
- return `${field}: "${value.replace('"', '\\"')}"`;
+ return `${field}: "${value.replace(/"/g, '\\"')}"`;
})
.join(' and ')
: `${options.groupBy} : "${id}"`;
From 574eb26cc70e36274384d82c36d9d6aa20ed7cc7 Mon Sep 17 00:00:00 2001
From: Hannah Mudge
Date: Fri, 20 Sep 2024 14:08:18 -0600
Subject: [PATCH 33/42] [Embeddable Rebuild] [Controls] Remove `react_controls`
top-level folder (#193451)
Final part of https://github.com/elastic/kibana/issues/192005
## Summary
This PR marks the "final" major cleanup step for the control group
refactor. This one is the simplest and does two things:
1. It removes the outer `react_controls` folder so that the new controls
live directly under the `public` folder
2. It moves the `external_api` folder under the `control_group` folder
Any files marked as "new" were not actually modified - this PR contains
**no** logic changes. It **only** contains import changes due to the
folder structure changing.
### 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)
---
.../public/actions/delete_control_action.test.tsx | 11 ++++-------
.../public/actions/edit_control_action.test.tsx | 11 ++++-------
.../edit_control_action_compatibility_check.ts | 5 +++--
.../{react_controls => }/control_factory_registry.ts | 0
.../control_group/components/control_clone.tsx | 2 +-
.../control_group/components/control_error.tsx | 0
.../control_group/components/control_group.scss | 0
.../control_group/components/control_group.tsx | 2 +-
.../components/control_group_editor.test.tsx | 4 ++--
.../control_group/components/control_group_editor.tsx | 2 +-
.../control_group/components/control_panel.scss | 0
.../control_group/components/control_panel.test.tsx | 2 +-
.../control_group/components/control_panel.tsx | 2 +-
.../control_group/components/control_renderer.tsx | 2 +-
.../components/control_setting_tooltip_label.tsx | 0
.../control_group/control_fetch/chaining.test.ts | 2 +-
.../control_group/control_fetch/chaining.ts | 2 +-
.../control_group/control_fetch/control_fetch.ts | 0
.../control_fetch/control_group_fetch.ts | 2 +-
.../control_group/control_fetch/index.ts | 0
.../control_group_renderer.test.tsx | 2 +-
.../control_group_renderer.tsx | 4 ++--
.../control_group_renderer_lazy.tsx | 0
.../control_group_renderer}/index.ts | 0
.../control_group_renderer}/types.ts | 0
.../control_group/control_group_strings.tsx | 0
.../control_group_unsaved_changes_api.ts | 2 +-
.../control_group/get_control_group_factory.tsx | 6 +++---
.../control_group/init_controls_manager.test.ts | 8 ++------
.../control_group/init_controls_manager.ts | 4 ++--
.../control_group/open_edit_control_group_flyout.tsx | 2 +-
.../register_control_group_embeddable.ts | 4 ++--
.../control_group/selections_manager.test.ts | 0
.../control_group/selections_manager.ts | 0
.../{react_controls => }/control_group/types.ts | 2 +-
.../utils/control_group_state_builder.ts | 6 +++---
.../control_group/utils/initialization_utils.ts | 2 +-
.../control_group/utils/serialization_utils.ts | 2 +-
.../public/{react_controls => }/controls/constants.ts | 0
.../controls/data_controls/data_control_constants.tsx | 2 +-
.../data_controls/data_control_editor.test.tsx | 4 ++--
.../controls/data_controls/data_control_editor.tsx | 4 ++--
.../data_controls/data_control_editor_utils.ts | 0
.../controls/data_controls/editor_constants.ts | 0
.../data_controls/initialize_data_control.test.tsx | 2 +-
.../controls/data_controls/initialize_data_control.ts | 4 ++--
.../controls/data_controls/mocks/api_mocks.tsx | 2 +-
.../controls/data_controls/mocks/factory_mocks.tsx | 0
.../data_controls/open_data_control_editor.tsx | 4 ++--
.../options_list_control/components/options_list.scss | 0
.../components/options_list_control.test.tsx | 0
.../components/options_list_control.tsx | 2 +-
.../components/options_list_editor_options.test.tsx | 4 ++--
.../components/options_list_editor_options.tsx | 4 ++--
.../components/options_list_popover.test.tsx | 2 +-
.../components/options_list_popover.tsx | 0
.../components/options_list_popover_action_bar.tsx | 2 +-
.../components/options_list_popover_empty_message.tsx | 0
.../components/options_list_popover_footer.tsx | 0
.../options_list_popover_invalid_selections.tsx | 0
.../options_list_popover_sorting_button.test.tsx | 0
.../options_list_popover_sorting_button.tsx | 2 +-
.../options_list_popover_suggestion_badge.tsx | 0
.../components/options_list_popover_suggestions.tsx | 4 ++--
.../data_controls/options_list_control/constants.ts | 2 +-
.../options_list_control/fetch_and_validate.tsx | 6 +++---
.../get_options_list_control_factory.test.tsx | 2 +-
.../get_options_list_control_factory.tsx | 6 +++---
.../options_list_context_provider.tsx | 2 +-
.../options_list_control_selections.ts | 4 ++--
.../options_list_control/options_list_fetch_cache.ts | 4 ++--
.../options_list_control/options_list_strings.ts | 2 +-
.../register_options_list_control.ts | 4 ++--
.../data_controls/options_list_control/types.ts | 2 +-
.../controls/data_controls/publishes_async_filters.ts | 0
.../range_slider/components/range_slider.styles.ts | 0
.../range_slider/components/range_slider_control.tsx | 0
.../get_range_slider_control_factory.test.tsx | 2 +-
.../range_slider/get_range_slider_control_factory.tsx | 2 +-
.../data_controls/range_slider/has_no_results.ts | 2 +-
.../controls/data_controls/range_slider/min_max.ts | 2 +-
.../range_slider/range_control_selections.ts | 0
.../range_slider/range_slider_strings.ts | 0
.../range_slider/register_range_slider_control.ts | 4 ++--
.../controls/data_controls/range_slider/types.ts | 2 +-
.../controls/data_controls/reference_name_utils.ts | 0
.../controls/data_controls/types.ts | 2 +-
.../controls/initialize_default_control_api.tsx | 2 +-
.../controls/mocks/control_mocks.ts | 2 +-
.../controls/timeslider_control/components/index.scss | 0
.../timeslider_control/components/play_button.tsx | 0
.../components/time_slider_anchored_range.tsx | 0
.../components/time_slider_popover_button.tsx | 0
.../components/time_slider_popover_content.tsx | 0
.../components/time_slider_prepend.tsx | 0
.../components/time_slider_sliding_window_range.tsx | 0
.../components/time_slider_strings.ts | 0
.../timeslider_control/get_time_range_meta.ts | 2 +-
.../get_timeslider_control_factory.test.tsx | 2 +-
.../get_timeslider_control_factory.tsx | 2 +-
.../timeslider_control/init_time_range_percentage.ts | 0
.../init_time_range_subscription.ts | 0
.../timeslider_control/register_timeslider_control.ts | 4 ++--
.../controls/timeslider_control/time_utils.tsx | 0
.../controls/timeslider_control/types.ts | 2 +-
.../public/{react_controls => }/controls/types.ts | 4 ++--
src/plugins/controls/public/index.ts | 11 ++++-------
src/plugins/controls/public/plugin.ts | 8 ++++----
.../dashboard_control_group_integration.test.ts | 2 --
109 files changed, 106 insertions(+), 120 deletions(-)
rename src/plugins/controls/public/{react_controls => }/control_factory_registry.ts (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_clone.tsx (97%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_error.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_group.scss (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_group.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_group_editor.test.tsx (96%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_group_editor.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_panel.scss (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_panel.test.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_panel.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_renderer.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/control_group/components/control_setting_tooltip_label.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/chaining.test.ts (99%)
rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/chaining.ts (98%)
rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/control_fetch.ts (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/control_group_fetch.ts (97%)
rename src/plugins/controls/public/{react_controls => }/control_group/control_fetch/index.ts (100%)
rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/control_group_renderer.test.tsx (97%)
rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/control_group_renderer.tsx (97%)
rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/control_group_renderer_lazy.tsx (100%)
rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/index.ts (100%)
rename src/plugins/controls/public/{react_controls/external_api => control_group/control_group_renderer}/types.ts (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/control_group_strings.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/control_group_unsaved_changes_api.ts (99%)
rename src/plugins/controls/public/{react_controls => }/control_group/get_control_group_factory.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/control_group/init_controls_manager.test.ts (98%)
rename src/plugins/controls/public/{react_controls => }/control_group/init_controls_manager.ts (99%)
rename src/plugins/controls/public/{react_controls => }/control_group/open_edit_control_group_flyout.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/control_group/register_control_group_embeddable.ts (87%)
rename src/plugins/controls/public/{react_controls => }/control_group/selections_manager.test.ts (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/selections_manager.ts (100%)
rename src/plugins/controls/public/{react_controls => }/control_group/types.ts (99%)
rename src/plugins/controls/public/{react_controls => }/control_group/utils/control_group_state_builder.ts (95%)
rename src/plugins/controls/public/{react_controls => }/control_group/utils/initialization_utils.ts (96%)
rename src/plugins/controls/public/{react_controls => }/control_group/utils/serialization_utils.ts (98%)
rename src/plugins/controls/public/{react_controls => }/controls/constants.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/data_control_constants.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/data_control_editor.test.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/data_control_editor.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/data_control_editor_utils.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/editor_constants.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/initialize_data_control.test.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/initialize_data_control.ts (98%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/mocks/api_mocks.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/mocks/factory_mocks.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/open_data_control_editor.tsx (96%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list.scss (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_control.test.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_control.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_editor_options.tsx (97%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover.test.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx (98%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx (97%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/constants.ts (94%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/fetch_and_validate.tsx (94%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/get_options_list_control_factory.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/options_list_context_provider.tsx (97%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/options_list_control_selections.ts (93%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/options_list_fetch_cache.ts (96%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/options_list_strings.ts (99%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/register_options_list_control.ts (85%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/options_list_control/types.ts (97%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/publishes_async_filters.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/components/range_slider.styles.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/components/range_slider_control.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/get_range_slider_control_factory.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/has_no_results.ts (98%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/min_max.ts (98%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/range_control_selections.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/range_slider_strings.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/register_range_slider_control.ts (85%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/range_slider/types.ts (91%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/reference_name_utils.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/data_controls/types.ts (97%)
rename src/plugins/controls/public/{react_controls => }/controls/initialize_default_control_api.tsx (96%)
rename src/plugins/controls/public/{react_controls => }/controls/mocks/control_mocks.ts (97%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/index.scss (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/play_button.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_anchored_range.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_popover_button.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_popover_content.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_prepend.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_sliding_window_range.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/components/time_slider_strings.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/get_time_range_meta.ts (96%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/get_timeslider_control_factory.test.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/get_timeslider_control_factory.tsx (99%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/init_time_range_percentage.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/init_time_range_subscription.ts (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/register_timeslider_control.ts (85%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/time_utils.tsx (100%)
rename src/plugins/controls/public/{react_controls => }/controls/timeslider_control/types.ts (94%)
rename src/plugins/controls/public/{react_controls => }/controls/types.ts (96%)
diff --git a/src/plugins/controls/public/actions/delete_control_action.test.tsx b/src/plugins/controls/public/actions/delete_control_action.test.tsx
index c158d743f69ae..56b020962a9f7 100644
--- a/src/plugins/controls/public/actions/delete_control_action.test.tsx
+++ b/src/plugins/controls/public/actions/delete_control_action.test.tsx
@@ -10,14 +10,11 @@
import { BehaviorSubject } from 'rxjs';
import { ViewMode } from '@kbn/presentation-publishing';
-import { getOptionsListControlFactory } from '../react_controls/controls/data_controls/options_list_control/get_options_list_control_factory';
-import { OptionsListControlApi } from '../react_controls/controls/data_controls/options_list_control/types';
-import {
- getMockedBuildApi,
- getMockedControlGroupApi,
-} from '../react_controls/controls/mocks/control_mocks';
-import { DeleteControlAction } from './delete_control_action';
+import { getOptionsListControlFactory } from '../controls/data_controls/options_list_control/get_options_list_control_factory';
+import { OptionsListControlApi } from '../controls/data_controls/options_list_control/types';
+import { getMockedBuildApi, getMockedControlGroupApi } from '../controls/mocks/control_mocks';
import { coreServices } from '../services/kibana_services';
+import { DeleteControlAction } from './delete_control_action';
const dashboardApi = {
viewMode: new BehaviorSubject('view'),
diff --git a/src/plugins/controls/public/actions/edit_control_action.test.tsx b/src/plugins/controls/public/actions/edit_control_action.test.tsx
index b1c24d779aaf6..497223d9f0889 100644
--- a/src/plugins/controls/public/actions/edit_control_action.test.tsx
+++ b/src/plugins/controls/public/actions/edit_control_action.test.tsx
@@ -13,13 +13,10 @@ import dateMath from '@kbn/datemath';
import type { TimeRange } from '@kbn/es-query';
import type { ViewMode } from '@kbn/presentation-publishing';
-import { getOptionsListControlFactory } from '../react_controls/controls/data_controls/options_list_control/get_options_list_control_factory';
-import type { OptionsListControlApi } from '../react_controls/controls/data_controls/options_list_control/types';
-import {
- getMockedBuildApi,
- getMockedControlGroupApi,
-} from '../react_controls/controls/mocks/control_mocks';
-import { getTimesliderControlFactory } from '../react_controls/controls/timeslider_control/get_timeslider_control_factory';
+import { getOptionsListControlFactory } from '../controls/data_controls/options_list_control/get_options_list_control_factory';
+import type { OptionsListControlApi } from '../controls/data_controls/options_list_control/types';
+import { getMockedBuildApi, getMockedControlGroupApi } from '../controls/mocks/control_mocks';
+import { getTimesliderControlFactory } from '../controls/timeslider_control/get_timeslider_control_factory';
import { dataService } from '../services/kibana_services';
import { EditControlAction } from './edit_control_action';
diff --git a/src/plugins/controls/public/actions/edit_control_action_compatibility_check.ts b/src/plugins/controls/public/actions/edit_control_action_compatibility_check.ts
index f74c6b0103c9d..0af5a942dd032 100644
--- a/src/plugins/controls/public/actions/edit_control_action_compatibility_check.ts
+++ b/src/plugins/controls/public/actions/edit_control_action_compatibility_check.ts
@@ -7,6 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
+import { ViewMode } from '@kbn/embeddable-plugin/public';
import { apiIsPresentationContainer } from '@kbn/presentation-containers';
import {
apiCanAccessViewMode,
@@ -17,9 +18,9 @@ import {
getInheritedViewMode,
hasEditCapabilities,
} from '@kbn/presentation-publishing';
-import { ViewMode } from '@kbn/embeddable-plugin/public';
+
import { CONTROL_GROUP_TYPE } from '../../common';
-import { DataControlApi } from '../react_controls/controls/data_controls/types';
+import { DataControlApi } from '../controls/data_controls/types';
export const compatibilityCheck = (api: unknown): api is DataControlApi => {
return Boolean(
diff --git a/src/plugins/controls/public/react_controls/control_factory_registry.ts b/src/plugins/controls/public/control_factory_registry.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_factory_registry.ts
rename to src/plugins/controls/public/control_factory_registry.ts
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_clone.tsx b/src/plugins/controls/public/control_group/components/control_clone.tsx
similarity index 97%
rename from src/plugins/controls/public/react_controls/control_group/components/control_clone.tsx
rename to src/plugins/controls/public/control_group/components/control_clone.tsx
index 38cb7b1703559..7002bbf78d5d4 100644
--- a/src/plugins/controls/public/react_controls/control_group/components/control_clone.tsx
+++ b/src/plugins/controls/public/control_group/components/control_clone.tsx
@@ -13,7 +13,7 @@ import React from 'react';
import { EuiFlexGroup, EuiFlexItem, EuiFormLabel, EuiIcon } from '@elastic/eui';
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
import { BehaviorSubject } from 'rxjs';
-import { DEFAULT_CONTROL_GROW } from '../../../../common';
+import { DEFAULT_CONTROL_GROW } from '../../../common';
import { DefaultControlApi } from '../../controls/types';
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_error.tsx b/src/plugins/controls/public/control_group/components/control_error.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_group/components/control_error.tsx
rename to src/plugins/controls/public/control_group/components/control_error.tsx
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_group.scss b/src/plugins/controls/public/control_group/components/control_group.scss
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_group/components/control_group.scss
rename to src/plugins/controls/public/control_group/components/control_group.scss
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_group.tsx b/src/plugins/controls/public/control_group/components/control_group.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/control_group/components/control_group.tsx
rename to src/plugins/controls/public/control_group/components/control_group.tsx
index 54e778684806a..6453474aa8ff2 100644
--- a/src/plugins/controls/public/react_controls/control_group/components/control_group.tsx
+++ b/src/plugins/controls/public/control_group/components/control_group.tsx
@@ -30,7 +30,7 @@ import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiPanel, EuiToolTip } from '
import { css } from '@emotion/react';
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
-import type { ControlLabelPosition } from '../../../../common';
+import type { ControlLabelPosition } from '../../../common';
import type { DefaultControlApi } from '../../controls/types';
import { ControlGroupStrings } from '../control_group_strings';
import { ControlsInOrder } from '../init_controls_manager';
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_group_editor.test.tsx b/src/plugins/controls/public/control_group/components/control_group_editor.test.tsx
similarity index 96%
rename from src/plugins/controls/public/react_controls/control_group/components/control_group_editor.test.tsx
rename to src/plugins/controls/public/control_group/components/control_group_editor.test.tsx
index b3705106afe2c..a17068228f9a8 100644
--- a/src/plugins/controls/public/react_controls/control_group/components/control_group_editor.test.tsx
+++ b/src/plugins/controls/public/control_group/components/control_group_editor.test.tsx
@@ -12,13 +12,13 @@ import { BehaviorSubject } from 'rxjs';
import { render } from '@testing-library/react';
-import { ControlGroupApi } from '../../..';
+import { ControlGroupApi } from '../..';
import {
ControlGroupChainingSystem,
ControlLabelPosition,
DEFAULT_CONTROL_LABEL_POSITION,
ParentIgnoreSettings,
-} from '../../../../common';
+} from '../../../common';
import { DefaultControlApi } from '../../controls/types';
import { ControlGroupEditor } from './control_group_editor';
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_group_editor.tsx b/src/plugins/controls/public/control_group/components/control_group_editor.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/control_group/components/control_group_editor.tsx
rename to src/plugins/controls/public/control_group/components/control_group_editor.tsx
index c4e7dc61476ba..8f1ccb4d699b0 100644
--- a/src/plugins/controls/public/react_controls/control_group/components/control_group_editor.tsx
+++ b/src/plugins/controls/public/control_group/components/control_group_editor.tsx
@@ -27,7 +27,7 @@ import {
} from '@elastic/eui';
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
-import type { ControlLabelPosition, ParentIgnoreSettings } from '../../../../common';
+import type { ControlLabelPosition, ParentIgnoreSettings } from '../../../common';
import { CONTROL_LAYOUT_OPTIONS } from '../../controls/data_controls/editor_constants';
import type { ControlStateManager } from '../../controls/types';
import { ControlGroupStrings } from '../control_group_strings';
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_panel.scss b/src/plugins/controls/public/control_group/components/control_panel.scss
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_group/components/control_panel.scss
rename to src/plugins/controls/public/control_group/components/control_panel.scss
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_panel.test.tsx b/src/plugins/controls/public/control_group/components/control_panel.test.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/control_group/components/control_panel.test.tsx
rename to src/plugins/controls/public/control_group/components/control_panel.test.tsx
index 365c896bb908e..116e268afe208 100644
--- a/src/plugins/controls/public/react_controls/control_group/components/control_panel.test.tsx
+++ b/src/plugins/controls/public/control_group/components/control_panel.test.tsx
@@ -14,7 +14,7 @@ import { pluginServices as presentationUtilPluginServices } from '@kbn/presentat
import { registry as presentationUtilServicesRegistry } from '@kbn/presentation-util-plugin/public/services/plugin_services.story';
import { render, waitFor } from '@testing-library/react';
-import type { ControlLabelPosition, ControlWidth } from '../../../../common';
+import type { ControlLabelPosition, ControlWidth } from '../../../common';
import { ControlPanel } from './control_panel';
describe('render', () => {
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_panel.tsx b/src/plugins/controls/public/control_group/components/control_panel.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/control_group/components/control_panel.tsx
rename to src/plugins/controls/public/control_group/components/control_panel.tsx
index 7936ebc896c12..73eee5c5146ae 100644
--- a/src/plugins/controls/public/react_controls/control_group/components/control_panel.tsx
+++ b/src/plugins/controls/public/control_group/components/control_panel.tsx
@@ -28,7 +28,7 @@ import {
useBatchedOptionalPublishingSubjects,
} from '@kbn/presentation-publishing';
import { FloatingActions } from '@kbn/presentation-util-plugin/public';
-import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '../../../../common';
+import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '../../../common';
import { ControlPanelProps, DefaultControlApi } from '../../controls/types';
import { ControlError } from './control_error';
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_renderer.tsx b/src/plugins/controls/public/control_group/components/control_renderer.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/control_group/components/control_renderer.tsx
rename to src/plugins/controls/public/control_group/components/control_renderer.tsx
index e2a09012c7df2..a30c39f1dfe2a 100644
--- a/src/plugins/controls/public/react_controls/control_group/components/control_renderer.tsx
+++ b/src/plugins/controls/public/control_group/components/control_renderer.tsx
@@ -13,7 +13,7 @@ import { BehaviorSubject } from 'rxjs';
import { initializeUnsavedChanges } from '@kbn/presentation-containers';
import { StateComparators } from '@kbn/presentation-publishing';
-import type { DefaultControlState } from '../../../../common';
+import type { DefaultControlState } from '../../../common';
import { getControlFactory } from '../../control_factory_registry';
import type { ControlApiRegistration, DefaultControlApi } from '../../controls/types';
import type { ControlGroupApi } from '../types';
diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_setting_tooltip_label.tsx b/src/plugins/controls/public/control_group/components/control_setting_tooltip_label.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_group/components/control_setting_tooltip_label.tsx
rename to src/plugins/controls/public/control_group/components/control_setting_tooltip_label.tsx
diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.test.ts b/src/plugins/controls/public/control_group/control_fetch/chaining.test.ts
similarity index 99%
rename from src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.test.ts
rename to src/plugins/controls/public/control_group/control_fetch/chaining.test.ts
index cb8dfe1d922ce..7c8650a104afe 100644
--- a/src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.test.ts
+++ b/src/plugins/controls/public/control_group/control_fetch/chaining.test.ts
@@ -11,7 +11,7 @@ import { BehaviorSubject, skip } from 'rxjs';
import { Filter } from '@kbn/es-query';
-import { ControlGroupChainingSystem } from '../../../../common';
+import { ControlGroupChainingSystem } from '../../../common';
import { chaining$ } from './chaining';
const FILTER_ALPHA = {
diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.ts b/src/plugins/controls/public/control_group/control_fetch/chaining.ts
similarity index 98%
rename from src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.ts
rename to src/plugins/controls/public/control_group/control_fetch/chaining.ts
index d25a0b5d24cf6..5c82b0eaddf1b 100644
--- a/src/plugins/controls/public/react_controls/control_group/control_fetch/chaining.ts
+++ b/src/plugins/controls/public/control_group/control_fetch/chaining.ts
@@ -24,7 +24,7 @@ import {
apiPublishesTimeslice,
} from '@kbn/presentation-publishing';
-import type { ControlGroupChainingSystem } from '../../../../common';
+import type { ControlGroupChainingSystem } from '../../../common';
export interface ChainingContext {
chainingFilters?: Filter[] | undefined;
diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/control_fetch.ts b/src/plugins/controls/public/control_group/control_fetch/control_fetch.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_group/control_fetch/control_fetch.ts
rename to src/plugins/controls/public/control_group/control_fetch/control_fetch.ts
diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/control_group_fetch.ts b/src/plugins/controls/public/control_group/control_fetch/control_group_fetch.ts
similarity index 97%
rename from src/plugins/controls/public/react_controls/control_group/control_fetch/control_group_fetch.ts
rename to src/plugins/controls/public/control_group/control_fetch/control_group_fetch.ts
index 0339a1a6ac716..ef6da75caa135 100644
--- a/src/plugins/controls/public/react_controls/control_group/control_fetch/control_group_fetch.ts
+++ b/src/plugins/controls/public/control_group/control_fetch/control_group_fetch.ts
@@ -11,7 +11,7 @@ import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query';
import { PublishesUnifiedSearch, PublishingSubject } from '@kbn/presentation-publishing';
import { apiPublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload';
import { BehaviorSubject, debounceTime, map, merge, Observable, switchMap } from 'rxjs';
-import { ParentIgnoreSettings } from '../../../../common';
+import { ParentIgnoreSettings } from '../../../common';
export interface ControlGroupFetchContext {
unifiedSearchFilters?: Filter[] | undefined;
diff --git a/src/plugins/controls/public/react_controls/control_group/control_fetch/index.ts b/src/plugins/controls/public/control_group/control_fetch/index.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_group/control_fetch/index.ts
rename to src/plugins/controls/public/control_group/control_fetch/index.ts
diff --git a/src/plugins/controls/public/react_controls/external_api/control_group_renderer.test.tsx b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.test.tsx
similarity index 97%
rename from src/plugins/controls/public/react_controls/external_api/control_group_renderer.test.tsx
rename to src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.test.tsx
index e034ca817908e..a0ca9b74f222f 100644
--- a/src/plugins/controls/public/react_controls/external_api/control_group_renderer.test.tsx
+++ b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.test.tsx
@@ -16,7 +16,7 @@ import { act, render, waitFor } from '@testing-library/react';
import { ControlGroupRendererApi } from '.';
import { CONTROL_GROUP_TYPE } from '../..';
-import { getControlGroupEmbeddableFactory } from '../control_group/get_control_group_factory';
+import { getControlGroupEmbeddableFactory } from '../get_control_group_factory';
import { ControlGroupRenderer, ControlGroupRendererProps } from './control_group_renderer';
type ParentApiType = PublishesUnifiedSearch & {
diff --git a/src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx
similarity index 97%
rename from src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx
rename to src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx
index 74d477c48f23a..728c8ca551a28 100644
--- a/src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx
+++ b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx
@@ -25,8 +25,8 @@ import {
import {
type ControlGroupStateBuilder,
controlGroupStateBuilder,
-} from '../control_group/utils/control_group_state_builder';
-import { getDefaultControlGroupRuntimeState } from '../control_group/utils/initialization_utils';
+} from '../utils/control_group_state_builder';
+import { getDefaultControlGroupRuntimeState } from '../utils/initialization_utils';
import type { ControlGroupCreationOptions, ControlGroupRendererApi } from './types';
export interface ControlGroupRendererProps {
diff --git a/src/plugins/controls/public/react_controls/external_api/control_group_renderer_lazy.tsx b/src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer_lazy.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/external_api/control_group_renderer_lazy.tsx
rename to src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer_lazy.tsx
diff --git a/src/plugins/controls/public/react_controls/external_api/index.ts b/src/plugins/controls/public/control_group/control_group_renderer/index.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/external_api/index.ts
rename to src/plugins/controls/public/control_group/control_group_renderer/index.ts
diff --git a/src/plugins/controls/public/react_controls/external_api/types.ts b/src/plugins/controls/public/control_group/control_group_renderer/types.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/external_api/types.ts
rename to src/plugins/controls/public/control_group/control_group_renderer/types.ts
diff --git a/src/plugins/controls/public/react_controls/control_group/control_group_strings.tsx b/src/plugins/controls/public/control_group/control_group_strings.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_group/control_group_strings.tsx
rename to src/plugins/controls/public/control_group/control_group_strings.tsx
diff --git a/src/plugins/controls/public/react_controls/control_group/control_group_unsaved_changes_api.ts b/src/plugins/controls/public/control_group/control_group_unsaved_changes_api.ts
similarity index 99%
rename from src/plugins/controls/public/react_controls/control_group/control_group_unsaved_changes_api.ts
rename to src/plugins/controls/public/control_group/control_group_unsaved_changes_api.ts
index d26812cdd0b8f..5f01410a85718 100644
--- a/src/plugins/controls/public/react_controls/control_group/control_group_unsaved_changes_api.ts
+++ b/src/plugins/controls/public/control_group/control_group_unsaved_changes_api.ts
@@ -21,7 +21,7 @@ import {
type StateComparators,
} from '@kbn/presentation-publishing';
-import type { ControlGroupRuntimeState, ControlPanelsState } from '../../../common';
+import type { ControlGroupRuntimeState, ControlPanelsState } from '../../common';
import { apiPublishesAsyncFilters } from '../controls/data_controls/publishes_async_filters';
import { getControlsInOrder, type ControlsInOrder } from './init_controls_manager';
diff --git a/src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx b/src/plugins/controls/public/control_group/get_control_group_factory.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx
rename to src/plugins/controls/public/control_group/get_control_group_factory.tsx
index 77da1480eb494..62af1d1f868a9 100644
--- a/src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx
+++ b/src/plugins/controls/public/control_group/get_control_group_factory.tsx
@@ -32,9 +32,10 @@ import type {
ControlLabelPosition,
ControlPanelsState,
ParentIgnoreSettings,
-} from '../../../common';
-import { CONTROL_GROUP_TYPE, DEFAULT_CONTROL_LABEL_POSITION } from '../../../common';
+} from '../../common';
+import { CONTROL_GROUP_TYPE, DEFAULT_CONTROL_LABEL_POSITION } from '../../common';
import { openDataControlEditor } from '../controls/data_controls/open_data_control_editor';
+import { coreServices, dataViewsService } from '../services/kibana_services';
import { ControlGroup } from './components/control_group';
import { chaining$, controlFetch$, controlGroupFetch$ } from './control_fetch';
import { initializeControlGroupUnsavedChanges } from './control_group_unsaved_changes_api';
@@ -43,7 +44,6 @@ import { openEditControlGroupFlyout } from './open_edit_control_group_flyout';
import { initSelectionsManager } from './selections_manager';
import type { ControlGroupApi } from './types';
import { deserializeControlGroup } from './utils/serialization_utils';
-import { coreServices, dataViewsService } from '../../services/kibana_services';
const DEFAULT_CHAINING_SYSTEM = 'HIERARCHICAL';
diff --git a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts b/src/plugins/controls/public/control_group/init_controls_manager.test.ts
similarity index 98%
rename from src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts
rename to src/plugins/controls/public/control_group/init_controls_manager.test.ts
index 2137c502c2e64..29998325664bb 100644
--- a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts
+++ b/src/plugins/controls/public/control_group/init_controls_manager.test.ts
@@ -8,13 +8,9 @@
*/
import { BehaviorSubject } from 'rxjs';
+import type { ControlPanelState, ControlPanelsState, DefaultDataControlState } from '../../common';
import type { DefaultControlApi } from '../controls/types';
-import { initControlsManager, getLastUsedDataViewId } from './init_controls_manager';
-import type {
- ControlPanelState,
- DefaultDataControlState,
- ControlPanelsState,
-} from '../../../common';
+import { getLastUsedDataViewId, initControlsManager } from './init_controls_manager';
jest.mock('uuid', () => ({
v4: jest.fn().mockReturnValue('delta'),
diff --git a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts b/src/plugins/controls/public/control_group/init_controls_manager.ts
similarity index 99%
rename from src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts
rename to src/plugins/controls/public/control_group/init_controls_manager.ts
index 5b499f1924f1a..ee020bf1fbd59 100644
--- a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts
+++ b/src/plugins/controls/public/control_group/init_controls_manager.ts
@@ -26,8 +26,8 @@ import type {
ControlWidth,
DefaultControlState,
DefaultDataControlState,
-} from '../../../common';
-import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '../../../common';
+} from '../../common';
+import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '../../common';
import type { DefaultControlApi } from '../controls/types';
import type { ControlGroupComparatorState } from './control_group_unsaved_changes_api';
import type { ControlGroupApi } from './types';
diff --git a/src/plugins/controls/public/react_controls/control_group/open_edit_control_group_flyout.tsx b/src/plugins/controls/public/control_group/open_edit_control_group_flyout.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/control_group/open_edit_control_group_flyout.tsx
rename to src/plugins/controls/public/control_group/open_edit_control_group_flyout.tsx
index 5e7baf1f73e5d..54e35ab271b34 100644
--- a/src/plugins/controls/public/react_controls/control_group/open_edit_control_group_flyout.tsx
+++ b/src/plugins/controls/public/control_group/open_edit_control_group_flyout.tsx
@@ -18,7 +18,7 @@ import { BehaviorSubject } from 'rxjs';
import { ControlStateManager } from '../controls/types';
import { ControlGroupEditor } from './components/control_group_editor';
import { ControlGroupApi, ControlGroupEditorState } from './types';
-import { coreServices } from '../../services/kibana_services';
+import { coreServices } from '../services/kibana_services';
export const openEditControlGroupFlyout = (
controlGroupApi: ControlGroupApi,
diff --git a/src/plugins/controls/public/react_controls/control_group/register_control_group_embeddable.ts b/src/plugins/controls/public/control_group/register_control_group_embeddable.ts
similarity index 87%
rename from src/plugins/controls/public/react_controls/control_group/register_control_group_embeddable.ts
rename to src/plugins/controls/public/control_group/register_control_group_embeddable.ts
index a64faa63e8efc..f93458ab6bc4a 100644
--- a/src/plugins/controls/public/react_controls/control_group/register_control_group_embeddable.ts
+++ b/src/plugins/controls/public/control_group/register_control_group_embeddable.ts
@@ -8,8 +8,8 @@
*/
import type { EmbeddableSetup } from '@kbn/embeddable-plugin/public';
-import { CONTROL_GROUP_TYPE } from '../../../common';
-import { untilPluginStartServicesReady } from '../../services/kibana_services';
+import { CONTROL_GROUP_TYPE } from '../../common';
+import { untilPluginStartServicesReady } from '../services/kibana_services';
export function registerControlGroupEmbeddable(embeddableSetup: EmbeddableSetup) {
embeddableSetup.registerReactEmbeddableFactory(CONTROL_GROUP_TYPE, async () => {
diff --git a/src/plugins/controls/public/react_controls/control_group/selections_manager.test.ts b/src/plugins/controls/public/control_group/selections_manager.test.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_group/selections_manager.test.ts
rename to src/plugins/controls/public/control_group/selections_manager.test.ts
diff --git a/src/plugins/controls/public/react_controls/control_group/selections_manager.ts b/src/plugins/controls/public/control_group/selections_manager.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/control_group/selections_manager.ts
rename to src/plugins/controls/public/control_group/selections_manager.ts
diff --git a/src/plugins/controls/public/react_controls/control_group/types.ts b/src/plugins/controls/public/control_group/types.ts
similarity index 99%
rename from src/plugins/controls/public/react_controls/control_group/types.ts
rename to src/plugins/controls/public/control_group/types.ts
index 37f9f40c4079f..7a2bf74b5a27d 100644
--- a/src/plugins/controls/public/react_controls/control_group/types.ts
+++ b/src/plugins/controls/public/control_group/types.ts
@@ -38,7 +38,7 @@ import {
ControlPanelState,
DefaultControlState,
ParentIgnoreSettings,
-} from '../../../common';
+} from '../../common';
import { ControlFetchContext } from './control_fetch/control_fetch';
/**
diff --git a/src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts b/src/plugins/controls/public/control_group/utils/control_group_state_builder.ts
similarity index 95%
rename from src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts
rename to src/plugins/controls/public/control_group/utils/control_group_state_builder.ts
index 1c051e58af46f..9c1dce024168e 100644
--- a/src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts
+++ b/src/plugins/controls/public/control_group/utils/control_group_state_builder.ts
@@ -16,9 +16,9 @@ import {
type ControlGroupRuntimeState,
type ControlPanelsState,
type DefaultDataControlState,
-} from '../../../../common';
-import type { OptionsListControlState } from '../../../../common/options_list';
-import { dataViewsService } from '../../../services/kibana_services';
+} from '../../../common';
+import type { OptionsListControlState } from '../../../common/options_list';
+import { dataViewsService } from '../../services/kibana_services';
import { getDataControlFieldRegistry } from '../../controls/data_controls/data_control_editor_utils';
import type { RangesliderControlState } from '../../controls/data_controls/range_slider/types';
diff --git a/src/plugins/controls/public/react_controls/control_group/utils/initialization_utils.ts b/src/plugins/controls/public/control_group/utils/initialization_utils.ts
similarity index 96%
rename from src/plugins/controls/public/react_controls/control_group/utils/initialization_utils.ts
rename to src/plugins/controls/public/control_group/utils/initialization_utils.ts
index ef81b4e30b361..ea785d05ac735 100644
--- a/src/plugins/controls/public/react_controls/control_group/utils/initialization_utils.ts
+++ b/src/plugins/controls/public/control_group/utils/initialization_utils.ts
@@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import { DEFAULT_CONTROL_LABEL_POSITION, type ControlGroupRuntimeState } from '../../../../common';
+import { DEFAULT_CONTROL_LABEL_POSITION, type ControlGroupRuntimeState } from '../../../common';
export const getDefaultControlGroupRuntimeState = (): ControlGroupRuntimeState => ({
initialChildControlState: {},
diff --git a/src/plugins/controls/public/react_controls/control_group/utils/serialization_utils.ts b/src/plugins/controls/public/control_group/utils/serialization_utils.ts
similarity index 98%
rename from src/plugins/controls/public/react_controls/control_group/utils/serialization_utils.ts
rename to src/plugins/controls/public/control_group/utils/serialization_utils.ts
index 4762d3aa9ce81..ad7dea5827507 100644
--- a/src/plugins/controls/public/react_controls/control_group/utils/serialization_utils.ts
+++ b/src/plugins/controls/public/control_group/utils/serialization_utils.ts
@@ -10,7 +10,7 @@
import { omit } from 'lodash';
import { SerializedPanelState } from '@kbn/presentation-containers';
-import type { ControlGroupRuntimeState, ControlGroupSerializedState } from '../../../../common';
+import type { ControlGroupRuntimeState, ControlGroupSerializedState } from '../../../common';
import { parseReferenceName } from '../../controls/data_controls/reference_name_utils';
export const deserializeControlGroup = (
diff --git a/src/plugins/controls/public/react_controls/controls/constants.ts b/src/plugins/controls/public/controls/constants.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/constants.ts
rename to src/plugins/controls/public/controls/constants.ts
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_constants.tsx b/src/plugins/controls/public/controls/data_controls/data_control_constants.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/data_controls/data_control_constants.tsx
rename to src/plugins/controls/public/controls/data_controls/data_control_constants.tsx
index 2c7f5a02b6b5a..6b06bd8a52439 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_constants.tsx
+++ b/src/plugins/controls/public/controls/data_controls/data_control_constants.tsx
@@ -8,7 +8,7 @@
*/
import { i18n } from '@kbn/i18n';
-import { RANGE_SLIDER_CONTROL } from '../../../../common';
+import { RANGE_SLIDER_CONTROL } from '../../../common';
export const DataControlEditorStrings = {
manageControl: {
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx b/src/plugins/controls/public/controls/data_controls/data_control_editor.test.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx
rename to src/plugins/controls/public/controls/data_controls/data_control_editor.test.tsx
index 8d8385d603fb3..23f9b053d23b2 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx
+++ b/src/plugins/controls/public/controls/data_controls/data_control_editor.test.tsx
@@ -20,8 +20,8 @@ import {
DEFAULT_CONTROL_GROW,
DEFAULT_CONTROL_WIDTH,
type DefaultDataControlState,
-} from '../../../../common';
-import { dataViewsService } from '../../../services/kibana_services';
+} from '../../../common';
+import { dataViewsService } from '../../services/kibana_services';
import { getAllControlTypes, getControlFactory } from '../../control_factory_registry';
import type { ControlGroupApi } from '../../control_group/types';
import type { ControlFactory } from '../types';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx b/src/plugins/controls/public/controls/data_controls/data_control_editor.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx
rename to src/plugins/controls/public/controls/data_controls/data_control_editor.tsx
index 35e21ca3b407a..43d0f46324557 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx
+++ b/src/plugins/controls/public/controls/data_controls/data_control_editor.tsx
@@ -44,8 +44,8 @@ import {
DEFAULT_CONTROL_WIDTH,
type ControlWidth,
type DefaultDataControlState,
-} from '../../../../common';
-import { dataViewsService } from '../../../services/kibana_services';
+} from '../../../common';
+import { dataViewsService } from '../../services/kibana_services';
import { getAllControlTypes, getControlFactory } from '../../control_factory_registry';
import type { ControlGroupApi } from '../../control_group/types';
import { DataControlEditorStrings } from './data_control_constants';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor_utils.ts b/src/plugins/controls/public/controls/data_controls/data_control_editor_utils.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor_utils.ts
rename to src/plugins/controls/public/controls/data_controls/data_control_editor_utils.ts
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/editor_constants.ts b/src/plugins/controls/public/controls/data_controls/editor_constants.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/editor_constants.ts
rename to src/plugins/controls/public/controls/data_controls/editor_constants.ts
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.test.tsx b/src/plugins/controls/public/controls/data_controls/initialize_data_control.test.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.test.tsx
rename to src/plugins/controls/public/controls/data_controls/initialize_data_control.test.tsx
index d189d0aaa1ae9..c3c4dd0d6da77 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.test.tsx
+++ b/src/plugins/controls/public/controls/data_controls/initialize_data_control.test.tsx
@@ -9,7 +9,7 @@
import type { DataView } from '@kbn/data-views-plugin/public';
import { first, skip } from 'rxjs';
-import { dataViewsService } from '../../../services/kibana_services';
+import { dataViewsService } from '../../services/kibana_services';
import { ControlGroupApi } from '../../control_group/types';
import { initializeDataControl } from './initialize_data_control';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts b/src/plugins/controls/public/controls/data_controls/initialize_data_control.ts
similarity index 98%
rename from src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts
rename to src/plugins/controls/public/controls/data_controls/initialize_data_control.ts
index 11fb453d56350..71cb6cfb78245 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts
+++ b/src/plugins/controls/public/controls/data_controls/initialize_data_control.ts
@@ -20,8 +20,8 @@ import { SerializedPanelState } from '@kbn/presentation-containers';
import { StateComparators } from '@kbn/presentation-publishing';
import { i18n } from '@kbn/i18n';
-import type { DefaultControlState, DefaultDataControlState } from '../../../../common';
-import { dataViewsService } from '../../../services/kibana_services';
+import type { DefaultControlState, DefaultDataControlState } from '../../../common';
+import { dataViewsService } from '../../services/kibana_services';
import type { ControlGroupApi } from '../../control_group/types';
import { initializeDefaultControlApi } from '../initialize_default_control_api';
import type { ControlApiInitialization, ControlStateManager } from '../types';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/mocks/api_mocks.tsx b/src/plugins/controls/public/controls/data_controls/mocks/api_mocks.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/controls/data_controls/mocks/api_mocks.tsx
rename to src/plugins/controls/public/controls/data_controls/mocks/api_mocks.tsx
index 9abf7f6c67c87..ade12fda012d6 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/mocks/api_mocks.tsx
+++ b/src/plugins/controls/public/controls/data_controls/mocks/api_mocks.tsx
@@ -18,7 +18,7 @@ import type {
OptionsListSelection,
OptionsListSortingType,
OptionsListSuggestions,
-} from '../../../../../common/options_list';
+} from '../../../../common/options_list';
export const getOptionsListMocks = () => {
const selectedOptions$ = new BehaviorSubject(undefined);
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/mocks/factory_mocks.tsx b/src/plugins/controls/public/controls/data_controls/mocks/factory_mocks.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/mocks/factory_mocks.tsx
rename to src/plugins/controls/public/controls/data_controls/mocks/factory_mocks.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx b/src/plugins/controls/public/controls/data_controls/open_data_control_editor.tsx
similarity index 96%
rename from src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx
rename to src/plugins/controls/public/controls/data_controls/open_data_control_editor.tsx
index 08118702a003e..1c1be2e121a17 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx
+++ b/src/plugins/controls/public/controls/data_controls/open_data_control_editor.tsx
@@ -16,8 +16,8 @@ import { tracksOverlays } from '@kbn/presentation-containers';
import { apiHasParentApi } from '@kbn/presentation-publishing';
import { toMountPoint } from '@kbn/react-kibana-mount';
-import type { DefaultDataControlState } from '../../../../common';
-import { coreServices } from '../../../services/kibana_services';
+import type { DefaultDataControlState } from '../../../common';
+import { coreServices } from '../../services/kibana_services';
import type { ControlGroupApi } from '../../control_group/types';
import { DataControlEditor } from './data_control_editor';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list.scss b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list.scss
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list.scss
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list.scss
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.test.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.test.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.test.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx
index b82258cb510c4..da9aa000dcef0 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_control.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_control.tsx
@@ -25,7 +25,7 @@ import {
useBatchedPublishingSubjects,
} from '@kbn/presentation-publishing';
-import { OptionsListSelection } from '../../../../../../common/options_list/options_list_selections';
+import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections';
import { MIN_POPOVER_WIDTH } from '../../../constants';
import { useOptionsListContext } from '../options_list_context_provider';
import { OptionsListPopover } from './options_list_popover';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx
index e7660ff2ec9b6..079a857f7c090 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx
@@ -14,8 +14,8 @@ import { DataViewField } from '@kbn/data-views-plugin/common';
import { act, render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import type { DefaultDataControlState } from '../../../../../../common';
-import type { OptionsListControlState } from '../../../../../../common/options_list';
+import type { DefaultDataControlState } from '../../../../../common';
+import type { OptionsListControlState } from '../../../../../common/options_list';
import type { ControlGroupApi } from '../../../../control_group/types';
import { getMockedControlGroupApi } from '../../../mocks/control_mocks';
import type { CustomOptionsComponentProps } from '../../types';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.tsx
similarity index 97%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.tsx
index 27f12e6d0f2e8..e9dad12be5623 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_editor_options.tsx
@@ -15,8 +15,8 @@ import { useStateFromPublishingSubject } from '@kbn/presentation-publishing';
import type {
OptionsListControlState,
OptionsListSearchTechnique,
-} from '../../../../../../common/options_list';
-import { getCompatibleSearchTechniques } from '../../../../../../common/options_list/suggestions_searching';
+} from '../../../../../common/options_list';
+import { getCompatibleSearchTechniques } from '../../../../../common/options_list/suggestions_searching';
import { ControlSettingTooltipLabel } from '../../../../control_group/components/control_setting_tooltip_label';
import { CustomOptionsComponentProps } from '../../types';
import { DEFAULT_SEARCH_TECHNIQUE } from '../constants';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.test.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.test.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.test.tsx
index 1f18e229bef3b..0cf3ca5b7da23 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.test.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.test.tsx
@@ -14,7 +14,7 @@ import { DataViewField } from '@kbn/data-views-plugin/common';
import { act, render, RenderResult, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import type { OptionsListDisplaySettings } from '../../../../../../common/options_list';
+import type { OptionsListDisplaySettings } from '../../../../../common/options_list';
import { getOptionsListMocks } from '../../mocks/api_mocks';
import { ContextStateManager, OptionsListControlContext } from '../options_list_context_provider';
import type { OptionsListComponentApi } from '../types';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx
index d9502e781ab06..ccf0ce857b783 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_action_bar.tsx
@@ -20,7 +20,7 @@ import {
} from '@elastic/eui';
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
-import { getCompatibleSearchTechniques } from '../../../../../../common/options_list/suggestions_searching';
+import { getCompatibleSearchTechniques } from '../../../../../common/options_list/suggestions_searching';
import { useOptionsListContext } from '../options_list_context_provider';
import { OptionsListPopoverSortingButton } from './options_list_popover_sorting_button';
import { OptionsListStrings } from '../options_list_strings';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_empty_message.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_footer.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_invalid_selections.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.test.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx
similarity index 98%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx
index a48df361e50e4..5a82614e77df9 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_sorting_button.tsx
@@ -28,7 +28,7 @@ import {
getCompatibleSortingTypes,
OptionsListSortBy,
OPTIONS_LIST_DEFAULT_SORT,
-} from '../../../../../../common/options_list/suggestions_sorting';
+} from '../../../../../common/options_list/suggestions_sorting';
import { useOptionsListContext } from '../options_list_context_provider';
import { OptionsListStrings } from '../options_list_strings';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestion_badge.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx
similarity index 97%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx
index 8883ac43b6e41..9372c2a091de3 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/components/options_list_popover_suggestions.tsx
@@ -14,8 +14,8 @@ import { EuiSelectableOption } from '@elastic/eui/src/components/selectable/sele
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
import { euiThemeVars } from '@kbn/ui-theme';
-import { OptionsListSuggestions } from '../../../../../../common/options_list/types';
-import { OptionsListSelection } from '../../../../../../common/options_list/options_list_selections';
+import { OptionsListSuggestions } from '../../../../../common/options_list/types';
+import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections';
import { MAX_OPTIONS_LIST_REQUEST_SIZE } from '../constants';
import { useOptionsListContext } from '../options_list_context_provider';
import { OptionsListStrings } from '../options_list_strings';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/constants.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/constants.ts
similarity index 94%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/constants.ts
rename to src/plugins/controls/public/controls/data_controls/options_list_control/constants.ts
index 0d4a92b6734a9..87415dff252b0 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/constants.ts
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/constants.ts
@@ -10,7 +10,7 @@
import type {
OptionsListSortingType,
OptionsListSearchTechnique,
-} from '../../../../../common/options_list';
+} from '../../../../common/options_list';
export const DEFAULT_SEARCH_TECHNIQUE: OptionsListSearchTechnique = 'prefix';
export const OPTIONS_LIST_DEFAULT_SORT: OptionsListSortingType = {
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/fetch_and_validate.tsx
similarity index 94%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/fetch_and_validate.tsx
index 2e2cd341e8704..ca71fc46a72c1 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/fetch_and_validate.tsx
@@ -21,9 +21,9 @@ import {
import { PublishingSubject } from '@kbn/presentation-publishing';
import { apiPublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload';
-import { OptionsListSuccessResponse } from '../../../../../common/options_list/types';
-import { isValidSearch } from '../../../../../common/options_list/is_valid_search';
-import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections';
+import { OptionsListSuccessResponse } from '../../../../common/options_list/types';
+import { isValidSearch } from '../../../../common/options_list/is_valid_search';
+import { OptionsListSelection } from '../../../../common/options_list/options_list_selections';
import { ControlFetchContext } from '../../../control_group/control_fetch';
import { ControlStateManager } from '../../types';
import { OptionsListFetchCache } from './options_list_fetch_cache';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx
index 20911d1cdb872..20aad3e260983 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.test.tsx
@@ -14,7 +14,7 @@ import { createStubDataView } from '@kbn/data-views-plugin/common/data_view.stub
import { act, render, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { coreServices, dataViewsService } from '../../../../services/kibana_services';
+import { coreServices, dataViewsService } from '../../../services/kibana_services';
import { getMockedBuildApi, getMockedControlGroupApi } from '../../mocks/control_mocks';
import { getOptionsListControlFactory } from './get_options_list_control_factory';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.tsx
index 2a23ac9341ab9..de4811f0220d6 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/get_options_list_control_factory.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.tsx
@@ -14,7 +14,7 @@ import { BehaviorSubject, combineLatest, debounceTime, filter, map, skip } from
import { buildExistsFilter, buildPhraseFilter, buildPhrasesFilter, Filter } from '@kbn/es-query';
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
-import { OPTIONS_LIST_CONTROL } from '../../../../../common';
+import { OPTIONS_LIST_CONTROL } from '../../../../common';
import type {
OptionsListControlState,
OptionsListSearchTechnique,
@@ -22,8 +22,8 @@ import type {
OptionsListSortingType,
OptionsListSuccessResponse,
OptionsListSuggestions,
-} from '../../../../../common/options_list';
-import { getSelectionAsFieldType, isValidSearch } from '../../../../../common/options_list';
+} from '../../../../common/options_list';
+import { getSelectionAsFieldType, isValidSearch } from '../../../../common/options_list';
import { initializeDataControl } from '../initialize_data_control';
import type { DataControlFactory } from '../types';
import { OptionsListControl } from './components/options_list_control';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_context_provider.tsx b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_context_provider.tsx
similarity index 97%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_context_provider.tsx
rename to src/plugins/controls/public/controls/data_controls/options_list_control/options_list_context_provider.tsx
index d0acec2f0d683..b594b21116cf2 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_context_provider.tsx
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_context_provider.tsx
@@ -14,7 +14,7 @@ import { PublishingSubject } from '@kbn/presentation-publishing';
import type {
OptionsListDisplaySettings,
OptionsListSelection,
-} from '../../../../../common/options_list';
+} from '../../../../common/options_list';
import type { ControlStateManager } from '../../types';
import type { OptionsListComponentApi, OptionsListComponentState } from './types';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_control_selections.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_control_selections.ts
similarity index 93%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_control_selections.ts
rename to src/plugins/controls/public/controls/data_controls/options_list_control/options_list_control_selections.ts
index d766b564d0212..94d46c1d59a84 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_control_selections.ts
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_control_selections.ts
@@ -12,8 +12,8 @@ import { BehaviorSubject } from 'rxjs';
import { PublishingSubject, StateComparators } from '@kbn/presentation-publishing';
-import { OptionsListControlState } from '../../../../../common/options_list';
-import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections';
+import { OptionsListControlState } from '../../../../common/options_list';
+import { OptionsListSelection } from '../../../../common/options_list/options_list_selections';
export function initializeOptionsListSelections(
initialState: OptionsListControlState,
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_fetch_cache.ts
similarity index 96%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts
rename to src/plugins/controls/public/controls/data_controls/options_list_control/options_list_fetch_cache.ts
index 60b1463118733..55d613e0afc19 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_fetch_cache.ts
@@ -19,8 +19,8 @@ import type {
OptionsListRequest,
OptionsListResponse,
OptionsListSuccessResponse,
-} from '../../../../../common/options_list/types';
-import { coreServices, dataService } from '../../../../services/kibana_services';
+} from '../../../../common/options_list/types';
+import { coreServices, dataService } from '../../../services/kibana_services';
const REQUEST_CACHE_SIZE = 50; // only store a max of 50 responses
const REQUEST_CACHE_TTL = 1000 * 60; // time to live = 1 minute
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_strings.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_strings.ts
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_strings.ts
rename to src/plugins/controls/public/controls/data_controls/options_list_control/options_list_strings.ts
index eef121b8b3574..b910b217063e6 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_strings.ts
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_strings.ts
@@ -8,7 +8,7 @@
*/
import { i18n } from '@kbn/i18n';
-import { OptionsListSearchTechnique } from '../../../../../common/options_list/suggestions_searching';
+import { OptionsListSearchTechnique } from '../../../../common/options_list/suggestions_searching';
export const OptionsListStrings = {
control: {
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/register_options_list_control.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/register_options_list_control.ts
similarity index 85%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/register_options_list_control.ts
rename to src/plugins/controls/public/controls/data_controls/options_list_control/register_options_list_control.ts
index b58189a75daca..45f430598fa50 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/register_options_list_control.ts
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/register_options_list_control.ts
@@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import { OPTIONS_LIST_CONTROL } from '../../../../../common';
-import { untilPluginStartServicesReady } from '../../../../services/kibana_services';
+import { OPTIONS_LIST_CONTROL } from '../../../../common';
+import { untilPluginStartServicesReady } from '../../../services/kibana_services';
import { registerControlFactory } from '../../../control_factory_registry';
export function registerOptionsListControl() {
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/types.ts b/src/plugins/controls/public/controls/data_controls/options_list_control/types.ts
similarity index 97%
rename from src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/types.ts
rename to src/plugins/controls/public/controls/data_controls/options_list_control/types.ts
index 1d34c082eb8a6..3cdb79f78a98d 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/types.ts
+++ b/src/plugins/controls/public/controls/data_controls/options_list_control/types.ts
@@ -15,7 +15,7 @@ import type {
OptionsListDisplaySettings,
OptionsListSelection,
OptionsListSuggestions,
-} from '../../../../../common/options_list';
+} from '../../../../common/options_list';
import type { DataControlApi } from '../types';
export type OptionsListControlApi = DataControlApi;
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/publishes_async_filters.ts b/src/plugins/controls/public/controls/data_controls/publishes_async_filters.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/publishes_async_filters.ts
rename to src/plugins/controls/public/controls/data_controls/publishes_async_filters.ts
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/components/range_slider.styles.ts b/src/plugins/controls/public/controls/data_controls/range_slider/components/range_slider.styles.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/components/range_slider.styles.ts
rename to src/plugins/controls/public/controls/data_controls/range_slider/components/range_slider.styles.ts
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/components/range_slider_control.tsx b/src/plugins/controls/public/controls/data_controls/range_slider/components/range_slider_control.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/components/range_slider_control.tsx
rename to src/plugins/controls/public/controls/data_controls/range_slider/components/range_slider_control.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx b/src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx
rename to src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx
index 925ec3443849a..03ebe50969d05 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx
+++ b/src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx
@@ -15,7 +15,7 @@ import { DataViewField } from '@kbn/data-views-plugin/common';
import { SerializedPanelState } from '@kbn/presentation-containers';
import { fireEvent, render, waitFor } from '@testing-library/react';
-import { dataService, dataViewsService } from '../../../../services/kibana_services';
+import { dataService, dataViewsService } from '../../../services/kibana_services';
import { getMockedBuildApi, getMockedControlGroupApi } from '../../mocks/control_mocks';
import { getRangesliderControlFactory } from './get_range_slider_control_factory';
import { RangesliderControlState } from './types';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx b/src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx
rename to src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.tsx
index 3ad3b97af7414..0605fe4586abb 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx
+++ b/src/plugins/controls/public/controls/data_controls/range_slider/get_range_slider_control_factory.tsx
@@ -14,7 +14,7 @@ import { EuiFieldNumber, EuiFormRow } from '@elastic/eui';
import { Filter, RangeFilterParams, buildRangeFilter } from '@kbn/es-query';
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
-import { RANGE_SLIDER_CONTROL } from '../../../../../common';
+import { RANGE_SLIDER_CONTROL } from '../../../../common';
import { initializeDataControl } from '../initialize_data_control';
import type { DataControlFactory } from '../types';
import { RangeSliderControl } from './components/range_slider_control';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/has_no_results.ts b/src/plugins/controls/public/controls/data_controls/range_slider/has_no_results.ts
similarity index 98%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/has_no_results.ts
rename to src/plugins/controls/public/controls/data_controls/range_slider/has_no_results.ts
index 24d4510b3fc22..5b5cfd33788cb 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/has_no_results.ts
+++ b/src/plugins/controls/public/controls/data_controls/range_slider/has_no_results.ts
@@ -12,7 +12,7 @@ import { DataView } from '@kbn/data-views-plugin/public';
import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query';
import { PublishesDataViews } from '@kbn/presentation-publishing';
import { Observable, combineLatest, lastValueFrom, switchMap, tap } from 'rxjs';
-import { dataService } from '../../../../services/kibana_services';
+import { dataService } from '../../../services/kibana_services';
import { ControlFetchContext } from '../../../control_group/control_fetch';
import { ControlGroupApi } from '../../../control_group/types';
import { DataControlApi } from '../types';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts b/src/plugins/controls/public/controls/data_controls/range_slider/min_max.ts
similarity index 98%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts
rename to src/plugins/controls/public/controls/data_controls/range_slider/min_max.ts
index 8e4d5e00374af..f118e2da24c9b 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts
+++ b/src/plugins/controls/public/controls/data_controls/range_slider/min_max.ts
@@ -13,7 +13,7 @@ import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query';
import { PublishesDataViews, PublishingSubject } from '@kbn/presentation-publishing';
import { apiPublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload';
import { Observable, combineLatest, lastValueFrom, of, startWith, switchMap, tap } from 'rxjs';
-import { dataService } from '../../../../services/kibana_services';
+import { dataService } from '../../../services/kibana_services';
import { ControlFetchContext } from '../../../control_group/control_fetch';
import { ControlGroupApi } from '../../../control_group/types';
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/range_control_selections.ts b/src/plugins/controls/public/controls/data_controls/range_slider/range_control_selections.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/range_control_selections.ts
rename to src/plugins/controls/public/controls/data_controls/range_slider/range_control_selections.ts
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/range_slider_strings.ts b/src/plugins/controls/public/controls/data_controls/range_slider/range_slider_strings.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/range_slider_strings.ts
rename to src/plugins/controls/public/controls/data_controls/range_slider/range_slider_strings.ts
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/register_range_slider_control.ts b/src/plugins/controls/public/controls/data_controls/range_slider/register_range_slider_control.ts
similarity index 85%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/register_range_slider_control.ts
rename to src/plugins/controls/public/controls/data_controls/range_slider/register_range_slider_control.ts
index 0e1c0fd925792..9f7af0ccae2c3 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/register_range_slider_control.ts
+++ b/src/plugins/controls/public/controls/data_controls/range_slider/register_range_slider_control.ts
@@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import { RANGE_SLIDER_CONTROL } from '../../../../../common';
-import { untilPluginStartServicesReady } from '../../../../services/kibana_services';
+import { RANGE_SLIDER_CONTROL } from '../../../../common';
+import { untilPluginStartServicesReady } from '../../../services/kibana_services';
import { registerControlFactory } from '../../../control_factory_registry';
export function registerRangeSliderControl() {
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/types.ts b/src/plugins/controls/public/controls/data_controls/range_slider/types.ts
similarity index 91%
rename from src/plugins/controls/public/react_controls/controls/data_controls/range_slider/types.ts
rename to src/plugins/controls/public/controls/data_controls/range_slider/types.ts
index 459220a9dd166..bbbf75e5730b5 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/types.ts
+++ b/src/plugins/controls/public/controls/data_controls/range_slider/types.ts
@@ -7,7 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import type { DefaultDataControlState } from '../../../../../common';
+import type { DefaultDataControlState } from '../../../../common';
import type { DataControlApi } from '../types';
export type RangeValue = [string, string];
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/reference_name_utils.ts b/src/plugins/controls/public/controls/data_controls/reference_name_utils.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/data_controls/reference_name_utils.ts
rename to src/plugins/controls/public/controls/data_controls/reference_name_utils.ts
diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/types.ts b/src/plugins/controls/public/controls/data_controls/types.ts
similarity index 97%
rename from src/plugins/controls/public/react_controls/controls/data_controls/types.ts
rename to src/plugins/controls/public/controls/data_controls/types.ts
index 89912e6eabb03..24eb9e73fb49e 100644
--- a/src/plugins/controls/public/react_controls/controls/data_controls/types.ts
+++ b/src/plugins/controls/public/controls/data_controls/types.ts
@@ -16,7 +16,7 @@ import {
PublishingSubject,
} from '@kbn/presentation-publishing';
-import { DefaultDataControlState } from '../../../../common';
+import { DefaultDataControlState } from '../../../common';
import { ControlGroupApi } from '../../control_group/types';
import { ControlFactory, DefaultControlApi } from '../types';
import { PublishesAsyncFilters } from './publishes_async_filters';
diff --git a/src/plugins/controls/public/react_controls/controls/initialize_default_control_api.tsx b/src/plugins/controls/public/controls/initialize_default_control_api.tsx
similarity index 96%
rename from src/plugins/controls/public/react_controls/controls/initialize_default_control_api.tsx
rename to src/plugins/controls/public/controls/initialize_default_control_api.tsx
index 558595a877f64..06d7f3e4028f5 100644
--- a/src/plugins/controls/public/react_controls/controls/initialize_default_control_api.tsx
+++ b/src/plugins/controls/public/controls/initialize_default_control_api.tsx
@@ -12,7 +12,7 @@ import { BehaviorSubject } from 'rxjs';
import { SerializedPanelState } from '@kbn/presentation-containers';
import { StateComparators } from '@kbn/presentation-publishing';
-import type { ControlWidth, DefaultControlState } from '../../../common';
+import type { ControlWidth, DefaultControlState } from '../../common';
import type { ControlApiInitialization, ControlStateManager, DefaultControlApi } from './types';
export type ControlApi = ControlApiInitialization;
diff --git a/src/plugins/controls/public/react_controls/controls/mocks/control_mocks.ts b/src/plugins/controls/public/controls/mocks/control_mocks.ts
similarity index 97%
rename from src/plugins/controls/public/react_controls/controls/mocks/control_mocks.ts
rename to src/plugins/controls/public/controls/mocks/control_mocks.ts
index 5e3156e5d732b..e71ecb12e030b 100644
--- a/src/plugins/controls/public/react_controls/controls/mocks/control_mocks.ts
+++ b/src/plugins/controls/public/controls/mocks/control_mocks.ts
@@ -11,7 +11,7 @@ import { BehaviorSubject } from 'rxjs';
import { StateComparators } from '@kbn/presentation-publishing';
-import { CONTROL_GROUP_TYPE } from '../../../../common';
+import { CONTROL_GROUP_TYPE } from '../../../common';
import type { ControlFetchContext } from '../../control_group/control_fetch/control_fetch';
import type { ControlGroupApi } from '../../control_group/types';
import type { ControlApiRegistration, ControlFactory, DefaultControlApi } from '../types';
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/index.scss b/src/plugins/controls/public/controls/timeslider_control/components/index.scss
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/index.scss
rename to src/plugins/controls/public/controls/timeslider_control/components/index.scss
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/play_button.tsx b/src/plugins/controls/public/controls/timeslider_control/components/play_button.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/play_button.tsx
rename to src/plugins/controls/public/controls/timeslider_control/components/play_button.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_anchored_range.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_anchored_range.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_anchored_range.tsx
rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_anchored_range.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_popover_button.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_popover_button.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_popover_button.tsx
rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_popover_button.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_popover_content.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_popover_content.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_popover_content.tsx
rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_popover_content.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_prepend.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_prepend.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_prepend.tsx
rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_prepend.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_sliding_window_range.tsx b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_sliding_window_range.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_sliding_window_range.tsx
rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_sliding_window_range.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_strings.ts b/src/plugins/controls/public/controls/timeslider_control/components/time_slider_strings.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/components/time_slider_strings.ts
rename to src/plugins/controls/public/controls/timeslider_control/components/time_slider_strings.ts
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_time_range_meta.ts b/src/plugins/controls/public/controls/timeslider_control/get_time_range_meta.ts
similarity index 96%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/get_time_range_meta.ts
rename to src/plugins/controls/public/controls/timeslider_control/get_time_range_meta.ts
index 5c84cfbdef508..a9fe07c9bf3b9 100644
--- a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_time_range_meta.ts
+++ b/src/plugins/controls/public/controls/timeslider_control/get_time_range_meta.ts
@@ -9,7 +9,7 @@
import { EuiRangeTick } from '@elastic/eui';
import { TimeRange } from '@kbn/es-query';
-import { coreServices, dataService } from '../../../services/kibana_services';
+import { coreServices, dataService } from '../../services/kibana_services';
import {
FROM_INDEX,
getStepSize,
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.test.tsx b/src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.test.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.test.tsx
rename to src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.test.tsx
index d4b8ff6c13461..a49f1489d31d1 100644
--- a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.test.tsx
+++ b/src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.test.tsx
@@ -15,7 +15,7 @@ import { TimeRange } from '@kbn/es-query';
import { StateComparators } from '@kbn/presentation-publishing';
import { fireEvent, render } from '@testing-library/react';
-import { dataService } from '../../../services/kibana_services';
+import { dataService } from '../../services/kibana_services';
import { getMockedControlGroupApi } from '../mocks/control_mocks';
import { ControlApiRegistration } from '../types';
import { getTimesliderControlFactory } from './get_timeslider_control_factory';
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.tsx b/src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.tsx
similarity index 99%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.tsx
rename to src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.tsx
index cfc8e50bee1b5..b7d5b6f077080 100644
--- a/src/plugins/controls/public/react_controls/controls/timeslider_control/get_timeslider_control_factory.tsx
+++ b/src/plugins/controls/public/controls/timeslider_control/get_timeslider_control_factory.tsx
@@ -21,7 +21,7 @@ import {
useBatchedPublishingSubjects,
} from '@kbn/presentation-publishing';
-import { TIME_SLIDER_CONTROL } from '../../../../common';
+import { TIME_SLIDER_CONTROL } from '../../../common';
import { initializeDefaultControlApi } from '../initialize_default_control_api';
import { ControlFactory } from '../types';
import './components/index.scss';
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/init_time_range_percentage.ts b/src/plugins/controls/public/controls/timeslider_control/init_time_range_percentage.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/init_time_range_percentage.ts
rename to src/plugins/controls/public/controls/timeslider_control/init_time_range_percentage.ts
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/init_time_range_subscription.ts b/src/plugins/controls/public/controls/timeslider_control/init_time_range_subscription.ts
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/init_time_range_subscription.ts
rename to src/plugins/controls/public/controls/timeslider_control/init_time_range_subscription.ts
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts b/src/plugins/controls/public/controls/timeslider_control/register_timeslider_control.ts
similarity index 85%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts
rename to src/plugins/controls/public/controls/timeslider_control/register_timeslider_control.ts
index 338a52631c931..93f30fe4b07d3 100644
--- a/src/plugins/controls/public/react_controls/controls/timeslider_control/register_timeslider_control.ts
+++ b/src/plugins/controls/public/controls/timeslider_control/register_timeslider_control.ts
@@ -7,8 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/
-import { TIME_SLIDER_CONTROL } from '../../../../common';
-import { untilPluginStartServicesReady } from '../../../services/kibana_services';
+import { TIME_SLIDER_CONTROL } from '../../../common';
+import { untilPluginStartServicesReady } from '../../services/kibana_services';
import { registerControlFactory } from '../../control_factory_registry';
export function registerTimeSliderControl() {
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/time_utils.tsx b/src/plugins/controls/public/controls/timeslider_control/time_utils.tsx
similarity index 100%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/time_utils.tsx
rename to src/plugins/controls/public/controls/timeslider_control/time_utils.tsx
diff --git a/src/plugins/controls/public/react_controls/controls/timeslider_control/types.ts b/src/plugins/controls/public/controls/timeslider_control/types.ts
similarity index 94%
rename from src/plugins/controls/public/react_controls/controls/timeslider_control/types.ts
rename to src/plugins/controls/public/controls/timeslider_control/types.ts
index 634e0351e77eb..48c7a5a76469c 100644
--- a/src/plugins/controls/public/react_controls/controls/timeslider_control/types.ts
+++ b/src/plugins/controls/public/controls/timeslider_control/types.ts
@@ -8,7 +8,7 @@
*/
import type { PublishesPanelTitle, PublishesTimeslice } from '@kbn/presentation-publishing';
-import type { DefaultControlState } from '../../../../common';
+import type { DefaultControlState } from '../../../common';
import type { DefaultControlApi } from '../types';
export type Timeslice = [number, number];
diff --git a/src/plugins/controls/public/react_controls/controls/types.ts b/src/plugins/controls/public/controls/types.ts
similarity index 96%
rename from src/plugins/controls/public/react_controls/controls/types.ts
rename to src/plugins/controls/public/controls/types.ts
index ce4ad9f194fa3..e79c20c99f150 100644
--- a/src/plugins/controls/public/react_controls/controls/types.ts
+++ b/src/plugins/controls/public/controls/types.ts
@@ -24,9 +24,9 @@ import {
StateComparators,
} from '@kbn/presentation-publishing';
-import { ControlWidth, DefaultControlState } from '../../../common/types';
+import { ControlWidth, DefaultControlState } from '../../common/types';
import { ControlGroupApi } from '../control_group/types';
-import { CanClearSelections } from '../../types';
+import { CanClearSelections } from '../types';
export interface HasCustomPrepend {
CustomPrependComponent: React.FC<{}>;
diff --git a/src/plugins/controls/public/index.ts b/src/plugins/controls/public/index.ts
index 6c7a548cb091d..eaa800387759b 100644
--- a/src/plugins/controls/public/index.ts
+++ b/src/plugins/controls/public/index.ts
@@ -12,23 +12,20 @@ import { ControlsPlugin } from './plugin';
export {
controlGroupStateBuilder,
type ControlGroupStateBuilder,
-} from './react_controls/control_group/utils/control_group_state_builder';
+} from './control_group/utils/control_group_state_builder';
-export type { ControlGroupApi, ControlStateTransform } from './react_controls/control_group/types';
+export type { ControlGroupApi, ControlStateTransform } from './control_group/types';
export { ACTION_CLEAR_CONTROL, ACTION_DELETE_CONTROL, ACTION_EDIT_CONTROL } from './actions';
-export type {
- DataControlApi,
- DataControlFactory,
-} from './react_controls/controls/data_controls/types';
+export type { DataControlApi, DataControlFactory } from './controls/data_controls/types';
export {
ControlGroupRenderer,
type ControlGroupCreationOptions,
type ControlGroupRendererApi,
type ControlGroupRendererProps,
-} from './react_controls/external_api';
+} from './control_group/control_group_renderer';
export {
CONTROL_GROUP_TYPE,
diff --git a/src/plugins/controls/public/plugin.ts b/src/plugins/controls/public/plugin.ts
index c6e1a2873b169..3e915e958d111 100644
--- a/src/plugins/controls/public/plugin.ts
+++ b/src/plugins/controls/public/plugin.ts
@@ -13,10 +13,10 @@ import { PANEL_HOVER_TRIGGER } from '@kbn/embeddable-plugin/public';
import { ClearControlAction } from './actions/clear_control_action';
import { DeleteControlAction } from './actions/delete_control_action';
import { EditControlAction } from './actions/edit_control_action';
-import { registerControlGroupEmbeddable } from './react_controls/control_group/register_control_group_embeddable';
-import { registerOptionsListControl } from './react_controls/controls/data_controls/options_list_control/register_options_list_control';
-import { registerRangeSliderControl } from './react_controls/controls/data_controls/range_slider/register_range_slider_control';
-import { registerTimeSliderControl } from './react_controls/controls/timeslider_control/register_timeslider_control';
+import { registerControlGroupEmbeddable } from './control_group/register_control_group_embeddable';
+import { registerOptionsListControl } from './controls/data_controls/options_list_control/register_options_list_control';
+import { registerRangeSliderControl } from './controls/data_controls/range_slider/register_range_slider_control';
+import { registerTimeSliderControl } from './controls/timeslider_control/register_timeslider_control';
import { setKibanaServices, untilPluginStartServicesReady } from './services/kibana_services';
import type { ControlsPluginSetupDeps, ControlsPluginStartDeps } from './types';
diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/create/controls/dashboard_control_group_integration.test.ts b/src/plugins/dashboard/public/dashboard_container/embeddable/create/controls/dashboard_control_group_integration.test.ts
index 1659d3673e43d..3a18acd242e4f 100644
--- a/src/plugins/dashboard/public/dashboard_container/embeddable/create/controls/dashboard_control_group_integration.test.ts
+++ b/src/plugins/dashboard/public/dashboard_container/embeddable/create/controls/dashboard_control_group_integration.test.ts
@@ -11,8 +11,6 @@ import { Filter } from '@kbn/es-query';
import { combineDashboardFiltersWithControlGroupFilters } from './dashboard_control_group_integration';
import { BehaviorSubject } from 'rxjs';
-jest.mock('@kbn/controls-plugin/public/react_controls/control_group/get_control_group_factory');
-
const testFilter1: Filter = {
meta: {
key: 'testfield',
From 434430a995487971137ce6b3182d2285758cd4c1 Mon Sep 17 00:00:00 2001
From: Rickyanto Ang
Date: Fri, 20 Sep 2024 13:54:44 -0700
Subject: [PATCH 34/42] [Cloud Security] Vulnerabilities Preview & Refactor CSP
Plugin PHASE 1 (#193385)
## Summary
In an attempt to make Reviewing easier and more accurate, the
implementation of Vulnerabilities on Host.name flyout in Alerts Page
will be split into 2 Phases
Phase 1: Move Functions, Utils or Helpers, Hooks, constants to Package
Phase 2: Implementing the feature
---
.../constants.ts | 7 +++++++
.../kbn-cloud-security-posture-common/index.ts | 2 ++
.../csp_vulnerability_finding.ts | 2 +-
.../schema/vulnerabilities/latest.ts} | 1 +
.../types/vulnerabilities.ts | 8 ++++++++
.../utils/get_abbreviated_number.test.ts | 0
.../utils/get_abbreviated_number.ts | 0
.../cloud_security_posture/common/constants.ts | 16 ++--------------
.../cloud_security_posture/common/types_old.ts | 2 --
.../common/utils/get_vulnerability_colors.ts | 2 +-
.../additional_controls.tsx | 2 +-
.../public/components/vulnerability_badges.tsx | 2 +-
.../components/vulnerability_severity_map.tsx | 2 +-
.../latest_findings_group_renderer.tsx | 2 +-
.../layout/findings_distribution_bar.tsx | 2 +-
.../_mocks_/vulnerability.mock.ts | 2 +-
.../hooks/use_grouped_vulnerabilities.tsx | 2 +-
.../hooks/use_latest_vulnerabilities.tsx | 10 +++++-----
.../use_latest_vulnerabilities_grouping.tsx | 6 ++----
.../latest_vulnerabilities_group_renderer.tsx | 2 +-
.../latest_vulnerabilities_table.tsx | 2 +-
.../public/pages/vulnerabilities/types.ts | 2 +-
.../create_detection_rule_from_vulnerability.ts | 4 ++--
.../utils/get_vector_score_list.ts | 2 +-
.../vulnerability_detection_rule_counter.tsx | 2 +-
.../vulnerability_finding_flyout.tsx | 2 +-
.../vulnerability_json_tab.tsx | 2 +-
.../vulnerability_overview_tab.tsx | 5 ++++-
.../vulnerability_table_tab.tsx | 2 +-
.../vulnerabilities/vulnerabilties.test.tsx | 8 ++++----
.../vulnerability_dashboard.test.tsx | 6 ++----
.../vulnerability_table_panel_section.tsx | 2 +-
.../vulnerability_trend_graph.tsx | 3 ++-
.../server/create_indices/latest_indices.ts | 6 ++++--
.../latest_vulnerabilities_transforms.ts | 4 +++-
.../collectors/cloud_accounts_stats_collector.ts | 7 +++++--
.../collectors/indices_stats_collector.ts | 2 +-
.../server/routes/status/status.ts | 6 +++---
.../get_top_patchable_vulnerabilities.ts | 2 +-
.../get_top_vulnerabilities.ts | 2 +-
.../get_top_vulnerable_resources.ts | 2 +-
.../get_vulnerabilities_statistics.ts | 6 ++----
.../server/saved_objects/data_views.ts | 2 +-
.../server/tasks/findings_stats_task.ts | 2 +-
.../server/cloud_security/constants.ts | 6 ++----
.../status/status_index_timeout.ts | 2 +-
.../status/status_indexed.ts | 2 +-
.../status/status_indexing.ts | 2 +-
.../status/status_unprivileged.ts | 2 +-
.../routes/helper/user_roles_utilites.ts | 6 ++++--
.../cloud_security_metering.ts | 6 ++----
.../status/status_indexed.ts | 2 +-
.../status/status_indexing.ts | 2 +-
53 files changed, 96 insertions(+), 89 deletions(-)
rename x-pack/{plugins/cloud_security_posture/common/schemas => packages/kbn-cloud-security-posture-common/schema/vulnerabilities}/csp_vulnerability_finding.ts (97%)
rename x-pack/{plugins/cloud_security_posture/common/schemas/index.ts => packages/kbn-cloud-security-posture-common/schema/vulnerabilities/latest.ts} (99%)
create mode 100644 x-pack/packages/kbn-cloud-security-posture-common/types/vulnerabilities.ts
rename x-pack/{plugins/cloud_security_posture/public/common => packages/kbn-cloud-security-posture-common}/utils/get_abbreviated_number.test.ts (100%)
rename x-pack/{plugins/cloud_security_posture/public/common => packages/kbn-cloud-security-posture-common}/utils/get_abbreviated_number.ts (100%)
diff --git a/x-pack/packages/kbn-cloud-security-posture-common/constants.ts b/x-pack/packages/kbn-cloud-security-posture-common/constants.ts
index 2772b6ae6d9c7..0e8b1b3e16cfa 100644
--- a/x-pack/packages/kbn-cloud-security-posture-common/constants.ts
+++ b/x-pack/packages/kbn-cloud-security-posture-common/constants.ts
@@ -26,3 +26,10 @@ export const CLOUD_SECURITY_POSTURE_BASE_PATH = '/cloud_security_posture';
export const CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX =
'security_solution_cdr_latest_misconfigurations';
export const SECURITY_DEFAULT_DATA_VIEW_ID = 'security-solution-default';
+
+export const CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN =
+ 'logs-cloud_security_posture.vulnerabilities_latest-default';
+export const CDR_LATEST_THIRD_PARTY_VULNERABILITIES_INDEX_PATTERN =
+ 'security_solution-*.vulnerability_latest';
+export const CDR_VULNERABILITIES_INDEX_PATTERN = `${CDR_LATEST_THIRD_PARTY_VULNERABILITIES_INDEX_PATTERN},${CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN}`;
+export const LATEST_VULNERABILITIES_RETENTION_POLICY = '3d';
diff --git a/x-pack/packages/kbn-cloud-security-posture-common/index.ts b/x-pack/packages/kbn-cloud-security-posture-common/index.ts
index 86ed573fc3915..4cb5a8d6e1bd8 100644
--- a/x-pack/packages/kbn-cloud-security-posture-common/index.ts
+++ b/x-pack/packages/kbn-cloud-security-posture-common/index.ts
@@ -19,9 +19,11 @@ export type {
} from './types/status';
export type { CspFinding, CspFindingResult } from './types/findings';
export type { BenchmarksCisId } from './types/benchmark';
+export type { VulnSeverity } from './types/vulnerabilities';
export * from './constants';
export {
extractErrorMessage,
buildMutedRulesFilter,
buildEntityFlyoutPreviewQuery,
} from './utils/helpers';
+export { getAbbreviatedNumber } from './utils/get_abbreviated_number';
diff --git a/x-pack/plugins/cloud_security_posture/common/schemas/csp_vulnerability_finding.ts b/x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/csp_vulnerability_finding.ts
similarity index 97%
rename from x-pack/plugins/cloud_security_posture/common/schemas/csp_vulnerability_finding.ts
rename to x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/csp_vulnerability_finding.ts
index 10b3dbb96b1d3..b2255b8fa51f8 100644
--- a/x-pack/plugins/cloud_security_posture/common/schemas/csp_vulnerability_finding.ts
+++ b/x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/csp_vulnerability_finding.ts
@@ -7,7 +7,7 @@
// TODO: this needs to be defined in a versioned schema
import type { EcsEvent } from '@elastic/ecs';
-import { VulnSeverity } from '../types_old';
+import type { VulnSeverity } from '../../types/vulnerabilities';
export interface CspVulnerabilityFinding {
'@timestamp': string;
diff --git a/x-pack/plugins/cloud_security_posture/common/schemas/index.ts b/x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/latest.ts
similarity index 99%
rename from x-pack/plugins/cloud_security_posture/common/schemas/index.ts
rename to x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/latest.ts
index 8c8dcdc52f0f4..961d1bf9dc49d 100644
--- a/x-pack/plugins/cloud_security_posture/common/schemas/index.ts
+++ b/x-pack/packages/kbn-cloud-security-posture-common/schema/vulnerabilities/latest.ts
@@ -4,4 +4,5 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
+
export * from './csp_vulnerability_finding';
diff --git a/x-pack/packages/kbn-cloud-security-posture-common/types/vulnerabilities.ts b/x-pack/packages/kbn-cloud-security-posture-common/types/vulnerabilities.ts
new file mode 100644
index 0000000000000..e4360c1307e0a
--- /dev/null
+++ b/x-pack/packages/kbn-cloud-security-posture-common/types/vulnerabilities.ts
@@ -0,0 +1,8 @@
+/*
+ * Copyright 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 type VulnSeverity = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL' | 'UNKNOWN';
diff --git a/x-pack/plugins/cloud_security_posture/public/common/utils/get_abbreviated_number.test.ts b/x-pack/packages/kbn-cloud-security-posture-common/utils/get_abbreviated_number.test.ts
similarity index 100%
rename from x-pack/plugins/cloud_security_posture/public/common/utils/get_abbreviated_number.test.ts
rename to x-pack/packages/kbn-cloud-security-posture-common/utils/get_abbreviated_number.test.ts
diff --git a/x-pack/plugins/cloud_security_posture/public/common/utils/get_abbreviated_number.ts b/x-pack/packages/kbn-cloud-security-posture-common/utils/get_abbreviated_number.ts
similarity index 100%
rename from x-pack/plugins/cloud_security_posture/public/common/utils/get_abbreviated_number.ts
rename to x-pack/packages/kbn-cloud-security-posture-common/utils/get_abbreviated_number.ts
diff --git a/x-pack/plugins/cloud_security_posture/common/constants.ts b/x-pack/plugins/cloud_security_posture/common/constants.ts
index fc6fc7d76bf7f..e5d95b882b2e7 100644
--- a/x-pack/plugins/cloud_security_posture/common/constants.ts
+++ b/x-pack/plugins/cloud_security_posture/common/constants.ts
@@ -6,12 +6,8 @@
*/
import { KSPM_POLICY_TEMPLATE, CSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
-import {
- AwsCredentialsTypeFieldMap,
- GcpCredentialsTypeFieldMap,
- PostureTypes,
- VulnSeverity,
-} from './types_old';
+import type { VulnSeverity } from '@kbn/cloud-security-posture-common';
+import { AwsCredentialsTypeFieldMap, GcpCredentialsTypeFieldMap, PostureTypes } from './types_old';
export const CLOUD_SECURITY_INTERTAL_PREFIX_ROUTE_PATH = '/internal/cloud_security_posture/';
@@ -61,14 +57,6 @@ export const VULNERABILITIES_INDEX_DEFAULT_NS =
export const LATEST_VULNERABILITIES_INDEX_TEMPLATE_NAME =
'logs-cloud_security_posture.vulnerabilities_latest';
-export const CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN =
- 'logs-cloud_security_posture.vulnerabilities_latest-default';
-export const CDR_LATEST_THIRD_PARTY_VULNERABILITIES_INDEX_PATTERN =
- 'security_solution-*.vulnerability_latest';
-export const CDR_VULNERABILITIES_INDEX_PATTERN = `${CDR_LATEST_THIRD_PARTY_VULNERABILITIES_INDEX_PATTERN},${CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN}`;
-
-export const LATEST_VULNERABILITIES_RETENTION_POLICY = '3d';
-
export const SECURITY_DEFAULT_DATA_VIEW_ID = 'security-solution-default';
export const ALERTS_INDEX_PATTERN = '.alerts-security.alerts-*';
diff --git a/x-pack/plugins/cloud_security_posture/common/types_old.ts b/x-pack/plugins/cloud_security_posture/common/types_old.ts
index c6531605bc328..be5366b89bc24 100644
--- a/x-pack/plugins/cloud_security_posture/common/types_old.ts
+++ b/x-pack/plugins/cloud_security_posture/common/types_old.ts
@@ -151,8 +151,6 @@ export interface CnvmDashboardData {
topVulnerabilities: VulnerabilityStat[];
}
-export type VulnSeverity = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL' | 'UNKNOWN';
-
export interface VulnerableResourceStat {
vulnerabilityCount: number | undefined;
resource: {
diff --git a/x-pack/plugins/cloud_security_posture/public/common/utils/get_vulnerability_colors.ts b/x-pack/plugins/cloud_security_posture/public/common/utils/get_vulnerability_colors.ts
index db5776bb82ccc..fc63ac1131faa 100644
--- a/x-pack/plugins/cloud_security_posture/public/common/utils/get_vulnerability_colors.ts
+++ b/x-pack/plugins/cloud_security_posture/public/common/utils/get_vulnerability_colors.ts
@@ -6,8 +6,8 @@
*/
import { euiThemeVars } from '@kbn/ui-theme';
+import type { VulnSeverity } from '@kbn/cloud-security-posture-common';
import { VULNERABILITIES_SEVERITY } from '../../../common/constants';
-import { VulnSeverity } from '../../../common/types_old';
export const getCvsScoreColor = (score: number): string | undefined => {
if (score <= 4) {
diff --git a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/additional_controls.tsx b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/additional_controls.tsx
index b967384161949..856c2a5c91d75 100644
--- a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/additional_controls.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/additional_controls.tsx
@@ -8,9 +8,9 @@ import React, { FC, PropsWithChildren } from 'react';
import { EuiButtonEmpty, EuiFlexItem } from '@elastic/eui';
import { type DataView } from '@kbn/data-views-plugin/common';
import { FormattedMessage } from '@kbn/i18n-react';
+import { getAbbreviatedNumber } from '@kbn/cloud-security-posture-common';
import { FieldsSelectorModal, useFieldsModal } from './fields_selector';
import { useStyles } from './use_styles';
-import { getAbbreviatedNumber } from '../../common/utils/get_abbreviated_number';
import { CSP_FIELDS_SELECTOR_OPEN_BUTTON } from '../test_subjects';
const GroupSelectorWrapper: FC> = ({ children }) => {
diff --git a/x-pack/plugins/cloud_security_posture/public/components/vulnerability_badges.tsx b/x-pack/plugins/cloud_security_posture/public/components/vulnerability_badges.tsx
index 7d29cda67e9d4..cb4fbbad83a35 100644
--- a/x-pack/plugins/cloud_security_posture/public/components/vulnerability_badges.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/components/vulnerability_badges.tsx
@@ -9,8 +9,8 @@ import { EuiBadge, EuiIcon, EuiTextColor } from '@elastic/eui';
import React from 'react';
import { css } from '@emotion/react';
import { float } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
+import type { VulnSeverity } from '@kbn/cloud-security-posture-common';
import { getCvsScoreColor, getSeverityStatusColor } from '../common/utils/get_vulnerability_colors';
-import { VulnSeverity } from '../../common/types_old';
import { VULNERABILITIES_CVSS_SCORE_BADGE_SUBJ } from './test_subjects';
interface CVSScoreBadgeProps {
diff --git a/x-pack/plugins/cloud_security_posture/public/components/vulnerability_severity_map.tsx b/x-pack/plugins/cloud_security_posture/public/components/vulnerability_severity_map.tsx
index b22846b624b9c..74341095caac2 100644
--- a/x-pack/plugins/cloud_security_posture/public/components/vulnerability_severity_map.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/components/vulnerability_severity_map.tsx
@@ -15,9 +15,9 @@ import {
EuiText,
} from '@elastic/eui';
import { PaletteColorStop } from '@elastic/eui/src/components/color_picker/color_palette_picker';
+import type { VulnSeverity } from '@kbn/cloud-security-posture-common';
import { i18n } from '@kbn/i18n';
import { getSeverityStatusColor } from '../common/utils/get_vulnerability_colors';
-import { VulnSeverity } from '../../common/types_old';
import { SeverityStatusBadge } from './vulnerability_badges';
interface Props {
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/latest_findings_group_renderer.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/latest_findings_group_renderer.tsx
index e2ea550447af1..b4ad5d15ec8e9 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/latest_findings_group_renderer.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/latest_findings/latest_findings_group_renderer.tsx
@@ -17,13 +17,13 @@ import { css } from '@emotion/react';
import { GroupPanelRenderer, GroupStatsItem, RawBucket } from '@kbn/grouping/src';
import React from 'react';
import { i18n } from '@kbn/i18n';
+import { getAbbreviatedNumber } from '@kbn/cloud-security-posture-common';
import { FINDINGS_GROUPING_OPTIONS } from '../../../common/constants';
import {
firstNonNullValue,
LoadingGroup,
NullGroup,
} from '../../../components/cloud_security_grouping';
-import { getAbbreviatedNumber } from '../../../common/utils/get_abbreviated_number';
import { CISBenchmarkIcon } from '../../../components/cis_benchmark_icon';
import { ComplianceScoreBar } from '../../../components/compliance_score_bar';
import { FindingsGroupingAggregation } from './use_grouped_findings';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/layout/findings_distribution_bar.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/layout/findings_distribution_bar.tsx
index f737589aa2a4a..3fe31785f81df 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/layout/findings_distribution_bar.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/layout/findings_distribution_bar.tsx
@@ -9,7 +9,7 @@ import { css } from '@emotion/react';
import { EuiHealth, EuiBadge, EuiSpacer, EuiFlexGroup, useEuiTheme } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { statusColors } from '@kbn/cloud-security-posture';
-import { getAbbreviatedNumber } from '../../../common/utils/get_abbreviated_number';
+import { getAbbreviatedNumber } from '@kbn/cloud-security-posture-common';
import { RULE_FAILED, RULE_PASSED } from '../../../../common/constants';
import type { Evaluation } from '../../../../common/types_old';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/_mocks_/vulnerability.mock.ts b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/_mocks_/vulnerability.mock.ts
index e66f9b33d7e91..46a6197360de9 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/_mocks_/vulnerability.mock.ts
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/_mocks_/vulnerability.mock.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { CspVulnerabilityFinding } from '../../../../common/schemas';
+import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
export const mockVulnerabilityHit: CspVulnerabilityFinding = {
'@timestamp': '2023-03-30T10:27:35.013Z',
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_grouped_vulnerabilities.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_grouped_vulnerabilities.tsx
index 72815ef434ef9..580926340438f 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_grouped_vulnerabilities.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_grouped_vulnerabilities.tsx
@@ -11,7 +11,7 @@ import { GenericBuckets, GroupingQuery, RootAggregation } from '@kbn/grouping/sr
import { useQuery } from '@tanstack/react-query';
import { lastValueFrom } from 'rxjs';
import { showErrorToast } from '@kbn/cloud-security-posture';
-import { CDR_VULNERABILITIES_INDEX_PATTERN } from '../../../../common/constants';
+import { CDR_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import { useKibana } from '../../../common/hooks/use_kibana';
// Elasticsearch returns `null` when a sub-aggregation cannot be computed
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities.tsx
index c4c73f0ce5db2..3e5bd646e7993 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities.tsx
@@ -16,14 +16,14 @@ import {
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { buildDataTableRecord } from '@kbn/discover-utils';
import { EsHitRecord } from '@kbn/discover-utils/types';
-import { MAX_FINDINGS_TO_LOAD } from '@kbn/cloud-security-posture-common';
-import { FindingsBaseEsQuery, showErrorToast } from '@kbn/cloud-security-posture';
-import { VULNERABILITY_FIELDS } from '../../../common/constants';
-import { CspVulnerabilityFinding } from '../../../../common/schemas';
import {
+ MAX_FINDINGS_TO_LOAD,
CDR_VULNERABILITIES_INDEX_PATTERN,
LATEST_VULNERABILITIES_RETENTION_POLICY,
-} from '../../../../common/constants';
+} from '@kbn/cloud-security-posture-common';
+import { FindingsBaseEsQuery, showErrorToast } from '@kbn/cloud-security-posture';
+import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
+import { VULNERABILITY_FIELDS } from '../../../common/constants';
import { useKibana } from '../../../common/hooks/use_kibana';
import { getCaseInsensitiveSortScript } from '../utils/custom_sort_script';
type LatestFindingsRequest = IKibanaSearchRequest;
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities_grouping.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities_grouping.tsx
index e713a0ad6aad9..f615ccdb4a293 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities_grouping.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/hooks/use_latest_vulnerabilities_grouping.tsx
@@ -14,6 +14,7 @@ import {
parseGroupingQuery,
} from '@kbn/grouping/src';
import { useMemo } from 'react';
+import { LATEST_VULNERABILITIES_RETENTION_POLICY } from '@kbn/cloud-security-posture-common';
import { buildEsQuery, Filter } from '@kbn/es-query';
import {
LOCAL_STORAGE_VULNERABILITIES_GROUPING_KEY,
@@ -21,10 +22,7 @@ import {
VULNERABILITY_FIELDS,
} from '../../../common/constants';
import { useDataViewContext } from '../../../common/contexts/data_view_context';
-import {
- LATEST_VULNERABILITIES_RETENTION_POLICY,
- VULNERABILITIES_SEVERITY,
-} from '../../../../common/constants';
+import { VULNERABILITIES_SEVERITY } from '../../../../common/constants';
import {
VulnerabilitiesGroupingAggregation,
VulnerabilitiesRootGroupingAggregation,
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_group_renderer.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_group_renderer.tsx
index 242c61b7276ad..c05cff298fc34 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_group_renderer.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_group_renderer.tsx
@@ -17,11 +17,11 @@ import { css } from '@emotion/react';
import { GroupPanelRenderer, GroupStatsItem, RawBucket } from '@kbn/grouping/src';
import React from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
+import { getAbbreviatedNumber } from '@kbn/cloud-security-posture-common';
import { getCloudProviderNameFromAbbreviation } from '../../../common/utils/helpers';
import { VulnerabilitiesGroupingAggregation } from './hooks/use_grouped_vulnerabilities';
import { VULNERABILITIES_GROUPING_COUNTER } from './test_subjects';
import { NULL_GROUPING_MESSAGES, NULL_GROUPING_UNIT, VULNERABILITIES } from './translations';
-import { getAbbreviatedNumber } from '../../common/utils/get_abbreviated_number';
import {
firstNonNullValue,
LoadingGroup,
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_table.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_table.tsx
index ac215d4e12cf7..1a6ae8f660bc0 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_table.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/latest_vulnerabilities_table.tsx
@@ -11,8 +11,8 @@ import { i18n } from '@kbn/i18n';
import { EuiDataGridCellValueElementProps, EuiSpacer } from '@elastic/eui';
import { Filter } from '@kbn/es-query';
import { HttpSetup } from '@kbn/core-http-browser';
+import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
import { getDatasetDisplayName } from '../../common/utils/get_dataset_display_name';
-import { CspVulnerabilityFinding } from '../../../common/schemas';
import { CloudSecurityDataTable } from '../../components/cloud_security_data_table';
import { useLatestVulnerabilitiesTable } from './hooks/use_latest_vulnerabilities_table';
import { LATEST_VULNERABILITIES_TABLE } from './test_subjects';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/types.ts b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/types.ts
index e0c97ce6ff76d..22a62a25f8cd4 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/types.ts
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/types.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { VectorScoreBase } from '../../../common/schemas';
+import { VectorScoreBase } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
export type Vendor = 'NVD' | 'Red Hat' | 'GHSA';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/utils/create_detection_rule_from_vulnerability.ts b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/utils/create_detection_rule_from_vulnerability.ts
index 3680c7a6af844..7e817a3d56a15 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/utils/create_detection_rule_from_vulnerability.ts
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/utils/create_detection_rule_from_vulnerability.ts
@@ -7,9 +7,9 @@
import { HttpSetup } from '@kbn/core/public';
import { i18n } from '@kbn/i18n';
-import type { Vulnerability } from '../../../../common/schemas';
+import { LATEST_VULNERABILITIES_RETENTION_POLICY } from '@kbn/cloud-security-posture-common';
+import type { Vulnerability } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
import {
- LATEST_VULNERABILITIES_RETENTION_POLICY,
VULNERABILITIES_INDEX_PATTERN,
VULNERABILITIES_SEVERITY,
} from '../../../../common/constants';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/utils/get_vector_score_list.ts b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/utils/get_vector_score_list.ts
index b4f6bd90389fd..c9190a001b3b5 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/utils/get_vector_score_list.ts
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/utils/get_vector_score_list.ts
@@ -5,7 +5,7 @@
* 2.0.
*/
-import { VectorScoreBase } from '../../../../common/schemas';
+import { VectorScoreBase } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
import { Vector } from '../types';
export const getVectorScoreList = (vectorBaseScore: VectorScoreBase) => {
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_detection_rule_counter.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_detection_rule_counter.tsx
index b05013353b2b8..facb4817cec51 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_detection_rule_counter.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_detection_rule_counter.tsx
@@ -7,8 +7,8 @@
import React from 'react';
import type { HttpSetup } from '@kbn/core/public';
+import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
import { CSP_VULN_DATASET } from '../../../common/utils/get_dataset_display_name';
-import { CspVulnerabilityFinding } from '../../../../common/schemas';
import { DetectionRuleCounter } from '../../../components/detection_rule_counter';
import { createDetectionRuleFromVulnerabilityFinding } from '../utils/create_detection_rule_from_vulnerability';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_finding_flyout.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_finding_flyout.tsx
index 953d8af6ce7cb..102fc272801ea 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_finding_flyout.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_finding_flyout.tsx
@@ -27,13 +27,13 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { euiThemeVars } from '@kbn/ui-theme';
import { css } from '@emotion/react';
import { HttpSetup } from '@kbn/core-http-browser';
+import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
import { TakeAction } from '../../../components/take_action';
import { truthy } from '../../../../common/utils/helpers';
import { CspInlineDescriptionList } from '../../../components/csp_inline_description_list';
import { VulnerabilityOverviewTab } from './vulnerability_overview_tab';
import { VulnerabilityJsonTab } from './vulnerability_json_tab';
import { SeverityStatusBadge } from '../../../components/vulnerability_badges';
-import type { CspVulnerabilityFinding } from '../../../../common/schemas';
import {
FINDINGS_VULNERABILITY_FLYOUT_DESCRIPTION_LIST,
TAB_ID_VULNERABILITY_FLYOUT,
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_json_tab.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_json_tab.tsx
index c18571eb975e6..03701ad4ee442 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_json_tab.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_json_tab.tsx
@@ -8,7 +8,7 @@
import { CodeEditor } from '@kbn/code-editor';
import React from 'react';
import { XJsonLang } from '@kbn/monaco';
-import { CspVulnerabilityFinding } from '../../../../common/schemas';
+import type { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
import { JSON_TAB_VULNERABILITY_FLYOUT } from '../test_subjects';
interface VulnerabilityJsonTabProps {
vulnerabilityRecord: CspVulnerabilityFinding;
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_overview_tab.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_overview_tab.tsx
index ecff474d5f50f..9848bbd402e50 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_overview_tab.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_overview_tab.tsx
@@ -19,8 +19,11 @@ import moment from 'moment';
import React from 'react';
import { euiThemeVars } from '@kbn/ui-theme';
import { i18n } from '@kbn/i18n';
+import {
+ VectorScoreBase,
+ CspVulnerabilityFinding,
+} from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
import { getDatasetDisplayName } from '../../../common/utils/get_dataset_display_name';
-import { VectorScoreBase, CspVulnerabilityFinding } from '../../../../common/schemas';
import { CspFlyoutMarkdown } from '../../configurations/findings_flyout/findings_flyout';
import { NvdLogo } from '../../../assets/icons/nvd_logo_svg';
import { CVSScoreBadge } from '../../../components/vulnerability_badges';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_table_tab.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_table_tab.tsx
index 3d5c5d6c519a7..e84661bd0bcb1 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_table_tab.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilities_finding_flyout/vulnerability_table_tab.tsx
@@ -15,7 +15,7 @@ import {
import React from 'react';
import { getFlattenedObject } from '@kbn/std';
import { i18n } from '@kbn/i18n';
-import { CspVulnerabilityFinding } from '../../../../common/schemas';
+import { CspVulnerabilityFinding } from '@kbn/cloud-security-posture-common/schema/vulnerabilities/latest';
interface FlattenedItem {
key: string; // flattened dot notation object path for Vulnerability;
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilties.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilties.test.tsx
index 07db3f1905167..0c624a215c253 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilties.test.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerabilities/vulnerabilties.test.tsx
@@ -6,12 +6,12 @@
*/
import React from 'react';
import Chance from 'chance';
-import { CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX } from '@kbn/cloud-security-posture-common';
-import { Vulnerabilities } from './vulnerabilities';
import {
+ CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX,
CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
- VULN_MGMT_POLICY_TEMPLATE,
-} from '../../../common/constants';
+} from '@kbn/cloud-security-posture-common';
+import { Vulnerabilities } from './vulnerabilities';
+import { VULN_MGMT_POLICY_TEMPLATE } from '../../../common/constants';
import { useCspSetupStatusApi } from '@kbn/cloud-security-posture/src/hooks/use_csp_setup_status_api';
import { useDataView } from '@kbn/cloud-security-posture/src/hooks/use_data_view';
import { createReactQueryResponse } from '../../test/fixtures/react_query';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_dashboard.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_dashboard.test.tsx
index 9ea51de9e5f9d..50f630e6b9376 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_dashboard.test.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_dashboard.test.tsx
@@ -8,10 +8,8 @@ import React from 'react';
import Chance from 'chance';
import { dataPluginMock } from '@kbn/data-plugin/public/mocks';
import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks';
-import {
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
- VULN_MGMT_POLICY_TEMPLATE,
-} from '../../../common/constants';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
+import { VULN_MGMT_POLICY_TEMPLATE } from '../../../common/constants';
import { chartPluginMock } from '@kbn/charts-plugin/public/mocks';
import { discoverPluginMock } from '@kbn/discover-plugin/public/mocks';
import { useCspSetupStatusApi } from '@kbn/cloud-security-posture/src/hooks/use_csp_setup_status_api';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_table_panel_section.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_table_panel_section.tsx
index a3d92ab40f08c..42794e91d2036 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_table_panel_section.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_table_panel_section.tsx
@@ -18,11 +18,11 @@ import {
import { i18n } from '@kbn/i18n';
import type { NavFilter } from '@kbn/cloud-security-posture/src/hooks/use_navigate_findings';
import { useNavigateVulnerabilities } from '@kbn/cloud-security-posture/src/hooks/use_navigate_findings';
+import type { VulnSeverity } from '@kbn/cloud-security-posture-common';
import {
PatchableVulnerabilityStat,
VulnerabilityStat,
VulnerableResourceStat,
- VulnSeverity,
} from '../../../common/types_old';
import { DASHBOARD_TABLE_TYPES } from './vulnerability_table_panel.config';
import { VulnerabilityTablePanel } from './vulnerability_table_panel';
diff --git a/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_trend_graph.tsx b/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_trend_graph.tsx
index 89404b0238ece..ca29b18822fae 100644
--- a/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_trend_graph.tsx
+++ b/x-pack/plugins/cloud_security_posture/public/pages/vulnerability_dashboard/vulnerability_trend_graph.tsx
@@ -20,8 +20,9 @@ import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import { useNavigateVulnerabilities } from '@kbn/cloud-security-posture/src/hooks/use_navigate_findings';
+import type { VulnSeverity } from '@kbn/cloud-security-posture-common';
import { truthy } from '../../../common/utils/helpers';
-import { VulnStatsTrend, VulnSeverity } from '../../../common/types_old';
+import { VulnStatsTrend } from '../../../common/types_old';
import { useVulnerabilityDashboardApi } from '../../common/api/use_vulnerability_dashboard_api';
import { getSeverityStatusColor } from '../../common/utils/get_vulnerability_colors';
import { ChartPanel } from '../../components/chart_panel';
diff --git a/x-pack/plugins/cloud_security_posture/server/create_indices/latest_indices.ts b/x-pack/plugins/cloud_security_posture/server/create_indices/latest_indices.ts
index 5505ea4c42c23..4d91c3f3fc2c5 100644
--- a/x-pack/plugins/cloud_security_posture/server/create_indices/latest_indices.ts
+++ b/x-pack/plugins/cloud_security_posture/server/create_indices/latest_indices.ts
@@ -5,13 +5,15 @@
* 2.0.
*/
-import { CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
+import {
+ CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
+ CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN,
+} from '@kbn/cloud-security-posture-common';
import {
FINDINGS_INDEX_NAME,
LATEST_FINDINGS_INDEX_TEMPLATE_NAME,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
VULNERABILITIES_INDEX_NAME,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
LATEST_VULNERABILITIES_INDEX_TEMPLATE_NAME,
} from '../../common/constants';
import { LatestIndexConfig } from './types';
diff --git a/x-pack/plugins/cloud_security_posture/server/create_transforms/latest_vulnerabilities_transforms.ts b/x-pack/plugins/cloud_security_posture/server/create_transforms/latest_vulnerabilities_transforms.ts
index 0f116f9635e03..fad6b526c72d7 100644
--- a/x-pack/plugins/cloud_security_posture/server/create_transforms/latest_vulnerabilities_transforms.ts
+++ b/x-pack/plugins/cloud_security_posture/server/create_transforms/latest_vulnerabilities_transforms.ts
@@ -7,9 +7,11 @@
import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types';
import {
- CLOUD_SECURITY_POSTURE_PACKAGE_NAME,
CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
LATEST_VULNERABILITIES_RETENTION_POLICY,
+} from '@kbn/cloud-security-posture-common';
+import {
+ CLOUD_SECURITY_POSTURE_PACKAGE_NAME,
VULNERABILITIES_INDEX_PATTERN,
} from '../../common/constants';
diff --git a/x-pack/plugins/cloud_security_posture/server/lib/telemetry/collectors/cloud_accounts_stats_collector.ts b/x-pack/plugins/cloud_security_posture/server/lib/telemetry/collectors/cloud_accounts_stats_collector.ts
index ab561f515d22f..e416bec9564c4 100644
--- a/x-pack/plugins/cloud_security_posture/server/lib/telemetry/collectors/cloud_accounts_stats_collector.ts
+++ b/x-pack/plugins/cloud_security_posture/server/lib/telemetry/collectors/cloud_accounts_stats_collector.ts
@@ -6,7 +6,11 @@
*/
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
import type { ISavedObjectsRepository, Logger } from '@kbn/core/server';
-import { KSPM_POLICY_TEMPLATE, CSPM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-common';
+import {
+ CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
+ KSPM_POLICY_TEMPLATE,
+ CSPM_POLICY_TEMPLATE,
+} from '@kbn/cloud-security-posture-common';
import type { SearchRequest } from '@elastic/elasticsearch/lib/api/types';
import { getPackagePolicyIdRuntimeMapping } from '../../../../common/runtime_mappings/get_package_policy_id_mapping';
import { getIdentifierRuntimeMapping } from '../../../../common/runtime_mappings/get_identifier_runtime_mapping';
@@ -19,7 +23,6 @@ import type {
} from './types';
import {
LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
VULN_MGMT_POLICY_TEMPLATE,
} from '../../../../common/constants';
import {
diff --git a/x-pack/plugins/cloud_security_posture/server/lib/telemetry/collectors/indices_stats_collector.ts b/x-pack/plugins/cloud_security_posture/server/lib/telemetry/collectors/indices_stats_collector.ts
index c8fb7167eeae1..e5c19c9216be5 100644
--- a/x-pack/plugins/cloud_security_posture/server/lib/telemetry/collectors/indices_stats_collector.ts
+++ b/x-pack/plugins/cloud_security_posture/server/lib/telemetry/collectors/indices_stats_collector.ts
@@ -6,6 +6,7 @@
*/
import type { CoreStart, Logger, SavedObjectsClientContract } from '@kbn/core/server';
import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import { getCspStatus } from '../../../routes/status/status';
import type { CspServerPluginStart, CspServerPluginStartDeps } from '../../../types';
@@ -14,7 +15,6 @@ import {
BENCHMARK_SCORE_INDEX_DEFAULT_NS,
FINDINGS_INDEX_DEFAULT_NS,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
VULNERABILITIES_INDEX_DEFAULT_NS,
} from '../../../../common/constants';
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts b/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts
index 47ad4c32cba6e..659b2ed94f43a 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/status/status.ts
@@ -12,6 +12,9 @@ import {
STATUS_ROUTE_PATH,
LATEST_FINDINGS_RETENTION_POLICY,
CDR_MISCONFIGURATIONS_INDEX_PATTERN,
+ CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
+ LATEST_VULNERABILITIES_RETENTION_POLICY,
+ CDR_VULNERABILITIES_INDEX_PATTERN,
} from '@kbn/cloud-security-posture-common';
import type {
CspSetupStatus,
@@ -36,11 +39,8 @@ import {
BENCHMARK_SCORE_INDEX_DEFAULT_NS,
VULNERABILITIES_INDEX_PATTERN,
POSTURE_TYPES,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
VULN_MGMT_POLICY_TEMPLATE,
POSTURE_TYPE_ALL,
- LATEST_VULNERABILITIES_RETENTION_POLICY,
- CDR_VULNERABILITIES_INDEX_PATTERN,
} from '../../../common/constants';
import type {
CspApiRequestHandlerContext,
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_patchable_vulnerabilities.ts b/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_patchable_vulnerabilities.ts
index add7eac260c25..565400ec3a6df 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_patchable_vulnerabilities.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_patchable_vulnerabilities.ts
@@ -7,8 +7,8 @@
import { SearchRequest } from '@elastic/elasticsearch/lib/api/types';
import { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import { AggFieldBucket, PatchableVulnerabilityStat } from '../../../common/types_old';
-import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '../../../common/constants';
interface VulnerabilityBucket {
key: string | undefined;
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_vulnerabilities.ts b/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_vulnerabilities.ts
index 5160d0d98fa0c..4ab2ee45ed549 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_vulnerabilities.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_vulnerabilities.ts
@@ -7,8 +7,8 @@
import { SearchRequest } from '@elastic/elasticsearch/lib/api/types';
import { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import { VulnerabilityStat } from '../../../common/types_old';
-import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '../../../common/constants';
interface VulnerabilityBucket {
key: string | undefined;
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_vulnerable_resources.ts b/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_vulnerable_resources.ts
index 6a7f0b17be21b..e04266e214d4c 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_vulnerable_resources.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_top_vulnerable_resources.ts
@@ -6,9 +6,9 @@
*/
import { SearchRequest } from '@elastic/elasticsearch/lib/api/types';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
import { AggFieldBucket, VulnerableResourceStat } from '../../../common/types_old';
-import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '../../../common/constants';
interface ResourceBucket {
key: string | undefined;
diff --git a/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_vulnerabilities_statistics.ts b/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_vulnerabilities_statistics.ts
index 797a69113fc0d..905810f1efc01 100644
--- a/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_vulnerabilities_statistics.ts
+++ b/x-pack/plugins/cloud_security_posture/server/routes/vulnerabilities_dashboard/get_vulnerabilities_statistics.ts
@@ -7,10 +7,8 @@
import { SearchRequest } from '@elastic/elasticsearch/lib/api/types';
import { ElasticsearchClient } from '@kbn/core-elasticsearch-server';
-import {
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
- VULNERABILITIES_SEVERITY,
-} from '../../../common/constants';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
+import { VULNERABILITIES_SEVERITY } from '../../../common/constants';
export interface VulnerabilitiesStatisticsQueryResult {
critical: {
diff --git a/x-pack/plugins/cloud_security_posture/server/saved_objects/data_views.ts b/x-pack/plugins/cloud_security_posture/server/saved_objects/data_views.ts
index 69eef99d7cd43..475afc52a2e03 100644
--- a/x-pack/plugins/cloud_security_posture/server/saved_objects/data_views.ts
+++ b/x-pack/plugins/cloud_security_posture/server/saved_objects/data_views.ts
@@ -19,11 +19,11 @@ import {
CDR_MISCONFIGURATIONS_INDEX_PATTERN,
CDR_MISCONFIGURATIONS_DATA_VIEW_ID_PREFIX,
CDR_MISCONFIGURATIONS_DATA_VIEW_NAME,
+ CDR_VULNERABILITIES_INDEX_PATTERN,
} from '@kbn/cloud-security-posture-common';
import {
CDR_VULNERABILITIES_DATA_VIEW_ID_PREFIX,
CDR_VULNERABILITIES_DATA_VIEW_NAME,
- CDR_VULNERABILITIES_INDEX_PATTERN,
} from '../../common/constants';
const DATA_VIEW_TIME_FIELD = '@timestamp';
diff --git a/x-pack/plugins/cloud_security_posture/server/tasks/findings_stats_task.ts b/x-pack/plugins/cloud_security_posture/server/tasks/findings_stats_task.ts
index f04ddd3459fb9..1f8614c6d4a5e 100644
--- a/x-pack/plugins/cloud_security_posture/server/tasks/findings_stats_task.ts
+++ b/x-pack/plugins/cloud_security_posture/server/tasks/findings_stats_task.ts
@@ -14,6 +14,7 @@ import {
import type { SearchRequest } from '@elastic/elasticsearch/lib/api/types';
import { ElasticsearchClient } from '@kbn/core/server';
import { QueryDslQueryContainer } from '@kbn/data-views-plugin/common/types';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import type { ISavedObjectsRepository, Logger } from '@kbn/core/server';
import { getMutedRulesFilterQuery } from '../routes/benchmark_rules/get_states/v1';
import { getSafePostureTypeRuntimeMapping } from '../../common/runtime_mappings/get_safe_posture_type_runtime_mapping';
@@ -24,7 +25,6 @@ import {
CSPM_FINDINGS_STATS_INTERVAL,
INTERNAL_CSP_SETTINGS_SAVED_OBJECT_TYPE,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
VULNERABILITIES_SEVERITY,
VULN_MGMT_POLICY_TEMPLATE,
} from '../../common/constants';
diff --git a/x-pack/plugins/security_solution_serverless/server/cloud_security/constants.ts b/x-pack/plugins/security_solution_serverless/server/cloud_security/constants.ts
index c0b95f4de8c32..fa98707e5ebeb 100644
--- a/x-pack/plugins/security_solution_serverless/server/cloud_security/constants.ts
+++ b/x-pack/plugins/security_solution_serverless/server/cloud_security/constants.ts
@@ -9,11 +9,9 @@ import {
CSPM_POLICY_TEMPLATE,
KSPM_POLICY_TEMPLATE,
CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN,
-} from '@kbn/cloud-security-posture-common';
-import {
- CNVM_POLICY_TEMPLATE,
CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
-} from '@kbn/cloud-security-posture-plugin/common/constants';
+} from '@kbn/cloud-security-posture-common';
+import { CNVM_POLICY_TEMPLATE } from '@kbn/cloud-security-posture-plugin/common/constants';
import { INTEGRATION_PACKAGE_NAME } from '@kbn/cloud-defend-plugin/common/constants';
export const CLOUD_DEFEND_HEARTBEAT_INDEX = 'metrics-cloud_defend.heartbeat-*';
diff --git a/x-pack/test/api_integration/apis/cloud_security_posture/status/status_index_timeout.ts b/x-pack/test/api_integration/apis/cloud_security_posture/status/status_index_timeout.ts
index 6bce493c3f539..ce0c9014478dc 100644
--- a/x-pack/test/api_integration/apis/cloud_security_posture/status/status_index_timeout.ts
+++ b/x-pack/test/api_integration/apis/cloud_security_posture/status/status_index_timeout.ts
@@ -7,10 +7,10 @@
import expect from '@kbn/expect';
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import {
FINDINGS_INDEX_DEFAULT_NS,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
VULNERABILITIES_INDEX_DEFAULT_NS,
} from '@kbn/cloud-security-posture-plugin/common/constants';
import { generateAgent } from '../../../../fleet_api_integration/helpers';
diff --git a/x-pack/test/api_integration/apis/cloud_security_posture/status/status_indexed.ts b/x-pack/test/api_integration/apis/cloud_security_posture/status/status_indexed.ts
index 9205788854869..504bb9f504516 100644
--- a/x-pack/test/api_integration/apis/cloud_security_posture/status/status_indexed.ts
+++ b/x-pack/test/api_integration/apis/cloud_security_posture/status/status_indexed.ts
@@ -6,11 +6,11 @@
*/
import expect from '@kbn/expect';
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
import {
FINDINGS_INDEX_DEFAULT_NS,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
VULNERABILITIES_INDEX_DEFAULT_NS,
} from '@kbn/cloud-security-posture-plugin/common/constants';
import { FtrProviderContext } from '../../../ftr_provider_context';
diff --git a/x-pack/test/api_integration/apis/cloud_security_posture/status/status_indexing.ts b/x-pack/test/api_integration/apis/cloud_security_posture/status/status_indexing.ts
index a011d4f5577e8..4d66d8460b9a4 100644
--- a/x-pack/test/api_integration/apis/cloud_security_posture/status/status_indexing.ts
+++ b/x-pack/test/api_integration/apis/cloud_security_posture/status/status_indexing.ts
@@ -7,10 +7,10 @@
import expect from '@kbn/expect';
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import {
FINDINGS_INDEX_DEFAULT_NS,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
VULNERABILITIES_INDEX_DEFAULT_NS,
} from '@kbn/cloud-security-posture-plugin/common/constants';
import { FtrProviderContext } from '../../../ftr_provider_context';
diff --git a/x-pack/test/api_integration/apis/cloud_security_posture/status/status_unprivileged.ts b/x-pack/test/api_integration/apis/cloud_security_posture/status/status_unprivileged.ts
index 1b576515d4f31..7c09e4b51f679 100644
--- a/x-pack/test/api_integration/apis/cloud_security_posture/status/status_unprivileged.ts
+++ b/x-pack/test/api_integration/apis/cloud_security_posture/status/status_unprivileged.ts
@@ -6,11 +6,11 @@
*/
import expect from '@kbn/expect';
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
import {
BENCHMARK_SCORE_INDEX_DEFAULT_NS,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
FINDINGS_INDEX_PATTERN,
} from '@kbn/cloud-security-posture-plugin/common/constants';
import { FtrProviderContext } from '../../../ftr_provider_context';
diff --git a/x-pack/test/cloud_security_posture_api/routes/helper/user_roles_utilites.ts b/x-pack/test/cloud_security_posture_api/routes/helper/user_roles_utilites.ts
index 90a04f3307c61..2aed6367236e4 100644
--- a/x-pack/test/cloud_security_posture_api/routes/helper/user_roles_utilites.ts
+++ b/x-pack/test/cloud_security_posture_api/routes/helper/user_roles_utilites.ts
@@ -5,10 +5,12 @@
* 2.0.
*/
-import { CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import {
- BENCHMARK_SCORE_INDEX_PATTERN,
+ CDR_LATEST_NATIVE_MISCONFIGURATIONS_INDEX_PATTERN,
CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
+} from '@kbn/cloud-security-posture-common';
+import {
+ BENCHMARK_SCORE_INDEX_PATTERN,
ALERTS_INDEX_PATTERN,
FINDINGS_INDEX_PATTERN,
} from '@kbn/cloud-security-posture-plugin/common/constants';
diff --git a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts
index 482e0a571d835..01c2ebf9a64a7 100644
--- a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/serverless_metering/cloud_security_metering.ts
@@ -6,10 +6,8 @@
*/
import expect from '@kbn/expect';
-import {
- LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
-} from '@kbn/cloud-security-posture-plugin/common/constants';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
+import { LATEST_FINDINGS_INDEX_DEFAULT_NS } from '@kbn/cloud-security-posture-plugin/common/constants';
import * as http from 'http';
import {
deleteIndex,
diff --git a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/status/status_indexed.ts b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/status/status_indexed.ts
index 02340e4f7a8fc..a9da3a42cdfc8 100644
--- a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/status/status_indexed.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/status/status_indexed.ts
@@ -7,10 +7,10 @@
import expect from '@kbn/expect';
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import {
FINDINGS_INDEX_DEFAULT_NS,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
VULNERABILITIES_INDEX_DEFAULT_NS,
} from '@kbn/cloud-security-posture-plugin/common/constants';
import {
diff --git a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/status/status_indexing.ts b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/status/status_indexing.ts
index 6e6f8d128bb35..ec6a5835e6aa3 100644
--- a/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/status/status_indexing.ts
+++ b/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/status/status_indexing.ts
@@ -7,10 +7,10 @@
import expect from '@kbn/expect';
import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common';
import type { CspSetupStatus } from '@kbn/cloud-security-posture-common';
+import { CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN } from '@kbn/cloud-security-posture-common';
import {
FINDINGS_INDEX_DEFAULT_NS,
LATEST_FINDINGS_INDEX_DEFAULT_NS,
- CDR_LATEST_NATIVE_VULNERABILITIES_INDEX_PATTERN,
VULNERABILITIES_INDEX_DEFAULT_NS,
} from '@kbn/cloud-security-posture-plugin/common/constants';
import {
From decbdfaa4ce43755270ae516987cd92337e54439 Mon Sep 17 00:00:00 2001
From: "Quynh Nguyen (Quinn)" <43350163+qn895@users.noreply.github.com>
Date: Fri, 20 Sep 2024 16:37:34 -0500
Subject: [PATCH 35/42] [ES|QL] Disable field stats panel in Dashboard if ES|QL
is disabled (#193587)
## Summary
This PR disables field stats panel in Dashboard if ES|QL is disabled. In
addition, it adds a bit of safety check for panels that have already
been added.
### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
---
.../field_stats/field_stats_factory.tsx | 75 ++-
.../field_stats/field_stats_initializer.tsx | 1 +
.../initialize_field_stats_controls.ts | 13 +-
.../ui_actions/create_field_stats_table.tsx | 26 +-
x-pack/plugins/data_visualizer/tsconfig.json | 3 +-
.../translations/translations/fr-FR.json | 474 +++++++++---------
.../translations/translations/ja-JP.json | 474 +++++++++---------
.../translations/translations/zh-CN.json | 474 +++++++++---------
8 files changed, 804 insertions(+), 736 deletions(-)
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_factory.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_factory.tsx
index d644779ba0a87..45187737ad09d 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_factory.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/embeddables/field_stats/field_stats_factory.tsx
@@ -38,13 +38,14 @@ import {
import type { DataView } from '@kbn/data-views-plugin/public';
import { dynamic } from '@kbn/shared-ux-utility';
import { isDefined } from '@kbn/ml-is-defined';
-import { EuiFlexItem } from '@elastic/eui';
+import { EuiCallOut, EuiEmptyPrompt, EuiFlexItem } from '@elastic/eui';
import { css } from '@emotion/react';
import type { ActionExecutionContext } from '@kbn/ui-actions-plugin/public';
import type { Filter } from '@kbn/es-query';
import { FilterStateStore } from '@kbn/es-query';
-import { getESQLAdHocDataview } from '@kbn/esql-utils';
+import { ENABLE_ESQL, getESQLAdHocDataview } from '@kbn/esql-utils';
import { ACTION_GLOBAL_APPLY_FILTER } from '@kbn/unified-search-plugin/public';
+import { FormattedMessage } from '@kbn/i18n-react';
import type { DataVisualizerTableState } from '../../../../../common/types';
import type { DataVisualizerPluginStart } from '../../../../plugin';
import type { FieldStatisticsTableEmbeddableState } from '../grid_embeddable/types';
@@ -153,20 +154,19 @@ export const getFieldStatsChartEmbeddableFactory = (
serializeFieldStatsChartState,
onFieldStatsTableDestroy,
resetData$,
- } = initializeFieldStatsControls(state);
+ } = initializeFieldStatsControls(state, deps.uiSettings);
const { onError, dataLoading, blockingError } = dataLoadingApi;
- const defaultDataViewId = await deps.data.dataViews.getDefaultId();
- const validDataViewId: string =
- isDefined(state.dataViewId) && state.dataViewId !== ''
- ? state.dataViewId
- : defaultDataViewId ?? '';
- let initialDataView: DataView[] | undefined;
+ const validDataViewId: string | undefined =
+ isDefined(state.dataViewId) && state.dataViewId !== '' ? state.dataViewId : undefined;
+ let initialDataView: DataView | undefined;
try {
const dataView = isESQLQuery(state.query)
? await getESQLAdHocDataview(state.query.esql, deps.data.dataViews)
- : await deps.data.dataViews.get(validDataViewId);
- initialDataView = [dataView];
+ : validDataViewId
+ ? await deps.data.dataViews.get(validDataViewId)
+ : undefined;
+ initialDataView = dataView;
} catch (error) {
// Only need to publish blocking error if viewtype is data view, and no data view found
if (state.viewType === FieldStatsInitializerViewType.DATA_VIEW) {
@@ -174,7 +174,9 @@ export const getFieldStatsChartEmbeddableFactory = (
}
}
- const dataViews$ = new BehaviorSubject(initialDataView);
+ const dataViews$ = new BehaviorSubject(
+ initialDataView ? [initialDataView] : undefined
+ );
const subscriptions = new Subscription();
if (fieldStatsControlsApi.dataViewId$) {
@@ -182,10 +184,10 @@ export const getFieldStatsChartEmbeddableFactory = (
fieldStatsControlsApi.dataViewId$
.pipe(
skip(1),
- skipWhile((dataViewId) => !dataViewId && !defaultDataViewId),
+ skipWhile((dataViewId) => !dataViewId),
switchMap(async (dataViewId) => {
try {
- return await deps.data.dataViews.get(dataViewId ?? defaultDataViewId);
+ return await deps.data.dataViews.get(dataViewId);
} catch (error) {
return undefined;
}
@@ -324,6 +326,8 @@ export const getFieldStatsChartEmbeddableFactory = (
api.viewType$,
api.showDistributions$
);
+ const isEsqlEnabled = deps.uiSettings.get(ENABLE_ESQL);
+
const lastReloadRequestTime = useObservable(reload$, Date.now());
const isEsqlMode = viewType === FieldStatsInitializerViewType.ESQL;
@@ -362,6 +366,49 @@ export const getFieldStatsChartEmbeddableFactory = (
};
}, []);
+ if (viewType === FieldStatsInitializerViewType.DATA_VIEW && !dataViews) {
+ return (
+
+
+
+ }
+ body={
+
+
+
+ }
+ />
+ );
+ }
+
+ if (isEsqlMode && !isEsqlEnabled) {
+ return (
+
+
+
+
+ }
+ color="warning"
+ iconType="alert"
+ />
+
+ );
+ }
+
return (
= ({
defaultMessage: 'Data view',
}
)}
+ css={css({ padding: euiThemeVars.euiSizeM })}
>
{
+export const initializeFieldStatsControls = (
+ rawState: FieldStatsInitialState,
+ uiSettings: IUiSettingsClient
+) => {
+ const isEsqlEnabled = uiSettings.get(ENABLE_ESQL);
+ const defaultType = isEsqlEnabled
+ ? FieldStatsInitializerViewType.ESQL
+ : FieldStatsInitializerViewType.DATA_VIEW;
const viewType$ = new BehaviorSubject(
- rawState.viewType ?? FieldStatsInitializerViewType.ESQL
+ rawState.viewType ?? defaultType
);
const dataViewId$ = new BehaviorSubject(rawState.dataViewId);
const query$ = new BehaviorSubject(rawState.query);
diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/ui_actions/create_field_stats_table.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/ui_actions/create_field_stats_table.tsx
index 20081daf89bdd..2c1254732c24a 100644
--- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/ui_actions/create_field_stats_table.tsx
+++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/ui_actions/create_field_stats_table.tsx
@@ -17,6 +17,7 @@ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
import React from 'react';
import { isDefined } from '@kbn/ml-is-defined';
import { COMMON_VISUALIZATION_GROUPING } from '@kbn/visualizations-plugin/public';
+import { ENABLE_ESQL } from '@kbn/esql-utils';
import { FIELD_STATS_EMBEDDABLE_TYPE } from '../embeddables/field_stats/constants';
import type { DataVisualizerStartDependencies } from '../../common/types/data_visualizer_plugin';
import type {
@@ -139,22 +140,31 @@ export function createAddFieldStatsTableAction(
i18n.translate('xpack.dataVisualizer.fieldStatistics.displayName', {
defaultMessage: 'Field statistics',
}),
+ disabled: !coreStart.uiSettings.get(ENABLE_ESQL),
async isCompatible(context: EmbeddableApiContext) {
- return Boolean(await parentApiIsCompatible(context.embeddable));
+ return (
+ Boolean(await parentApiIsCompatible(context.embeddable)) &&
+ coreStart.uiSettings.get(ENABLE_ESQL)
+ );
},
async execute(context) {
const presentationContainerParent = await parentApiIsCompatible(context.embeddable);
if (!presentationContainerParent) throw new IncompatibleActionError();
+ const isEsqlEnabled = coreStart.uiSettings.get(ENABLE_ESQL);
try {
const defaultIndexPattern = await pluginStart.data.dataViews.getDefault();
- const defaultInitialState: FieldStatsInitialState = {
- viewType: FieldStatsInitializerViewType.ESQL,
- query: {
- // Initial default query
- esql: `from ${defaultIndexPattern?.getIndexPattern()} | limit 10`,
- },
- };
+ const defaultInitialState: FieldStatsInitialState = isEsqlEnabled
+ ? {
+ viewType: FieldStatsInitializerViewType.ESQL,
+ query: {
+ // Initial default query
+ esql: `from ${defaultIndexPattern?.getIndexPattern()} | limit 10`,
+ },
+ }
+ : {
+ viewType: FieldStatsInitializerViewType.DATA_VIEW,
+ };
const embeddable = await presentationContainerParent.addNewPanel<
object,
FieldStatisticsTableEmbeddableApi
diff --git a/x-pack/plugins/data_visualizer/tsconfig.json b/x-pack/plugins/data_visualizer/tsconfig.json
index 79060fbbe53f9..505002d1a088c 100644
--- a/x-pack/plugins/data_visualizer/tsconfig.json
+++ b/x-pack/plugins/data_visualizer/tsconfig.json
@@ -88,7 +88,8 @@
"@kbn/core-lifecycle-browser",
"@kbn/presentation-containers",
"@kbn/react-kibana-mount",
- "@kbn/visualizations-plugin"
+ "@kbn/visualizations-plugin",
+ "@kbn/core-ui-settings-browser"
],
"exclude": [
"target/**/*",
diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json
index 259bef83053ba..8fdbb513fc4f8 100644
--- a/x-pack/plugins/translations/translations/fr-FR.json
+++ b/x-pack/plugins/translations/translations/fr-FR.json
@@ -5446,6 +5446,243 @@
"kibanaOverview.manageData.sectionTitle": "Gérer vos données",
"kibanaOverview.more.title": "Toujours plus avec Elastic",
"kibanaOverview.news.title": "Nouveautés",
+ "languageDocumentationPopover.documentationESQL.abs": "ABS",
+ "languageDocumentationPopover.documentationESQL.abs.markdown": "\n\n ### ABS\n Renvoie la valeur absolue.\n\n ````\n Numéro ROW = -1.0 \n | EVAL abs_number = ABS(number)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.acos": "ACOS",
+ "languageDocumentationPopover.documentationESQL.acos.markdown": "\n\n ### ACOS\n Renvoie l'arc cosinus de `n` sous forme d'angle, exprimé en radians.\n\n ````\n ROW a=.9\n | EVAL acos=ACOS(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.aggregationFunctions": "Fonctions d'agrégation",
+ "languageDocumentationPopover.documentationESQL.aggregationFunctionsDocumentationESQLDescription": "Ces fonctions peuvent être utilisées avec STATS...BY :",
+ "languageDocumentationPopover.documentationESQL.asin": "ASIN",
+ "languageDocumentationPopover.documentationESQL.asin.markdown": "\n\n ### ASIN\n Renvoie l'arc sinus de l'entrée\n expression numérique sous forme d'angle, exprimée en radians.\n\n ````\n ROW a=.9\n | EVAL asin=ASIN(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.atan": "ATAN",
+ "languageDocumentationPopover.documentationESQL.atan.markdown": "\n\n ### ATAN\n Renvoie l'arc tangente de l'entrée\n expression numérique sous forme d'angle, exprimée en radians.\n\n ````\n ROW a=.12.9\n | EVAL atan=ATAN(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.atan2": "ATAN2",
+ "languageDocumentationPopover.documentationESQL.atan2.markdown": "\n\n ### ATAN2\n L'angle entre l'axe positif des x et le rayon allant de\n l'origine au point (x , y) dans le plan cartésien, exprimée en radians.\n\n ````\n ROW y=12.9, x=.6\n | EVAL atan2=ATAN2(y, x)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.autoBucketFunction": "COMPARTIMENT",
+ "languageDocumentationPopover.documentationESQL.autoBucketFunction.markdown": "### COMPARTIMENT\nCréer des groupes de valeurs, des compartiments (\"buckets\"), à partir d'une entrée d'un numéro ou d'un horodatage. La taille des compartiments peut être fournie directement ou choisie selon une plage de valeurs et de décompte recommandée.\n\n`BUCKET` a deux modes de fonctionnement : \n\n1. Dans lequel la taille du compartiment est calculée selon la recommandation de décompte d'un compartiment (quatre paramètres) et une plage.\n2. Dans lequel la taille du compartiment est fournie directement (deux paramètres).\n\nAvec un nombre cible de compartiments, le début d'une plage et la fin d'une plage, `BUCKET` choisit une taille de compartiment appropriée afin de générer le nombre cible de compartiments ou moins.\n\nPar exemple, demander jusqu'à 20 compartiments pour une année organisera les données en intervalles mensuels :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT hire_date\n````\n\n**REMARQUE** : Le but n'est pas de fournir le nombre précis de compartiments, mais plutôt de sélectionner une plage qui fournit, tout au plus, le nombre cible de compartiments.\n\nVous pouvez combiner `BUCKET` avec une agrégation pour créer un histogramme :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_month = COUNT(*) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT month\n````\n\n**REMARQUE** : `BUCKET` ne crée pas de compartiments qui ne correspondent à aucun document. C'est pourquoi, dans l'exemple précédent, il manque 1985-03-01 ainsi que d'autres dates.\n\nDemander d'autres compartiments peut résulter en une plage réduite. Par exemple, demander jusqu'à 100 compartiments en un an résulte en des compartiments hebdomadaires :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 100, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT week\n````\n\n**REMARQUE** : `AUTO_BUCKET` ne filtre aucune ligne. Il n'utilise que la plage fournie pour choisir une taille de compartiment appropriée. Pour les lignes dont la valeur se situe en dehors de la plage, il renvoie une valeur de compartiment qui correspond à un compartiment situé en dehors de la plage. Associez `BUCKET` à `WHERE` pour filtrer les lignes.\n\nSi la taille de compartiment désirée est connue à l'avance, fournissez-la comme second argument, en ignorant la plage :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 1 week)\n| SORT week\n````\n\n**REMARQUE** : Lorsque vous fournissez la taille du compartiment comme second argument, ce dernier doit être une période temporelle ou une durée.\n\n`BUCKET` peut également être utilisé pour des champs numériques. Par exemple, pour créer un histogramme de salaire :\n\n````\nFROM employees\n| STATS COUNT(*) by bs = BUCKET(salary, 20, 25324, 74999)\n| SORT bs\n````\n\nContrairement à l'exemple précédent qui filtre intentionnellement sur une plage temporelle, vous n'avez pas souvent besoin de filtrer sur une plage numérique. Vous devez trouver les valeurs min et max séparément. ES|QL n'a pas encore de façon aisée d'effectuer cette opération automatiquement.\n\nLa plage peut être ignorée si la taille désirée de compartiment est connue à l'avance. Fournissez-la simplement comme second argument :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS c = COUNT(1) BY b = BUCKET(salary, 5000.)\n| SORT b\n````\n\n**REMARQUE** : Lorsque vous fournissez la taille du compartiment comme second argument, elle doit être de type à **virgule flottante**.\n\nVoici un exemple sur comment créer des compartiments horaires pour les dernières 24 heures, et calculer le nombre d'événements par heure :\n\n````\nFROM sample_data\n| WHERE @timestamp >= NOW() - 1 day and @timestamp < NOW()\n| STATS COUNT(*) BY bucket = BUCKET(@timestamp, 25, NOW() - 1 day, NOW())\n````\n\nVoici un exemple permettant de créer des compartiments mensuels pour l'année 1985, et calculer le salaire moyen par mois d'embauche :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS AVG(salary) BY bucket = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT bucket\n````\n\n`BUCKET` peut être utilisé pour les parties de groupage et d'agrégation de la commande `STATS … BY ...`, tant que la partie d'agrégation de la fonction est **référencée par un alias défini dans la partie de groupage**, ou que celle-ci est invoquée avec exactement la même expression.\n\nPar exemple :\n\n````\nFROM employees\n| STATS s1 = b1 + 1, s2 = BUCKET(salary / 1000 + 999, 50.) + 2 BY b1 = BUCKET(salary / 100 + 99, 50.), b2 = BUCKET(salary / 1000 + 999, 50.)\n| SORT b1, b2\n| KEEP s1, b1, s2, b2\n````\n ",
+ "languageDocumentationPopover.documentationESQL.binaryOperators": "Opérateurs binaires",
+ "languageDocumentationPopover.documentationESQL.binaryOperators.markdown": "### Opérateurs binaires\nLes opérateurs de comparaison binaire suivants sont pris en charge :\n\n* égalité : `==`\n* inégalité : `!=`\n* inférieur à : `<`\n* inférieur ou égal à : `<=`\n* supérieur à : `>`\n* supérieur ou égal à : `>=`\n* ajouter : `+`\n* soustraire : `-`\n* multiplier par : `*`\n* diviser par : `/`\n* module : `%`\n ",
+ "languageDocumentationPopover.documentationESQL.booleanOperators": "Opérateurs booléens",
+ "languageDocumentationPopover.documentationESQL.booleanOperators.markdown": "### Opérateurs booléens\nLes opérateurs booléens suivants sont pris en charge :\n\n* `AND`\n* `OR`\n* `NOT`\n ",
+ "languageDocumentationPopover.documentationESQL.bucket": "COMPARTIMENT",
+ "languageDocumentationPopover.documentationESQL.bucket.markdown": "\n\n ### COMPARTIMENT\n Créer des groupes de valeurs, des compartiments (\"buckets\"), à partir d'une entrée d'un numéro ou d'un horodatage.\n La taille des compartiments peut être fournie directement ou choisie selon une plage de valeurs et de décompte recommandée.\n\n ````\n FROM employees\n | WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n | STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n | SORT hire_date\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.case": "CASE",
+ "languageDocumentationPopover.documentationESQL.case.markdown": "\n\n ### CAS\n Accepte les paires de conditions et de valeurs. La fonction renvoie la valeur qui\n appartient à la première condition étant évaluée comme `true`.\n\n Si le nombre d'arguments est impair, le dernier argument est la valeur par défaut qui est\n renvoyée si aucune condition ne correspond. Si le nombre d'arguments est pair, et\n qu'aucune condition ne correspond, la fonction renvoie `null`.\n\n ````\n FROM employees\n | EVAL type = CASE(\n languages <= 1, \"monolingual\",\n languages <= 2, \"bilingual\",\n \"polyglot\")\n | KEEP emp_no, languages, type\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.castOperator": "Cast (::)",
+ "languageDocumentationPopover.documentationESQL.castOperator.markdown": "### CAST (`::`)\nL'opérateur `::` fournit une syntaxe alternative pratique au type de converstion de fonction `TO_`.\n\nExemple :\n````\nROW ver = CONCAT((\"0\"::INT + 1)::STRING, \".2.3\")::VERSION\n````\n ",
+ "languageDocumentationPopover.documentationESQL.cbrt": "CBRT",
+ "languageDocumentationPopover.documentationESQL.cbrt.markdown": "\n\n ### CBRT\n Renvoie la racine cubique d'un nombre. La valeur de renvoi est toujours un double, quelle que soit la valeur numérique de l'entrée.\n La racine cubique de l’infini est nulle.\n\n ````\n ROW d = 1000.0\n | EVAL c = cbrt(d)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.ceil": "CEIL",
+ "languageDocumentationPopover.documentationESQL.ceil.markdown": "\n\n ### CEIL\n Arrondir un nombre à l'entier supérieur.\n\n ```\n ROW a=1.8\n | EVAL a=CEIL(a)\n ```\n Remarque : Il s'agit d'un noop pour `long` (y compris non signé) et `integer`. Pour `double`, la fonction choisit la valeur `double` la plus proche de l'entier, de manière similaire à la méthode Math.ceil.\n ",
+ "languageDocumentationPopover.documentationESQL.cidr_match": "CIDR_MATCH",
+ "languageDocumentationPopover.documentationESQL.cidr_match.markdown": "\n\n ### CIDR_MATCH\n Renvoie `true` si l'IP fournie est contenue dans l'un des blocs CIDR fournis.\n\n ````\n FROM hosts \n | WHERE CIDR_MATCH(ip1, \"127.0.0.2/32\", \"127.0.0.3/32\") \n | KEEP card, host, ip0, ip1\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.coalesce": "COALESCE",
+ "languageDocumentationPopover.documentationESQL.coalesce.markdown": "\n\n ### COALESCE\n Renvoie le premier de ses arguments qui n'est pas nul. Si tous les arguments sont nuls, `null` est renvoyé.\n\n ````\n ROW a=null, b=\"b\"\n | EVAL COALESCE(a, b)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.commandsDescription": "Une commande source produit un tableau, habituellement avec des données issues d'Elasticsearch. ES|QL est compatible avec les commandes sources suivantes.",
+ "languageDocumentationPopover.documentationESQL.concat": "CONCAT",
+ "languageDocumentationPopover.documentationESQL.concat.markdown": "\n\n ### CONCAT\n Concatène deux ou plusieurs chaînes.\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fullname = CONCAT(first_name, \" \", last_name)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.cos": "COS",
+ "languageDocumentationPopover.documentationESQL.cos.markdown": "\n\n ### COS\n Renvoie le cosinus d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL cos=COS(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.cosh": "COSH",
+ "languageDocumentationPopover.documentationESQL.cosh.markdown": "\n\n ### COSH\n Renvoie le cosinus hyperbolique d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL cosh=COSH(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_diff": "DATE_DIFF",
+ "languageDocumentationPopover.documentationESQL.date_diff.markdown": "\n\n ### DATE_DIFF\n Soustrait le `startTimestamp` du `endTimestamp` et renvoie la différence en multiples `d'unité`.\n Si `startTimestamp` est postérieur à `endTimestamp`, des valeurs négatives sont renvoyées.\n\n ````\n ROW date1 = TO_DATETIME(\"2023-12-02T11:00:00.000Z\"), date2 = TO_DATETIME(\"2023-12-02T11:00:00.001Z\")\n | EVAL dd_ms = DATE_DIFF(\"microseconds\", date1, date2)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.date_extract": "DATE_EXTRACT",
+ "languageDocumentationPopover.documentationESQL.date_extract.markdown": "\n\n ### DATE_EXTRACT\n Extrait des parties d'une date, telles que l'année, le mois, le jour, l'heure.\n\n ````\n ROW date = DATE_PARSE(\"yyyy-MM-dd\", \"2022-05-06\")\n | EVAL year = DATE_EXTRACT(\"year\", date)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.date_format": "DATE_FORMAT",
+ "languageDocumentationPopover.documentationESQL.date_format.markdown": "\n\n ### DATE_FORMAT\n Renvoie une représentation sous forme de chaîne d'une date dans le format fourni.\n\n ````\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL hired = DATE_FORMAT(\"YYYY-MM-dd\", hire_date)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.date_parse": "DATE_PARSE",
+ "languageDocumentationPopover.documentationESQL.date_parse.markdown": "\n\n ### DATE_PARSE\n Renvoie une date en analysant le deuxième argument selon le format spécifié dans le premier argument.\n\n ````\n ROW date_string = \"2022-05-06\"\n | EVAL date = DATE_PARSE(\"yyyy-MM-dd\", date_string)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.date_trunc": "DATE_TRUNC",
+ "languageDocumentationPopover.documentationESQL.date_trunc.markdown": "\n\n ### DATE_TRUNC\n Arrondit une date à l'intervalle le plus proche.\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL year_hired = DATE_TRUNC(1 year, hire_date)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.dissect": "DISSECT",
+ "languageDocumentationPopover.documentationESQL.dissect.markdown": "### DISSECT\n`DISSECT` vous permet d'extraire des données structurées d'une chaîne. `DISSECT` compare la chaîne à un modèle basé sur les délimiteurs, et extrait les clés indiquées en tant que colonnes.\n\nPour obtenir la syntaxe des modèles \"dissect\", consultez [la documentation relative au processeur \"dissect\"](https://www.elastic.co/guide/en/elasticsearch/reference/current/dissect-processor.html).\n\n```\nROW a = \"1953-01-23T12:15:00Z - some text - 127.0.0.1\"\n| DISSECT a \"%'{Y}-%{M}-%{D}T%{h}:%{m}:%{s}Z - %{msg} - %{ip}'\"\n```` ",
+ "languageDocumentationPopover.documentationESQL.drop": "DROP",
+ "languageDocumentationPopover.documentationESQL.drop.markdown": "### DROP\nAfin de supprimer certaines colonnes d'un tableau, utilisez `DROP` :\n \n```\nFROM employees\n| DROP height\n```\n\nPlutôt que de spécifier chaque colonne par son nom, vous pouvez utiliser des caractères génériques pour supprimer toutes les colonnes dont le nom correspond à un modèle :\n\n```\nFROM employees\n| DROP height*\n````\n ",
+ "languageDocumentationPopover.documentationESQL.e": "E",
+ "languageDocumentationPopover.documentationESQL.e.markdown": "\n\n ### E\n Retourne le nombre d'Euler.\n\n ````\n ROW E()\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.ends_with": "ENDS_WITH",
+ "languageDocumentationPopover.documentationESQL.ends_with.markdown": "\n\n ### ENDS_WITH\n Renvoie une valeur booléenne qui indique si une chaîne de mots-clés se termine par une autre chaîne.\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL ln_E = ENDS_WITH(last_name, \"d\")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.enrich": "ENRICH",
+ "languageDocumentationPopover.documentationESQL.enrich.markdown": "### ENRICH\nVous pouvez utiliser `ENRICH` pour ajouter les données de vos index existants aux enregistrements entrants. Une fonction similaire à l'[enrichissement par ingestion](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html), mais qui fonctionne au moment de la requête.\n\n```\nROW language_code = \"1\"\n| ENRICH languages_policy\n```\n\n`ENRICH` requiert l'exécution d'une [politique d'enrichissement](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-policy). La politique d'enrichissement définit un champ de correspondance (un champ clé) et un ensemble de champs d'enrichissement.\n\n`ENRICH` recherche les enregistrements dans l'[index d'enrichissement](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-index) en se basant sur la valeur du champ de correspondance. La clé de correspondance dans l'ensemble de données d'entrée peut être définie en utilisant `ON `. Si elle n'est pas spécifiée, la correspondance sera effectuée sur un champ portant le même nom que le champ de correspondance défini dans la politique d'enrichissement.\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a\n```\n\nVous pouvez indiquer quels attributs (parmi ceux définis comme champs d'enrichissement dans la politique) doivent être ajoutés au résultat, en utilisant la syntaxe `WITH , ...`.\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH language_name\n```\n\nLes attributs peuvent également être renommés à l'aide de la syntaxe `WITH new_name=`\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH name = language_name\n````\n\nPar défaut (si aucun `WITH` n'est défini), `ENRICH` ajoute au résultat tous les champs d'enrichissement définis dans la politique d'enrichissement.\n\nEn cas de collision de noms, les champs nouvellement créés remplacent les champs existants.\n ",
+ "languageDocumentationPopover.documentationESQL.eval": "EVAL",
+ "languageDocumentationPopover.documentationESQL.eval.markdown": "### EVAL\n`EVAL` permet d'ajouter des colonnes :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height_feet = height * 3.281, height_cm = height * 100\n````\n\nSi la colonne indiquée existe déjà, la colonne existante sera supprimée et la nouvelle colonne sera ajoutée au tableau :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height = height * 3.281\n````\n\n#### Fonctions\n`EVAL` prend en charge diverses fonctions de calcul des valeurs. Pour en savoir plus, consultez les fonctions.\n ",
+ "languageDocumentationPopover.documentationESQL.floor": "FLOOR",
+ "languageDocumentationPopover.documentationESQL.floor.markdown": "\n\n ### FLOOR\n Arrondir un nombre à l'entier inférieur.\n\n ````\n ROW a=1.8\n | EVAL a=FLOOR(a)\n ````\n Remarque : Il s'agit d'un noop pour `long` (y compris non signé) et `integer`.\n Pour `double`, la fonction choisit la valeur `double` la plus proche de l'entier,\n de manière similaire à Math.floor.\n ",
+ "languageDocumentationPopover.documentationESQL.from": "FROM",
+ "languageDocumentationPopover.documentationESQL.from_base64": "FROM_BASE64",
+ "languageDocumentationPopover.documentationESQL.from_base64.markdown": "\n\n ### FROM_BASE64\n Décodez une chaîne base64.\n\n ````\n row a = \"ZWxhc3RpYw==\" \n | eval d = from_base64(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.from.markdown": "### FROM\nLa commande source `FROM` renvoie un tableau contenant jusqu'à 10 000 documents issus d'un flux de données, d'un index ou d'un alias. Chaque ligne du tableau obtenu correspond à un document. Chaque colonne correspond à un champ et est accessible par le nom de ce champ.\n\n````\nFROM employees\n````\n\nVous pouvez utiliser des [calculs impliquant des dates](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-date-math-index-names) pour désigner les indices, les alias et les flux de données. Cela peut s'avérer utile pour les données temporelles.\n\nUtilisez des listes séparées par des virgules ou des caractères génériques pour rechercher plusieurs flux de données, indices ou alias :\n\n````\nFROM employees-00001,employees-*\n````\n\n#### Métadonnées\n\nES|QL peut accéder aux champs de métadonnées suivants :\n\n* `_index` : l'index auquel appartient le document. Le champ est du type `keyword`.\n* `_id` : l'identifiant du document source. Le champ est du type `keyword`.\n* `_id` : la version du document source. Le champ est du type `long`.\n\nUtilisez la directive `METADATA` pour activer les champs de métadonnées :\n\n````\nFROM index [METADATA _index, _id]\n````\n\nLes champs de métadonnées ne sont disponibles que si la source des données est un index. Par conséquent, `FROM` est la seule commande source qui prend en charge la directive `METADATA`.\n\nUne fois activés, les champs sont disponibles pour les commandes de traitement suivantes, tout comme les autres champs de l'index :\n\n````\nFROM ul_logs, apps [METADATA _index, _version]\n| WHERE id IN (13, 14) AND _version == 1\n| EVAL key = CONCAT(_index, \"_\", TO_STR(id))\n| SORT id, _index\n| KEEP id, _index, _version, key\n````\n\nDe même, comme pour les champs d'index, une fois l'agrégation effectuée, un champ de métadonnées ne sera plus accessible aux commandes suivantes, sauf s'il est utilisé comme champ de regroupement :\n\n````\nFROM employees [METADATA _index, _id]\n| STATS max = MAX(emp_no) BY _index\n````\n ",
+ "languageDocumentationPopover.documentationESQL.functions": "Fonctions",
+ "languageDocumentationPopover.documentationESQL.functionsDocumentationESQLDescription": "Les fonctions sont compatibles avec \"ROW\" (Ligne), \"EVAL\" (Évaluation) et \"WHERE\" (Où).",
+ "languageDocumentationPopover.documentationESQL.greatest": "GREATEST",
+ "languageDocumentationPopover.documentationESQL.greatest.markdown": "\n\n ### GREATEST\n Renvoie la valeur maximale de plusieurs colonnes. Similaire à `MV_MAX`\n sauf que ceci est destiné à une exécution sur plusieurs colonnes à la fois.\n\n ````\n ROW a = 10, b = 20\n | EVAL g = GREATEST(a, b)\n ````\n Remarque : Lorsque cette fonction est exécutée sur les champs `keyword` ou `text`, elle renvoie la dernière chaîne dans l'ordre alphabétique. Lorsqu'elle est exécutée sur des colonnes `boolean`, elle renvoie `true` si l'une des valeurs l'est.\n ",
+ "languageDocumentationPopover.documentationESQL.grok": "GROK",
+ "languageDocumentationPopover.documentationESQL.grok.markdown": "### GROK\n`GROK` vous permet d'extraire des données structurées d'une chaîne. `GROK` compare la chaîne à des modèles, sur la base d’expressions régulières, et extrait les modèles indiqués en tant que colonnes.\n\nPour obtenir la syntaxe des modèles \"grok\", consultez [la documentation relative au processeur \"grok\"](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html).\n\n````\nROW a = \"12 15.5 15.6 true\"\n| GROK a \"%'{NUMBER:b:int}' %'{NUMBER:c:float}' %'{NUMBER:d:double}' %'{WORD:e:boolean}'\"\n````\n ",
+ "languageDocumentationPopover.documentationESQL.groupingFunctions": "Fonctions de groupage",
+ "languageDocumentationPopover.documentationESQL.groupingFunctionsDocumentationESQLDescription": "Ces fonctions de regroupement peuvent être utilisées avec `STATS...BY` :",
+ "languageDocumentationPopover.documentationESQL.inOperator": "IN",
+ "languageDocumentationPopover.documentationESQL.inOperator.markdown": "### IN\nL'opérateur `IN` permet de tester si un champ ou une expression est égal à un élément d'une liste de littéraux, de champs ou d'expressions :\n\n````\nROW a = 1, b = 4, c = 3\n| WHERE c-a IN (3, b / 2, a)\n````\n ",
+ "languageDocumentationPopover.documentationESQL.ip_prefix": "IP_PREFIX",
+ "languageDocumentationPopover.documentationESQL.ip_prefix.markdown": "\n\n ### IP_PREFIX\n Tronque une adresse IP à une longueur de préfixe donnée.\n\n ````\n row ip4 = to_ip(\"1.2.3.4\"), ip6 = to_ip(\"fe80::cae2:65ff:fece:feb9\")\n | eval ip4_prefix = ip_prefix(ip4, 24, 0), ip6_prefix = ip_prefix(ip6, 0, 112);\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.keep": "KEEP",
+ "languageDocumentationPopover.documentationESQL.keep.markdown": "### KEEP\nLa commande `KEEP` permet de définir les colonnes qui seront renvoyées et l'ordre dans lequel elles le seront.\n\nPour limiter les colonnes retournées, utilisez une liste de noms de colonnes séparés par des virgules. Les colonnes sont renvoyées dans l'ordre indiqué :\n \n````\nFROM employees\n| KEEP first_name, last_name, height\n````\n\nPlutôt que de spécifier chaque colonne par son nom, vous pouvez utiliser des caractères génériques pour renvoyer toutes les colonnes dont le nom correspond à un modèle :\n\n````\nFROM employees\n| KEEP h*\n````\n\nLe caractère générique de l'astérisque (\"*\") placé de manière isolée transpose l'ensemble des colonnes qui ne correspondent pas aux autres arguments. La requête suivante renverra en premier lieu toutes les colonnes dont le nom commence par un h, puis toutes les autres colonnes :\n\n````\nFROM employees\n| KEEP h*, *\n````\n ",
+ "languageDocumentationPopover.documentationESQL.least": "LEAST",
+ "languageDocumentationPopover.documentationESQL.least.markdown": "\n\n ### LEAST\n Renvoie la valeur minimale de plusieurs colonnes. Cette fonction est similaire à `MV_MIN`. Toutefois, elle est destinée à être exécutée sur plusieurs colonnes à la fois.\n\n ````\n ROW a = 10, b = 20\n | EVAL l = LEAST(a, b)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.left": "LEFT",
+ "languageDocumentationPopover.documentationESQL.left.markdown": "\n\n ### LEFT\n Renvoie la sous-chaîne qui extrait la \"longueur\" des caractères de la \"chaîne\" en partant de la gauche.\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL left = LEFT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.length": "LENGHT",
+ "languageDocumentationPopover.documentationESQL.length.markdown": "\n\n ### LENGTH\n Renvoie la longueur des caractères d'une chaîne.\n\n ````\n FROM employees\n | KEEP first_name, last_name\n | EVAL fn_length = LENGTH(first_name)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.limit": "LIMIT",
+ "languageDocumentationPopover.documentationESQL.limit.markdown": "### LIMIT\nLa commande de traitement `LIMIT` permet de restreindre le nombre de lignes :\n \n````\nFROM employees\n| LIMIT 5\n````\n ",
+ "languageDocumentationPopover.documentationESQL.locate": "LOCATE",
+ "languageDocumentationPopover.documentationESQL.locate.markdown": "\n\n ### LOCATE\n Renvoie un entier qui indique la position d'une sous-chaîne de mots-clés dans une autre chaîne\n\n ````\n row a = \"hello\"\n | eval a_ll = locate(a, \"ll\")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.log": "LOG",
+ "languageDocumentationPopover.documentationESQL.log.markdown": "\n\n ### LOG\n Renvoie le logarithme d'une valeur dans une base. La valeur de renvoi est toujours un double, quelle que soit la valeur numérique de l'entrée.\n\n Les journaux de zéros, de nombres négatifs et de base 1 renvoient `null` ainsi qu'un avertissement.\n\n ````\n ROW base = 2.0, value = 8.0\n | EVAL s = LOG(base, value)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.log10": "LOG10",
+ "languageDocumentationPopover.documentationESQL.log10.markdown": "\n\n ### LOG10\n Renvoie le logarithme d'une valeur en base 10. La valeur de renvoi est toujours un double, quelle que soit la valeur numérique de l'entrée.\n\n Les logs de 0 et de nombres négatifs renvoient `null` ainsi qu'un avertissement.\n\n ````\n ROW d = 1000.0 \n | EVAL s = LOG10(d)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.ltrim": "LTRIM",
+ "languageDocumentationPopover.documentationESQL.ltrim.markdown": "\n\n ### LTRIM\n Retire les espaces au début des chaînes.\n\n ````\n ROW message = \" some text \", color = \" red \"\n | EVAL message = LTRIM(message)\n | EVAL color = LTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.markdown": "## ES|QL\n\nUne requête ES|QL (langage de requête Elasticsearch) se compose d'une série de commandes, séparées par une barre verticale : `|`. Chaque requête commence par une **commande source**, qui produit un tableau, habituellement avec des données issues d'Elasticsearch. \n\nUne commande source peut être suivie d'une ou plusieurs **commandes de traitement**. Les commandes de traitement peuvent modifier le tableau de sortie de la commande précédente en ajoutant, supprimant ou modifiant les lignes et les colonnes.\n\n````\nsource-command\n| processing-command1\n| processing-command2\n````\n\nLe résultat d'une requête est le tableau produit par la dernière commande de traitement. \n ",
+ "languageDocumentationPopover.documentationESQL.mv_append": "MV_APPEND",
+ "languageDocumentationPopover.documentationESQL.mv_append.markdown": "\n\n ### MV_APPEND\n Concatène les valeurs de deux champs à valeurs multiples.\n\n ",
+ "languageDocumentationPopover.documentationESQL.mv_avg": "MV_AVG",
+ "languageDocumentationPopover.documentationESQL.mv_avg.markdown": "\n\n ### MV_AVG\n Convertit un champ multivalué en un champ à valeur unique comprenant la moyenne de toutes les valeurs.\n\n ````\n ROW a=[3, 5, 1, 6]\n | EVAL avg_a = MV_AVG(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_concat": "MV_CONCAT",
+ "languageDocumentationPopover.documentationESQL.mv_concat.markdown": "\n\n ### MV_CONCAT\n Convertit une expression de type chaîne multivalué en une colonne à valeur unique comprenant la concaténation de toutes les valeurs, séparées par un délimiteur.\n\n ````\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL j = MV_CONCAT(a, \", \")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_count": "MV_COUNT",
+ "languageDocumentationPopover.documentationESQL.mv_count.markdown": "\n\n ### MV_COUNT\n Convertit une expression multivaluée en une colonne à valeur unique comprenant le total du nombre de valeurs.\n\n ````\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL count_a = MV_COUNT(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_dedupe": "MV_DEDUPE",
+ "languageDocumentationPopover.documentationESQL.mv_dedupe.markdown": "\n\n ### MV_DEDUPE\n Supprime les valeurs en doublon d'un champ multivalué.\n\n ````\n ROW a=[\"foo\", \"foo\", \"bar\", \"foo\"]\n | EVAL dedupe_a = MV_DEDUPE(a)\n ````\n Remarque : la fonction `MV_DEDUPE` est en mesure de trier les valeurs de la colonne, mais ne le fait pas systématiquement.\n ",
+ "languageDocumentationPopover.documentationESQL.mv_first": "MV_FIRST",
+ "languageDocumentationPopover.documentationESQL.mv_first.markdown": "\n\n ### MV_FIRST\n Convertit une expression multivaluée en une colonne à valeur unique comprenant la\n première valeur. Ceci est particulièrement utile pour lire une fonction qui émet\n des colonnes multivaluées dans un ordre connu, comme `SPLIT`.\n\n L'ordre dans lequel les champs multivalués sont lus à partir\n du stockage sous-jacent n'est pas garanti. Il est *souvent* ascendant, mais ne vous y\n fiez pas. Si vous avez besoin de la valeur minimale, utilisez `MV_MIN` au lieu de\n `MV_FIRST`. `MV_MIN` comporte des optimisations pour les valeurs triées, il n'y a donc aucun\n avantage en matière de performances pour `MV_FIRST`.\n\n ````\n ROW a=\"foo;bar;baz\"\n | EVAL first_a = MV_FIRST(SPLIT(a, \";\"))\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_last": "MV_LAST",
+ "languageDocumentationPopover.documentationESQL.mv_last.markdown": "\n\n ### MV_LAST\n Convertit une expression multivaluée en une colonne à valeur unique comprenant la dernière\n valeur. Ceci est particulièrement utile pour lire une fonction qui émet des champs multivalués\n dans un ordre connu, comme `SPLIT`.\n\n L'ordre dans lequel les champs multivalués sont lus à partir\n du stockage sous-jacent n'est pas garanti. Il est *souvent* ascendant, mais ne vous y\n fiez pas. Si vous avez besoin de la valeur maximale, utilisez `MV_MAX` au lieu de\n `MV_LAST`. `MV_MAX` comporte des optimisations pour les valeurs triées, il n'y a donc aucun\n avantage en matière de performances pour `MV_LAST`.\n\n ````\n ROW a=\"foo;bar;baz\"\n | EVAL last_a = MV_LAST(SPLIT(a, \";\"))\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_max": "MV_MAX",
+ "languageDocumentationPopover.documentationESQL.mv_max.markdown": "\n\n ### MV_MAX\n Convertit une expression multivaluée en une colonne à valeur unique comprenant la valeur maximale.\n\n ````\n ROW a=[3, 5, 1]\n | EVAL max_a = MV_MAX(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_median": "MV_MEDIAN",
+ "languageDocumentationPopover.documentationESQL.mv_median.markdown": "\n\n ### MV_MEDIAN\n Convertit un champ multivalué en un champ à valeur unique comprenant la valeur médiane.\n\n ````\n ROW a=[3, 5, 1]\n | EVAL median_a = MV_MEDIAN(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_min": "MV_MIN",
+ "languageDocumentationPopover.documentationESQL.mv_min.markdown": "\n\n ### MV_MIN\n Convertit une expression multivaluée en une colonne à valeur unique comprenant la valeur minimale.\n\n ````\n ROW a=[2, 1]\n | EVAL min_a = MV_MIN(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_slice": "MV_SLICE",
+ "languageDocumentationPopover.documentationESQL.mv_slice.markdown": "\n\n ### MV_SLICE\n Renvoie un sous-ensemble du champ multivalué en utilisant les valeurs d'index de début et de fin.\n\n ````\n row a = [1, 2, 2, 3]\n | eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_sort": "MV_SORT",
+ "languageDocumentationPopover.documentationESQL.mv_sort.markdown": "\n\n ### MV_SORT\n Trie une expression multivaluée par ordre lexicographique.\n\n ````\n ROW a = [4, 2, -3, 2]\n | EVAL sa = mv_sort(a), sd = mv_sort(a, \"DESC\")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_sum": "MV_SUM",
+ "languageDocumentationPopover.documentationESQL.mv_sum.markdown": "\n\n ### MV_SUM\n Convertit un champ multivalué en un champ à valeur unique comprenant la somme de toutes les valeurs.\n\n ````\n ROW a=[3, 5, 6]\n | EVAL sum_a = MV_SUM(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mv_zip": "MV_ZIP",
+ "languageDocumentationPopover.documentationESQL.mv_zip.markdown": "\n\n ### MV_ZIP\n Combine les valeurs de deux champs multivalués avec un délimiteur qui les relie.\n\n ````\n ROW a = [\"x\", \"y\", \"z\"], b = [\"1\", \"2\"]\n | EVAL c = mv_zip(a, b, \"-\")\n | KEEP a, b, c\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.mvExpand": "MV_EXPAND",
+ "languageDocumentationPopover.documentationESQL.mvExpand.markdown": "### MV_EXPAND\nLa commande de traitement `MV_EXPAND` développe les champs multivalués en indiquant une valeur par ligne et en dupliquant les autres champs : \n````\nROW a=[1,2,3], b=\"b\", j=[\"a\",\"b\"]\n| MV_EXPAND a\n````\n ",
+ "languageDocumentationPopover.documentationESQL.now": "NOW",
+ "languageDocumentationPopover.documentationESQL.now.markdown": "\n\n ### NOW\n Renvoie la date et l'heure actuelles.\n\n ````\n ROW current_date = NOW()\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.operators": "Opérateurs",
+ "languageDocumentationPopover.documentationESQL.operatorsDocumentationESQLDescription": "ES|QL est compatible avec les opérateurs suivants :",
+ "languageDocumentationPopover.documentationESQL.pi": "PI",
+ "languageDocumentationPopover.documentationESQL.pi.markdown": "\n\n ### PI\n Renvoie Pi, le rapport entre la circonférence et le diamètre d'un cercle.\n\n ````\n ROW PI()\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.pow": "POW",
+ "languageDocumentationPopover.documentationESQL.pow.markdown": "\n\n ### POW\n Renvoie la valeur d’une `base` élevée à la puissance d’un `exposant`.\n\n ````\n ROW base = 2.0, exponent = 2\n | EVAL result = POW(base, exponent)\n ````\n Remarque : Il est toujours possible de dépasser un résultat double ici ; dans ce cas, la valeur `null` sera renvoyée.\n ",
+ "languageDocumentationPopover.documentationESQL.predicates": "valeurs NULL",
+ "languageDocumentationPopover.documentationESQL.predicates.markdown": "### Valeurs NULL\nPour une comparaison avec une valeur NULL, utilisez les attributs `IS NULL` et `IS NOT NULL` :\n\n````\nFROM employees\n| WHERE birth_date IS NULL\n| KEEP first_name, last_name\n| SORT first_name\n| LIMIT 3\n````\n\n````\nFROM employees\n| WHERE is_rehired IS NOT NULL\n| STATS count(emp_no)\n````\n ",
+ "languageDocumentationPopover.documentationESQL.processingCommands": "Traitement des commandes",
+ "languageDocumentationPopover.documentationESQL.processingCommandsDescription": "Le traitement des commandes transforme un tableau des entrées par l'ajout, le retrait ou la modification des lignes et des colonnes. ES|QL est compatible avec le traitement des commandes suivant.",
+ "languageDocumentationPopover.documentationESQL.rename": "RENAME",
+ "languageDocumentationPopover.documentationESQL.rename.markdown": "### RENAME\nUtilisez `RENAME` pour renommer une colonne en utilisant la syntaxe suivante :\n\n````\nRENAME AS \n````\n\nPar exemple :\n\n````\nFROM employees\n| KEEP first_name, last_name, still_hired\n| RENAME still_hired AS employed\n````\n\nSi une colonne portant le nouveau nom existe déjà, elle sera remplacée par la nouvelle colonne.\n\nPlusieurs colonnes peuvent être renommées à l'aide d'une seule commande `RENAME` :\n\n````\nFROM employees\n| KEEP first_name, last_name\n| RENAME first_name AS fn, last_name AS ln\n````\n ",
+ "languageDocumentationPopover.documentationESQL.repeat": "REPEAT",
+ "languageDocumentationPopover.documentationESQL.repeat.markdown": "\n\n ### REPEAT\n Renvoie une chaîne construite par la concaténation de la `chaîne` avec elle-même, le `nombre` de fois spécifié.\n\n ````\n ROW a = \"Hello!\"\n | EVAL triple_a = REPEAT(a, 3);\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.replace": "REPLACE",
+ "languageDocumentationPopover.documentationESQL.replace.markdown": "\n\n ### REPLACE\n La fonction remplace dans la chaîne `str` toutes les correspondances avec l'expression régulière `regex`\n par la chaîne de remplacement `newStr`.\n\n ````\n ROW str = \"Hello World\"\n | EVAL str = REPLACE(str, \"World\", \"Universe\")\n | KEEP str\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.right": "RIGHT",
+ "languageDocumentationPopover.documentationESQL.right.markdown": "\n\n ### RIGHT\n Renvoie la sous-chaîne qui extrait la longueur des caractères de `str` en partant de la droite.\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL right = RIGHT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.round": "ROUND",
+ "languageDocumentationPopover.documentationESQL.round.markdown": "\n\n ### ROUND\n Arrondit un nombre au nombre spécifié de décimales.\n La valeur par défaut est 0, qui renvoie l'entier le plus proche. Si le\n nombre de décimales spécifié est négatif, la fonction arrondit au nombre de décimales à gauche\n de la virgule.\n\n ````\n FROM employees\n | KEEP first_name, last_name, height\n | EVAL height_ft = ROUND(height * 3.281, 1)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.row": "ROW",
+ "languageDocumentationPopover.documentationESQL.row.markdown": "### ROW\nLa commande source `ROW` renvoie une ligne contenant une ou plusieurs colonnes avec les valeurs que vous spécifiez. Cette commande peut s'avérer utile pour les tests.\n \n````\nROW a = 1, b = \"two\", c = null\n````\n\nUtilisez des crochets pour créer des colonnes à valeurs multiples :\n\n````\nROW a = [2, 1]\n````\n\nROW permet d'utiliser des fonctions :\n\n````\nROW a = ROUND(1.23, 0)\n````\n ",
+ "languageDocumentationPopover.documentationESQL.rtrim": "RTRIM",
+ "languageDocumentationPopover.documentationESQL.rtrim.markdown": "\n\n ### RTRIM\n Supprime les espaces à la fin des chaînes.\n\n ````\n ROW message = \" some text \", color = \" red \"\n | EVAL message = RTRIM(message)\n | EVAL color = RTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.show": "SHOW",
+ "languageDocumentationPopover.documentationESQL.show.markdown": "### SHOW\nLa commande source `SHOW - ` renvoie des informations sur le déploiement et ses capacités :\n\n* Utilisez `SHOW INFO` pour renvoyer la version du déploiement, la date de compilation et le hachage.\n* Utilisez `SHOW FUNCTIONS` pour renvoyer une liste de toutes les fonctions prises en charge et un résumé de chaque fonction.\n ",
+ "languageDocumentationPopover.documentationESQL.signum": "SIGNUM",
+ "languageDocumentationPopover.documentationESQL.signum.markdown": "\n\n ### SIGNUM\n Renvoie le signe du nombre donné.\n Il renvoie `-1` pour les nombres négatifs, `0` pour `0` et `1` pour les nombres positifs.\n\n ````\n ROW d = 100.0\n | EVAL s = SIGNUM(d)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.sin": "SIN",
+ "languageDocumentationPopover.documentationESQL.sin.markdown": "\n\n ### SIN\n Renvoie la fonction trigonométrique sinusoïdale d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL sin=SIN(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.sinh": "SINH",
+ "languageDocumentationPopover.documentationESQL.sinh.markdown": "\n\n ### SINH\n Renvoie le sinus hyperbolique d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL sinh=SINH(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.sort": "SORT",
+ "languageDocumentationPopover.documentationESQL.sort.markdown": "### SORT\nUtilisez la commande `SORT` pour trier les lignes sur un ou plusieurs champs :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height\n````\n\nL'ordre de tri par défaut est croissant. Définissez un ordre de tri explicite en utilisant `ASC` ou `DESC` :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC\n````\n\nSi deux lignes disposent de la même clé de tri, l'ordre original sera préservé. Vous pouvez ajouter des expressions de tri pour départager les deux lignes :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC, first_name ASC\n````\n\n#### valeurs `null`\nPar défaut, les valeurs `null` sont considérées comme étant supérieures à toutes les autres valeurs. Selon un ordre de tri croissant, les valeurs `null` sont classées en dernier. Selon un ordre de tri décroissant, les valeurs `null` sont classées en premier. Pour modifier cet ordre, utilisez `NULLS FIRST` ou `NULLS LAST` :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| SORT first_name ASC NULLS FIRST\n````\n ",
+ "languageDocumentationPopover.documentationESQL.sourceCommands": "Commandes sources",
+ "languageDocumentationPopover.documentationESQL.split": "SPLIT",
+ "languageDocumentationPopover.documentationESQL.split.markdown": "\n\n ### SPLIT\n Divise une chaîne de valeur unique en plusieurs chaînes.\n\n ````\n ROW words=\"foo;bar;baz;qux;quux;corge\"\n | EVAL word = SPLIT(words, \";\")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.sqrt": "SQRT",
+ "languageDocumentationPopover.documentationESQL.sqrt.markdown": "\n\n ### SQRT\n Renvoie la racine carrée d'un nombre. La valeur de renvoi est toujours un double, quelle que soit la valeur numérique de l'entrée.\n Les racines carrées des nombres négatifs et des infinis sont nulles.\n\n ````\n ROW d = 100.0\n | EVAL s = SQRT(d)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.st_contains": "ST_CONTAINS",
+ "languageDocumentationPopover.documentationESQL.st_contains.markdown": "\n\n ### ST_CONTAINS\n Renvoie si la première géométrie contient la deuxième géométrie.\n Il s'agit de l'inverse de la fonction `ST_WITHIN`.\n\n ````\n FROM airport_city_boundaries\n | WHERE ST_CONTAINS(city_boundary, TO_GEOSHAPE(\"POLYGON((109.35 18.3, 109.45 18.3, 109.45 18.4, 109.35 18.4, 109.35 18.3))\"))\n | KEEP abbrev, airport, region, city, city_location\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.st_disjoint": "ST_DISJOINT",
+ "languageDocumentationPopover.documentationESQL.st_disjoint.markdown": "\n\n ### ST_DISJOINT\n Renvoie si les deux géométries ou colonnes géométriques sont disjointes.\n Il s'agit de l'inverse de la fonction `ST_INTERSECTS`.\n En termes mathématiques : ST_Disjoint(A, B) ⇔ A ⋂ B = ∅\n\n ````\n FROM airport_city_boundaries\n | WHERE ST_DISJOINT(city_boundary, TO_GEOSHAPE(\"POLYGON((-10 -60, 120 -60, 120 60, -10 60, -10 -60))\"))\n | KEEP abbrev, airport, region, city, city_location\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.st_distance": "ST_DISTANCE",
+ "languageDocumentationPopover.documentationESQL.st_distance.markdown": "\n\n ### ST_DISTANCE\n Calcule la distance entre deux points.\n Pour les géométries cartésiennes, c’est la distance pythagoricienne dans les mêmes unités que les coordonnées d'origine.\n Pour les géométries géographiques, c’est la distance circulaire le long du grand cercle en mètres.\n\n ````\n Aéroports FROM\n | WHERE abbrev == \"CPH\"\n | EVAL distance = ST_DISTANCE(location, city_location)\n | KEEP abbrev, name, location, city_location, distance\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.st_intersects": "ST_INTERSECTS",
+ "languageDocumentationPopover.documentationESQL.st_intersects.markdown": "\n\n ### ST_INTERSECTS\n Renvoie `true` (vrai) si deux géométries se croisent.\n Elles se croisent si elles ont un point commun, y compris leurs points intérieurs\n (les points situés le long des lignes ou dans des polygones).\n Il s'agit de l'inverse de la fonction `ST_DISJOINT`.\n En termes mathématiques : ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅\n\n ````\n Aéroports FROM\n | WHERE ST_INTERSECTS(location, TO_GEOSHAPE(\"POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))\"))\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.st_within": "ST_WITHIN",
+ "languageDocumentationPopover.documentationESQL.st_within.markdown": "\n\n ### ST_WITHIN\n Renvoie si la première géométrie est à l'intérieur de la deuxième géométrie.\n Il s'agit de l'inverse de la fonction `ST_CONTAINS`.\n\n ````\n FROM airport_city_boundaries\n | WHERE ST_WITHIN(city_boundary, TO_GEOSHAPE(\"POLYGON((109.1 18.15, 109.6 18.15, 109.6 18.65, 109.1 18.65, 109.1 18.15))\"))\n | KEEP abbrev, airport, region, city, city_location\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.st_x": "ST_X",
+ "languageDocumentationPopover.documentationESQL.st_x.markdown": "\n\n ### ST_X\n Extrait la coordonnée `x` du point fourni.\n Si les points sont de type `geo_point`, cela revient à extraire la valeur de la `longitude`.\n\n ````\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.st_y": "ST_Y",
+ "languageDocumentationPopover.documentationESQL.st_y.markdown": "\n\n ### ST_Y\n Extrait la coordonnée `y` du point fourni.\n Si les points sont de type `geo_point`, cela revient à extraire la valeur de la `latitude`.\n\n ````\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.starts_with": "STARTS_WITH",
+ "languageDocumentationPopover.documentationESQL.starts_with.markdown": "\n\n ### STARTS_WITH\n Renvoie un booléen qui indique si une chaîne de mot-clés débute par une autre chaîne.\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL ln_S = STARTS_WITH(last_name, \"B\")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.statsby": "STATS ... BY",
+ "languageDocumentationPopover.documentationESQL.statsby.markdown": "### STATS ... BY\nUtilisez `STATS ... BY` pour regrouper les lignes en fonction d'une valeur commune et calculer une ou plusieurs valeurs agrégées sur les lignes regroupées.\n\n**Exemples** :\n\n````\nFROM employees\n| STATS count = COUNT(emp_no) BY languages\n| SORT languages\n````\n\nSi `BY` est omis, le tableau de sortie contient exactement une ligne avec les agrégations appliquées sur l'ensemble des données :\n\n````\nFROM employees\n| STATS avg_lang = AVG(languages)\n````\n\nIl est possible de calculer plusieurs valeurs :\n\n````\nFROM employees\n| STATS avg_lang = AVG(languages), max_lang = MAX(languages)\n````\n\nIl est également possible d'effectuer des regroupements en fonction de plusieurs valeurs (uniquement pour les champs longs et les champs de la famille de mots-clés) :\n\n````\nFROM employees\n| EVAL hired = DATE_FORMAT(hire_date, \"YYYY\")\n| STATS avg_salary = AVG(salary) BY hired, languages.long\n| EVAL avg_salary = ROUND(avg_salary)\n| SORT hired, languages.long\n````\n\nConsultez la rubrique **Fonctions d'agrégation** pour obtenir la liste des fonctions pouvant être utilisées avec `STATS ... BY`.\n\nLes fonctions d'agrégation et les expressions de regroupement acceptent toutes deux d'autres fonctions. Ceci est utile pour utiliser `STATS...BY` sur des colonnes à valeur multiple. Par exemple, pour calculer l'évolution moyenne du salaire, vous pouvez utiliser `MV_AVG` pour faire la moyenne des multiples valeurs par employé, et utiliser le résultat avec la fonction `AVG` :\n\n````\nFROM employees\n| STATS avg_salary_change = AVG(MV_AVG(salary_change))\n````\n\nLe regroupement par expression est par exemple le regroupement des employés en fonction de la première lettre de leur nom de famille :\n\n````\nFROM employees\n| STATS my_count = COUNT() BY LEFT(last_name, 1)\n| SORT \"LEFT(last_name, 1)\"\n````\n\nIl n'est pas obligatoire d'indiquer le nom de la colonne de sortie. S'il n'est pas spécifié, le nouveau nom de la colonne est égal à l'expression. La requête suivante renvoie une colonne appelée `AVG(salary)` :\n\n````\nFROM employees\n| STATS AVG(salary)\n````\n\nComme ce nom contient des caractères spéciaux, il doit être placé entre deux caractères (`) lorsqu'il est utilisé dans des commandes suivantes :\n\n````\nFROM employees\n| STATS AVG(salary)\n| EVAL avg_salary_rounded = ROUND(\"AVG(salary)\")\n````\n\n**Remarque** : `STATS` sans aucun groupe est beaucoup plus rapide que l'ajout d'un groupe.\n\n**Remarque** : Le regroupement sur une seule expression est actuellement beaucoup plus optimisé que le regroupement sur plusieurs expressions.\n ",
+ "languageDocumentationPopover.documentationESQL.stringOperators": "LIKE et RLIKE",
+ "languageDocumentationPopover.documentationESQL.stringOperators.markdown": "### LIKE et RLIKE\nPour comparer des chaînes en utilisant des caractères génériques ou des expressions régulières, utilisez `LIKE` ou `RLIKE` :\n\nUtilisez `LIKE` pour faire correspondre des chaînes à l'aide de caractères génériques. Les caractères génériques suivants sont pris en charge :\n\n* `*` correspond à zéro caractère ou plus.\n* `?` correspond à un seul caractère.\n\n````\nFROM employees\n| WHERE first_name LIKE \"?b*\"\n| KEEP first_name, last_name\n````\n\nUtilisez `RLIKE` pour faire correspondre des chaînes à l'aide d'expressions régulières :\n\n````\nFROM employees\n| WHERE first_name RLIKE \".leja.*\"\n| KEEP first_name, last_name\n````\n ",
+ "languageDocumentationPopover.documentationESQL.substring": "SUBSTRING",
+ "languageDocumentationPopover.documentationESQL.substring.markdown": "\n\n ### SUBSTRING\n Renvoie la sous-chaîne d'une chaîne, délimitée en fonction d'une position de départ et d'une longueur facultative\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL ln_sub = SUBSTRING(last_name, 1, 3)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.tan": "TAN",
+ "languageDocumentationPopover.documentationESQL.tan.markdown": "\n\n ### TAN\n Renvoie la fonction trigonométrique Tangente d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL tan=TAN(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.tanh": "TANH",
+ "languageDocumentationPopover.documentationESQL.tanh.markdown": "\n\n ### TANH\n Renvoie la fonction hyperbolique Tangente d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL tanh=TANH(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.tau": "TAU",
+ "languageDocumentationPopover.documentationESQL.tau.markdown": "\n\n ### TAU\n Renvoie le rapport entre la circonférence et le rayon d'un cercle.\n\n ````\n ROW TAU()\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_base64": "TO_BASE64",
+ "languageDocumentationPopover.documentationESQL.to_base64.markdown": "\n\n ### TO_BASE64\n Encode une chaîne en chaîne base64.\n\n ````\n row a = \"elastic\" \n | eval e = to_base64(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_boolean": "TO_BOOLEAN",
+ "languageDocumentationPopover.documentationESQL.to_boolean.markdown": "\n\n ### TO_BOOLEAN\n Convertit une valeur d'entrée en une valeur booléenne.\n Une chaîne de valeur *true* sera convertie, sans tenir compte de la casse, en une valeur booléenne *true*.\n Pour toute autre valeur, y compris une chaîne vide, la fonction renverra *false*.\n La valeur numérique *0* sera convertie en *false*, toute autre valeur sera convertie en *true*.\n\n ````\n ROW str = [\"true\", \"TRuE\", \"false\", \"\", \"yes\", \"1\"]\n | EVAL bool = TO_BOOLEAN(str)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_cartesianpoint": "TO_CARTESIANPOINT",
+ "languageDocumentationPopover.documentationESQL.to_cartesianpoint.markdown": "\n\n ### TO_CARTESIANPOINT\n Convertit la valeur d'une entrée en une valeur `cartesian_point`.\n Une chaîne ne sera convertie que si elle respecte le format WKT Point.\n\n ````\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POINT(7580.93 2272.77)\"]\n | MV_EXPAND wkt\n | EVAL pt = TO_CARTESIANPOINT(wkt)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_cartesianshape": "TO_CARTESIANSHAPE",
+ "languageDocumentationPopover.documentationESQL.to_cartesianshape.markdown": "\n\n ### TO_CARTESIANSHAPE\n Convertit une valeur d'entrée en une valeur `cartesian_shape`.\n Une chaîne ne sera convertie que si elle respecte le format WKT.\n\n ````\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POLYGON ((3339584.72 1118889.97, 4452779.63 4865942.27, 2226389.81 4865942.27, 1113194.90 2273030.92, 3339584.72 1118889.97))\"]\n | MV_EXPAND wkt\n | EVAL geom = TO_CARTESIANSHAPE(wkt)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_datetime": "TO_DATETIME",
+ "languageDocumentationPopover.documentationESQL.to_datetime.markdown": "\n\n ### TO_DATETIME\n Convertit une valeur d'entrée en une valeur de date.\n Une chaîne ne sera convertie que si elle respecte le format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`.\n Pour convertir des dates vers d'autres formats, utilisez `DATE_PARSE`.\n\n ````\n ROW string = [\"1953-09-02T00:00:00.000Z\", \"1964-06-02T00:00:00.000Z\", \"1964-06-02 00:00:00\"]\n | EVAL datetime = TO_DATETIME(string)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_degrees": "TO_DEGREES",
+ "languageDocumentationPopover.documentationESQL.to_degrees.markdown": "\n\n ### TO_DEGREES\n Convertit un nombre en radians en degrés.\n\n ````\n ROW rad = [1.57, 3.14, 4.71]\n | EVAL deg = TO_DEGREES(rad)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_double": "TO_DOUBLE",
+ "languageDocumentationPopover.documentationESQL.to_double.markdown": "\n\n ### TO_DOUBLE\n Convertit une valeur d'entrée en une valeur double. Si le paramètre d'entrée est de type date,\n sa valeur sera interprétée en millisecondes depuis l'heure Unix,\n convertie en double. Le booléen *true* sera converti en double *1.0*, et *false* en *0.0*.\n\n ````\n ROW str1 = \"5.20128E11\", str2 = \"foo\"\n | EVAL dbl = TO_DOUBLE(\"520128000000\"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_geopoint": "TO_GEOPOINT",
+ "languageDocumentationPopover.documentationESQL.to_geopoint.markdown": "\n\n ### TO_GEOPOINT\n Convertit une valeur d'entrée en une valeur `geo_point`.\n Une chaîne ne sera convertie que si elle respecte le format WKT Point.\n\n ````\n ROW wkt = \"POINT(42.97109630194 14.7552534413725)\"\n | EVAL pt = TO_GEOPOINT(wkt)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_geoshape": "TO_GEOSHAPE",
+ "languageDocumentationPopover.documentationESQL.to_geoshape.markdown": "\n\n ### TO_GEOSHAPE\n Convertit une valeur d'entrée en une valeur `geo_shape`.\n Une chaîne ne sera convertie que si elle respecte le format WKT.\n\n ````\n ROW wkt = \"POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))\"\n | EVAL geom = TO_GEOSHAPE(wkt)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_integer": "TO_INTEGER",
+ "languageDocumentationPopover.documentationESQL.to_integer.markdown": "\n\n ### TO_INTEGER\n Convertit une valeur d'entrée en une valeur entière.\n Si le paramètre d'entrée est de type date, sa valeur sera interprétée en millisecondes\n depuis l'heure Unix, convertie en entier.\n Le booléen *true* sera converti en entier *1*, et *false* en *0*.\n\n ````\n ROW long = [5013792, 2147483647, 501379200000]\n | EVAL int = TO_INTEGER(long)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_ip": "TO_IP",
+ "languageDocumentationPopover.documentationESQL.to_ip.markdown": "\n\n ### TO_IP\n Convertit une chaîne d'entrée en valeur IP.\n\n ````\n ROW str1 = \"1.1.1.1\", str2 = \"foo\"\n | EVAL ip1 = TO_IP(str1), ip2 = TO_IP(str2)\n | WHERE CIDR_MATCH(ip1, \"1.0.0.0/8\")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_long": "TO_LONG",
+ "languageDocumentationPopover.documentationESQL.to_long.markdown": "\n\n ### TO_LONG\n Convertit une valeur d'entrée en une valeur longue. Si le paramètre d'entrée est de type date,\n sa valeur sera interprétée en millisecondes depuis l'heure Unix, convertie en valeur longue.\n Le booléen *true* sera converti en valeur longue *1*, et *false* en *0*.\n\n ````\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_LONG(str1), long2 = TO_LONG(str2), long3 = TO_LONG(str3)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_lower": "TO_LOWER",
+ "languageDocumentationPopover.documentationESQL.to_lower.markdown": "\n\n ### TO_LOWER\n Renvoie une nouvelle chaîne représentant la chaîne d'entrée convertie en minuscules.\n\n ````\n ROW message = \"Some Text\"\n | EVAL message_lower = TO_LOWER(message)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_radians": "TO_RADIANS",
+ "languageDocumentationPopover.documentationESQL.to_radians.markdown": "\n\n ### TO_RADIANS\n Convertit un nombre en degrés en radians.\n\n ````\n ROW deg = [90.0, 180.0, 270.0]\n | EVAL rad = TO_RADIANS(deg)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_string": "TO_STRING",
+ "languageDocumentationPopover.documentationESQL.to_string.markdown": "\n\n ### TO_STRING\n Convertit une valeur d'entrée en une chaîne.\n\n ````\n ROW a=10\n | EVAL j = TO_STRING(a)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_unsigned_long": "TO_UNSIGNED_LONG",
+ "languageDocumentationPopover.documentationESQL.to_unsigned_long.markdown": "\n\n ### TO_UNSIGNED_LONG\n Convertit une valeur d'entrée en une valeur longue non signée. Si le paramètre d'entrée est de type date,\n sa valeur sera interprétée en millisecondes depuis l'heure Unix, convertie en valeur longue non signée.\n Le booléen *true* sera converti en valeur longue non signée *1*, et *false* en *0*.\n\n ````\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_UNSIGNED_LONG(str1), long2 = TO_ULONG(str2), long3 = TO_UL(str3)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_upper": "TO_UPPER",
+ "languageDocumentationPopover.documentationESQL.to_upper.markdown": "\n\n ### TO_UPPER\n Renvoie une nouvelle chaîne représentant la chaîne d'entrée convertie en majuscules.\n\n ````\n ROW message = \"Some Text\"\n | EVAL message_upper = TO_UPPER(message)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.to_version": "TO_VERSION",
+ "languageDocumentationPopover.documentationESQL.to_version.markdown": "\n\n ### TO_VERSION\n Convertit une chaîne d'entrée en une valeur de version.\n\n ````\n ROW v = TO_VERSION(\"1.2.3\")\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.trim": "TRIM",
+ "languageDocumentationPopover.documentationESQL.trim.markdown": "\n\n ### TRIM\n Supprime les espaces de début et de fin d'une chaîne.\n\n ````\n ROW message = \" some text \", color = \" red \"\n | EVAL message = TRIM(message)\n | EVAL color = TRIM(color)\n ````\n ",
+ "languageDocumentationPopover.documentationESQL.where": "WHERE",
+ "languageDocumentationPopover.documentationESQL.where.markdown": "### WHERE\nUtilisez `WHERE` afin d'obtenir un tableau qui comprend toutes les lignes du tableau d'entrée pour lesquelles la condition fournie est évaluée à `true` :\n \n````\nFROM employees\n| KEEP first_name, last_name, still_hired\n| WHERE still_hired == true\n````\n\n#### Opérateurs\n\nPour obtenir un aperçu des opérateurs pris en charge, consultez la section **Opérateurs**.\n\n#### Fonctions\n`WHERE` prend en charge diverses fonctions de calcul des valeurs. Pour en savoir plus, consultez la section **Fonctions**.\n ",
"languageDocumentationPopover.documentationLinkLabel": "Voir toute la documentation",
"languageDocumentationPopover.header": "Référence de {language}",
"languageDocumentationPopover.searchPlaceholder": "Recherche",
@@ -7084,253 +7321,17 @@
"telemetry.usageCollectionConstant": "collecte de données d’utilisation",
"telemetry.usageDataTitle": "Collecte de données d’utilisation",
"textBasedEditor.query.textBasedLanguagesEditor.aborted": "La demande a été annulée",
- "languageDocumentationPopover.documentationESQL.aggregationFunctions": "Fonctions d'agrégation",
- "languageDocumentationPopover.documentationESQL.aggregationFunctionsDocumentationESQLDescription": "Ces fonctions peuvent être utilisées avec STATS...BY :",
"textBasedEditor.query.textBasedLanguagesEditor.cancel": "Annuler",
"textBasedEditor.query.textBasedLanguagesEditor.collapseLabel": "Réduire",
- "languageDocumentationPopover.documentationESQL.commandsDescription": "Une commande source produit un tableau, habituellement avec des données issues d'Elasticsearch. ES|QL est compatible avec les commandes sources suivantes.",
"textBasedEditor.query.textBasedLanguagesEditor.disableWordWrapLabel": "Supprimer les sauts de ligne des barres verticales",
- "languageDocumentationPopover.documentationESQL.abs": "ABS",
- "languageDocumentationPopover.documentationESQL.abs.markdown": "\n\n ### ABS\n Renvoie la valeur absolue.\n\n ````\n Numéro ROW = -1.0 \n | EVAL abs_number = ABS(number)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.acos": "ACOS",
- "languageDocumentationPopover.documentationESQL.acos.markdown": "\n\n ### ACOS\n Renvoie l'arc cosinus de `n` sous forme d'angle, exprimé en radians.\n\n ````\n ROW a=.9\n | EVAL acos=ACOS(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.asin": "ASIN",
- "languageDocumentationPopover.documentationESQL.asin.markdown": "\n\n ### ASIN\n Renvoie l'arc sinus de l'entrée\n expression numérique sous forme d'angle, exprimée en radians.\n\n ````\n ROW a=.9\n | EVAL asin=ASIN(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.atan": "ATAN",
- "languageDocumentationPopover.documentationESQL.atan.markdown": "\n\n ### ATAN\n Renvoie l'arc tangente de l'entrée\n expression numérique sous forme d'angle, exprimée en radians.\n\n ````\n ROW a=.12.9\n | EVAL atan=ATAN(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.atan2": "ATAN2",
- "languageDocumentationPopover.documentationESQL.atan2.markdown": "\n\n ### ATAN2\n L'angle entre l'axe positif des x et le rayon allant de\n l'origine au point (x , y) dans le plan cartésien, exprimée en radians.\n\n ````\n ROW y=12.9, x=.6\n | EVAL atan2=ATAN2(y, x)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.autoBucketFunction": "COMPARTIMENT",
- "languageDocumentationPopover.documentationESQL.autoBucketFunction.markdown": "### COMPARTIMENT\nCréer des groupes de valeurs, des compartiments (\"buckets\"), à partir d'une entrée d'un numéro ou d'un horodatage. La taille des compartiments peut être fournie directement ou choisie selon une plage de valeurs et de décompte recommandée.\n\n`BUCKET` a deux modes de fonctionnement : \n\n1. Dans lequel la taille du compartiment est calculée selon la recommandation de décompte d'un compartiment (quatre paramètres) et une plage.\n2. Dans lequel la taille du compartiment est fournie directement (deux paramètres).\n\nAvec un nombre cible de compartiments, le début d'une plage et la fin d'une plage, `BUCKET` choisit une taille de compartiment appropriée afin de générer le nombre cible de compartiments ou moins.\n\nPar exemple, demander jusqu'à 20 compartiments pour une année organisera les données en intervalles mensuels :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT hire_date\n````\n\n**REMARQUE** : Le but n'est pas de fournir le nombre précis de compartiments, mais plutôt de sélectionner une plage qui fournit, tout au plus, le nombre cible de compartiments.\n\nVous pouvez combiner `BUCKET` avec une agrégation pour créer un histogramme :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_month = COUNT(*) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT month\n````\n\n**REMARQUE** : `BUCKET` ne crée pas de compartiments qui ne correspondent à aucun document. C'est pourquoi, dans l'exemple précédent, il manque 1985-03-01 ainsi que d'autres dates.\n\nDemander d'autres compartiments peut résulter en une plage réduite. Par exemple, demander jusqu'à 100 compartiments en un an résulte en des compartiments hebdomadaires :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 100, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT week\n````\n\n**REMARQUE** : `AUTO_BUCKET` ne filtre aucune ligne. Il n'utilise que la plage fournie pour choisir une taille de compartiment appropriée. Pour les lignes dont la valeur se situe en dehors de la plage, il renvoie une valeur de compartiment qui correspond à un compartiment situé en dehors de la plage. Associez `BUCKET` à `WHERE` pour filtrer les lignes.\n\nSi la taille de compartiment désirée est connue à l'avance, fournissez-la comme second argument, en ignorant la plage :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 1 week)\n| SORT week\n````\n\n**REMARQUE** : Lorsque vous fournissez la taille du compartiment comme second argument, ce dernier doit être une période temporelle ou une durée.\n\n`BUCKET` peut également être utilisé pour des champs numériques. Par exemple, pour créer un histogramme de salaire :\n\n````\nFROM employees\n| STATS COUNT(*) by bs = BUCKET(salary, 20, 25324, 74999)\n| SORT bs\n````\n\nContrairement à l'exemple précédent qui filtre intentionnellement sur une plage temporelle, vous n'avez pas souvent besoin de filtrer sur une plage numérique. Vous devez trouver les valeurs min et max séparément. ES|QL n'a pas encore de façon aisée d'effectuer cette opération automatiquement.\n\nLa plage peut être ignorée si la taille désirée de compartiment est connue à l'avance. Fournissez-la simplement comme second argument :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS c = COUNT(1) BY b = BUCKET(salary, 5000.)\n| SORT b\n````\n\n**REMARQUE** : Lorsque vous fournissez la taille du compartiment comme second argument, elle doit être de type à **virgule flottante**.\n\nVoici un exemple sur comment créer des compartiments horaires pour les dernières 24 heures, et calculer le nombre d'événements par heure :\n\n````\nFROM sample_data\n| WHERE @timestamp >= NOW() - 1 day and @timestamp < NOW()\n| STATS COUNT(*) BY bucket = BUCKET(@timestamp, 25, NOW() - 1 day, NOW())\n````\n\nVoici un exemple permettant de créer des compartiments mensuels pour l'année 1985, et calculer le salaire moyen par mois d'embauche :\n\n````\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS AVG(salary) BY bucket = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT bucket\n````\n\n`BUCKET` peut être utilisé pour les parties de groupage et d'agrégation de la commande `STATS … BY ...`, tant que la partie d'agrégation de la fonction est **référencée par un alias défini dans la partie de groupage**, ou que celle-ci est invoquée avec exactement la même expression.\n\nPar exemple :\n\n````\nFROM employees\n| STATS s1 = b1 + 1, s2 = BUCKET(salary / 1000 + 999, 50.) + 2 BY b1 = BUCKET(salary / 100 + 99, 50.), b2 = BUCKET(salary / 1000 + 999, 50.)\n| SORT b1, b2\n| KEEP s1, b1, s2, b2\n````\n ",
- "languageDocumentationPopover.documentationESQL.binaryOperators": "Opérateurs binaires",
- "languageDocumentationPopover.documentationESQL.binaryOperators.markdown": "### Opérateurs binaires\nLes opérateurs de comparaison binaire suivants sont pris en charge :\n\n* égalité : `==`\n* inégalité : `!=`\n* inférieur à : `<`\n* inférieur ou égal à : `<=`\n* supérieur à : `>`\n* supérieur ou égal à : `>=`\n* ajouter : `+`\n* soustraire : `-`\n* multiplier par : `*`\n* diviser par : `/`\n* module : `%`\n ",
- "languageDocumentationPopover.documentationESQL.booleanOperators": "Opérateurs booléens",
- "languageDocumentationPopover.documentationESQL.booleanOperators.markdown": "### Opérateurs booléens\nLes opérateurs booléens suivants sont pris en charge :\n\n* `AND`\n* `OR`\n* `NOT`\n ",
- "languageDocumentationPopover.documentationESQL.bucket": "COMPARTIMENT",
- "languageDocumentationPopover.documentationESQL.bucket.markdown": "\n\n ### COMPARTIMENT\n Créer des groupes de valeurs, des compartiments (\"buckets\"), à partir d'une entrée d'un numéro ou d'un horodatage.\n La taille des compartiments peut être fournie directement ou choisie selon une plage de valeurs et de décompte recommandée.\n\n ````\n FROM employees\n | WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n | STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n | SORT hire_date\n ````\n ",
- "languageDocumentationPopover.documentationESQL.case": "CASE",
- "languageDocumentationPopover.documentationESQL.case.markdown": "\n\n ### CAS\n Accepte les paires de conditions et de valeurs. La fonction renvoie la valeur qui\n appartient à la première condition étant évaluée comme `true`.\n\n Si le nombre d'arguments est impair, le dernier argument est la valeur par défaut qui est\n renvoyée si aucune condition ne correspond. Si le nombre d'arguments est pair, et\n qu'aucune condition ne correspond, la fonction renvoie `null`.\n\n ````\n FROM employees\n | EVAL type = CASE(\n languages <= 1, \"monolingual\",\n languages <= 2, \"bilingual\",\n \"polyglot\")\n | KEEP emp_no, languages, type\n ````\n ",
- "languageDocumentationPopover.documentationESQL.castOperator": "Cast (::)",
- "languageDocumentationPopover.documentationESQL.castOperator.markdown": "### CAST (`::`)\nL'opérateur `::` fournit une syntaxe alternative pratique au type de converstion de fonction `TO_`.\n\nExemple :\n````\nROW ver = CONCAT((\"0\"::INT + 1)::STRING, \".2.3\")::VERSION\n````\n ",
- "languageDocumentationPopover.documentationESQL.cbrt": "CBRT",
- "languageDocumentationPopover.documentationESQL.cbrt.markdown": "\n\n ### CBRT\n Renvoie la racine cubique d'un nombre. La valeur de renvoi est toujours un double, quelle que soit la valeur numérique de l'entrée.\n La racine cubique de l’infini est nulle.\n\n ````\n ROW d = 1000.0\n | EVAL c = cbrt(d)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.ceil": "CEIL",
- "languageDocumentationPopover.documentationESQL.ceil.markdown": "\n\n ### CEIL\n Arrondir un nombre à l'entier supérieur.\n\n ```\n ROW a=1.8\n | EVAL a=CEIL(a)\n ```\n Remarque : Il s'agit d'un noop pour `long` (y compris non signé) et `integer`. Pour `double`, la fonction choisit la valeur `double` la plus proche de l'entier, de manière similaire à la méthode Math.ceil.\n ",
- "languageDocumentationPopover.documentationESQL.cidr_match": "CIDR_MATCH",
- "languageDocumentationPopover.documentationESQL.cidr_match.markdown": "\n\n ### CIDR_MATCH\n Renvoie `true` si l'IP fournie est contenue dans l'un des blocs CIDR fournis.\n\n ````\n FROM hosts \n | WHERE CIDR_MATCH(ip1, \"127.0.0.2/32\", \"127.0.0.3/32\") \n | KEEP card, host, ip0, ip1\n ````\n ",
- "languageDocumentationPopover.documentationESQL.coalesce": "COALESCE",
- "languageDocumentationPopover.documentationESQL.coalesce.markdown": "\n\n ### COALESCE\n Renvoie le premier de ses arguments qui n'est pas nul. Si tous les arguments sont nuls, `null` est renvoyé.\n\n ````\n ROW a=null, b=\"b\"\n | EVAL COALESCE(a, b)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.concat": "CONCAT",
- "languageDocumentationPopover.documentationESQL.concat.markdown": "\n\n ### CONCAT\n Concatène deux ou plusieurs chaînes.\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fullname = CONCAT(first_name, \" \", last_name)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.cos": "COS",
- "languageDocumentationPopover.documentationESQL.cos.markdown": "\n\n ### COS\n Renvoie le cosinus d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL cos=COS(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.cosh": "COSH",
- "languageDocumentationPopover.documentationESQL.cosh.markdown": "\n\n ### COSH\n Renvoie le cosinus hyperbolique d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL cosh=COSH(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_diff": "DATE_DIFF",
- "languageDocumentationPopover.documentationESQL.date_diff.markdown": "\n\n ### DATE_DIFF\n Soustrait le `startTimestamp` du `endTimestamp` et renvoie la différence en multiples `d'unité`.\n Si `startTimestamp` est postérieur à `endTimestamp`, des valeurs négatives sont renvoyées.\n\n ````\n ROW date1 = TO_DATETIME(\"2023-12-02T11:00:00.000Z\"), date2 = TO_DATETIME(\"2023-12-02T11:00:00.001Z\")\n | EVAL dd_ms = DATE_DIFF(\"microseconds\", date1, date2)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.date_extract": "DATE_EXTRACT",
- "languageDocumentationPopover.documentationESQL.date_extract.markdown": "\n\n ### DATE_EXTRACT\n Extrait des parties d'une date, telles que l'année, le mois, le jour, l'heure.\n\n ````\n ROW date = DATE_PARSE(\"yyyy-MM-dd\", \"2022-05-06\")\n | EVAL year = DATE_EXTRACT(\"year\", date)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.date_format": "DATE_FORMAT",
- "languageDocumentationPopover.documentationESQL.date_format.markdown": "\n\n ### DATE_FORMAT\n Renvoie une représentation sous forme de chaîne d'une date dans le format fourni.\n\n ````\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL hired = DATE_FORMAT(\"YYYY-MM-dd\", hire_date)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.date_parse": "DATE_PARSE",
- "languageDocumentationPopover.documentationESQL.date_parse.markdown": "\n\n ### DATE_PARSE\n Renvoie une date en analysant le deuxième argument selon le format spécifié dans le premier argument.\n\n ````\n ROW date_string = \"2022-05-06\"\n | EVAL date = DATE_PARSE(\"yyyy-MM-dd\", date_string)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.date_trunc": "DATE_TRUNC",
- "languageDocumentationPopover.documentationESQL.date_trunc.markdown": "\n\n ### DATE_TRUNC\n Arrondit une date à l'intervalle le plus proche.\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL year_hired = DATE_TRUNC(1 year, hire_date)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.dissect": "DISSECT",
- "languageDocumentationPopover.documentationESQL.dissect.markdown": "### DISSECT\n`DISSECT` vous permet d'extraire des données structurées d'une chaîne. `DISSECT` compare la chaîne à un modèle basé sur les délimiteurs, et extrait les clés indiquées en tant que colonnes.\n\nPour obtenir la syntaxe des modèles \"dissect\", consultez [la documentation relative au processeur \"dissect\"](https://www.elastic.co/guide/en/elasticsearch/reference/current/dissect-processor.html).\n\n```\nROW a = \"1953-01-23T12:15:00Z - some text - 127.0.0.1\"\n| DISSECT a \"%'{Y}-%{M}-%{D}T%{h}:%{m}:%{s}Z - %{msg} - %{ip}'\"\n```` ",
- "languageDocumentationPopover.documentationESQL.drop": "DROP",
- "languageDocumentationPopover.documentationESQL.drop.markdown": "### DROP\nAfin de supprimer certaines colonnes d'un tableau, utilisez `DROP` :\n \n```\nFROM employees\n| DROP height\n```\n\nPlutôt que de spécifier chaque colonne par son nom, vous pouvez utiliser des caractères génériques pour supprimer toutes les colonnes dont le nom correspond à un modèle :\n\n```\nFROM employees\n| DROP height*\n````\n ",
- "languageDocumentationPopover.documentationESQL.e": "E",
- "languageDocumentationPopover.documentationESQL.e.markdown": "\n\n ### E\n Retourne le nombre d'Euler.\n\n ````\n ROW E()\n ````\n ",
- "languageDocumentationPopover.documentationESQL.ends_with": "ENDS_WITH",
- "languageDocumentationPopover.documentationESQL.ends_with.markdown": "\n\n ### ENDS_WITH\n Renvoie une valeur booléenne qui indique si une chaîne de mots-clés se termine par une autre chaîne.\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL ln_E = ENDS_WITH(last_name, \"d\")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.enrich": "ENRICH",
- "languageDocumentationPopover.documentationESQL.enrich.markdown": "### ENRICH\nVous pouvez utiliser `ENRICH` pour ajouter les données de vos index existants aux enregistrements entrants. Une fonction similaire à l'[enrichissement par ingestion](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html), mais qui fonctionne au moment de la requête.\n\n```\nROW language_code = \"1\"\n| ENRICH languages_policy\n```\n\n`ENRICH` requiert l'exécution d'une [politique d'enrichissement](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-policy). La politique d'enrichissement définit un champ de correspondance (un champ clé) et un ensemble de champs d'enrichissement.\n\n`ENRICH` recherche les enregistrements dans l'[index d'enrichissement](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-index) en se basant sur la valeur du champ de correspondance. La clé de correspondance dans l'ensemble de données d'entrée peut être définie en utilisant `ON `. Si elle n'est pas spécifiée, la correspondance sera effectuée sur un champ portant le même nom que le champ de correspondance défini dans la politique d'enrichissement.\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a\n```\n\nVous pouvez indiquer quels attributs (parmi ceux définis comme champs d'enrichissement dans la politique) doivent être ajoutés au résultat, en utilisant la syntaxe `WITH , ...`.\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH language_name\n```\n\nLes attributs peuvent également être renommés à l'aide de la syntaxe `WITH new_name=`\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH name = language_name\n````\n\nPar défaut (si aucun `WITH` n'est défini), `ENRICH` ajoute au résultat tous les champs d'enrichissement définis dans la politique d'enrichissement.\n\nEn cas de collision de noms, les champs nouvellement créés remplacent les champs existants.\n ",
- "languageDocumentationPopover.documentationESQL.eval": "EVAL",
- "languageDocumentationPopover.documentationESQL.eval.markdown": "### EVAL\n`EVAL` permet d'ajouter des colonnes :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height_feet = height * 3.281, height_cm = height * 100\n````\n\nSi la colonne indiquée existe déjà, la colonne existante sera supprimée et la nouvelle colonne sera ajoutée au tableau :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height = height * 3.281\n````\n\n#### Fonctions\n`EVAL` prend en charge diverses fonctions de calcul des valeurs. Pour en savoir plus, consultez les fonctions.\n ",
- "languageDocumentationPopover.documentationESQL.floor": "FLOOR",
- "languageDocumentationPopover.documentationESQL.floor.markdown": "\n\n ### FLOOR\n Arrondir un nombre à l'entier inférieur.\n\n ````\n ROW a=1.8\n | EVAL a=FLOOR(a)\n ````\n Remarque : Il s'agit d'un noop pour `long` (y compris non signé) et `integer`.\n Pour `double`, la fonction choisit la valeur `double` la plus proche de l'entier,\n de manière similaire à Math.floor.\n ",
- "languageDocumentationPopover.documentationESQL.from": "FROM",
- "languageDocumentationPopover.documentationESQL.from_base64": "FROM_BASE64",
- "languageDocumentationPopover.documentationESQL.from_base64.markdown": "\n\n ### FROM_BASE64\n Décodez une chaîne base64.\n\n ````\n row a = \"ZWxhc3RpYw==\" \n | eval d = from_base64(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.from.markdown": "### FROM\nLa commande source `FROM` renvoie un tableau contenant jusqu'à 10 000 documents issus d'un flux de données, d'un index ou d'un alias. Chaque ligne du tableau obtenu correspond à un document. Chaque colonne correspond à un champ et est accessible par le nom de ce champ.\n\n````\nFROM employees\n````\n\nVous pouvez utiliser des [calculs impliquant des dates](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-date-math-index-names) pour désigner les indices, les alias et les flux de données. Cela peut s'avérer utile pour les données temporelles.\n\nUtilisez des listes séparées par des virgules ou des caractères génériques pour rechercher plusieurs flux de données, indices ou alias :\n\n````\nFROM employees-00001,employees-*\n````\n\n#### Métadonnées\n\nES|QL peut accéder aux champs de métadonnées suivants :\n\n* `_index` : l'index auquel appartient le document. Le champ est du type `keyword`.\n* `_id` : l'identifiant du document source. Le champ est du type `keyword`.\n* `_id` : la version du document source. Le champ est du type `long`.\n\nUtilisez la directive `METADATA` pour activer les champs de métadonnées :\n\n````\nFROM index [METADATA _index, _id]\n````\n\nLes champs de métadonnées ne sont disponibles que si la source des données est un index. Par conséquent, `FROM` est la seule commande source qui prend en charge la directive `METADATA`.\n\nUne fois activés, les champs sont disponibles pour les commandes de traitement suivantes, tout comme les autres champs de l'index :\n\n````\nFROM ul_logs, apps [METADATA _index, _version]\n| WHERE id IN (13, 14) AND _version == 1\n| EVAL key = CONCAT(_index, \"_\", TO_STR(id))\n| SORT id, _index\n| KEEP id, _index, _version, key\n````\n\nDe même, comme pour les champs d'index, une fois l'agrégation effectuée, un champ de métadonnées ne sera plus accessible aux commandes suivantes, sauf s'il est utilisé comme champ de regroupement :\n\n````\nFROM employees [METADATA _index, _id]\n| STATS max = MAX(emp_no) BY _index\n````\n ",
- "languageDocumentationPopover.documentationESQL.greatest": "GREATEST",
- "languageDocumentationPopover.documentationESQL.greatest.markdown": "\n\n ### GREATEST\n Renvoie la valeur maximale de plusieurs colonnes. Similaire à `MV_MAX`\n sauf que ceci est destiné à une exécution sur plusieurs colonnes à la fois.\n\n ````\n ROW a = 10, b = 20\n | EVAL g = GREATEST(a, b)\n ````\n Remarque : Lorsque cette fonction est exécutée sur les champs `keyword` ou `text`, elle renvoie la dernière chaîne dans l'ordre alphabétique. Lorsqu'elle est exécutée sur des colonnes `boolean`, elle renvoie `true` si l'une des valeurs l'est.\n ",
- "languageDocumentationPopover.documentationESQL.grok": "GROK",
- "languageDocumentationPopover.documentationESQL.grok.markdown": "### GROK\n`GROK` vous permet d'extraire des données structurées d'une chaîne. `GROK` compare la chaîne à des modèles, sur la base d’expressions régulières, et extrait les modèles indiqués en tant que colonnes.\n\nPour obtenir la syntaxe des modèles \"grok\", consultez [la documentation relative au processeur \"grok\"](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html).\n\n````\nROW a = \"12 15.5 15.6 true\"\n| GROK a \"%'{NUMBER:b:int}' %'{NUMBER:c:float}' %'{NUMBER:d:double}' %'{WORD:e:boolean}'\"\n````\n ",
- "languageDocumentationPopover.documentationESQL.inOperator": "IN",
- "languageDocumentationPopover.documentationESQL.inOperator.markdown": "### IN\nL'opérateur `IN` permet de tester si un champ ou une expression est égal à un élément d'une liste de littéraux, de champs ou d'expressions :\n\n````\nROW a = 1, b = 4, c = 3\n| WHERE c-a IN (3, b / 2, a)\n````\n ",
- "languageDocumentationPopover.documentationESQL.ip_prefix": "IP_PREFIX",
- "languageDocumentationPopover.documentationESQL.ip_prefix.markdown": "\n\n ### IP_PREFIX\n Tronque une adresse IP à une longueur de préfixe donnée.\n\n ````\n row ip4 = to_ip(\"1.2.3.4\"), ip6 = to_ip(\"fe80::cae2:65ff:fece:feb9\")\n | eval ip4_prefix = ip_prefix(ip4, 24, 0), ip6_prefix = ip_prefix(ip6, 0, 112);\n ````\n ",
- "languageDocumentationPopover.documentationESQL.keep": "KEEP",
- "languageDocumentationPopover.documentationESQL.keep.markdown": "### KEEP\nLa commande `KEEP` permet de définir les colonnes qui seront renvoyées et l'ordre dans lequel elles le seront.\n\nPour limiter les colonnes retournées, utilisez une liste de noms de colonnes séparés par des virgules. Les colonnes sont renvoyées dans l'ordre indiqué :\n \n````\nFROM employees\n| KEEP first_name, last_name, height\n````\n\nPlutôt que de spécifier chaque colonne par son nom, vous pouvez utiliser des caractères génériques pour renvoyer toutes les colonnes dont le nom correspond à un modèle :\n\n````\nFROM employees\n| KEEP h*\n````\n\nLe caractère générique de l'astérisque (\"*\") placé de manière isolée transpose l'ensemble des colonnes qui ne correspondent pas aux autres arguments. La requête suivante renverra en premier lieu toutes les colonnes dont le nom commence par un h, puis toutes les autres colonnes :\n\n````\nFROM employees\n| KEEP h*, *\n````\n ",
- "languageDocumentationPopover.documentationESQL.least": "LEAST",
- "languageDocumentationPopover.documentationESQL.least.markdown": "\n\n ### LEAST\n Renvoie la valeur minimale de plusieurs colonnes. Cette fonction est similaire à `MV_MIN`. Toutefois, elle est destinée à être exécutée sur plusieurs colonnes à la fois.\n\n ````\n ROW a = 10, b = 20\n | EVAL l = LEAST(a, b)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.left": "LEFT",
- "languageDocumentationPopover.documentationESQL.left.markdown": "\n\n ### LEFT\n Renvoie la sous-chaîne qui extrait la \"longueur\" des caractères de la \"chaîne\" en partant de la gauche.\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL left = LEFT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ````\n ",
- "languageDocumentationPopover.documentationESQL.length": "LENGHT",
- "languageDocumentationPopover.documentationESQL.length.markdown": "\n\n ### LENGTH\n Renvoie la longueur des caractères d'une chaîne.\n\n ````\n FROM employees\n | KEEP first_name, last_name\n | EVAL fn_length = LENGTH(first_name)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.limit": "LIMIT",
- "languageDocumentationPopover.documentationESQL.limit.markdown": "### LIMIT\nLa commande de traitement `LIMIT` permet de restreindre le nombre de lignes :\n \n````\nFROM employees\n| LIMIT 5\n````\n ",
- "languageDocumentationPopover.documentationESQL.locate": "LOCATE",
- "languageDocumentationPopover.documentationESQL.locate.markdown": "\n\n ### LOCATE\n Renvoie un entier qui indique la position d'une sous-chaîne de mots-clés dans une autre chaîne\n\n ````\n row a = \"hello\"\n | eval a_ll = locate(a, \"ll\")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.log": "LOG",
- "languageDocumentationPopover.documentationESQL.log.markdown": "\n\n ### LOG\n Renvoie le logarithme d'une valeur dans une base. La valeur de renvoi est toujours un double, quelle que soit la valeur numérique de l'entrée.\n\n Les journaux de zéros, de nombres négatifs et de base 1 renvoient `null` ainsi qu'un avertissement.\n\n ````\n ROW base = 2.0, value = 8.0\n | EVAL s = LOG(base, value)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.log10": "LOG10",
- "languageDocumentationPopover.documentationESQL.log10.markdown": "\n\n ### LOG10\n Renvoie le logarithme d'une valeur en base 10. La valeur de renvoi est toujours un double, quelle que soit la valeur numérique de l'entrée.\n\n Les logs de 0 et de nombres négatifs renvoient `null` ainsi qu'un avertissement.\n\n ````\n ROW d = 1000.0 \n | EVAL s = LOG10(d)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.ltrim": "LTRIM",
- "languageDocumentationPopover.documentationESQL.ltrim.markdown": "\n\n ### LTRIM\n Retire les espaces au début des chaînes.\n\n ````\n ROW message = \" some text \", color = \" red \"\n | EVAL message = LTRIM(message)\n | EVAL color = LTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.markdown": "## ES|QL\n\nUne requête ES|QL (langage de requête Elasticsearch) se compose d'une série de commandes, séparées par une barre verticale : `|`. Chaque requête commence par une **commande source**, qui produit un tableau, habituellement avec des données issues d'Elasticsearch. \n\nUne commande source peut être suivie d'une ou plusieurs **commandes de traitement**. Les commandes de traitement peuvent modifier le tableau de sortie de la commande précédente en ajoutant, supprimant ou modifiant les lignes et les colonnes.\n\n````\nsource-command\n| processing-command1\n| processing-command2\n````\n\nLe résultat d'une requête est le tableau produit par la dernière commande de traitement. \n ",
- "languageDocumentationPopover.documentationESQL.mv_append": "MV_APPEND",
- "languageDocumentationPopover.documentationESQL.mv_append.markdown": "\n\n ### MV_APPEND\n Concatène les valeurs de deux champs à valeurs multiples.\n\n ",
- "languageDocumentationPopover.documentationESQL.mv_avg": "MV_AVG",
- "languageDocumentationPopover.documentationESQL.mv_avg.markdown": "\n\n ### MV_AVG\n Convertit un champ multivalué en un champ à valeur unique comprenant la moyenne de toutes les valeurs.\n\n ````\n ROW a=[3, 5, 1, 6]\n | EVAL avg_a = MV_AVG(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_concat": "MV_CONCAT",
- "languageDocumentationPopover.documentationESQL.mv_concat.markdown": "\n\n ### MV_CONCAT\n Convertit une expression de type chaîne multivalué en une colonne à valeur unique comprenant la concaténation de toutes les valeurs, séparées par un délimiteur.\n\n ````\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL j = MV_CONCAT(a, \", \")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_count": "MV_COUNT",
- "languageDocumentationPopover.documentationESQL.mv_count.markdown": "\n\n ### MV_COUNT\n Convertit une expression multivaluée en une colonne à valeur unique comprenant le total du nombre de valeurs.\n\n ````\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL count_a = MV_COUNT(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_dedupe": "MV_DEDUPE",
- "languageDocumentationPopover.documentationESQL.mv_dedupe.markdown": "\n\n ### MV_DEDUPE\n Supprime les valeurs en doublon d'un champ multivalué.\n\n ````\n ROW a=[\"foo\", \"foo\", \"bar\", \"foo\"]\n | EVAL dedupe_a = MV_DEDUPE(a)\n ````\n Remarque : la fonction `MV_DEDUPE` est en mesure de trier les valeurs de la colonne, mais ne le fait pas systématiquement.\n ",
- "languageDocumentationPopover.documentationESQL.mv_first": "MV_FIRST",
- "languageDocumentationPopover.documentationESQL.mv_first.markdown": "\n\n ### MV_FIRST\n Convertit une expression multivaluée en une colonne à valeur unique comprenant la\n première valeur. Ceci est particulièrement utile pour lire une fonction qui émet\n des colonnes multivaluées dans un ordre connu, comme `SPLIT`.\n\n L'ordre dans lequel les champs multivalués sont lus à partir\n du stockage sous-jacent n'est pas garanti. Il est *souvent* ascendant, mais ne vous y\n fiez pas. Si vous avez besoin de la valeur minimale, utilisez `MV_MIN` au lieu de\n `MV_FIRST`. `MV_MIN` comporte des optimisations pour les valeurs triées, il n'y a donc aucun\n avantage en matière de performances pour `MV_FIRST`.\n\n ````\n ROW a=\"foo;bar;baz\"\n | EVAL first_a = MV_FIRST(SPLIT(a, \";\"))\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_last": "MV_LAST",
- "languageDocumentationPopover.documentationESQL.mv_last.markdown": "\n\n ### MV_LAST\n Convertit une expression multivaluée en une colonne à valeur unique comprenant la dernière\n valeur. Ceci est particulièrement utile pour lire une fonction qui émet des champs multivalués\n dans un ordre connu, comme `SPLIT`.\n\n L'ordre dans lequel les champs multivalués sont lus à partir\n du stockage sous-jacent n'est pas garanti. Il est *souvent* ascendant, mais ne vous y\n fiez pas. Si vous avez besoin de la valeur maximale, utilisez `MV_MAX` au lieu de\n `MV_LAST`. `MV_MAX` comporte des optimisations pour les valeurs triées, il n'y a donc aucun\n avantage en matière de performances pour `MV_LAST`.\n\n ````\n ROW a=\"foo;bar;baz\"\n | EVAL last_a = MV_LAST(SPLIT(a, \";\"))\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_max": "MV_MAX",
- "languageDocumentationPopover.documentationESQL.mv_max.markdown": "\n\n ### MV_MAX\n Convertit une expression multivaluée en une colonne à valeur unique comprenant la valeur maximale.\n\n ````\n ROW a=[3, 5, 1]\n | EVAL max_a = MV_MAX(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_median": "MV_MEDIAN",
- "languageDocumentationPopover.documentationESQL.mv_median.markdown": "\n\n ### MV_MEDIAN\n Convertit un champ multivalué en un champ à valeur unique comprenant la valeur médiane.\n\n ````\n ROW a=[3, 5, 1]\n | EVAL median_a = MV_MEDIAN(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_min": "MV_MIN",
- "languageDocumentationPopover.documentationESQL.mv_min.markdown": "\n\n ### MV_MIN\n Convertit une expression multivaluée en une colonne à valeur unique comprenant la valeur minimale.\n\n ````\n ROW a=[2, 1]\n | EVAL min_a = MV_MIN(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_slice": "MV_SLICE",
- "languageDocumentationPopover.documentationESQL.mv_slice.markdown": "\n\n ### MV_SLICE\n Renvoie un sous-ensemble du champ multivalué en utilisant les valeurs d'index de début et de fin.\n\n ````\n row a = [1, 2, 2, 3]\n | eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_sort": "MV_SORT",
- "languageDocumentationPopover.documentationESQL.mv_sort.markdown": "\n\n ### MV_SORT\n Trie une expression multivaluée par ordre lexicographique.\n\n ````\n ROW a = [4, 2, -3, 2]\n | EVAL sa = mv_sort(a), sd = mv_sort(a, \"DESC\")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_sum": "MV_SUM",
- "languageDocumentationPopover.documentationESQL.mv_sum.markdown": "\n\n ### MV_SUM\n Convertit un champ multivalué en un champ à valeur unique comprenant la somme de toutes les valeurs.\n\n ````\n ROW a=[3, 5, 6]\n | EVAL sum_a = MV_SUM(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mv_zip": "MV_ZIP",
- "languageDocumentationPopover.documentationESQL.mv_zip.markdown": "\n\n ### MV_ZIP\n Combine les valeurs de deux champs multivalués avec un délimiteur qui les relie.\n\n ````\n ROW a = [\"x\", \"y\", \"z\"], b = [\"1\", \"2\"]\n | EVAL c = mv_zip(a, b, \"-\")\n | KEEP a, b, c\n ````\n ",
- "languageDocumentationPopover.documentationESQL.mvExpand": "MV_EXPAND",
- "languageDocumentationPopover.documentationESQL.mvExpand.markdown": "### MV_EXPAND\nLa commande de traitement `MV_EXPAND` développe les champs multivalués en indiquant une valeur par ligne et en dupliquant les autres champs : \n````\nROW a=[1,2,3], b=\"b\", j=[\"a\",\"b\"]\n| MV_EXPAND a\n````\n ",
- "languageDocumentationPopover.documentationESQL.now": "NOW",
- "languageDocumentationPopover.documentationESQL.now.markdown": "\n\n ### NOW\n Renvoie la date et l'heure actuelles.\n\n ````\n ROW current_date = NOW()\n ````\n ",
- "languageDocumentationPopover.documentationESQL.pi": "PI",
- "languageDocumentationPopover.documentationESQL.pi.markdown": "\n\n ### PI\n Renvoie Pi, le rapport entre la circonférence et le diamètre d'un cercle.\n\n ````\n ROW PI()\n ````\n ",
- "languageDocumentationPopover.documentationESQL.pow": "POW",
- "languageDocumentationPopover.documentationESQL.pow.markdown": "\n\n ### POW\n Renvoie la valeur d’une `base` élevée à la puissance d’un `exposant`.\n\n ````\n ROW base = 2.0, exponent = 2\n | EVAL result = POW(base, exponent)\n ````\n Remarque : Il est toujours possible de dépasser un résultat double ici ; dans ce cas, la valeur `null` sera renvoyée.\n ",
- "languageDocumentationPopover.documentationESQL.predicates": "valeurs NULL",
- "languageDocumentationPopover.documentationESQL.predicates.markdown": "### Valeurs NULL\nPour une comparaison avec une valeur NULL, utilisez les attributs `IS NULL` et `IS NOT NULL` :\n\n````\nFROM employees\n| WHERE birth_date IS NULL\n| KEEP first_name, last_name\n| SORT first_name\n| LIMIT 3\n````\n\n````\nFROM employees\n| WHERE is_rehired IS NOT NULL\n| STATS count(emp_no)\n````\n ",
- "languageDocumentationPopover.documentationESQL.rename": "RENAME",
- "languageDocumentationPopover.documentationESQL.rename.markdown": "### RENAME\nUtilisez `RENAME` pour renommer une colonne en utilisant la syntaxe suivante :\n\n````\nRENAME AS \n````\n\nPar exemple :\n\n````\nFROM employees\n| KEEP first_name, last_name, still_hired\n| RENAME still_hired AS employed\n````\n\nSi une colonne portant le nouveau nom existe déjà, elle sera remplacée par la nouvelle colonne.\n\nPlusieurs colonnes peuvent être renommées à l'aide d'une seule commande `RENAME` :\n\n````\nFROM employees\n| KEEP first_name, last_name\n| RENAME first_name AS fn, last_name AS ln\n````\n ",
- "languageDocumentationPopover.documentationESQL.repeat": "REPEAT",
- "languageDocumentationPopover.documentationESQL.repeat.markdown": "\n\n ### REPEAT\n Renvoie une chaîne construite par la concaténation de la `chaîne` avec elle-même, le `nombre` de fois spécifié.\n\n ````\n ROW a = \"Hello!\"\n | EVAL triple_a = REPEAT(a, 3);\n ````\n ",
- "languageDocumentationPopover.documentationESQL.replace": "REPLACE",
- "languageDocumentationPopover.documentationESQL.replace.markdown": "\n\n ### REPLACE\n La fonction remplace dans la chaîne `str` toutes les correspondances avec l'expression régulière `regex`\n par la chaîne de remplacement `newStr`.\n\n ````\n ROW str = \"Hello World\"\n | EVAL str = REPLACE(str, \"World\", \"Universe\")\n | KEEP str\n ````\n ",
- "languageDocumentationPopover.documentationESQL.right": "RIGHT",
- "languageDocumentationPopover.documentationESQL.right.markdown": "\n\n ### RIGHT\n Renvoie la sous-chaîne qui extrait la longueur des caractères de `str` en partant de la droite.\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL right = RIGHT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ````\n ",
- "languageDocumentationPopover.documentationESQL.round": "ROUND",
- "languageDocumentationPopover.documentationESQL.round.markdown": "\n\n ### ROUND\n Arrondit un nombre au nombre spécifié de décimales.\n La valeur par défaut est 0, qui renvoie l'entier le plus proche. Si le\n nombre de décimales spécifié est négatif, la fonction arrondit au nombre de décimales à gauche\n de la virgule.\n\n ````\n FROM employees\n | KEEP first_name, last_name, height\n | EVAL height_ft = ROUND(height * 3.281, 1)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.row": "ROW",
- "languageDocumentationPopover.documentationESQL.row.markdown": "### ROW\nLa commande source `ROW` renvoie une ligne contenant une ou plusieurs colonnes avec les valeurs que vous spécifiez. Cette commande peut s'avérer utile pour les tests.\n \n````\nROW a = 1, b = \"two\", c = null\n````\n\nUtilisez des crochets pour créer des colonnes à valeurs multiples :\n\n````\nROW a = [2, 1]\n````\n\nROW permet d'utiliser des fonctions :\n\n````\nROW a = ROUND(1.23, 0)\n````\n ",
- "languageDocumentationPopover.documentationESQL.rtrim": "RTRIM",
- "languageDocumentationPopover.documentationESQL.rtrim.markdown": "\n\n ### RTRIM\n Supprime les espaces à la fin des chaînes.\n\n ````\n ROW message = \" some text \", color = \" red \"\n | EVAL message = RTRIM(message)\n | EVAL color = RTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.show": "SHOW",
- "languageDocumentationPopover.documentationESQL.show.markdown": "### SHOW\nLa commande source `SHOW
- ` renvoie des informations sur le déploiement et ses capacités :\n\n* Utilisez `SHOW INFO` pour renvoyer la version du déploiement, la date de compilation et le hachage.\n* Utilisez `SHOW FUNCTIONS` pour renvoyer une liste de toutes les fonctions prises en charge et un résumé de chaque fonction.\n ",
- "languageDocumentationPopover.documentationESQL.signum": "SIGNUM",
- "languageDocumentationPopover.documentationESQL.signum.markdown": "\n\n ### SIGNUM\n Renvoie le signe du nombre donné.\n Il renvoie `-1` pour les nombres négatifs, `0` pour `0` et `1` pour les nombres positifs.\n\n ````\n ROW d = 100.0\n | EVAL s = SIGNUM(d)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.sin": "SIN",
- "languageDocumentationPopover.documentationESQL.sin.markdown": "\n\n ### SIN\n Renvoie la fonction trigonométrique sinusoïdale d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL sin=SIN(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.sinh": "SINH",
- "languageDocumentationPopover.documentationESQL.sinh.markdown": "\n\n ### SINH\n Renvoie le sinus hyperbolique d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL sinh=SINH(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.sort": "SORT",
- "languageDocumentationPopover.documentationESQL.sort.markdown": "### SORT\nUtilisez la commande `SORT` pour trier les lignes sur un ou plusieurs champs :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height\n````\n\nL'ordre de tri par défaut est croissant. Définissez un ordre de tri explicite en utilisant `ASC` ou `DESC` :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC\n````\n\nSi deux lignes disposent de la même clé de tri, l'ordre original sera préservé. Vous pouvez ajouter des expressions de tri pour départager les deux lignes :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC, first_name ASC\n````\n\n#### valeurs `null`\nPar défaut, les valeurs `null` sont considérées comme étant supérieures à toutes les autres valeurs. Selon un ordre de tri croissant, les valeurs `null` sont classées en dernier. Selon un ordre de tri décroissant, les valeurs `null` sont classées en premier. Pour modifier cet ordre, utilisez `NULLS FIRST` ou `NULLS LAST` :\n\n````\nFROM employees\n| KEEP first_name, last_name, height\n| SORT first_name ASC NULLS FIRST\n````\n ",
- "languageDocumentationPopover.documentationESQL.split": "SPLIT",
- "languageDocumentationPopover.documentationESQL.split.markdown": "\n\n ### SPLIT\n Divise une chaîne de valeur unique en plusieurs chaînes.\n\n ````\n ROW words=\"foo;bar;baz;qux;quux;corge\"\n | EVAL word = SPLIT(words, \";\")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.sqrt": "SQRT",
- "languageDocumentationPopover.documentationESQL.sqrt.markdown": "\n\n ### SQRT\n Renvoie la racine carrée d'un nombre. La valeur de renvoi est toujours un double, quelle que soit la valeur numérique de l'entrée.\n Les racines carrées des nombres négatifs et des infinis sont nulles.\n\n ````\n ROW d = 100.0\n | EVAL s = SQRT(d)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.st_contains": "ST_CONTAINS",
- "languageDocumentationPopover.documentationESQL.st_contains.markdown": "\n\n ### ST_CONTAINS\n Renvoie si la première géométrie contient la deuxième géométrie.\n Il s'agit de l'inverse de la fonction `ST_WITHIN`.\n\n ````\n FROM airport_city_boundaries\n | WHERE ST_CONTAINS(city_boundary, TO_GEOSHAPE(\"POLYGON((109.35 18.3, 109.45 18.3, 109.45 18.4, 109.35 18.4, 109.35 18.3))\"))\n | KEEP abbrev, airport, region, city, city_location\n ````\n ",
- "languageDocumentationPopover.documentationESQL.st_disjoint": "ST_DISJOINT",
- "languageDocumentationPopover.documentationESQL.st_disjoint.markdown": "\n\n ### ST_DISJOINT\n Renvoie si les deux géométries ou colonnes géométriques sont disjointes.\n Il s'agit de l'inverse de la fonction `ST_INTERSECTS`.\n En termes mathématiques : ST_Disjoint(A, B) ⇔ A ⋂ B = ∅\n\n ````\n FROM airport_city_boundaries\n | WHERE ST_DISJOINT(city_boundary, TO_GEOSHAPE(\"POLYGON((-10 -60, 120 -60, 120 60, -10 60, -10 -60))\"))\n | KEEP abbrev, airport, region, city, city_location\n ````\n ",
- "languageDocumentationPopover.documentationESQL.st_distance": "ST_DISTANCE",
- "languageDocumentationPopover.documentationESQL.st_distance.markdown": "\n\n ### ST_DISTANCE\n Calcule la distance entre deux points.\n Pour les géométries cartésiennes, c’est la distance pythagoricienne dans les mêmes unités que les coordonnées d'origine.\n Pour les géométries géographiques, c’est la distance circulaire le long du grand cercle en mètres.\n\n ````\n Aéroports FROM\n | WHERE abbrev == \"CPH\"\n | EVAL distance = ST_DISTANCE(location, city_location)\n | KEEP abbrev, name, location, city_location, distance\n ````\n ",
- "languageDocumentationPopover.documentationESQL.st_intersects": "ST_INTERSECTS",
- "languageDocumentationPopover.documentationESQL.st_intersects.markdown": "\n\n ### ST_INTERSECTS\n Renvoie `true` (vrai) si deux géométries se croisent.\n Elles se croisent si elles ont un point commun, y compris leurs points intérieurs\n (les points situés le long des lignes ou dans des polygones).\n Il s'agit de l'inverse de la fonction `ST_DISJOINT`.\n En termes mathématiques : ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅\n\n ````\n Aéroports FROM\n | WHERE ST_INTERSECTS(location, TO_GEOSHAPE(\"POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))\"))\n ````\n ",
- "languageDocumentationPopover.documentationESQL.st_within": "ST_WITHIN",
- "languageDocumentationPopover.documentationESQL.st_within.markdown": "\n\n ### ST_WITHIN\n Renvoie si la première géométrie est à l'intérieur de la deuxième géométrie.\n Il s'agit de l'inverse de la fonction `ST_CONTAINS`.\n\n ````\n FROM airport_city_boundaries\n | WHERE ST_WITHIN(city_boundary, TO_GEOSHAPE(\"POLYGON((109.1 18.15, 109.6 18.15, 109.6 18.65, 109.1 18.65, 109.1 18.15))\"))\n | KEEP abbrev, airport, region, city, city_location\n ````\n ",
- "languageDocumentationPopover.documentationESQL.st_x": "ST_X",
- "languageDocumentationPopover.documentationESQL.st_x.markdown": "\n\n ### ST_X\n Extrait la coordonnée `x` du point fourni.\n Si les points sont de type `geo_point`, cela revient à extraire la valeur de la `longitude`.\n\n ````\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.st_y": "ST_Y",
- "languageDocumentationPopover.documentationESQL.st_y.markdown": "\n\n ### ST_Y\n Extrait la coordonnée `y` du point fourni.\n Si les points sont de type `geo_point`, cela revient à extraire la valeur de la `latitude`.\n\n ````\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.starts_with": "STARTS_WITH",
- "languageDocumentationPopover.documentationESQL.starts_with.markdown": "\n\n ### STARTS_WITH\n Renvoie un booléen qui indique si une chaîne de mot-clés débute par une autre chaîne.\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL ln_S = STARTS_WITH(last_name, \"B\")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.statsby": "STATS ... BY",
- "languageDocumentationPopover.documentationESQL.statsby.markdown": "### STATS ... BY\nUtilisez `STATS ... BY` pour regrouper les lignes en fonction d'une valeur commune et calculer une ou plusieurs valeurs agrégées sur les lignes regroupées.\n\n**Exemples** :\n\n````\nFROM employees\n| STATS count = COUNT(emp_no) BY languages\n| SORT languages\n````\n\nSi `BY` est omis, le tableau de sortie contient exactement une ligne avec les agrégations appliquées sur l'ensemble des données :\n\n````\nFROM employees\n| STATS avg_lang = AVG(languages)\n````\n\nIl est possible de calculer plusieurs valeurs :\n\n````\nFROM employees\n| STATS avg_lang = AVG(languages), max_lang = MAX(languages)\n````\n\nIl est également possible d'effectuer des regroupements en fonction de plusieurs valeurs (uniquement pour les champs longs et les champs de la famille de mots-clés) :\n\n````\nFROM employees\n| EVAL hired = DATE_FORMAT(hire_date, \"YYYY\")\n| STATS avg_salary = AVG(salary) BY hired, languages.long\n| EVAL avg_salary = ROUND(avg_salary)\n| SORT hired, languages.long\n````\n\nConsultez la rubrique **Fonctions d'agrégation** pour obtenir la liste des fonctions pouvant être utilisées avec `STATS ... BY`.\n\nLes fonctions d'agrégation et les expressions de regroupement acceptent toutes deux d'autres fonctions. Ceci est utile pour utiliser `STATS...BY` sur des colonnes à valeur multiple. Par exemple, pour calculer l'évolution moyenne du salaire, vous pouvez utiliser `MV_AVG` pour faire la moyenne des multiples valeurs par employé, et utiliser le résultat avec la fonction `AVG` :\n\n````\nFROM employees\n| STATS avg_salary_change = AVG(MV_AVG(salary_change))\n````\n\nLe regroupement par expression est par exemple le regroupement des employés en fonction de la première lettre de leur nom de famille :\n\n````\nFROM employees\n| STATS my_count = COUNT() BY LEFT(last_name, 1)\n| SORT \"LEFT(last_name, 1)\"\n````\n\nIl n'est pas obligatoire d'indiquer le nom de la colonne de sortie. S'il n'est pas spécifié, le nouveau nom de la colonne est égal à l'expression. La requête suivante renvoie une colonne appelée `AVG(salary)` :\n\n````\nFROM employees\n| STATS AVG(salary)\n````\n\nComme ce nom contient des caractères spéciaux, il doit être placé entre deux caractères (`) lorsqu'il est utilisé dans des commandes suivantes :\n\n````\nFROM employees\n| STATS AVG(salary)\n| EVAL avg_salary_rounded = ROUND(\"AVG(salary)\")\n````\n\n**Remarque** : `STATS` sans aucun groupe est beaucoup plus rapide que l'ajout d'un groupe.\n\n**Remarque** : Le regroupement sur une seule expression est actuellement beaucoup plus optimisé que le regroupement sur plusieurs expressions.\n ",
- "languageDocumentationPopover.documentationESQL.stringOperators": "LIKE et RLIKE",
- "languageDocumentationPopover.documentationESQL.stringOperators.markdown": "### LIKE et RLIKE\nPour comparer des chaînes en utilisant des caractères génériques ou des expressions régulières, utilisez `LIKE` ou `RLIKE` :\n\nUtilisez `LIKE` pour faire correspondre des chaînes à l'aide de caractères génériques. Les caractères génériques suivants sont pris en charge :\n\n* `*` correspond à zéro caractère ou plus.\n* `?` correspond à un seul caractère.\n\n````\nFROM employees\n| WHERE first_name LIKE \"?b*\"\n| KEEP first_name, last_name\n````\n\nUtilisez `RLIKE` pour faire correspondre des chaînes à l'aide d'expressions régulières :\n\n````\nFROM employees\n| WHERE first_name RLIKE \".leja.*\"\n| KEEP first_name, last_name\n````\n ",
- "languageDocumentationPopover.documentationESQL.substring": "SUBSTRING",
- "languageDocumentationPopover.documentationESQL.substring.markdown": "\n\n ### SUBSTRING\n Renvoie la sous-chaîne d'une chaîne, délimitée en fonction d'une position de départ et d'une longueur facultative\n\n ````\n FROM employees\n | KEEP last_name\n | EVAL ln_sub = SUBSTRING(last_name, 1, 3)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.tan": "TAN",
- "languageDocumentationPopover.documentationESQL.tan.markdown": "\n\n ### TAN\n Renvoie la fonction trigonométrique Tangente d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL tan=TAN(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.tanh": "TANH",
- "languageDocumentationPopover.documentationESQL.tanh.markdown": "\n\n ### TANH\n Renvoie la fonction hyperbolique Tangente d'un angle.\n\n ````\n ROW a=1.8 \n | EVAL tanh=TANH(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.tau": "TAU",
- "languageDocumentationPopover.documentationESQL.tau.markdown": "\n\n ### TAU\n Renvoie le rapport entre la circonférence et le rayon d'un cercle.\n\n ````\n ROW TAU()\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_base64": "TO_BASE64",
- "languageDocumentationPopover.documentationESQL.to_base64.markdown": "\n\n ### TO_BASE64\n Encode une chaîne en chaîne base64.\n\n ````\n row a = \"elastic\" \n | eval e = to_base64(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_boolean": "TO_BOOLEAN",
- "languageDocumentationPopover.documentationESQL.to_boolean.markdown": "\n\n ### TO_BOOLEAN\n Convertit une valeur d'entrée en une valeur booléenne.\n Une chaîne de valeur *true* sera convertie, sans tenir compte de la casse, en une valeur booléenne *true*.\n Pour toute autre valeur, y compris une chaîne vide, la fonction renverra *false*.\n La valeur numérique *0* sera convertie en *false*, toute autre valeur sera convertie en *true*.\n\n ````\n ROW str = [\"true\", \"TRuE\", \"false\", \"\", \"yes\", \"1\"]\n | EVAL bool = TO_BOOLEAN(str)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_cartesianpoint": "TO_CARTESIANPOINT",
- "languageDocumentationPopover.documentationESQL.to_cartesianpoint.markdown": "\n\n ### TO_CARTESIANPOINT\n Convertit la valeur d'une entrée en une valeur `cartesian_point`.\n Une chaîne ne sera convertie que si elle respecte le format WKT Point.\n\n ````\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POINT(7580.93 2272.77)\"]\n | MV_EXPAND wkt\n | EVAL pt = TO_CARTESIANPOINT(wkt)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_cartesianshape": "TO_CARTESIANSHAPE",
- "languageDocumentationPopover.documentationESQL.to_cartesianshape.markdown": "\n\n ### TO_CARTESIANSHAPE\n Convertit une valeur d'entrée en une valeur `cartesian_shape`.\n Une chaîne ne sera convertie que si elle respecte le format WKT.\n\n ````\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POLYGON ((3339584.72 1118889.97, 4452779.63 4865942.27, 2226389.81 4865942.27, 1113194.90 2273030.92, 3339584.72 1118889.97))\"]\n | MV_EXPAND wkt\n | EVAL geom = TO_CARTESIANSHAPE(wkt)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_datetime": "TO_DATETIME",
- "languageDocumentationPopover.documentationESQL.to_datetime.markdown": "\n\n ### TO_DATETIME\n Convertit une valeur d'entrée en une valeur de date.\n Une chaîne ne sera convertie que si elle respecte le format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`.\n Pour convertir des dates vers d'autres formats, utilisez `DATE_PARSE`.\n\n ````\n ROW string = [\"1953-09-02T00:00:00.000Z\", \"1964-06-02T00:00:00.000Z\", \"1964-06-02 00:00:00\"]\n | EVAL datetime = TO_DATETIME(string)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_degrees": "TO_DEGREES",
- "languageDocumentationPopover.documentationESQL.to_degrees.markdown": "\n\n ### TO_DEGREES\n Convertit un nombre en radians en degrés.\n\n ````\n ROW rad = [1.57, 3.14, 4.71]\n | EVAL deg = TO_DEGREES(rad)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_double": "TO_DOUBLE",
- "languageDocumentationPopover.documentationESQL.to_double.markdown": "\n\n ### TO_DOUBLE\n Convertit une valeur d'entrée en une valeur double. Si le paramètre d'entrée est de type date,\n sa valeur sera interprétée en millisecondes depuis l'heure Unix,\n convertie en double. Le booléen *true* sera converti en double *1.0*, et *false* en *0.0*.\n\n ````\n ROW str1 = \"5.20128E11\", str2 = \"foo\"\n | EVAL dbl = TO_DOUBLE(\"520128000000\"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_geopoint": "TO_GEOPOINT",
- "languageDocumentationPopover.documentationESQL.to_geopoint.markdown": "\n\n ### TO_GEOPOINT\n Convertit une valeur d'entrée en une valeur `geo_point`.\n Une chaîne ne sera convertie que si elle respecte le format WKT Point.\n\n ````\n ROW wkt = \"POINT(42.97109630194 14.7552534413725)\"\n | EVAL pt = TO_GEOPOINT(wkt)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_geoshape": "TO_GEOSHAPE",
- "languageDocumentationPopover.documentationESQL.to_geoshape.markdown": "\n\n ### TO_GEOSHAPE\n Convertit une valeur d'entrée en une valeur `geo_shape`.\n Une chaîne ne sera convertie que si elle respecte le format WKT.\n\n ````\n ROW wkt = \"POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))\"\n | EVAL geom = TO_GEOSHAPE(wkt)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_integer": "TO_INTEGER",
- "languageDocumentationPopover.documentationESQL.to_integer.markdown": "\n\n ### TO_INTEGER\n Convertit une valeur d'entrée en une valeur entière.\n Si le paramètre d'entrée est de type date, sa valeur sera interprétée en millisecondes\n depuis l'heure Unix, convertie en entier.\n Le booléen *true* sera converti en entier *1*, et *false* en *0*.\n\n ````\n ROW long = [5013792, 2147483647, 501379200000]\n | EVAL int = TO_INTEGER(long)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_ip": "TO_IP",
- "languageDocumentationPopover.documentationESQL.to_ip.markdown": "\n\n ### TO_IP\n Convertit une chaîne d'entrée en valeur IP.\n\n ````\n ROW str1 = \"1.1.1.1\", str2 = \"foo\"\n | EVAL ip1 = TO_IP(str1), ip2 = TO_IP(str2)\n | WHERE CIDR_MATCH(ip1, \"1.0.0.0/8\")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_long": "TO_LONG",
- "languageDocumentationPopover.documentationESQL.to_long.markdown": "\n\n ### TO_LONG\n Convertit une valeur d'entrée en une valeur longue. Si le paramètre d'entrée est de type date,\n sa valeur sera interprétée en millisecondes depuis l'heure Unix, convertie en valeur longue.\n Le booléen *true* sera converti en valeur longue *1*, et *false* en *0*.\n\n ````\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_LONG(str1), long2 = TO_LONG(str2), long3 = TO_LONG(str3)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_lower": "TO_LOWER",
- "languageDocumentationPopover.documentationESQL.to_lower.markdown": "\n\n ### TO_LOWER\n Renvoie une nouvelle chaîne représentant la chaîne d'entrée convertie en minuscules.\n\n ````\n ROW message = \"Some Text\"\n | EVAL message_lower = TO_LOWER(message)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_radians": "TO_RADIANS",
- "languageDocumentationPopover.documentationESQL.to_radians.markdown": "\n\n ### TO_RADIANS\n Convertit un nombre en degrés en radians.\n\n ````\n ROW deg = [90.0, 180.0, 270.0]\n | EVAL rad = TO_RADIANS(deg)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_string": "TO_STRING",
- "languageDocumentationPopover.documentationESQL.to_string.markdown": "\n\n ### TO_STRING\n Convertit une valeur d'entrée en une chaîne.\n\n ````\n ROW a=10\n | EVAL j = TO_STRING(a)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_unsigned_long": "TO_UNSIGNED_LONG",
- "languageDocumentationPopover.documentationESQL.to_unsigned_long.markdown": "\n\n ### TO_UNSIGNED_LONG\n Convertit une valeur d'entrée en une valeur longue non signée. Si le paramètre d'entrée est de type date,\n sa valeur sera interprétée en millisecondes depuis l'heure Unix, convertie en valeur longue non signée.\n Le booléen *true* sera converti en valeur longue non signée *1*, et *false* en *0*.\n\n ````\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_UNSIGNED_LONG(str1), long2 = TO_ULONG(str2), long3 = TO_UL(str3)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_upper": "TO_UPPER",
- "languageDocumentationPopover.documentationESQL.to_upper.markdown": "\n\n ### TO_UPPER\n Renvoie une nouvelle chaîne représentant la chaîne d'entrée convertie en majuscules.\n\n ````\n ROW message = \"Some Text\"\n | EVAL message_upper = TO_UPPER(message)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.to_version": "TO_VERSION",
- "languageDocumentationPopover.documentationESQL.to_version.markdown": "\n\n ### TO_VERSION\n Convertit une chaîne d'entrée en une valeur de version.\n\n ````\n ROW v = TO_VERSION(\"1.2.3\")\n ````\n ",
- "languageDocumentationPopover.documentationESQL.trim": "TRIM",
- "languageDocumentationPopover.documentationESQL.trim.markdown": "\n\n ### TRIM\n Supprime les espaces de début et de fin d'une chaîne.\n\n ````\n ROW message = \" some text \", color = \" red \"\n | EVAL message = TRIM(message)\n | EVAL color = TRIM(color)\n ````\n ",
- "languageDocumentationPopover.documentationESQL.where": "WHERE",
- "languageDocumentationPopover.documentationESQL.where.markdown": "### WHERE\nUtilisez `WHERE` afin d'obtenir un tableau qui comprend toutes les lignes du tableau d'entrée pour lesquelles la condition fournie est évaluée à `true` :\n \n````\nFROM employees\n| KEEP first_name, last_name, still_hired\n| WHERE still_hired == true\n````\n\n#### Opérateurs\n\nPour obtenir un aperçu des opérateurs pris en charge, consultez la section **Opérateurs**.\n\n#### Fonctions\n`WHERE` prend en charge diverses fonctions de calcul des valeurs. Pour en savoir plus, consultez la section **Fonctions**.\n ",
"textBasedEditor.query.textBasedLanguagesEditor.EnableWordWrapLabel": "Ajouter des sauts de ligne aux barres verticales",
"textBasedEditor.query.textBasedLanguagesEditor.errorCount": "{count} {count, plural, one {erreur} other {erreurs}}",
"textBasedEditor.query.textBasedLanguagesEditor.errorsTitle": "Erreurs",
"textBasedEditor.query.textBasedLanguagesEditor.expandLabel": "Développer",
"textBasedEditor.query.textBasedLanguagesEditor.feedback": "Commentaires",
- "languageDocumentationPopover.documentationESQL.functions": "Fonctions",
- "languageDocumentationPopover.documentationESQL.functionsDocumentationESQLDescription": "Les fonctions sont compatibles avec \"ROW\" (Ligne), \"EVAL\" (Évaluation) et \"WHERE\" (Où).",
- "languageDocumentationPopover.documentationESQL.groupingFunctions": "Fonctions de groupage",
- "languageDocumentationPopover.documentationESQL.groupingFunctionsDocumentationESQLDescription": "Ces fonctions de regroupement peuvent être utilisées avec `STATS...BY` :",
"textBasedEditor.query.textBasedLanguagesEditor.hideQueriesLabel": "Masquer les recherches récentes",
"textBasedEditor.query.textBasedLanguagesEditor.lineCount": "{count} {count, plural, one {ligne} other {lignes}}",
"textBasedEditor.query.textBasedLanguagesEditor.lineNumber": "Ligne {lineNumber}",
- "languageDocumentationPopover.documentationESQL.operators": "Opérateurs",
- "languageDocumentationPopover.documentationESQL.operatorsDocumentationESQLDescription": "ES|QL est compatible avec les opérateurs suivants :",
- "languageDocumentationPopover.documentationESQL.processingCommands": "Traitement des commandes",
- "languageDocumentationPopover.documentationESQL.processingCommandsDescription": "Le traitement des commandes transforme un tableau des entrées par l'ajout, le retrait ou la modification des lignes et des colonnes. ES|QL est compatible avec le traitement des commandes suivant.",
"textBasedEditor.query.textBasedLanguagesEditor.querieshistory.error": "La requête a échouée",
"textBasedEditor.query.textBasedLanguagesEditor.querieshistory.success": "La requête a été exécuté avec succès",
"textBasedEditor.query.textBasedLanguagesEditor.querieshistoryCopy": "Copier la requête dans le presse-papier",
@@ -7339,7 +7340,6 @@
"textBasedEditor.query.textBasedLanguagesEditor.recentQueriesColumnLabel": "Recherches récentes",
"textBasedEditor.query.textBasedLanguagesEditor.runQuery": "Exécuter la requête",
"textBasedEditor.query.textBasedLanguagesEditor.showQueriesLabel": "Afficher les recherches récentes",
- "languageDocumentationPopover.documentationESQL.sourceCommands": "Commandes sources",
"textBasedEditor.query.textBasedLanguagesEditor.submitFeedback": "Soumettre un commentaire",
"textBasedEditor.query.textBasedLanguagesEditor.timeRanColumnLabel": "Temps exécuté",
"textBasedEditor.query.textBasedLanguagesEditor.timestampNotDetected": "@timestamp non trouvé",
diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json
index 5583eaa525584..0fd64bb60ca8e 100644
--- a/x-pack/plugins/translations/translations/ja-JP.json
+++ b/x-pack/plugins/translations/translations/ja-JP.json
@@ -5440,6 +5440,243 @@
"kibanaOverview.manageData.sectionTitle": "データを管理",
"kibanaOverview.more.title": "Elasticではさまざまなことが可能です",
"kibanaOverview.news.title": "新機能",
+ "languageDocumentationPopover.documentationESQL.abs": "ABS",
+ "languageDocumentationPopover.documentationESQL.abs.markdown": "\n\n ### ABS\n 絶対値を返します。\n\n ```\n ROW number = -1.0 \n | EVAL abs_number = ABS(number)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.acos": "ACOS",
+ "languageDocumentationPopover.documentationESQL.acos.markdown": "\n\n ### ACOS\n nのアークコサインをラジアンで表記された角度として返します。\n\n ```\n ROW a=.9\n | EVAL acos=ACOS(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.aggregationFunctions": "集約関数",
+ "languageDocumentationPopover.documentationESQL.aggregationFunctionsDocumentationESQLDescription": "これらの関数はSTATS...BYで使用できます。",
+ "languageDocumentationPopover.documentationESQL.asin": "ASIN",
+ "languageDocumentationPopover.documentationESQL.asin.markdown": "\n\n ### ASIN\n 入力\n 数値式のアークサインをラジアンで表記された角度として返します。\n\n ```\n ROW a=.9\n | EVAL asin=ASIN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.atan": "ATAN",
+ "languageDocumentationPopover.documentationESQL.atan.markdown": "\n\n ### ATAN\n 入力\n 数値式のアークタンジェントをラジアンで表記された角度として返します。\n\n ```\n ROW a=12.9\n | EVAL atan=ATAN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.atan2": "ATAN2",
+ "languageDocumentationPopover.documentationESQL.atan2.markdown": "\n\n ### ATAN2\n 直交平面上の原点から点(x , y)に向かう光線と正のx軸のなす角(ラジアン表記)。\n \n\n ```\n ROW y=12.9, x=.6\n | EVAL atan2=ATAN2(y, x)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.autoBucketFunction": "BUCKET",
+ "languageDocumentationPopover.documentationESQL.autoBucketFunction.markdown": "### バケット\n日時または数値入力から、値(バケット)のグループを作成します。バケットのサイズは直接指定するか、推奨される数と値の範囲に基づいて選択できます。\n\nBUCKETは次の2つのモードで動作します。\n\n1.バケットのサイズがバケット数の提案(4つのパラメーター)と範囲に基づいて計算される。\n2.バケットサイズが直接指定される(2つのパラメーター)。\n\n目標バケット数、開始日、終了日を使用すると、目標バケット数以下のバケットを生成するために適切なバケットサイズがBUCKETによって選択されます。\n\nたとえば、1年に最大20バケットをリクエストすると、データが1か月間隔で整理されます。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT hire_date\n```\n\n**注**:ここでは、正確な目標バケット数を指定するのではなく、目標バケット数を_上限_として範囲を指定します。\n\nBUCKETを集約と組み合わせ、ヒストグラムを作成できます。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_month = COUNT(*) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT month\n```\n\n**注**:BUCKETは、どのドキュメントにも一致しないバケットを作成しません。そのため、前の例では1985-03-01やその他の日付が抜けています。\n\nその他のバケットを要求すると、範囲が小さくなることがあります。たとえば、1年に最大100バケットをリクエストすると、1週間単位のバケットになります。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 100, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT week\n```\n\n**注**:AUTO_BUCKETは行をフィルタリングしません。指定された範囲のみを使用して、適切なバケットサイズを選択します。範囲外の値の行に対しては、範囲外のバケツに対応するバケット値を返します。行をフィルタリングするには、BUCKETとWHEREを組み合わせます。\n\n事前に任意のバケットサイズがわかっている場合は、2番目の引数として指定し、範囲を除外します。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 1 week)\n| SORT week\n```\n\n**注**:バケットサイズを2番目のパラメーターとして指定するときには、時間の期間または日付の期間を選択する必要があります。\n\nBUCKETは数値フィールドでも動作します。たとえば、給与ヒストグラムを作成します。\n\n```\nFROM employees\n| STATS COUNT(*) by bs = BUCKET(salary, 20, 25324, 74999)\n| SORT bs\n```\n\n日付範囲で意図的フィルタリングする前の例とは異なり、数値フィールドでフィルタリングすることはほとんどありません。最小値と最大値を別々に見つける必要があります。ES|QLにはそれを自動的に実行するための簡単な方法がありません。\n\n任意のバケットサイズが事前にわかっている場合は、範囲を省略できます。2番目の引数として指定します。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS c = COUNT(1) BY b = BUCKET(salary, 5000.)\n| SORT b\n```\n\n**注**:バケットサイズを2番目のパラメーターとして指定するときには、**浮動小数点数型**でなければなりません。\n\n次の例は、過去24時間の1時間単位のバケットを作成し、1時間当たりのイベント数を計算します。\n\n```\nFROM sample_data\n| WHERE @timestamp >= NOW() - 1 day and @timestamp < NOW()\n| STATS COUNT(*) BY bucket = BUCKET(@timestamp, 25, NOW() - 1 day, NOW())\n```\n\n次の例は、1985年の1か月単位のバケットを作成し、採用月別に平均給与を計算します。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS AVG(salary) BY bucket = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT bucket\n```\n\n集約部で関数が**グループ部で定義されたエイリアスによって参照されている**場合、またはまったく同じ式で呼び出されている場合、BUCKETは、 STATS … BY …コマンドの集約部とグループ部の両方で使用できます。\n\n例:\n\n```\nFROM employees\n| STATS s1 = b1 + 1, s2 = BUCKET(salary / 1000 + 999, 50.) + 2 BY b1 = BUCKET(salary / 100 + 99, 50.), b2 = BUCKET(salary / 1000 + 999, 50.)\n| SORT b1, b2\n| KEEP s1, b1, s2, b2\n```\n ",
+ "languageDocumentationPopover.documentationESQL.binaryOperators": "バイナリ演算子",
+ "languageDocumentationPopover.documentationESQL.binaryOperators.markdown": "### バイナリ演算子\n次のバイナリ比較演算子がサポートされています。\n\n* 等号:`==`\n* 不等号:`!=`\n* より小さい:`<`\n* 以下:`<=`\n* より大きい:`>`\n* 以上:`>=`\n* 加算:`+`\n* 減算:`-`\n* 乗算:`*`\n* 除算:`/`\n* 係数:`%`\n ",
+ "languageDocumentationPopover.documentationESQL.booleanOperators": "ブール演算子",
+ "languageDocumentationPopover.documentationESQL.booleanOperators.markdown": "### ブール演算子\n次のブール演算子がサポートされています。\n\n* `AND`\n* `OR`\n* `NOT`\n ",
+ "languageDocumentationPopover.documentationESQL.bucket": "BUCKET",
+ "languageDocumentationPopover.documentationESQL.bucket.markdown": "\n\n ### BUCKET\n 日時または数値入力から、値(バケット)のグループを作成します。\n バケットのサイズは直接指定するか、推奨される数と値の範囲に基づいて選択できます。\n\n ```\n FROM employees\n | WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n | STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n | SORT hire_date\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.case": "CASE",
+ "languageDocumentationPopover.documentationESQL.case.markdown": "\n\n ### CASE\n 条件と値のペアを指定できます。この関数は、trueと評価される\n 最初の条件に属する値を返します。\n\n 引数の数が奇数の場合、最後の引数は条件に一致しない場合に返されるデフォルト値になります。\n 引数の数が偶数で、\n 条件が一致しない場合、この関数はnullを返します。\n\n ```\n FROM employees\n | EVAL type = CASE(\n languages <= 1, \"monolingual\",\n languages <= 2, \"bilingual\",\n \"polyglot\")\n | KEEP emp_no, languages, type\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.castOperator": "Cast (::)",
+ "languageDocumentationPopover.documentationESQL.castOperator.markdown": "### CAST (`::`)\n::演算子はO_型変換関数に代わる便利な構文です。\n\n例:\n```\nROW ver = CONCAT((\"0\"::INT + 1)::STRING, \".2.3\")::VERSION\n```\n ",
+ "languageDocumentationPopover.documentationESQL.cbrt": "CBRT",
+ "languageDocumentationPopover.documentationESQL.cbrt.markdown": "\n\n ### CBRT\n 数値の立方根を返します。入力は任意の数値で、戻り値は常にdoubleです。\n 無限大の立方根はnullです。\n\n ```\n ROW d = 1000.0\n | EVAL c = cbrt(d)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.ceil": "CEIL",
+ "languageDocumentationPopover.documentationESQL.ceil.markdown": "\n\n ### CEIL\n 最も近い整数に数値を切り上げます。\n\n ```\n ROW a=1.8\n | EVAL a=CEIL(a)\n ```\n 注:これはlong(符号なしを含む)とintegerのnoopです。doubleの場合、JavaのMath.ceilと同様に、整数に最も近いdoubleの値を選びます。\n ",
+ "languageDocumentationPopover.documentationESQL.cidr_match": "CIDR_MATCH",
+ "languageDocumentationPopover.documentationESQL.cidr_match.markdown": "\n\n ### CIDR_MATCH\n 指定されたIPが指定されたCIDRブロックのいずれかに含まれていればtrueを返します。\n\n ```\n FROM hosts \n | WHERE CIDR_MATCH(ip1, \"127.0.0.2/32\", \"127.0.0.3/32\") \n | KEEP card, host, ip0, ip1\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.coalesce": "COALESCE",
+ "languageDocumentationPopover.documentationESQL.coalesce.markdown": "\n\n ### COALESCE\n nullでない最初の引数を返します。すべての引数がnullの場合はnullを返します。\n\n ```\n ROW a=null, b=\"b\"\n | EVAL COALESCE(a, b)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.commandsDescription": "通常、ソースコマンドはElasticsearchのデータを使ってテーブルを生成します。ES|QLは以下のソースコマンドをサポートしています。",
+ "languageDocumentationPopover.documentationESQL.concat": "CONCAT",
+ "languageDocumentationPopover.documentationESQL.concat.markdown": "\n\n ### CONCAT\n 2つ以上の文字列を連結します。\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fullname = CONCAT(first_name, \" \", last_name)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.cos": "COS",
+ "languageDocumentationPopover.documentationESQL.cos.markdown": "\n\n ### COS\n 角度の余弦を返します。\n\n ```\n ROW a=1.8 \n | EVAL cos=COS(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.cosh": "COSH",
+ "languageDocumentationPopover.documentationESQL.cosh.markdown": "\n\n ### COSH\n 角度の双曲余弦を返します。\n\n ```\n ROW a=1.8 \n | EVAL cosh=COSH(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_diff": "DATE_DIFF",
+ "languageDocumentationPopover.documentationESQL.date_diff.markdown": "\n\n ### DATE_DIFF\n startTimestampをendTimestampから減算し、unitの乗数の差を返します。\n startTimestampがendTimestampより後の場合は、負の値が返されます。\n\n ```\n ROW date1 = TO_DATETIME(\"2023-12-02T11:00:00.000Z\"), date2 = TO_DATETIME(\"2023-12-02T11:00:00.001Z\")\n | EVAL dd_ms = DATE_DIFF(\"microseconds\", date1, date2)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_extract": "DATE_EXTRACT",
+ "languageDocumentationPopover.documentationESQL.date_extract.markdown": "\n\n ### DATE_EXTRACT\n 年、月、日、時間など、日付の一部を抽出します。\n\n ```\n ROW date = DATE_PARSE(\"yyyy-MM-dd\", \"2022-05-06\")\n | EVAL year = DATE_EXTRACT(\"year\", date)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_format": "DATE_FORMAT",
+ "languageDocumentationPopover.documentationESQL.date_format.markdown": "\n\n ### DATE_FORMAT\n 指定した書式の日付の文字列表現を返します。\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL hired = DATE_FORMAT(\"YYYY-MM-dd\", hire_date)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_parse": "DATE_PARSE",
+ "languageDocumentationPopover.documentationESQL.date_parse.markdown": "\n\n ### DATE_PARSE\n 最初の引数で指定した形式を使用して、2番目の引数を解析することで、日付を返します。\n\n ```\n ROW date_string = \"2022-05-06\"\n | EVAL date = DATE_PARSE(\"yyyy-MM-dd\", date_string)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_trunc": "DATE_TRUNC",
+ "languageDocumentationPopover.documentationESQL.date_trunc.markdown": "\n\n ### DATE_TRUNC\n 最も近い区間まで日付を切り捨てます。\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL year_hired = DATE_TRUNC(1 year, hire_date)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.dissect": "DISSECT",
+ "languageDocumentationPopover.documentationESQL.dissect.markdown": "### DISSECT\nDISSECTは文字列から構造化データを取り出すことができます。DISSECTは文字列を区切り文字ベースのパターンと照合し、指定されたキーを列として抽出します。\n\ndissectパターンの構文については、[dissectプロセッサードキュメント](https://www.elastic.co/guide/en/elasticsearch/reference/current/dissect-processor.html)を参照してください。\n\n```\nROW a = \"1953-01-23T12:15:00Z - some text - 127.0.0.1\"\n| DISSECT a \"%'{Y}-%{M}-%{D}T%{h}:%{m}:%{s}Z - %{msg} - %{ip}'\"\n``` ",
+ "languageDocumentationPopover.documentationESQL.drop": "DROP",
+ "languageDocumentationPopover.documentationESQL.drop.markdown": "### DROP\nテーブルから列を削除するには、DROPを使用します。\n \n```\nFROM employees\n| DROP height\n```\n\n各列を名前で指定するのではなく、ワイルドカードを使って、パターンと一致する名前の列をすべて削除することができます。\n\n```\nFROM employees\n| DROP height*\n```\n ",
+ "languageDocumentationPopover.documentationESQL.e": "E",
+ "languageDocumentationPopover.documentationESQL.e.markdown": "\n\n ### E\n オイラー数を返します。\n\n ```\n ROW E()\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.ends_with": "ENDS_WITH",
+ "languageDocumentationPopover.documentationESQL.ends_with.markdown": "\n\n ### ENDS_WITH\n キーワード文字列が他の文字列で終わるかどうかを示すブール値を返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_E = ENDS_WITH(last_name, \"d\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.enrich": "ENRICH",
+ "languageDocumentationPopover.documentationESQL.enrich.markdown": "### ENRICH\nENRICH`を使用すると、既存のインデックスのデータを受信レコードに追加することができます。[インジェストエンリッチ](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html)と似ていますが、クエリー時に動作します。\n\n```\nROW language_code = \"1\"\n| ENRICH languages_policy\n```\n\nENRICHでは、[エンリッチポリシー](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-policy)を実行する必要があります。エンリッチポリシーは、一致フィールド (キーフィールド) とエンリッチフィールドのセットを定義します。\n\nENRICHは、一致フィールド値に基づいて、[エンリッチインデックス](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-index)のレコードを検索します。入力データセットの一致するキーは、ON を使用して定義できます。指定しない場合は、エンリッチポリシーで定義された一致フィールドと同じ名前のフィールドで一致が実行されます。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a\n```\n\nWITH , ...構文を使用して、結果に追加される属性(ポリシーでエンリッチフィールドとして定義された属性の間)を指定できます。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH language_name\n```\n\n属性の名前は、WITH new_name=を使用して変更できます。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH name = language_name\n```\n\nデフォルトでは、(WITHが定義されていない場合)、ENRICHはエンリッチポリシーで定義されたすべてのエンリッチフィールドを結果に追加します。\n\n名前の競合が発生した場合、新しく作成されたフィールドが既存のフィールドを上書きします。\n ",
+ "languageDocumentationPopover.documentationESQL.eval": "EVAL",
+ "languageDocumentationPopover.documentationESQL.eval.markdown": "### EVAL\nEVALでは、新しい列を追加できます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height_feet = height * 3.281, height_cm = height * 100\n```\n\n指定した列がすでに存在する場合、既存の列は削除され、新しい列がテーブルに追加されます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height = height * 3.281\n```\n\n#### 関数\nEVALは値を計算するためのさまざまな関数をサポートしています。関数をクリックすると詳細が表示されます。\n ",
+ "languageDocumentationPopover.documentationESQL.floor": "FLOOR",
+ "languageDocumentationPopover.documentationESQL.floor.markdown": "\n\n ### FLOOR\n 最も近い整数に数値を切り捨てます。\n\n ```\n ROW a=1.8\n | EVAL a=FLOOR(a)\n ```\n 注:これはlong(符号なしを含む)とintegerのnoopです。\n doubleの場合、Math.floorと同様に、整数に最も近いdoubleの値を選びます。\n \n ",
+ "languageDocumentationPopover.documentationESQL.from": "FROM",
+ "languageDocumentationPopover.documentationESQL.from_base64": "FROM_BASE64",
+ "languageDocumentationPopover.documentationESQL.from_base64.markdown": "\n\n ### FROM_BASE64\n base64文字列をデコードします。\n\n ```\n row a = \"ZWxhc3RpYw==\" \n | eval d = from_base64(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.from.markdown": "### FROM\nソースコマンドFROMは、データストリーム、インデックス、またはエイリアスから、最大10,000ドキュメントを含むテーブルを返します。結果のテーブルの各行はドキュメントを表します。各列はフィールドに対応し、そのフィールドの名前でアクセスできます。\n\n```\nFROM employees\n```\n\n[日付演算](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-date-math-index-names) を使用して、インデックス、エイリアス、データストリームを参照できます。これは時系列データの場合に便利です。\n\nカンマ区切りのリストまたはワイルドカードを使用して、複数のデータストリーム、インデックス、またはエイリアスをクエリーします。\n\n```\nFROM employees-00001,employees-*\n```\n\n#### メタデータ\n\nES|QLは以下のメタデータフィールドにアクセスできます。\n\n* `_index`:ドキュメントが属するインデックス。このフィールドはkeyword型です。\n* `_id`:ソースドキュメントのID。このフィールドはkeyword型です。### `_version`:ソースドキュメントのバージョン。フィールドの型はlongです。\n\nメタデータフィールドを有効にするには、METADATAディレクティブを使います。\n\n```\nFROM index [METADATA _index, _id]\n```\n\nメタデータフィールドは、データのソースがインデックスである場合にのみ使用できます。その結果、FROMはMETADATAディレクティブをサポートする唯一のソースコマンドです。\n\nこのフィールドが有効になると、他のインデックスフィールドと同様に、後続の処理コマンドで利用できるようになります。\n\n```\nFROM ul_logs, apps [METADATA _index, _version]\n| WHERE id IN (13, 14) AND _version == 1\n| EVAL key = CONCAT(_index, \"_\", TO_STR(id))\n| SORT id, _index\n| KEEP id, _index, _version, key\n```\n\nまた、インデックス・フィールドと同様に、一度集約が実行されると、グループ化フィールドとして使用されないかぎり、メタデータフィールドは後続のコマンドからはアクセスできなくなります。\n\n```\nFROM employees [METADATA _index, _id]\n| STATS max = MAX(emp_no) BY _index\n```\n ",
+ "languageDocumentationPopover.documentationESQL.functions": "関数",
+ "languageDocumentationPopover.documentationESQL.functionsDocumentationESQLDescription": "関数はROW、EVAL、WHEREでサポートされています。",
+ "languageDocumentationPopover.documentationESQL.greatest": "GREATEST",
+ "languageDocumentationPopover.documentationESQL.greatest.markdown": "\n\n ### GREATEST\n 多数の列から最大値を返します。これはMV_MAX\n と似ていますが、一度に複数の列に対して実行します。\n\n ```\n ROW a = 10, b = 20\n | EVAL g = GREATEST(a, b)\n ```\n 注:keywordまたはtextフィールドに対して実行すると、アルファベット順の最後の文字列を返します。boolean列に対して実行すると、値がtrueの場合にtrueを返します。\n ",
+ "languageDocumentationPopover.documentationESQL.grok": "GROK",
+ "languageDocumentationPopover.documentationESQL.grok.markdown": "### GROK\nGROKを使うと、文字列から構造化データを抽出できます。GROKは正規表現に基づいて文字列をパターンと一致させ、指定されたパターンを列として抽出します。\n\ngrokパターンの構文については、 [grokプロセッサードキュメント](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html)を参照してください。\n\n```\nROW a = \"12 15.5 15.6 true\"\n| GROK a \"%'{NUMBER:b:int}' %'{NUMBER:c:float}' %'{NUMBER:d:double}' %'{WORD:e:boolean}'\"\n```\n ",
+ "languageDocumentationPopover.documentationESQL.groupingFunctions": "グループ関数",
+ "languageDocumentationPopover.documentationESQL.groupingFunctionsDocumentationESQLDescription": "これらのグループ関数はSTATS...BYで使用できます。",
+ "languageDocumentationPopover.documentationESQL.inOperator": "IN",
+ "languageDocumentationPopover.documentationESQL.inOperator.markdown": "### IN\nIN演算子は、フィールドや式がリテラル、フィールド、式のリストの要素と等しいかどうかをテストすることができます。\n\n```\nROW a = 1, b = 4, c = 3\n| WHERE c-a IN (3, b / 2, a)\n```\n ",
+ "languageDocumentationPopover.documentationESQL.ip_prefix": "IP_PREFIX",
+ "languageDocumentationPopover.documentationESQL.ip_prefix.markdown": "\n\n ### IP_PREFIX\n IPを特定のプレフィックス長に切り詰めます。\n\n ```\n row ip4 = to_ip(\"1.2.3.4\"), ip6 = to_ip(\"fe80::cae2:65ff:fece:feb9\")\n | eval ip4_prefix = ip_prefix(ip4, 24, 0), ip6_prefix = ip_prefix(ip6, 0, 112);\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.keep": "KEEP",
+ "languageDocumentationPopover.documentationESQL.keep.markdown": "### KEEP\nKEEPコマンドは、返される列と、列が返される順序を指定することができます。\n\n返される列を制限するには、カンマで区切りの列名リストを使用します。列は指定された順序で返されます。\n \n```\nFROM employees\n| KEEP first_name, last_name, height\n```\n\n各列を名前で指定するのではなく、ワイルドカードを使って、パターンと一致する名前の列をすべて返すことができます。\n\n```\nFROM employees\n| KEEP h*\n```\n\nアスタリスクワイルドカード(*)は単独で、他の引数と一致しないすべての列に変換されます。このクエリーは、最初にhで始まる名前の列をすべて返し、その後にその他の列をすべて返します。\n\n```\nFROM employees\n| KEEP h*, *\n```\n ",
+ "languageDocumentationPopover.documentationESQL.least": "LEAST",
+ "languageDocumentationPopover.documentationESQL.least.markdown": "\n\n ### LEAST\n 多数の列から最小値を返します。これはMV_MINと似ていますが、一度に複数の列に対して実行します。\n\n ```\n ROW a = 10, b = 20\n | EVAL l = LEAST(a, b)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.left": "LEFT",
+ "languageDocumentationPopover.documentationESQL.left.markdown": "\n\n ### LEFT\n stringから左から順にlength文字を抜き出したサブ文字列を返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL left = LEFT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.length": "LENGTH",
+ "languageDocumentationPopover.documentationESQL.length.markdown": "\n\n ### LENGTH\n 文字列の文字数を返します。\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fn_length = LENGTH(first_name)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.limit": "LIMIT",
+ "languageDocumentationPopover.documentationESQL.limit.markdown": "### LIMIT\nLIMIT`処理コマンドは行数を制限することができます。\n \n```\nFROM employees\n| LIMIT 5\n```\n ",
+ "languageDocumentationPopover.documentationESQL.locate": "LOCATE",
+ "languageDocumentationPopover.documentationESQL.locate.markdown": "\n\n ### LOCATE\n 別の文字列内のキーワードサブ文字列の位置を示す整数を返します。\n\n ```\n row a = \"hello\"\n | eval a_ll = locate(a, \"ll\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.log": "LOG",
+ "languageDocumentationPopover.documentationESQL.log.markdown": "\n\n ### LOG\n 基数に対する値の対数を返します。入力は任意の数値で、戻り値は常にdoubleです。\n\n ゼロの対数、負数、1の基数はnullと警告を返します。\n\n ```\n ROW base = 2.0, value = 8.0\n | EVAL s = LOG(base, value)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.log10": "LOG10",
+ "languageDocumentationPopover.documentationESQL.log10.markdown": "\n\n ### LOG10\n 基数10に対する値の対数を返します。入力は任意の数値で、戻り値は常にdoubleです。\n\n 0の対数および負数はnullと警告を返します。\n\n ```\n ROW d = 1000.0 \n | EVAL s = LOG10(d)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.ltrim": "LTRIM",
+ "languageDocumentationPopover.documentationESQL.ltrim.markdown": "\n\n ### LTRIM\n 文字列から先頭の空白を取り除きます。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = LTRIM(message)\n | EVAL color = LTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.markdown": "## ES|QL\n\nES|QL(Elasticsearch クエリー言語)クエリーは、パイプ文字の|で区切られた一連のコマンドで構成されます。各クエリーは**ソースコマンド**で始まり、通常はElasticsearchのデータを使ってテーブルを生成します。\n\nソースコマンドには、1つ以上の**処理コマンド**を続けることができます。処理コマンドは、行や列を追加、削除、変更することで、前のコマンドの出力テーブルを変更することができます。\n\n```\nsource-command\n| processing-command1\n| processing-command2\n```\n\nクエリーの結果は、最終的な処理コマンドによって生成されるテーブルです。 \n ",
+ "languageDocumentationPopover.documentationESQL.mv_append": "MV_APPEND",
+ "languageDocumentationPopover.documentationESQL.mv_append.markdown": "\n\n ### MV_APPEND\n 2つの複数値フィールドの値を連結します\n\n ",
+ "languageDocumentationPopover.documentationESQL.mv_avg": "MV_AVG",
+ "languageDocumentationPopover.documentationESQL.mv_avg.markdown": "\n\n ### MV_AVG\n 複数値フィールドを、すべての値の平均を含む単一値フィールドに変換します。\n\n ```\n ROW a=[3, 5, 1, 6]\n | EVAL avg_a = MV_AVG(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_concat": "MV_CONCAT",
+ "languageDocumentationPopover.documentationESQL.mv_concat.markdown": "\n\n ### MV_CONCAT\n 複数値文字列式を、区切り文字で区切られたすべての値を連結した単一値列に変換します。\n\n ```\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL j = MV_CONCAT(a, \", \")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_count": "MV_COUNT",
+ "languageDocumentationPopover.documentationESQL.mv_count.markdown": "\n\n ### MV_COUNT\n 複数値式を、値の数をカウントする単一値列に変換します。\n\n ```\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL count_a = MV_COUNT(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_dedupe": "MV_DEDUPE",
+ "languageDocumentationPopover.documentationESQL.mv_dedupe.markdown": "\n\n ### MV_DEDUPE\n 複数値フィールドから重複する値を削除します。\n\n ```\n ROW a=[\"foo\", \"foo\", \"bar\", \"foo\"]\n | EVAL dedupe_a = MV_DEDUPE(a)\n ```\n 注:MV_DEDUPEは列の値をソートすることがありますが、常にソートするわけではありません。\n ",
+ "languageDocumentationPopover.documentationESQL.mv_first": "MV_FIRST",
+ "languageDocumentationPopover.documentationESQL.mv_first.markdown": "\n\n ### MV_FIRST\n \n 複数値式を、最初の値を含む単一値列に変換します。これは、SPLITなどの既知の順序で複数値列を発行する関数から読み取るときに役立ちます。\n \n\n 複数値フィールドが基本ストレージから読み取られる順序は保証されません。\n \n 通常は昇順ですが、必ずしもそうであるわけではありません。最小値が必要な場合は、MV_FIRSTの代わりに、MV_MINを使用します。\n MV_MINは、ソートされた値向けに最適化されているため、\n MV_FIRSTにパフォーマンスの利点はありません。\n\n ```\n ROW a=\"foo;bar;baz\"\n | EVAL first_a = MV_FIRST(SPLIT(a, \";\"))\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_last": "MV_LAST",
+ "languageDocumentationPopover.documentationESQL.mv_last.markdown": "\n\n ### MV_LAST\n \n 複数値式を、最後の値を含む単一値列に変換します。これは、SPLITなどの既知の順序で複数値列を発行する関数から読み取るときに役立ちます。\n \n\n 複数値フィールドが基本ストレージから読み取られる順序は保証されません。\n \n 通常は昇順ですが、必ずしもそうであるわけではありません。最大値が必要な場合は、MV_LASTの代わりに、MV_MAXを使用します。\n MV_MAXは、ソートされた値向けに最適化されているため、\n MV_LASTにパフォーマンスの利点はありません。\n\n ```\n ROW a=\"foo;bar;baz\"\n | EVAL last_a = MV_LAST(SPLIT(a, \";\"))\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_max": "MV_MAX",
+ "languageDocumentationPopover.documentationESQL.mv_max.markdown": "\n\n ### MV_MAX\n 複数値フィールドを、最大値を含む単一値フィールドに変換します。\n\n ```\n ROW a=[3, 5, 1]\n | EVAL max_a = MV_MAX(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_median": "MV_MEDIAN",
+ "languageDocumentationPopover.documentationESQL.mv_median.markdown": "\n\n ### MV_MEDIAN\n 複数値フィールドを、中央値を含む単一値フィールドに変換します。\n\n ```\n ROW a=[3, 5, 1]\n | EVAL median_a = MV_MEDIAN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_min": "MV_MIN",
+ "languageDocumentationPopover.documentationESQL.mv_min.markdown": "\n\n ### MV_MIN\n 複数値フィールドを、最小値を含む単一値フィールドに変換します。\n\n ```\n ROW a=[2, 1]\n | EVAL min_a = MV_MIN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_slice": "MV_SLICE",
+ "languageDocumentationPopover.documentationESQL.mv_slice.markdown": "\n\n ### MV_SLICE\n 開始インデックス値と終了インデックス値を使用して、複数値フィールドのサブセットを返します。\n\n ```\n row a = [1, 2, 2, 3]\n | eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_sort": "MV_SORT",
+ "languageDocumentationPopover.documentationESQL.mv_sort.markdown": "\n\n ### MV_SORT\n 辞書の順序で複数値フィールドを並べ替えます。\n\n ```\n ROW a = [4, 2, -3, 2]\n | EVAL sa = mv_sort(a), sd = mv_sort(a, \"DESC\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_sum": "MV_SUM",
+ "languageDocumentationPopover.documentationESQL.mv_sum.markdown": "\n\n ### MV_SUM\n 複数値フィールドを、すべての値の合計を含む単一値フィールドに変換します。\n\n ```\n ROW a=[3, 5, 6]\n | EVAL sum_a = MV_SUM(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_zip": "MV_ZIP",
+ "languageDocumentationPopover.documentationESQL.mv_zip.markdown": "\n\n ### MV_ZIP\n 値を結合する区切り文字を使用して、2つの複数値フィールドの値を結合します。\n\n ```\n ROW a = [\"x\", \"y\", \"z\"], b = [\"1\", \"2\"]\n | EVAL c = mv_zip(a, b, \"-\")\n | KEEP a, b, c\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mvExpand": "MV_EXPAND",
+ "languageDocumentationPopover.documentationESQL.mvExpand.markdown": "### MV_EXPAND\nMV_EXPAND処理コマンドは、複数値フィールドを値ごとに1行に展開し、他のフィールドを複製します。 \n```\nROW a=[1,2,3], b=\"b\", j=[\"a\",\"b\"]\n| MV_EXPAND a\n```\n ",
+ "languageDocumentationPopover.documentationESQL.now": "NOW",
+ "languageDocumentationPopover.documentationESQL.now.markdown": "\n\n ### NOW\n 現在の日付と時刻を返します。\n\n ```\n ROW current_date = NOW()\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.operators": "演算子",
+ "languageDocumentationPopover.documentationESQL.operatorsDocumentationESQLDescription": "ES|QLは以下の演算子をサポートしています。",
+ "languageDocumentationPopover.documentationESQL.pi": "PI",
+ "languageDocumentationPopover.documentationESQL.pi.markdown": "\n\n ### PI\n 円の円周と直径の比率であるPiを返します。\n\n ```\n ROW PI()\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.pow": "POW",
+ "languageDocumentationPopover.documentationESQL.pow.markdown": "\n\n ### POW\n exponentのべき乗にしたbaseの値を返します。\n\n ```\n ROW base = 2.0, exponent = 2\n | EVAL result = POW(base, exponent)\n ```\n 注:ここでは、倍精度浮動小数点数の結果でもオーバーフローする可能性があります。その場合は、NULLが返されます。\n ",
+ "languageDocumentationPopover.documentationESQL.predicates": "NULL値",
+ "languageDocumentationPopover.documentationESQL.predicates.markdown": "### NULL値\nNULLの比較には、IS NULLとIS NOT NULL述語を使います。\n\n```\nFROM employees\n| WHERE birth_date IS NULL\n| KEEP first_name, last_name\n| SORT first_name\n| LIMIT 3\n```\n\n```\nFROM employees\n| WHERE is_rehired IS NOT NULL\n| STATS count(emp_no)\n```\n ",
+ "languageDocumentationPopover.documentationESQL.processingCommands": "処理コマンド",
+ "languageDocumentationPopover.documentationESQL.processingCommandsDescription": "処理コマンドは、行や列を追加、削除、変更することによって入力テーブルを変更します。ES|QLは以下の処理コマンドをサポートしています。",
+ "languageDocumentationPopover.documentationESQL.rename": "RENAME",
+ "languageDocumentationPopover.documentationESQL.rename.markdown": "### RENAME\nRENAMEを使用して、次の構文で列の名前を変更します。\n\n```\nRENAME AS \n```\n\n例:\n\n```\nFROM employees\n| KEEP first_name, last_name, still_hired\n| RENAME still_hired AS employed\n```\n\n新しい名前の列がすでに存在する場合、その列は新しい列に置き換えられます。\n\n複数の列の名前を1つのRENAMEコマンドで変更することができます。\n\n```\nFROM employees\n| KEEP first_name, last_name\n| RENAME first_name AS fn, last_name AS ln\n```\n ",
+ "languageDocumentationPopover.documentationESQL.repeat": "REPEAT",
+ "languageDocumentationPopover.documentationESQL.repeat.markdown": "\n\n ### REPEAT\n 指定したnumberの回数、文字列stringとそれ自身を連結して構成された文字列を返します。\n\n ```\n ROW a = \"Hello!\"\n | EVAL triple_a = REPEAT(a, 3);\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.replace": "REPLACE",
+ "languageDocumentationPopover.documentationESQL.replace.markdown": "\n\n ### REPLACE\n \n この関数は、正規表現regexと置換文字列newStrの任意の一致を文字列strに代入します。\n\n ```\n ROW str = \"Hello World\"\n | EVAL str = REPLACE(str, \"World\", \"Universe\")\n | KEEP str\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.right": "RIGHT",
+ "languageDocumentationPopover.documentationESQL.right.markdown": "\n\n ### RIGHT\n strのうち右から数えてlength文字までのサブ文字列を返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL right = RIGHT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.round": "ROUND",
+ "languageDocumentationPopover.documentationESQL.round.markdown": "\n\n ### ROUND\n 数値を指定した小数点以下の桁数に丸めます。\n デフォルトは0で、最も近い整数を返します。\n 精度が負の場合、小数点以下の桁数に丸めます。\n \n\n ```\n FROM employees\n | KEEP first_name, last_name, height\n | EVAL height_ft = ROUND(height * 3.281, 1)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.row": "ROW",
+ "languageDocumentationPopover.documentationESQL.row.markdown": "### ROW\nROWソースコマンドは、指定した値の列を1つ以上含む行を作成します。これはテストの場合に便利です。\n \n```\nROW a = 1, b = \"two\", c = null\n```\n\n複数の値を含む列を作成するには角括弧を使用します。\n\n```\nROW a = [2, 1]\n```\n\nROWは関数の使用をサポートしています。\n\n```\nROW a = ROUND(1.23, 0)\n```\n ",
+ "languageDocumentationPopover.documentationESQL.rtrim": "RTRIM",
+ "languageDocumentationPopover.documentationESQL.rtrim.markdown": "\n\n ### RTRIM\n 文字列から末尾の空白を取り除きます。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = RTRIM(message)\n | EVAL color = RTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.show": "SHOW",
+ "languageDocumentationPopover.documentationESQL.show.markdown": "### SHOW\nSHOW
- ソースコマンドはデプロイとその能力に関する情報を返します。\n\n* デプロイのバージョン、ビルド日、ハッシュを返すには、SHOW INFOを使用します。\n* SHOW FUNCTIONSを使用すると、サポートされているすべての関数のリストと各関数の概要を返します。\n ",
+ "languageDocumentationPopover.documentationESQL.signum": "SIGNUM",
+ "languageDocumentationPopover.documentationESQL.signum.markdown": "\n\n ### SIGNUM\n 任意の数値の符号を返します。\n 負の数値の場合は-1を返します。0の場合は0を返します。正の数値の場合は1を返します。\n\n ```\n ROW d = 100.0\n | EVAL s = SIGNUM(d)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.sin": "SIN",
+ "languageDocumentationPopover.documentationESQL.sin.markdown": "\n\n ### SIN\n 角度の正弦三角関数を返します。\n\n ```\n ROW a=1.8 \n | EVAL sin=SIN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.sinh": "SINH",
+ "languageDocumentationPopover.documentationESQL.sinh.markdown": "\n\n ### SINH\n 角度の双曲線正弦を返します。\n\n ```\n ROW a=1.8 \n | EVAL sinh=SINH(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.sort": "SORT",
+ "languageDocumentationPopover.documentationESQL.sort.markdown": "### SORT\nSORTコマンドを使用すると、1つ以上のフィールドで行をソートすることができます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height\n```\n\nデフォルトのソート順は昇順です。ASCまたはDESCを使って明示的なソート順を設定します。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC\n```\n\n2つの行のソートキーが同じ場合、元の順序が保持されます。タイブレーカーとなるソート式を追加で指定できます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC, first_name ASC\n```\n\n#### null値\nデフォルトでは、null値は他のどの値よりも大きい値として扱われます。昇順のソートではnull値は最後にソートされ、降順のソートではnull値は最初にソートされます。NULLS FIRSTまたはNULLS LASTを指定することで変更できます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT first_name ASC NULLS FIRST\n```\n ",
+ "languageDocumentationPopover.documentationESQL.sourceCommands": "ソースコマンド",
+ "languageDocumentationPopover.documentationESQL.split": "SPLIT",
+ "languageDocumentationPopover.documentationESQL.split.markdown": "\n\n ### SPLIT\n 単一の値の文字列を複数の文字列に分割します。\n\n ```\n ROW words=\"foo;bar;baz;qux;quux;corge\"\n | EVAL word = SPLIT(words, \";\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.sqrt": "SQRT",
+ "languageDocumentationPopover.documentationESQL.sqrt.markdown": "\n\n ### SQRT\n 数値の平方根を返します。入力は任意の数値で、戻り値は常にdoubleです。\n 負数と無限大の平方根はnullです。\n\n ```\n ROW d = 100.0\n | EVAL s = SQRT(d)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_contains": "ST_CONTAINS",
+ "languageDocumentationPopover.documentationESQL.st_contains.markdown": "\n\n ### ST_CONTAINS\n 最初のジオメトリに2番目のジオメトリが含まれるかどうかを返します。\n これはST_WITHIN関数の逆関数です。\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_CONTAINS(city_boundary, TO_GEOSHAPE(\"POLYGON((109.35 18.3, 109.45 18.3, 109.45 18.4, 109.35 18.4, 109.35 18.3))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_disjoint": "ST_DISJOINT",
+ "languageDocumentationPopover.documentationESQL.st_disjoint.markdown": "\n\n ### ST_DISJOINT\n 2つのジオメトリまたはジオメトリ列が結合解除されているかどうかを返します。\n これはST_INTERSECTS関数の逆関数です。\n 数学的には次のようになります。ST_Disjoint(A, B) ⇔ A ⋂ B = ∅\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_DISJOINT(city_boundary, TO_GEOSHAPE(\"POLYGON((-10 -60, 120 -60, 120 60, -10 60, -10 -60))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_distance": "ST_DISTANCE",
+ "languageDocumentationPopover.documentationESQL.st_distance.markdown": "\n\n ### ST_DISTANCE\n 2点間の距離を計算します。\n デカルト幾何学の場合、これは元の座標と同じ単位でのピタゴラス距離です。\n 地理的幾何学では、これはメートル単位での円に沿った円周距離です。\n\n ```\n FROM airports\n | WHERE abbrev == \"CPH\"\n | EVAL distance = ST_DISTANCE(location, city_location)\n | KEEP abbrev, name, location, city_location, distance\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_intersects": "ST_INTERSECTS",
+ "languageDocumentationPopover.documentationESQL.st_intersects.markdown": "\n\n ### ST_INTERSECTS\n 2つのジオメトリが交差している場合はTrueを返します。\n 内部点を含め、共通の点がある場合は交差しています\n (線に沿った点または多角形内の点)。\n これはST_DISJOINT関数の逆関数です。\n 数学的には次のようになります。ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅\n\n ```\n FROM airports\n | WHERE ST_INTERSECTS(location, TO_GEOSHAPE(\"POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))\"))\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_within": "ST_WITHIN",
+ "languageDocumentationPopover.documentationESQL.st_within.markdown": "\n\n ### ST_WITHIN\n 最初のジオメトリが2番目のジオメトリ内にあるかどうかを返します。\n これはST_CONTAINS関数の逆関数です。\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_WITHIN(city_boundary, TO_GEOSHAPE(\"POLYGON((109.1 18.15, 109.6 18.15, 109.6 18.65, 109.1 18.65, 109.1 18.15))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_x": "ST_X",
+ "languageDocumentationPopover.documentationESQL.st_x.markdown": "\n\n ### ST_X\n 指定された点からx座標を抽出します。\n この点がgeo_pointタイプの場合は、longitude値を抽出するのと同じ結果になります。\n\n ```\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_y": "ST_Y",
+ "languageDocumentationPopover.documentationESQL.st_y.markdown": "\n\n ### ST_Y\n 指定された点からy座標を抽出します。\n この点がgeo_pointタイプの場合は、latitude値を抽出するのと同じ結果になります。\n\n ```\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.starts_with": "STARTS_WITH",
+ "languageDocumentationPopover.documentationESQL.starts_with.markdown": "\n\n ### STARTS_WITH\n キーワード文字列が他の文字列で始まるかどうかを示すブール値を返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_S = STARTS_WITH(last_name, \"B\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.statsby": "STATS ...BY",
+ "languageDocumentationPopover.documentationESQL.statsby.markdown": "### STATS ...BY\nSTATS ...BYを使用すると、共通の値に従って行をグループ化し、グループ化された行に対する1つ以上の集約値を計算します。\n\n**例**:\n\n```\nFROM employees\n| STATS count = COUNT(emp_no) BY languages\n| SORT languages\n```\n\nBYが省略された場合、出力テーブルには、データセット全体に適用された集約が正確に1行だけ含まれます。\n\n```\nFROM employees\n| STATS avg_lang = AVG(languages)\n```\n\n複数の値を計算することができます。\n\n```\nFROM employees\n| STATS avg_lang = AVG(languages), max_lang = MAX(languages)\n```\n\n複数の値でグループ化することも可能です(longおよびkeywordファミリーフィールドでのみサポート)。\n\n```\nFROM employees\n| EVAL hired = DATE_FORMAT(hire_date, \"YYYY\")\n| STATS avg_salary = AVG(salary) BY hired, languages.long\n| EVAL avg_salary = ROUND(avg_salary)\n| SORT hired, languages.long\n```\n\nSTATS ...BYで使用できる関数の一覧については、**集計関数**を参照してください。\n\n集計関数とグループ式の両方で他の関数を使用できます。これは、複数値列でSTATS...BYを使用するときに有用です。たとえば、平均給与変動を計算するには、まず、MV_AVGを使用して従業員ごとに複数の値の平均を求め、その結果にAVG関数を適用します。\n\n```\nFROM employees\n| STATS avg_salary_change = AVG(MV_AVG(salary_change))\n```\n\n式によるグループ化の例は、姓の最初の文字で従業員をグループ化することです。\n\n```\nFROM employees\n| STATS my_count = COUNT() BY LEFT(last_name, 1)\n| SORT `LEFT(last_name, 1)`\n```\n\n出力列名の指定は任意です。指定しない場合は、新しい列名が式と等しくなります。次のクエリーは列\"AVG(salary)\"を返します。\n\n```\nFROM employees\n| STATS AVG(salary)\n```\n\nこの名前には特殊文字が含まれているため、後続のコマンドで使用するときには、バッククオート(`)で囲む必要があります。\n\n```\nFROM employees\n| STATS AVG(salary)\n| EVAL avg_salary_rounded = ROUND(`AVG(salary)`)\n```\n\n**注**:グループなしのSTATSは、グループを追加するよりも大幅に高速です。\n\n**注**:単一式でのグループは、現在、複数式でのグループよりも大幅に最適化されています。\n ",
+ "languageDocumentationPopover.documentationESQL.stringOperators": "LIKEおよびRLIKE",
+ "languageDocumentationPopover.documentationESQL.stringOperators.markdown": "### LIKEおよびRLIKE\nワイルドカードや正規表現を使った文字列比較にはLIKEまたはRLIKEを使います。\n\nワイルドカードを使って文字列を一致させるにはLIKEを使います。次のワイルドカード文字がサポートされています。\n\n* `*`は0文字以上と一致します。\n* `?`は1文字と一致します。\n\n```\nFROM employees\n| WHERE first_name LIKE \"?b*\"\n| KEEP first_name, last_name\n```\n\n正規表現を使って文字列を一致させるには、RLIKEを使います。\n\n```\nFROM employees\n| WHERE first_name RLIKE \".leja.*\"\n| KEEP first_name, last_name\n```\n ",
+ "languageDocumentationPopover.documentationESQL.substring": "SUBSTRING",
+ "languageDocumentationPopover.documentationESQL.substring.markdown": "\n\n ### SUBSTRING\n 文字列のサブ文字列を、開始位置とオプションの長さで指定して返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_sub = SUBSTRING(last_name, 1, 3)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.tan": "TAN",
+ "languageDocumentationPopover.documentationESQL.tan.markdown": "\n\n ### TAN\n 角度の正接三角関数を返します。\n\n ```\n ROW a=1.8 \n | EVAL tan=TAN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.tanh": "TANH",
+ "languageDocumentationPopover.documentationESQL.tanh.markdown": "\n\n ### TANH\n 角度の正接双曲線関数を返します。\n\n ```\n ROW a=1.8 \n | EVAL tanh=TANH(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.tau": "TAU",
+ "languageDocumentationPopover.documentationESQL.tau.markdown": "\n\n ### TAU\n 円の円周と半径の比率を返します。\n\n ```\n ROW TAU()\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_base64": "TO_BASE64",
+ "languageDocumentationPopover.documentationESQL.to_base64.markdown": "\n\n ### TO_BASE64\n 文字列をbase64文字列にエンコードします。\n\n ```\n row a = \"elastic\" \n | eval e = to_base64(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_boolean": "TO_BOOLEAN",
+ "languageDocumentationPopover.documentationESQL.to_boolean.markdown": "\n\n ### TO_BOOLEAN\n 入力値をブール値に変換します。\n 文字列値*true*は、大文字小文字を区別せずにブール値*true*に変換されます。\n 空文字列を含むそれ以外の値に対しては、この関数は*false*を返します。\n 数値*0*は*false*に変換され、それ以外は*true*に変換されます。\n\n ```\n ROW str = [\"true\", \"TRuE\", \"false\", \"\", \"yes\", \"1\"]\n | EVAL bool = TO_BOOLEAN(str)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_cartesianpoint": "TO_CARTESIANPOINT",
+ "languageDocumentationPopover.documentationESQL.to_cartesianpoint.markdown": "\n\n ### TO_CARTESIANPOINT\n 入力値をcartesian_point値に変換します。\n 文字列は、WKT Point形式に従っている場合にのみ、正常に変換されます。\n\n ```\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POINT(7580.93 2272.77)\"]\n | MV_EXPAND wkt\n | EVAL pt = TO_CARTESIANPOINT(wkt)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_cartesianshape": "TO_CARTESIANSHAPE",
+ "languageDocumentationPopover.documentationESQL.to_cartesianshape.markdown": "\n\n ### TO_CARTESIANSHAPE\n 入力値をcartesian_shape値に変換します。\n 文字列は、WKT形式に従っている場合にのみ、正常に変換されます。\n\n ```\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POLYGON ((3339584.72 1118889.97, 4452779.63 4865942.27, 2226389.81 4865942.27, 1113194.90 2273030.92, 3339584.72 1118889.97))\"]\n | MV_EXPAND wkt\n | EVAL geom = TO_CARTESIANSHAPE(wkt)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_datetime": "TO_DATETIME",
+ "languageDocumentationPopover.documentationESQL.to_datetime.markdown": "\n\n ### TO_DATETIME\n 入力値を日付値に変換します。\n 文字列は、yyyy-MM-dd'T'HH:mm:ss.SSS'Z'の書式に従っている場合のみ変換が成功します。\n 日付を他の形式に変換するには、DATE_PARSEを使用します。\n\n ```\n ROW string = [\"1953-09-02T00:00:00.000Z\", \"1964-06-02T00:00:00.000Z\", \"1964-06-02 00:00:00\"]\n | EVAL datetime = TO_DATETIME(string)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_degrees": "TO_DEGREES",
+ "languageDocumentationPopover.documentationESQL.to_degrees.markdown": "\n\n ### TO_DEGREES\n ラジアンの数値を度数に変換します。\n\n ```\n ROW rad = [1.57, 3.14, 4.71]\n | EVAL deg = TO_DEGREES(rad)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_double": "TO_DOUBLE",
+ "languageDocumentationPopover.documentationESQL.to_double.markdown": "\n\n ### TO_DOUBLE\n 入力値をdouble値に変換します。入力パラメーターが日付型の場合、その値はUnixのエポックからのミリ秒として解釈され、doubleに変換されます。\n \n ブール値の*true*はdouble値の*1.0*に、*false*は*0.0*に変換されます。\n\n ```\n ROW str1 = \"5.20128E11\", str2 = \"foo\"\n | EVAL dbl = TO_DOUBLE(\"520128000000\"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_geopoint": "TO_GEOPOINT",
+ "languageDocumentationPopover.documentationESQL.to_geopoint.markdown": "\n\n ### TO_GEOPOINT\n 入力値をgeo_point値に変換します。\n 文字列は、WKT Point形式に従っている場合にのみ、正常に変換されます。\n\n ```\n ROW wkt = \"POINT(42.97109630194 14.7552534413725)\"\n | EVAL pt = TO_GEOPOINT(wkt)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_geoshape": "TO_GEOSHAPE",
+ "languageDocumentationPopover.documentationESQL.to_geoshape.markdown": "\n\n ### TO_GEOSHAPE\n 入力値をgeo_shape値に変換します。\n 文字列は、WKT形式に従っている場合にのみ、正常に変換されます。\n\n ```\n ROW wkt = \"POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))\"\n | EVAL geom = TO_GEOSHAPE(wkt)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_integer": "TO_INTEGER",
+ "languageDocumentationPopover.documentationESQL.to_integer.markdown": "\n\n ### TO_INTEGER\n 入力値を整数値に変換します。\n 入力パラメーターが日付型の場合、その値はUnixのエポックからのミリ秒として解釈され、整数に変換されます。\n \n ブール値*true*は整数*1*に、*false*は*0*に変換されます。\n\n ```\n ROW long = [5013792, 2147483647, 501379200000]\n | EVAL int = TO_INTEGER(long)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_ip": "TO_IP",
+ "languageDocumentationPopover.documentationESQL.to_ip.markdown": "\n\n ### TO_IP\n 入力文字列をIP値に変換します。\n\n ```\n ROW str1 = \"1.1.1.1\", str2 = \"foo\"\n | EVAL ip1 = TO_IP(str1), ip2 = TO_IP(str2)\n | WHERE CIDR_MATCH(ip1, \"1.0.0.0/8\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_long": "TO_LONG",
+ "languageDocumentationPopover.documentationESQL.to_long.markdown": "\n\n ### TO_LONG\n 入力値をlong値に変換します。入力パラメーターが日付型の場合、\n その値はUnixのエポックからのミリ秒として解釈され、longに変換されます。\n ブール値の*true*は*long*値の*1*に、*false*は*0*に変換されます。\n\n ```\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_LONG(str1), long2 = TO_LONG(str2), long3 = TO_LONG(str3)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_lower": "TO_LOWER",
+ "languageDocumentationPopover.documentationESQL.to_lower.markdown": "\n\n ### TO_LOWER\n 小文字に変換された入力文字列を表す新しい文字列を返します。\n\n ```\n ROW message = \"Some Text\"\n | EVAL message_lower = TO_LOWER(message)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_radians": "TO_RADIANS",
+ "languageDocumentationPopover.documentationESQL.to_radians.markdown": "\n\n ### TO_RADIANS\n 度数をラジアンに変換します。\n\n ```\n ROW deg = [90.0, 180.0, 270.0]\n | EVAL rad = TO_RADIANS(deg)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_string": "TO_STRING",
+ "languageDocumentationPopover.documentationESQL.to_string.markdown": "\n\n ### TO_STRING\n 入力値を文字列に変換します。\n\n ```\n ROW a=10\n | EVAL j = TO_STRING(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_unsigned_long": "TO_UNSIGNED_LONG",
+ "languageDocumentationPopover.documentationESQL.to_unsigned_long.markdown": "\n\n ### TO_UNSIGNED_LONG\n 入力値を符号なしlong値に変換します。入力パラメーターが日付型の場合、\n その値はUnixのエポックからのミリ秒として解釈され、符号なしlong値に変換されます。\n ブール値の*true*は符号なし*long*値の*1*に、*false*は*0*に変換されます。\n\n ```\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_UNSIGNED_LONG(str1), long2 = TO_ULONG(str2), long3 = TO_UL(str3)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_upper": "TO_UPPER",
+ "languageDocumentationPopover.documentationESQL.to_upper.markdown": "\n\n ### TO_UPPER\n 大文字に変換された入力文字列を表す新しい文字列を返します。\n\n ```\n ROW message = \"Some Text\"\n | EVAL message_upper = TO_UPPER(message)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_version": "TO_VERSION",
+ "languageDocumentationPopover.documentationESQL.to_version.markdown": "\n\n ### TO_VERSION\n 入力文字列をバージョン値に変換します。\n\n ```\n ROW v = TO_VERSION(\"1.2.3\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.trim": "TRIM",
+ "languageDocumentationPopover.documentationESQL.trim.markdown": "\n\n ### TRIM\n 文字列から先頭と末尾の空白を削除します。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = TRIM(message)\n | EVAL color = TRIM(color)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.where": "WHERE",
+ "languageDocumentationPopover.documentationESQL.where.markdown": "### WHERE\nWHEREを使用すると、入力テーブルから、指定した条件がtrueと評価されるすべての行を含むテーブルを作成します。\n \n```\nFROM employees\n| KEEP first_name, last_name, still_hired\n| WHERE still_hired == true\n```\n\n#### 演算子\n\nサポートされている演算子の概要については、**演算子**を参照してください。\n\n#### 関数\nWHEREは値を計算するためのさまざまな関数をサポートしています。**関数**をクリックすると詳細が表示されます。\n ",
"languageDocumentationPopover.documentationLinkLabel": "ドキュメント全体を表示",
"languageDocumentationPopover.header": "{language}リファレンス",
"languageDocumentationPopover.searchPlaceholder": "検索",
@@ -7077,253 +7314,17 @@
"telemetry.usageCollectionConstant": "使用状況の収集",
"telemetry.usageDataTitle": "使用状況の収集",
"textBasedEditor.query.textBasedLanguagesEditor.aborted": "リクエストが中断されました",
- "languageDocumentationPopover.documentationESQL.aggregationFunctions": "集約関数",
- "languageDocumentationPopover.documentationESQL.aggregationFunctionsDocumentationESQLDescription": "これらの関数はSTATS...BYで使用できます。",
"textBasedEditor.query.textBasedLanguagesEditor.cancel": "キャンセル",
"textBasedEditor.query.textBasedLanguagesEditor.collapseLabel": "縮小",
- "languageDocumentationPopover.documentationESQL.commandsDescription": "通常、ソースコマンドはElasticsearchのデータを使ってテーブルを生成します。ES|QLは以下のソースコマンドをサポートしています。",
"textBasedEditor.query.textBasedLanguagesEditor.disableWordWrapLabel": "パイプの改行を削除",
- "languageDocumentationPopover.documentationESQL.abs": "ABS",
- "languageDocumentationPopover.documentationESQL.abs.markdown": "\n\n ### ABS\n 絶対値を返します。\n\n ```\n ROW number = -1.0 \n | EVAL abs_number = ABS(number)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.acos": "ACOS",
- "languageDocumentationPopover.documentationESQL.acos.markdown": "\n\n ### ACOS\n nのアークコサインをラジアンで表記された角度として返します。\n\n ```\n ROW a=.9\n | EVAL acos=ACOS(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.asin": "ASIN",
- "languageDocumentationPopover.documentationESQL.asin.markdown": "\n\n ### ASIN\n 入力\n 数値式のアークサインをラジアンで表記された角度として返します。\n\n ```\n ROW a=.9\n | EVAL asin=ASIN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.atan": "ATAN",
- "languageDocumentationPopover.documentationESQL.atan.markdown": "\n\n ### ATAN\n 入力\n 数値式のアークタンジェントをラジアンで表記された角度として返します。\n\n ```\n ROW a=12.9\n | EVAL atan=ATAN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.atan2": "ATAN2",
- "languageDocumentationPopover.documentationESQL.atan2.markdown": "\n\n ### ATAN2\n 直交平面上の原点から点(x , y)に向かう光線と正のx軸のなす角(ラジアン表記)。\n \n\n ```\n ROW y=12.9, x=.6\n | EVAL atan2=ATAN2(y, x)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.autoBucketFunction": "BUCKET",
- "languageDocumentationPopover.documentationESQL.autoBucketFunction.markdown": "### バケット\n日時または数値入力から、値(バケット)のグループを作成します。バケットのサイズは直接指定するか、推奨される数と値の範囲に基づいて選択できます。\n\nBUCKETは次の2つのモードで動作します。\n\n1.バケットのサイズがバケット数の提案(4つのパラメーター)と範囲に基づいて計算される。\n2.バケットサイズが直接指定される(2つのパラメーター)。\n\n目標バケット数、開始日、終了日を使用すると、目標バケット数以下のバケットを生成するために適切なバケットサイズがBUCKETによって選択されます。\n\nたとえば、1年に最大20バケットをリクエストすると、データが1か月間隔で整理されます。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT hire_date\n```\n\n**注**:ここでは、正確な目標バケット数を指定するのではなく、目標バケット数を_上限_として範囲を指定します。\n\nBUCKETを集約と組み合わせ、ヒストグラムを作成できます。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_month = COUNT(*) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT month\n```\n\n**注**:BUCKETは、どのドキュメントにも一致しないバケットを作成しません。そのため、前の例では1985-03-01やその他の日付が抜けています。\n\nその他のバケットを要求すると、範囲が小さくなることがあります。たとえば、1年に最大100バケットをリクエストすると、1週間単位のバケットになります。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 100, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT week\n```\n\n**注**:AUTO_BUCKETは行をフィルタリングしません。指定された範囲のみを使用して、適切なバケットサイズを選択します。範囲外の値の行に対しては、範囲外のバケツに対応するバケット値を返します。行をフィルタリングするには、BUCKETとWHEREを組み合わせます。\n\n事前に任意のバケットサイズがわかっている場合は、2番目の引数として指定し、範囲を除外します。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 1 week)\n| SORT week\n```\n\n**注**:バケットサイズを2番目のパラメーターとして指定するときには、時間の期間または日付の期間を選択する必要があります。\n\nBUCKETは数値フィールドでも動作します。たとえば、給与ヒストグラムを作成します。\n\n```\nFROM employees\n| STATS COUNT(*) by bs = BUCKET(salary, 20, 25324, 74999)\n| SORT bs\n```\n\n日付範囲で意図的フィルタリングする前の例とは異なり、数値フィールドでフィルタリングすることはほとんどありません。最小値と最大値を別々に見つける必要があります。ES|QLにはそれを自動的に実行するための簡単な方法がありません。\n\n任意のバケットサイズが事前にわかっている場合は、範囲を省略できます。2番目の引数として指定します。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS c = COUNT(1) BY b = BUCKET(salary, 5000.)\n| SORT b\n```\n\n**注**:バケットサイズを2番目のパラメーターとして指定するときには、**浮動小数点数型**でなければなりません。\n\n次の例は、過去24時間の1時間単位のバケットを作成し、1時間当たりのイベント数を計算します。\n\n```\nFROM sample_data\n| WHERE @timestamp >= NOW() - 1 day and @timestamp < NOW()\n| STATS COUNT(*) BY bucket = BUCKET(@timestamp, 25, NOW() - 1 day, NOW())\n```\n\n次の例は、1985年の1か月単位のバケットを作成し、採用月別に平均給与を計算します。\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS AVG(salary) BY bucket = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT bucket\n```\n\n集約部で関数が**グループ部で定義されたエイリアスによって参照されている**場合、またはまったく同じ式で呼び出されている場合、BUCKETは、 STATS … BY …コマンドの集約部とグループ部の両方で使用できます。\n\n例:\n\n```\nFROM employees\n| STATS s1 = b1 + 1, s2 = BUCKET(salary / 1000 + 999, 50.) + 2 BY b1 = BUCKET(salary / 100 + 99, 50.), b2 = BUCKET(salary / 1000 + 999, 50.)\n| SORT b1, b2\n| KEEP s1, b1, s2, b2\n```\n ",
- "languageDocumentationPopover.documentationESQL.binaryOperators": "バイナリ演算子",
- "languageDocumentationPopover.documentationESQL.binaryOperators.markdown": "### バイナリ演算子\n次のバイナリ比較演算子がサポートされています。\n\n* 等号:`==`\n* 不等号:`!=`\n* より小さい:`<`\n* 以下:`<=`\n* より大きい:`>`\n* 以上:`>=`\n* 加算:`+`\n* 減算:`-`\n* 乗算:`*`\n* 除算:`/`\n* 係数:`%`\n ",
- "languageDocumentationPopover.documentationESQL.booleanOperators": "ブール演算子",
- "languageDocumentationPopover.documentationESQL.booleanOperators.markdown": "### ブール演算子\n次のブール演算子がサポートされています。\n\n* `AND`\n* `OR`\n* `NOT`\n ",
- "languageDocumentationPopover.documentationESQL.bucket": "BUCKET",
- "languageDocumentationPopover.documentationESQL.bucket.markdown": "\n\n ### BUCKET\n 日時または数値入力から、値(バケット)のグループを作成します。\n バケットのサイズは直接指定するか、推奨される数と値の範囲に基づいて選択できます。\n\n ```\n FROM employees\n | WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n | STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n | SORT hire_date\n ```\n ",
- "languageDocumentationPopover.documentationESQL.case": "CASE",
- "languageDocumentationPopover.documentationESQL.case.markdown": "\n\n ### CASE\n 条件と値のペアを指定できます。この関数は、trueと評価される\n 最初の条件に属する値を返します。\n\n 引数の数が奇数の場合、最後の引数は条件に一致しない場合に返されるデフォルト値になります。\n 引数の数が偶数で、\n 条件が一致しない場合、この関数はnullを返します。\n\n ```\n FROM employees\n | EVAL type = CASE(\n languages <= 1, \"monolingual\",\n languages <= 2, \"bilingual\",\n \"polyglot\")\n | KEEP emp_no, languages, type\n ```\n ",
- "languageDocumentationPopover.documentationESQL.castOperator": "Cast (::)",
- "languageDocumentationPopover.documentationESQL.castOperator.markdown": "### CAST (`::`)\n::演算子はO_型変換関数に代わる便利な構文です。\n\n例:\n```\nROW ver = CONCAT((\"0\"::INT + 1)::STRING, \".2.3\")::VERSION\n```\n ",
- "languageDocumentationPopover.documentationESQL.cbrt": "CBRT",
- "languageDocumentationPopover.documentationESQL.cbrt.markdown": "\n\n ### CBRT\n 数値の立方根を返します。入力は任意の数値で、戻り値は常にdoubleです。\n 無限大の立方根はnullです。\n\n ```\n ROW d = 1000.0\n | EVAL c = cbrt(d)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.ceil": "CEIL",
- "languageDocumentationPopover.documentationESQL.ceil.markdown": "\n\n ### CEIL\n 最も近い整数に数値を切り上げます。\n\n ```\n ROW a=1.8\n | EVAL a=CEIL(a)\n ```\n 注:これはlong(符号なしを含む)とintegerのnoopです。doubleの場合、JavaのMath.ceilと同様に、整数に最も近いdoubleの値を選びます。\n ",
- "languageDocumentationPopover.documentationESQL.cidr_match": "CIDR_MATCH",
- "languageDocumentationPopover.documentationESQL.cidr_match.markdown": "\n\n ### CIDR_MATCH\n 指定されたIPが指定されたCIDRブロックのいずれかに含まれていればtrueを返します。\n\n ```\n FROM hosts \n | WHERE CIDR_MATCH(ip1, \"127.0.0.2/32\", \"127.0.0.3/32\") \n | KEEP card, host, ip0, ip1\n ```\n ",
- "languageDocumentationPopover.documentationESQL.coalesce": "COALESCE",
- "languageDocumentationPopover.documentationESQL.coalesce.markdown": "\n\n ### COALESCE\n nullでない最初の引数を返します。すべての引数がnullの場合はnullを返します。\n\n ```\n ROW a=null, b=\"b\"\n | EVAL COALESCE(a, b)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.concat": "CONCAT",
- "languageDocumentationPopover.documentationESQL.concat.markdown": "\n\n ### CONCAT\n 2つ以上の文字列を連結します。\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fullname = CONCAT(first_name, \" \", last_name)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.cos": "COS",
- "languageDocumentationPopover.documentationESQL.cos.markdown": "\n\n ### COS\n 角度の余弦を返します。\n\n ```\n ROW a=1.8 \n | EVAL cos=COS(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.cosh": "COSH",
- "languageDocumentationPopover.documentationESQL.cosh.markdown": "\n\n ### COSH\n 角度の双曲余弦を返します。\n\n ```\n ROW a=1.8 \n | EVAL cosh=COSH(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_diff": "DATE_DIFF",
- "languageDocumentationPopover.documentationESQL.date_diff.markdown": "\n\n ### DATE_DIFF\n startTimestampをendTimestampから減算し、unitの乗数の差を返します。\n startTimestampがendTimestampより後の場合は、負の値が返されます。\n\n ```\n ROW date1 = TO_DATETIME(\"2023-12-02T11:00:00.000Z\"), date2 = TO_DATETIME(\"2023-12-02T11:00:00.001Z\")\n | EVAL dd_ms = DATE_DIFF(\"microseconds\", date1, date2)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_extract": "DATE_EXTRACT",
- "languageDocumentationPopover.documentationESQL.date_extract.markdown": "\n\n ### DATE_EXTRACT\n 年、月、日、時間など、日付の一部を抽出します。\n\n ```\n ROW date = DATE_PARSE(\"yyyy-MM-dd\", \"2022-05-06\")\n | EVAL year = DATE_EXTRACT(\"year\", date)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_format": "DATE_FORMAT",
- "languageDocumentationPopover.documentationESQL.date_format.markdown": "\n\n ### DATE_FORMAT\n 指定した書式の日付の文字列表現を返します。\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL hired = DATE_FORMAT(\"YYYY-MM-dd\", hire_date)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_parse": "DATE_PARSE",
- "languageDocumentationPopover.documentationESQL.date_parse.markdown": "\n\n ### DATE_PARSE\n 最初の引数で指定した形式を使用して、2番目の引数を解析することで、日付を返します。\n\n ```\n ROW date_string = \"2022-05-06\"\n | EVAL date = DATE_PARSE(\"yyyy-MM-dd\", date_string)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_trunc": "DATE_TRUNC",
- "languageDocumentationPopover.documentationESQL.date_trunc.markdown": "\n\n ### DATE_TRUNC\n 最も近い区間まで日付を切り捨てます。\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL year_hired = DATE_TRUNC(1 year, hire_date)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.dissect": "DISSECT",
- "languageDocumentationPopover.documentationESQL.dissect.markdown": "### DISSECT\nDISSECTは文字列から構造化データを取り出すことができます。DISSECTは文字列を区切り文字ベースのパターンと照合し、指定されたキーを列として抽出します。\n\ndissectパターンの構文については、[dissectプロセッサードキュメント](https://www.elastic.co/guide/en/elasticsearch/reference/current/dissect-processor.html)を参照してください。\n\n```\nROW a = \"1953-01-23T12:15:00Z - some text - 127.0.0.1\"\n| DISSECT a \"%'{Y}-%{M}-%{D}T%{h}:%{m}:%{s}Z - %{msg} - %{ip}'\"\n``` ",
- "languageDocumentationPopover.documentationESQL.drop": "DROP",
- "languageDocumentationPopover.documentationESQL.drop.markdown": "### DROP\nテーブルから列を削除するには、DROPを使用します。\n \n```\nFROM employees\n| DROP height\n```\n\n各列を名前で指定するのではなく、ワイルドカードを使って、パターンと一致する名前の列をすべて削除することができます。\n\n```\nFROM employees\n| DROP height*\n```\n ",
- "languageDocumentationPopover.documentationESQL.e": "E",
- "languageDocumentationPopover.documentationESQL.e.markdown": "\n\n ### E\n オイラー数を返します。\n\n ```\n ROW E()\n ```\n ",
- "languageDocumentationPopover.documentationESQL.ends_with": "ENDS_WITH",
- "languageDocumentationPopover.documentationESQL.ends_with.markdown": "\n\n ### ENDS_WITH\n キーワード文字列が他の文字列で終わるかどうかを示すブール値を返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_E = ENDS_WITH(last_name, \"d\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.enrich": "ENRICH",
- "languageDocumentationPopover.documentationESQL.enrich.markdown": "### ENRICH\nENRICH`を使用すると、既存のインデックスのデータを受信レコードに追加することができます。[インジェストエンリッチ](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html)と似ていますが、クエリー時に動作します。\n\n```\nROW language_code = \"1\"\n| ENRICH languages_policy\n```\n\nENRICHでは、[エンリッチポリシー](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-policy)を実行する必要があります。エンリッチポリシーは、一致フィールド (キーフィールド) とエンリッチフィールドのセットを定義します。\n\nENRICHは、一致フィールド値に基づいて、[エンリッチインデックス](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-index)のレコードを検索します。入力データセットの一致するキーは、ON を使用して定義できます。指定しない場合は、エンリッチポリシーで定義された一致フィールドと同じ名前のフィールドで一致が実行されます。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a\n```\n\nWITH , ...構文を使用して、結果に追加される属性(ポリシーでエンリッチフィールドとして定義された属性の間)を指定できます。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH language_name\n```\n\n属性の名前は、WITH new_name=を使用して変更できます。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH name = language_name\n```\n\nデフォルトでは、(WITHが定義されていない場合)、ENRICHはエンリッチポリシーで定義されたすべてのエンリッチフィールドを結果に追加します。\n\n名前の競合が発生した場合、新しく作成されたフィールドが既存のフィールドを上書きします。\n ",
- "languageDocumentationPopover.documentationESQL.eval": "EVAL",
- "languageDocumentationPopover.documentationESQL.eval.markdown": "### EVAL\nEVALでは、新しい列を追加できます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height_feet = height * 3.281, height_cm = height * 100\n```\n\n指定した列がすでに存在する場合、既存の列は削除され、新しい列がテーブルに追加されます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height = height * 3.281\n```\n\n#### 関数\nEVALは値を計算するためのさまざまな関数をサポートしています。関数をクリックすると詳細が表示されます。\n ",
- "languageDocumentationPopover.documentationESQL.floor": "FLOOR",
- "languageDocumentationPopover.documentationESQL.floor.markdown": "\n\n ### FLOOR\n 最も近い整数に数値を切り捨てます。\n\n ```\n ROW a=1.8\n | EVAL a=FLOOR(a)\n ```\n 注:これはlong(符号なしを含む)とintegerのnoopです。\n doubleの場合、Math.floorと同様に、整数に最も近いdoubleの値を選びます。\n \n ",
- "languageDocumentationPopover.documentationESQL.from": "FROM",
- "languageDocumentationPopover.documentationESQL.from_base64": "FROM_BASE64",
- "languageDocumentationPopover.documentationESQL.from_base64.markdown": "\n\n ### FROM_BASE64\n base64文字列をデコードします。\n\n ```\n row a = \"ZWxhc3RpYw==\" \n | eval d = from_base64(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.from.markdown": "### FROM\nソースコマンドFROMは、データストリーム、インデックス、またはエイリアスから、最大10,000ドキュメントを含むテーブルを返します。結果のテーブルの各行はドキュメントを表します。各列はフィールドに対応し、そのフィールドの名前でアクセスできます。\n\n```\nFROM employees\n```\n\n[日付演算](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-date-math-index-names) を使用して、インデックス、エイリアス、データストリームを参照できます。これは時系列データの場合に便利です。\n\nカンマ区切りのリストまたはワイルドカードを使用して、複数のデータストリーム、インデックス、またはエイリアスをクエリーします。\n\n```\nFROM employees-00001,employees-*\n```\n\n#### メタデータ\n\nES|QLは以下のメタデータフィールドにアクセスできます。\n\n* `_index`:ドキュメントが属するインデックス。このフィールドはkeyword型です。\n* `_id`:ソースドキュメントのID。このフィールドはkeyword型です。### `_version`:ソースドキュメントのバージョン。フィールドの型はlongです。\n\nメタデータフィールドを有効にするには、METADATAディレクティブを使います。\n\n```\nFROM index [METADATA _index, _id]\n```\n\nメタデータフィールドは、データのソースがインデックスである場合にのみ使用できます。その結果、FROMはMETADATAディレクティブをサポートする唯一のソースコマンドです。\n\nこのフィールドが有効になると、他のインデックスフィールドと同様に、後続の処理コマンドで利用できるようになります。\n\n```\nFROM ul_logs, apps [METADATA _index, _version]\n| WHERE id IN (13, 14) AND _version == 1\n| EVAL key = CONCAT(_index, \"_\", TO_STR(id))\n| SORT id, _index\n| KEEP id, _index, _version, key\n```\n\nまた、インデックス・フィールドと同様に、一度集約が実行されると、グループ化フィールドとして使用されないかぎり、メタデータフィールドは後続のコマンドからはアクセスできなくなります。\n\n```\nFROM employees [METADATA _index, _id]\n| STATS max = MAX(emp_no) BY _index\n```\n ",
- "languageDocumentationPopover.documentationESQL.greatest": "GREATEST",
- "languageDocumentationPopover.documentationESQL.greatest.markdown": "\n\n ### GREATEST\n 多数の列から最大値を返します。これはMV_MAX\n と似ていますが、一度に複数の列に対して実行します。\n\n ```\n ROW a = 10, b = 20\n | EVAL g = GREATEST(a, b)\n ```\n 注:keywordまたはtextフィールドに対して実行すると、アルファベット順の最後の文字列を返します。boolean列に対して実行すると、値がtrueの場合にtrueを返します。\n ",
- "languageDocumentationPopover.documentationESQL.grok": "GROK",
- "languageDocumentationPopover.documentationESQL.grok.markdown": "### GROK\nGROKを使うと、文字列から構造化データを抽出できます。GROKは正規表現に基づいて文字列をパターンと一致させ、指定されたパターンを列として抽出します。\n\ngrokパターンの構文については、 [grokプロセッサードキュメント](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html)を参照してください。\n\n```\nROW a = \"12 15.5 15.6 true\"\n| GROK a \"%'{NUMBER:b:int}' %'{NUMBER:c:float}' %'{NUMBER:d:double}' %'{WORD:e:boolean}'\"\n```\n ",
- "languageDocumentationPopover.documentationESQL.inOperator": "IN",
- "languageDocumentationPopover.documentationESQL.inOperator.markdown": "### IN\nIN演算子は、フィールドや式がリテラル、フィールド、式のリストの要素と等しいかどうかをテストすることができます。\n\n```\nROW a = 1, b = 4, c = 3\n| WHERE c-a IN (3, b / 2, a)\n```\n ",
- "languageDocumentationPopover.documentationESQL.ip_prefix": "IP_PREFIX",
- "languageDocumentationPopover.documentationESQL.ip_prefix.markdown": "\n\n ### IP_PREFIX\n IPを特定のプレフィックス長に切り詰めます。\n\n ```\n row ip4 = to_ip(\"1.2.3.4\"), ip6 = to_ip(\"fe80::cae2:65ff:fece:feb9\")\n | eval ip4_prefix = ip_prefix(ip4, 24, 0), ip6_prefix = ip_prefix(ip6, 0, 112);\n ```\n ",
- "languageDocumentationPopover.documentationESQL.keep": "KEEP",
- "languageDocumentationPopover.documentationESQL.keep.markdown": "### KEEP\nKEEPコマンドは、返される列と、列が返される順序を指定することができます。\n\n返される列を制限するには、カンマで区切りの列名リストを使用します。列は指定された順序で返されます。\n \n```\nFROM employees\n| KEEP first_name, last_name, height\n```\n\n各列を名前で指定するのではなく、ワイルドカードを使って、パターンと一致する名前の列をすべて返すことができます。\n\n```\nFROM employees\n| KEEP h*\n```\n\nアスタリスクワイルドカード(*)は単独で、他の引数と一致しないすべての列に変換されます。このクエリーは、最初にhで始まる名前の列をすべて返し、その後にその他の列をすべて返します。\n\n```\nFROM employees\n| KEEP h*, *\n```\n ",
- "languageDocumentationPopover.documentationESQL.least": "LEAST",
- "languageDocumentationPopover.documentationESQL.least.markdown": "\n\n ### LEAST\n 多数の列から最小値を返します。これはMV_MINと似ていますが、一度に複数の列に対して実行します。\n\n ```\n ROW a = 10, b = 20\n | EVAL l = LEAST(a, b)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.left": "LEFT",
- "languageDocumentationPopover.documentationESQL.left.markdown": "\n\n ### LEFT\n stringから左から順にlength文字を抜き出したサブ文字列を返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL left = LEFT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ```\n ",
- "languageDocumentationPopover.documentationESQL.length": "LENGTH",
- "languageDocumentationPopover.documentationESQL.length.markdown": "\n\n ### LENGTH\n 文字列の文字数を返します。\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fn_length = LENGTH(first_name)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.limit": "LIMIT",
- "languageDocumentationPopover.documentationESQL.limit.markdown": "### LIMIT\nLIMIT`処理コマンドは行数を制限することができます。\n \n```\nFROM employees\n| LIMIT 5\n```\n ",
- "languageDocumentationPopover.documentationESQL.locate": "LOCATE",
- "languageDocumentationPopover.documentationESQL.locate.markdown": "\n\n ### LOCATE\n 別の文字列内のキーワードサブ文字列の位置を示す整数を返します。\n\n ```\n row a = \"hello\"\n | eval a_ll = locate(a, \"ll\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.log": "LOG",
- "languageDocumentationPopover.documentationESQL.log.markdown": "\n\n ### LOG\n 基数に対する値の対数を返します。入力は任意の数値で、戻り値は常にdoubleです。\n\n ゼロの対数、負数、1の基数はnullと警告を返します。\n\n ```\n ROW base = 2.0, value = 8.0\n | EVAL s = LOG(base, value)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.log10": "LOG10",
- "languageDocumentationPopover.documentationESQL.log10.markdown": "\n\n ### LOG10\n 基数10に対する値の対数を返します。入力は任意の数値で、戻り値は常にdoubleです。\n\n 0の対数および負数はnullと警告を返します。\n\n ```\n ROW d = 1000.0 \n | EVAL s = LOG10(d)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.ltrim": "LTRIM",
- "languageDocumentationPopover.documentationESQL.ltrim.markdown": "\n\n ### LTRIM\n 文字列から先頭の空白を取り除きます。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = LTRIM(message)\n | EVAL color = LTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.markdown": "## ES|QL\n\nES|QL(Elasticsearch クエリー言語)クエリーは、パイプ文字の|で区切られた一連のコマンドで構成されます。各クエリーは**ソースコマンド**で始まり、通常はElasticsearchのデータを使ってテーブルを生成します。\n\nソースコマンドには、1つ以上の**処理コマンド**を続けることができます。処理コマンドは、行や列を追加、削除、変更することで、前のコマンドの出力テーブルを変更することができます。\n\n```\nsource-command\n| processing-command1\n| processing-command2\n```\n\nクエリーの結果は、最終的な処理コマンドによって生成されるテーブルです。 \n ",
- "languageDocumentationPopover.documentationESQL.mv_append": "MV_APPEND",
- "languageDocumentationPopover.documentationESQL.mv_append.markdown": "\n\n ### MV_APPEND\n 2つの複数値フィールドの値を連結します\n\n ",
- "languageDocumentationPopover.documentationESQL.mv_avg": "MV_AVG",
- "languageDocumentationPopover.documentationESQL.mv_avg.markdown": "\n\n ### MV_AVG\n 複数値フィールドを、すべての値の平均を含む単一値フィールドに変換します。\n\n ```\n ROW a=[3, 5, 1, 6]\n | EVAL avg_a = MV_AVG(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_concat": "MV_CONCAT",
- "languageDocumentationPopover.documentationESQL.mv_concat.markdown": "\n\n ### MV_CONCAT\n 複数値文字列式を、区切り文字で区切られたすべての値を連結した単一値列に変換します。\n\n ```\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL j = MV_CONCAT(a, \", \")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_count": "MV_COUNT",
- "languageDocumentationPopover.documentationESQL.mv_count.markdown": "\n\n ### MV_COUNT\n 複数値式を、値の数をカウントする単一値列に変換します。\n\n ```\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL count_a = MV_COUNT(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_dedupe": "MV_DEDUPE",
- "languageDocumentationPopover.documentationESQL.mv_dedupe.markdown": "\n\n ### MV_DEDUPE\n 複数値フィールドから重複する値を削除します。\n\n ```\n ROW a=[\"foo\", \"foo\", \"bar\", \"foo\"]\n | EVAL dedupe_a = MV_DEDUPE(a)\n ```\n 注:MV_DEDUPEは列の値をソートすることがありますが、常にソートするわけではありません。\n ",
- "languageDocumentationPopover.documentationESQL.mv_first": "MV_FIRST",
- "languageDocumentationPopover.documentationESQL.mv_first.markdown": "\n\n ### MV_FIRST\n \n 複数値式を、最初の値を含む単一値列に変換します。これは、SPLITなどの既知の順序で複数値列を発行する関数から読み取るときに役立ちます。\n \n\n 複数値フィールドが基本ストレージから読み取られる順序は保証されません。\n \n 通常は昇順ですが、必ずしもそうであるわけではありません。最小値が必要な場合は、MV_FIRSTの代わりに、MV_MINを使用します。\n MV_MINは、ソートされた値向けに最適化されているため、\n MV_FIRSTにパフォーマンスの利点はありません。\n\n ```\n ROW a=\"foo;bar;baz\"\n | EVAL first_a = MV_FIRST(SPLIT(a, \";\"))\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_last": "MV_LAST",
- "languageDocumentationPopover.documentationESQL.mv_last.markdown": "\n\n ### MV_LAST\n \n 複数値式を、最後の値を含む単一値列に変換します。これは、SPLITなどの既知の順序で複数値列を発行する関数から読み取るときに役立ちます。\n \n\n 複数値フィールドが基本ストレージから読み取られる順序は保証されません。\n \n 通常は昇順ですが、必ずしもそうであるわけではありません。最大値が必要な場合は、MV_LASTの代わりに、MV_MAXを使用します。\n MV_MAXは、ソートされた値向けに最適化されているため、\n MV_LASTにパフォーマンスの利点はありません。\n\n ```\n ROW a=\"foo;bar;baz\"\n | EVAL last_a = MV_LAST(SPLIT(a, \";\"))\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_max": "MV_MAX",
- "languageDocumentationPopover.documentationESQL.mv_max.markdown": "\n\n ### MV_MAX\n 複数値フィールドを、最大値を含む単一値フィールドに変換します。\n\n ```\n ROW a=[3, 5, 1]\n | EVAL max_a = MV_MAX(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_median": "MV_MEDIAN",
- "languageDocumentationPopover.documentationESQL.mv_median.markdown": "\n\n ### MV_MEDIAN\n 複数値フィールドを、中央値を含む単一値フィールドに変換します。\n\n ```\n ROW a=[3, 5, 1]\n | EVAL median_a = MV_MEDIAN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_min": "MV_MIN",
- "languageDocumentationPopover.documentationESQL.mv_min.markdown": "\n\n ### MV_MIN\n 複数値フィールドを、最小値を含む単一値フィールドに変換します。\n\n ```\n ROW a=[2, 1]\n | EVAL min_a = MV_MIN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_slice": "MV_SLICE",
- "languageDocumentationPopover.documentationESQL.mv_slice.markdown": "\n\n ### MV_SLICE\n 開始インデックス値と終了インデックス値を使用して、複数値フィールドのサブセットを返します。\n\n ```\n row a = [1, 2, 2, 3]\n | eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_sort": "MV_SORT",
- "languageDocumentationPopover.documentationESQL.mv_sort.markdown": "\n\n ### MV_SORT\n 辞書の順序で複数値フィールドを並べ替えます。\n\n ```\n ROW a = [4, 2, -3, 2]\n | EVAL sa = mv_sort(a), sd = mv_sort(a, \"DESC\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_sum": "MV_SUM",
- "languageDocumentationPopover.documentationESQL.mv_sum.markdown": "\n\n ### MV_SUM\n 複数値フィールドを、すべての値の合計を含む単一値フィールドに変換します。\n\n ```\n ROW a=[3, 5, 6]\n | EVAL sum_a = MV_SUM(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_zip": "MV_ZIP",
- "languageDocumentationPopover.documentationESQL.mv_zip.markdown": "\n\n ### MV_ZIP\n 値を結合する区切り文字を使用して、2つの複数値フィールドの値を結合します。\n\n ```\n ROW a = [\"x\", \"y\", \"z\"], b = [\"1\", \"2\"]\n | EVAL c = mv_zip(a, b, \"-\")\n | KEEP a, b, c\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mvExpand": "MV_EXPAND",
- "languageDocumentationPopover.documentationESQL.mvExpand.markdown": "### MV_EXPAND\nMV_EXPAND処理コマンドは、複数値フィールドを値ごとに1行に展開し、他のフィールドを複製します。 \n```\nROW a=[1,2,3], b=\"b\", j=[\"a\",\"b\"]\n| MV_EXPAND a\n```\n ",
- "languageDocumentationPopover.documentationESQL.now": "NOW",
- "languageDocumentationPopover.documentationESQL.now.markdown": "\n\n ### NOW\n 現在の日付と時刻を返します。\n\n ```\n ROW current_date = NOW()\n ```\n ",
- "languageDocumentationPopover.documentationESQL.pi": "PI",
- "languageDocumentationPopover.documentationESQL.pi.markdown": "\n\n ### PI\n 円の円周と直径の比率であるPiを返します。\n\n ```\n ROW PI()\n ```\n ",
- "languageDocumentationPopover.documentationESQL.pow": "POW",
- "languageDocumentationPopover.documentationESQL.pow.markdown": "\n\n ### POW\n exponentのべき乗にしたbaseの値を返します。\n\n ```\n ROW base = 2.0, exponent = 2\n | EVAL result = POW(base, exponent)\n ```\n 注:ここでは、倍精度浮動小数点数の結果でもオーバーフローする可能性があります。その場合は、NULLが返されます。\n ",
- "languageDocumentationPopover.documentationESQL.predicates": "NULL値",
- "languageDocumentationPopover.documentationESQL.predicates.markdown": "### NULL値\nNULLの比較には、IS NULLとIS NOT NULL述語を使います。\n\n```\nFROM employees\n| WHERE birth_date IS NULL\n| KEEP first_name, last_name\n| SORT first_name\n| LIMIT 3\n```\n\n```\nFROM employees\n| WHERE is_rehired IS NOT NULL\n| STATS count(emp_no)\n```\n ",
- "languageDocumentationPopover.documentationESQL.rename": "RENAME",
- "languageDocumentationPopover.documentationESQL.rename.markdown": "### RENAME\nRENAMEを使用して、次の構文で列の名前を変更します。\n\n```\nRENAME AS \n```\n\n例:\n\n```\nFROM employees\n| KEEP first_name, last_name, still_hired\n| RENAME still_hired AS employed\n```\n\n新しい名前の列がすでに存在する場合、その列は新しい列に置き換えられます。\n\n複数の列の名前を1つのRENAMEコマンドで変更することができます。\n\n```\nFROM employees\n| KEEP first_name, last_name\n| RENAME first_name AS fn, last_name AS ln\n```\n ",
- "languageDocumentationPopover.documentationESQL.repeat": "REPEAT",
- "languageDocumentationPopover.documentationESQL.repeat.markdown": "\n\n ### REPEAT\n 指定したnumberの回数、文字列stringとそれ自身を連結して構成された文字列を返します。\n\n ```\n ROW a = \"Hello!\"\n | EVAL triple_a = REPEAT(a, 3);\n ```\n ",
- "languageDocumentationPopover.documentationESQL.replace": "REPLACE",
- "languageDocumentationPopover.documentationESQL.replace.markdown": "\n\n ### REPLACE\n \n この関数は、正規表現regexと置換文字列newStrの任意の一致を文字列strに代入します。\n\n ```\n ROW str = \"Hello World\"\n | EVAL str = REPLACE(str, \"World\", \"Universe\")\n | KEEP str\n ```\n ",
- "languageDocumentationPopover.documentationESQL.right": "RIGHT",
- "languageDocumentationPopover.documentationESQL.right.markdown": "\n\n ### RIGHT\n strのうち右から数えてlength文字までのサブ文字列を返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL right = RIGHT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ```\n ",
- "languageDocumentationPopover.documentationESQL.round": "ROUND",
- "languageDocumentationPopover.documentationESQL.round.markdown": "\n\n ### ROUND\n 数値を指定した小数点以下の桁数に丸めます。\n デフォルトは0で、最も近い整数を返します。\n 精度が負の場合、小数点以下の桁数に丸めます。\n \n\n ```\n FROM employees\n | KEEP first_name, last_name, height\n | EVAL height_ft = ROUND(height * 3.281, 1)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.row": "ROW",
- "languageDocumentationPopover.documentationESQL.row.markdown": "### ROW\nROWソースコマンドは、指定した値の列を1つ以上含む行を作成します。これはテストの場合に便利です。\n \n```\nROW a = 1, b = \"two\", c = null\n```\n\n複数の値を含む列を作成するには角括弧を使用します。\n\n```\nROW a = [2, 1]\n```\n\nROWは関数の使用をサポートしています。\n\n```\nROW a = ROUND(1.23, 0)\n```\n ",
- "languageDocumentationPopover.documentationESQL.rtrim": "RTRIM",
- "languageDocumentationPopover.documentationESQL.rtrim.markdown": "\n\n ### RTRIM\n 文字列から末尾の空白を取り除きます。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = RTRIM(message)\n | EVAL color = RTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.show": "SHOW",
- "languageDocumentationPopover.documentationESQL.show.markdown": "### SHOW\nSHOW
- ソースコマンドはデプロイとその能力に関する情報を返します。\n\n* デプロイのバージョン、ビルド日、ハッシュを返すには、SHOW INFOを使用します。\n* SHOW FUNCTIONSを使用すると、サポートされているすべての関数のリストと各関数の概要を返します。\n ",
- "languageDocumentationPopover.documentationESQL.signum": "SIGNUM",
- "languageDocumentationPopover.documentationESQL.signum.markdown": "\n\n ### SIGNUM\n 任意の数値の符号を返します。\n 負の数値の場合は-1を返します。0の場合は0を返します。正の数値の場合は1を返します。\n\n ```\n ROW d = 100.0\n | EVAL s = SIGNUM(d)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.sin": "SIN",
- "languageDocumentationPopover.documentationESQL.sin.markdown": "\n\n ### SIN\n 角度の正弦三角関数を返します。\n\n ```\n ROW a=1.8 \n | EVAL sin=SIN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.sinh": "SINH",
- "languageDocumentationPopover.documentationESQL.sinh.markdown": "\n\n ### SINH\n 角度の双曲線正弦を返します。\n\n ```\n ROW a=1.8 \n | EVAL sinh=SINH(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.sort": "SORT",
- "languageDocumentationPopover.documentationESQL.sort.markdown": "### SORT\nSORTコマンドを使用すると、1つ以上のフィールドで行をソートすることができます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height\n```\n\nデフォルトのソート順は昇順です。ASCまたはDESCを使って明示的なソート順を設定します。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC\n```\n\n2つの行のソートキーが同じ場合、元の順序が保持されます。タイブレーカーとなるソート式を追加で指定できます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC, first_name ASC\n```\n\n#### null値\nデフォルトでは、null値は他のどの値よりも大きい値として扱われます。昇順のソートではnull値は最後にソートされ、降順のソートではnull値は最初にソートされます。NULLS FIRSTまたはNULLS LASTを指定することで変更できます。\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT first_name ASC NULLS FIRST\n```\n ",
- "languageDocumentationPopover.documentationESQL.split": "SPLIT",
- "languageDocumentationPopover.documentationESQL.split.markdown": "\n\n ### SPLIT\n 単一の値の文字列を複数の文字列に分割します。\n\n ```\n ROW words=\"foo;bar;baz;qux;quux;corge\"\n | EVAL word = SPLIT(words, \";\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.sqrt": "SQRT",
- "languageDocumentationPopover.documentationESQL.sqrt.markdown": "\n\n ### SQRT\n 数値の平方根を返します。入力は任意の数値で、戻り値は常にdoubleです。\n 負数と無限大の平方根はnullです。\n\n ```\n ROW d = 100.0\n | EVAL s = SQRT(d)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_contains": "ST_CONTAINS",
- "languageDocumentationPopover.documentationESQL.st_contains.markdown": "\n\n ### ST_CONTAINS\n 最初のジオメトリに2番目のジオメトリが含まれるかどうかを返します。\n これはST_WITHIN関数の逆関数です。\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_CONTAINS(city_boundary, TO_GEOSHAPE(\"POLYGON((109.35 18.3, 109.45 18.3, 109.45 18.4, 109.35 18.4, 109.35 18.3))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_disjoint": "ST_DISJOINT",
- "languageDocumentationPopover.documentationESQL.st_disjoint.markdown": "\n\n ### ST_DISJOINT\n 2つのジオメトリまたはジオメトリ列が結合解除されているかどうかを返します。\n これはST_INTERSECTS関数の逆関数です。\n 数学的には次のようになります。ST_Disjoint(A, B) ⇔ A ⋂ B = ∅\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_DISJOINT(city_boundary, TO_GEOSHAPE(\"POLYGON((-10 -60, 120 -60, 120 60, -10 60, -10 -60))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_distance": "ST_DISTANCE",
- "languageDocumentationPopover.documentationESQL.st_distance.markdown": "\n\n ### ST_DISTANCE\n 2点間の距離を計算します。\n デカルト幾何学の場合、これは元の座標と同じ単位でのピタゴラス距離です。\n 地理的幾何学では、これはメートル単位での円に沿った円周距離です。\n\n ```\n FROM airports\n | WHERE abbrev == \"CPH\"\n | EVAL distance = ST_DISTANCE(location, city_location)\n | KEEP abbrev, name, location, city_location, distance\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_intersects": "ST_INTERSECTS",
- "languageDocumentationPopover.documentationESQL.st_intersects.markdown": "\n\n ### ST_INTERSECTS\n 2つのジオメトリが交差している場合はTrueを返します。\n 内部点を含め、共通の点がある場合は交差しています\n (線に沿った点または多角形内の点)。\n これはST_DISJOINT関数の逆関数です。\n 数学的には次のようになります。ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅\n\n ```\n FROM airports\n | WHERE ST_INTERSECTS(location, TO_GEOSHAPE(\"POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))\"))\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_within": "ST_WITHIN",
- "languageDocumentationPopover.documentationESQL.st_within.markdown": "\n\n ### ST_WITHIN\n 最初のジオメトリが2番目のジオメトリ内にあるかどうかを返します。\n これはST_CONTAINS関数の逆関数です。\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_WITHIN(city_boundary, TO_GEOSHAPE(\"POLYGON((109.1 18.15, 109.6 18.15, 109.6 18.65, 109.1 18.65, 109.1 18.15))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_x": "ST_X",
- "languageDocumentationPopover.documentationESQL.st_x.markdown": "\n\n ### ST_X\n 指定された点からx座標を抽出します。\n この点がgeo_pointタイプの場合は、longitude値を抽出するのと同じ結果になります。\n\n ```\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_y": "ST_Y",
- "languageDocumentationPopover.documentationESQL.st_y.markdown": "\n\n ### ST_Y\n 指定された点からy座標を抽出します。\n この点がgeo_pointタイプの場合は、latitude値を抽出するのと同じ結果になります。\n\n ```\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.starts_with": "STARTS_WITH",
- "languageDocumentationPopover.documentationESQL.starts_with.markdown": "\n\n ### STARTS_WITH\n キーワード文字列が他の文字列で始まるかどうかを示すブール値を返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_S = STARTS_WITH(last_name, \"B\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.statsby": "STATS ...BY",
- "languageDocumentationPopover.documentationESQL.statsby.markdown": "### STATS ...BY\nSTATS ...BYを使用すると、共通の値に従って行をグループ化し、グループ化された行に対する1つ以上の集約値を計算します。\n\n**例**:\n\n```\nFROM employees\n| STATS count = COUNT(emp_no) BY languages\n| SORT languages\n```\n\nBYが省略された場合、出力テーブルには、データセット全体に適用された集約が正確に1行だけ含まれます。\n\n```\nFROM employees\n| STATS avg_lang = AVG(languages)\n```\n\n複数の値を計算することができます。\n\n```\nFROM employees\n| STATS avg_lang = AVG(languages), max_lang = MAX(languages)\n```\n\n複数の値でグループ化することも可能です(longおよびkeywordファミリーフィールドでのみサポート)。\n\n```\nFROM employees\n| EVAL hired = DATE_FORMAT(hire_date, \"YYYY\")\n| STATS avg_salary = AVG(salary) BY hired, languages.long\n| EVAL avg_salary = ROUND(avg_salary)\n| SORT hired, languages.long\n```\n\nSTATS ...BYで使用できる関数の一覧については、**集計関数**を参照してください。\n\n集計関数とグループ式の両方で他の関数を使用できます。これは、複数値列でSTATS...BYを使用するときに有用です。たとえば、平均給与変動を計算するには、まず、MV_AVGを使用して従業員ごとに複数の値の平均を求め、その結果にAVG関数を適用します。\n\n```\nFROM employees\n| STATS avg_salary_change = AVG(MV_AVG(salary_change))\n```\n\n式によるグループ化の例は、姓の最初の文字で従業員をグループ化することです。\n\n```\nFROM employees\n| STATS my_count = COUNT() BY LEFT(last_name, 1)\n| SORT `LEFT(last_name, 1)`\n```\n\n出力列名の指定は任意です。指定しない場合は、新しい列名が式と等しくなります。次のクエリーは列\"AVG(salary)\"を返します。\n\n```\nFROM employees\n| STATS AVG(salary)\n```\n\nこの名前には特殊文字が含まれているため、後続のコマンドで使用するときには、バッククオート(`)で囲む必要があります。\n\n```\nFROM employees\n| STATS AVG(salary)\n| EVAL avg_salary_rounded = ROUND(`AVG(salary)`)\n```\n\n**注**:グループなしのSTATSは、グループを追加するよりも大幅に高速です。\n\n**注**:単一式でのグループは、現在、複数式でのグループよりも大幅に最適化されています。\n ",
- "languageDocumentationPopover.documentationESQL.stringOperators": "LIKEおよびRLIKE",
- "languageDocumentationPopover.documentationESQL.stringOperators.markdown": "### LIKEおよびRLIKE\nワイルドカードや正規表現を使った文字列比較にはLIKEまたはRLIKEを使います。\n\nワイルドカードを使って文字列を一致させるにはLIKEを使います。次のワイルドカード文字がサポートされています。\n\n* `*`は0文字以上と一致します。\n* `?`は1文字と一致します。\n\n```\nFROM employees\n| WHERE first_name LIKE \"?b*\"\n| KEEP first_name, last_name\n```\n\n正規表現を使って文字列を一致させるには、RLIKEを使います。\n\n```\nFROM employees\n| WHERE first_name RLIKE \".leja.*\"\n| KEEP first_name, last_name\n```\n ",
- "languageDocumentationPopover.documentationESQL.substring": "SUBSTRING",
- "languageDocumentationPopover.documentationESQL.substring.markdown": "\n\n ### SUBSTRING\n 文字列のサブ文字列を、開始位置とオプションの長さで指定して返します。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_sub = SUBSTRING(last_name, 1, 3)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.tan": "TAN",
- "languageDocumentationPopover.documentationESQL.tan.markdown": "\n\n ### TAN\n 角度の正接三角関数を返します。\n\n ```\n ROW a=1.8 \n | EVAL tan=TAN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.tanh": "TANH",
- "languageDocumentationPopover.documentationESQL.tanh.markdown": "\n\n ### TANH\n 角度の正接双曲線関数を返します。\n\n ```\n ROW a=1.8 \n | EVAL tanh=TANH(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.tau": "TAU",
- "languageDocumentationPopover.documentationESQL.tau.markdown": "\n\n ### TAU\n 円の円周と半径の比率を返します。\n\n ```\n ROW TAU()\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_base64": "TO_BASE64",
- "languageDocumentationPopover.documentationESQL.to_base64.markdown": "\n\n ### TO_BASE64\n 文字列をbase64文字列にエンコードします。\n\n ```\n row a = \"elastic\" \n | eval e = to_base64(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_boolean": "TO_BOOLEAN",
- "languageDocumentationPopover.documentationESQL.to_boolean.markdown": "\n\n ### TO_BOOLEAN\n 入力値をブール値に変換します。\n 文字列値*true*は、大文字小文字を区別せずにブール値*true*に変換されます。\n 空文字列を含むそれ以外の値に対しては、この関数は*false*を返します。\n 数値*0*は*false*に変換され、それ以外は*true*に変換されます。\n\n ```\n ROW str = [\"true\", \"TRuE\", \"false\", \"\", \"yes\", \"1\"]\n | EVAL bool = TO_BOOLEAN(str)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_cartesianpoint": "TO_CARTESIANPOINT",
- "languageDocumentationPopover.documentationESQL.to_cartesianpoint.markdown": "\n\n ### TO_CARTESIANPOINT\n 入力値をcartesian_point値に変換します。\n 文字列は、WKT Point形式に従っている場合にのみ、正常に変換されます。\n\n ```\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POINT(7580.93 2272.77)\"]\n | MV_EXPAND wkt\n | EVAL pt = TO_CARTESIANPOINT(wkt)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_cartesianshape": "TO_CARTESIANSHAPE",
- "languageDocumentationPopover.documentationESQL.to_cartesianshape.markdown": "\n\n ### TO_CARTESIANSHAPE\n 入力値をcartesian_shape値に変換します。\n 文字列は、WKT形式に従っている場合にのみ、正常に変換されます。\n\n ```\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POLYGON ((3339584.72 1118889.97, 4452779.63 4865942.27, 2226389.81 4865942.27, 1113194.90 2273030.92, 3339584.72 1118889.97))\"]\n | MV_EXPAND wkt\n | EVAL geom = TO_CARTESIANSHAPE(wkt)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_datetime": "TO_DATETIME",
- "languageDocumentationPopover.documentationESQL.to_datetime.markdown": "\n\n ### TO_DATETIME\n 入力値を日付値に変換します。\n 文字列は、yyyy-MM-dd'T'HH:mm:ss.SSS'Z'の書式に従っている場合のみ変換が成功します。\n 日付を他の形式に変換するには、DATE_PARSEを使用します。\n\n ```\n ROW string = [\"1953-09-02T00:00:00.000Z\", \"1964-06-02T00:00:00.000Z\", \"1964-06-02 00:00:00\"]\n | EVAL datetime = TO_DATETIME(string)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_degrees": "TO_DEGREES",
- "languageDocumentationPopover.documentationESQL.to_degrees.markdown": "\n\n ### TO_DEGREES\n ラジアンの数値を度数に変換します。\n\n ```\n ROW rad = [1.57, 3.14, 4.71]\n | EVAL deg = TO_DEGREES(rad)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_double": "TO_DOUBLE",
- "languageDocumentationPopover.documentationESQL.to_double.markdown": "\n\n ### TO_DOUBLE\n 入力値をdouble値に変換します。入力パラメーターが日付型の場合、その値はUnixのエポックからのミリ秒として解釈され、doubleに変換されます。\n \n ブール値の*true*はdouble値の*1.0*に、*false*は*0.0*に変換されます。\n\n ```\n ROW str1 = \"5.20128E11\", str2 = \"foo\"\n | EVAL dbl = TO_DOUBLE(\"520128000000\"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_geopoint": "TO_GEOPOINT",
- "languageDocumentationPopover.documentationESQL.to_geopoint.markdown": "\n\n ### TO_GEOPOINT\n 入力値をgeo_point値に変換します。\n 文字列は、WKT Point形式に従っている場合にのみ、正常に変換されます。\n\n ```\n ROW wkt = \"POINT(42.97109630194 14.7552534413725)\"\n | EVAL pt = TO_GEOPOINT(wkt)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_geoshape": "TO_GEOSHAPE",
- "languageDocumentationPopover.documentationESQL.to_geoshape.markdown": "\n\n ### TO_GEOSHAPE\n 入力値をgeo_shape値に変換します。\n 文字列は、WKT形式に従っている場合にのみ、正常に変換されます。\n\n ```\n ROW wkt = \"POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))\"\n | EVAL geom = TO_GEOSHAPE(wkt)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_integer": "TO_INTEGER",
- "languageDocumentationPopover.documentationESQL.to_integer.markdown": "\n\n ### TO_INTEGER\n 入力値を整数値に変換します。\n 入力パラメーターが日付型の場合、その値はUnixのエポックからのミリ秒として解釈され、整数に変換されます。\n \n ブール値*true*は整数*1*に、*false*は*0*に変換されます。\n\n ```\n ROW long = [5013792, 2147483647, 501379200000]\n | EVAL int = TO_INTEGER(long)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_ip": "TO_IP",
- "languageDocumentationPopover.documentationESQL.to_ip.markdown": "\n\n ### TO_IP\n 入力文字列をIP値に変換します。\n\n ```\n ROW str1 = \"1.1.1.1\", str2 = \"foo\"\n | EVAL ip1 = TO_IP(str1), ip2 = TO_IP(str2)\n | WHERE CIDR_MATCH(ip1, \"1.0.0.0/8\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_long": "TO_LONG",
- "languageDocumentationPopover.documentationESQL.to_long.markdown": "\n\n ### TO_LONG\n 入力値をlong値に変換します。入力パラメーターが日付型の場合、\n その値はUnixのエポックからのミリ秒として解釈され、longに変換されます。\n ブール値の*true*は*long*値の*1*に、*false*は*0*に変換されます。\n\n ```\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_LONG(str1), long2 = TO_LONG(str2), long3 = TO_LONG(str3)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_lower": "TO_LOWER",
- "languageDocumentationPopover.documentationESQL.to_lower.markdown": "\n\n ### TO_LOWER\n 小文字に変換された入力文字列を表す新しい文字列を返します。\n\n ```\n ROW message = \"Some Text\"\n | EVAL message_lower = TO_LOWER(message)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_radians": "TO_RADIANS",
- "languageDocumentationPopover.documentationESQL.to_radians.markdown": "\n\n ### TO_RADIANS\n 度数をラジアンに変換します。\n\n ```\n ROW deg = [90.0, 180.0, 270.0]\n | EVAL rad = TO_RADIANS(deg)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_string": "TO_STRING",
- "languageDocumentationPopover.documentationESQL.to_string.markdown": "\n\n ### TO_STRING\n 入力値を文字列に変換します。\n\n ```\n ROW a=10\n | EVAL j = TO_STRING(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_unsigned_long": "TO_UNSIGNED_LONG",
- "languageDocumentationPopover.documentationESQL.to_unsigned_long.markdown": "\n\n ### TO_UNSIGNED_LONG\n 入力値を符号なしlong値に変換します。入力パラメーターが日付型の場合、\n その値はUnixのエポックからのミリ秒として解釈され、符号なしlong値に変換されます。\n ブール値の*true*は符号なし*long*値の*1*に、*false*は*0*に変換されます。\n\n ```\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_UNSIGNED_LONG(str1), long2 = TO_ULONG(str2), long3 = TO_UL(str3)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_upper": "TO_UPPER",
- "languageDocumentationPopover.documentationESQL.to_upper.markdown": "\n\n ### TO_UPPER\n 大文字に変換された入力文字列を表す新しい文字列を返します。\n\n ```\n ROW message = \"Some Text\"\n | EVAL message_upper = TO_UPPER(message)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_version": "TO_VERSION",
- "languageDocumentationPopover.documentationESQL.to_version.markdown": "\n\n ### TO_VERSION\n 入力文字列をバージョン値に変換します。\n\n ```\n ROW v = TO_VERSION(\"1.2.3\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.trim": "TRIM",
- "languageDocumentationPopover.documentationESQL.trim.markdown": "\n\n ### TRIM\n 文字列から先頭と末尾の空白を削除します。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = TRIM(message)\n | EVAL color = TRIM(color)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.where": "WHERE",
- "languageDocumentationPopover.documentationESQL.where.markdown": "### WHERE\nWHEREを使用すると、入力テーブルから、指定した条件がtrueと評価されるすべての行を含むテーブルを作成します。\n \n```\nFROM employees\n| KEEP first_name, last_name, still_hired\n| WHERE still_hired == true\n```\n\n#### 演算子\n\nサポートされている演算子の概要については、**演算子**を参照してください。\n\n#### 関数\nWHEREは値を計算するためのさまざまな関数をサポートしています。**関数**をクリックすると詳細が表示されます。\n ",
"textBasedEditor.query.textBasedLanguagesEditor.EnableWordWrapLabel": "パイプの改行を追加",
"textBasedEditor.query.textBasedLanguagesEditor.errorCount": "{count} {count, plural, other {# 件のエラー}}",
"textBasedEditor.query.textBasedLanguagesEditor.errorsTitle": "エラー",
"textBasedEditor.query.textBasedLanguagesEditor.expandLabel": "拡張",
"textBasedEditor.query.textBasedLanguagesEditor.feedback": "フィードバック",
- "languageDocumentationPopover.documentationESQL.functions": "関数",
- "languageDocumentationPopover.documentationESQL.functionsDocumentationESQLDescription": "関数はROW、EVAL、WHEREでサポートされています。",
- "languageDocumentationPopover.documentationESQL.groupingFunctions": "グループ関数",
- "languageDocumentationPopover.documentationESQL.groupingFunctionsDocumentationESQLDescription": "これらのグループ関数はSTATS...BYで使用できます。",
"textBasedEditor.query.textBasedLanguagesEditor.hideQueriesLabel": "最近のクエリーを非表示",
"textBasedEditor.query.textBasedLanguagesEditor.lineCount": "{count} {count, plural, other {行}}",
"textBasedEditor.query.textBasedLanguagesEditor.lineNumber": "行{lineNumber}",
- "languageDocumentationPopover.documentationESQL.operators": "演算子",
- "languageDocumentationPopover.documentationESQL.operatorsDocumentationESQLDescription": "ES|QLは以下の演算子をサポートしています。",
- "languageDocumentationPopover.documentationESQL.processingCommands": "処理コマンド",
- "languageDocumentationPopover.documentationESQL.processingCommandsDescription": "処理コマンドは、行や列を追加、削除、変更することによって入力テーブルを変更します。ES|QLは以下の処理コマンドをサポートしています。",
"textBasedEditor.query.textBasedLanguagesEditor.querieshistory.error": "クエリ失敗",
"textBasedEditor.query.textBasedLanguagesEditor.querieshistory.success": "クエリは正常に実行されました",
"textBasedEditor.query.textBasedLanguagesEditor.querieshistoryCopy": "クエリをクリップボードにコピー",
@@ -7332,7 +7333,6 @@
"textBasedEditor.query.textBasedLanguagesEditor.recentQueriesColumnLabel": "最近のクエリー",
"textBasedEditor.query.textBasedLanguagesEditor.runQuery": "クエリーを実行",
"textBasedEditor.query.textBasedLanguagesEditor.showQueriesLabel": "最近のクエリを表示",
- "languageDocumentationPopover.documentationESQL.sourceCommands": "ソースコマンド",
"textBasedEditor.query.textBasedLanguagesEditor.submitFeedback": "フィードバックを送信",
"textBasedEditor.query.textBasedLanguagesEditor.timeRanColumnLabel": "実行時間",
"textBasedEditor.query.textBasedLanguagesEditor.timestampNotDetected": "@timestampが見つかりません",
diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json
index 94cb0e244e4da..1fab99c36780d 100644
--- a/x-pack/plugins/translations/translations/zh-CN.json
+++ b/x-pack/plugins/translations/translations/zh-CN.json
@@ -5450,6 +5450,243 @@
"kibanaOverview.manageData.sectionTitle": "管理您的数据",
"kibanaOverview.more.title": "Elastic 让您事半功倍",
"kibanaOverview.news.title": "最新动态",
+ "languageDocumentationPopover.documentationESQL.abs": "ABS",
+ "languageDocumentationPopover.documentationESQL.abs.markdown": "\n\n ### ABS\n 返回绝对值。\n\n ```\n ROW number = -1.0 \n | EVAL abs_number = ABS(number)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.acos": "ACOS",
+ "languageDocumentationPopover.documentationESQL.acos.markdown": "\n\n ### ACOS\n 返回 `n` 的反余弦作为角度,以弧度表示。\n\n ```\n ROW a=.9\n | EVAL acos=ACOS(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.aggregationFunctions": "聚合函数",
+ "languageDocumentationPopover.documentationESQL.aggregationFunctionsDocumentationESQLDescription": "这些函数可以与 STATS...BY 搭配使用:",
+ "languageDocumentationPopover.documentationESQL.asin": "ASIN",
+ "languageDocumentationPopover.documentationESQL.asin.markdown": "\n\n ### ASIN\n 返回输入数字表达式的反正弦\n 作为角度,以弧度表示。\n\n ```\n ROW a=.9\n | EVAL asin=ASIN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.atan": "ATAN",
+ "languageDocumentationPopover.documentationESQL.atan.markdown": "\n\n ### ATAN\n 返回输入数字表达式的反正切\n 作为角度,以弧度表示。\n\n ```\n ROW a=12.9\n | EVAL atan=ATAN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.atan2": "ATAN2",
+ "languageDocumentationPopover.documentationESQL.atan2.markdown": "\n\n ### ATAN2\n 笛卡儿平面中正 x 轴\n 与从原点到点 (x , y) 构成的射线之间的角度,以弧度表示。\n\n ```\n ROW y=12.9, x=.6\n | EVAL atan2=ATAN2(y, x)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.autoBucketFunction": "BUCKET",
+ "languageDocumentationPopover.documentationESQL.autoBucketFunction.markdown": "### BUCKET\n用日期时间或数字输入创建值(存储桶)的分组。存储桶的大小可以直接提供,或基于建议的计数和值范围进行选择。\n\n`BUCKET` 以两种模式运行:\n\n1.在此模式下基于存储桶计数建议(四个参数)和范围计算存储桶的大小。\n2.在此模式下直接提供存储桶大小(两个参数)。\n\n使用存储桶的目标数量、起始范围和结束范围,`BUCKET` 将选取适当的存储桶大小以生成目标数量或更小数量的存储桶。\n\n例如,一年请求多达 20 个存储桶会按每月时间间隔组织数据:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT hire_date\n```\n\n**注意**:目标并不是提供存储桶的确切目标数量,而是选择一个范围,最多提供存储桶的目标数量。\n\n可以组合 `BUCKET` 与聚合以创建直方图:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_month = COUNT(*) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT month\n```\n\n**注意**:`BUCKET` 不会创建未匹配任何文档的存储桶。因此,上一示例缺少 `1985-03-01` 和其他日期。\n\n如果需要更多存储桶,可能导致更小的范围。例如,如果一年内最多请求 100 个存储桶,会导致周期为周的存储桶:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 100, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT week\n```\n\n**注意**:`AUTO_BUCKET` 不筛选任何行。它只会使用提供的范围来选取适当的存储桶大小。对于值超出范围的行,它会返回与超出范围的存储桶对应的存储桶值。组合 `BUCKET` 与 `WHERE` 可筛选行。\n\n如果提前已知所需存储桶大小,则只需提供它作为第二个参数,而忽略范围:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 1 week)\n| SORT week\n```\n\n**注意**:提供存储桶大小作为第二个参数时,它必须为持续时间或日期期间。\n\n`BUCKET` 还可对数字字段执行操作。例如,要创建工资直方图:\n\n```\nFROM employees\n| STATS COUNT(*) by bs = BUCKET(salary, 20, 25324, 74999)\n| SORT bs\n```\n\n与前面的有意筛选日期范围示例不同,您极少想要筛选数值范围。您必须分别查找最小值和最大值。ES|QL 尚未提供简便方法来自动执行此操作。\n\n如果提前已知所需存储桶大小,则可以忽略该范围。只需提供它作为第二个参数即可:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS c = COUNT(1) BY b = BUCKET(salary, 5000.)\n| SORT b\n```\n\n**注意**:提供存储桶大小作为第二个参数时,它必须为 **浮点类型**。\n\n这里提供了一个示例,用于为过去 24 小时创建小时存储桶,并计算每小时的事件数:\n\n```\nFROM sample_data\n| WHERE @timestamp >= NOW() - 1 day and @timestamp < NOW()\n| STATS COUNT(*) BY bucket = BUCKET(@timestamp, 25, NOW() - 1 day, NOW())\n```\n\n这里提供了一个示例,用于为 1985 年创建月度存储桶,并按聘用月份计算平均工资:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS AVG(salary) BY bucket = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT bucket\n```\n\n`BUCKET` 可用在 `STATS … BY …` 命令的聚合和分组部分, 前提是在聚合部分中,该函数 **由在分组部分中定义的别名引用**,或使用完全相同的表达式调用。\n\n例如:\n\n```\nFROM employees\n| STATS s1 = b1 + 1, s2 = BUCKET(salary / 1000 + 999, 50.) + 2 BY b1 = BUCKET(salary / 100 + 99, 50.), b2 = BUCKET(salary / 1000 + 999, 50.)\n| SORT b1, b2\n| KEEP s1, b1, s2, b2\n```\n ",
+ "languageDocumentationPopover.documentationESQL.binaryOperators": "二进制运算符",
+ "languageDocumentationPopover.documentationESQL.binaryOperators.markdown": "### 二进制运算符\n支持这些二进制比较运算符:\n\n* 等于:`==`\n* 不等于:`!=`\n* 小于:`<`\n* 小于或等于:`<=`\n* 大于:`>`\n* 大于或等于:`>=`\n* 加:`+`\n* 减:`-`\n* 乘:`*`\n* 除:`/`\n* 取模:`%`\n ",
+ "languageDocumentationPopover.documentationESQL.booleanOperators": "布尔运算符",
+ "languageDocumentationPopover.documentationESQL.booleanOperators.markdown": "### 布尔运算符\n支持以下布尔运算符:\n\n* `AND`\n* `OR`\n* `NOT`\n ",
+ "languageDocumentationPopover.documentationESQL.bucket": "BUCKET",
+ "languageDocumentationPopover.documentationESQL.bucket.markdown": "\n\n ### BUCKET\n 用日期时间或数字输入创建值(存储桶)的分组。\n 存储桶的大小可以直接提供,或基于建议的计数和值范围进行选择。\n\n ```\n FROM employees\n | WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n | STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n | SORT hire_date\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.case": "CASE",
+ "languageDocumentationPopover.documentationESQL.case.markdown": "\n\n ### CASE\n 接受成对的条件和值。此函数返回属于第一个\n 评估为 `true` 的条件的值。\n\n 如果参数数量为奇数,则最后一个参数为\n 在无条件匹配时返回的默认值。如果参数数量为偶数,且\n 无任何条件匹配,则此函数返回 `null`。\n\n ```\n FROM employees\n | EVAL type = CASE(\n languages <= 1, \"monolingual\",\n languages <= 2, \"bilingual\",\n \"polyglot\")\n | KEEP emp_no, languages, type\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.castOperator": "Cast (::)",
+ "languageDocumentationPopover.documentationESQL.castOperator.markdown": "### CAST (`::`)\n`::` 运算符为 `TO_` 类型转换函数提供了实用的替代语法。\n\n例如:\n```\nROW ver = CONCAT((\"0\"::INT + 1)::STRING, \".2.3\")::VERSION\n```\n ",
+ "languageDocumentationPopover.documentationESQL.cbrt": "CBRT",
+ "languageDocumentationPopover.documentationESQL.cbrt.markdown": "\n\n ### CBRT\n 返回数字的立方根。输入可以为任何数字值,返回值始终为双精度值。\n 无穷大的立方根为 null。\n\n ```\n ROW d = 1000.0\n | EVAL c = cbrt(d)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.ceil": "CEIL",
+ "languageDocumentationPopover.documentationESQL.ceil.markdown": "\n\n ### CEIL\n 将数字四舍五入为最近的整数。\n\n ```\n ROW a=1.8\n | EVAL a=CEIL(a)\n ```\n 注意:对于 `long`(包括无符号值)和 `integer`,这相当于“无操作”。对于 `double`,这会提取最接近整数的 `double` 值,类似于 Math.ceil。\n ",
+ "languageDocumentationPopover.documentationESQL.cidr_match": "CIDR_MATCH",
+ "languageDocumentationPopover.documentationESQL.cidr_match.markdown": "\n\n ### CIDR_MATCH\n 如果提供的 IP 包含在所提供的其中一个 CIDR 块中,则返回 true。\n\n ```\n FROM hosts \n | WHERE CIDR_MATCH(ip1, \"127.0.0.2/32\", \"127.0.0.3/32\") \n | KEEP card, host, ip0, ip1\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.coalesce": "COALESCE",
+ "languageDocumentationPopover.documentationESQL.coalesce.markdown": "\n\n ### COALESCE\n 返回它的第一个不为 null 的参数。如果所有参数均为 null,则返回 `null`。\n\n ```\n ROW a=null, b=\"b\"\n | EVAL COALESCE(a, b)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.commandsDescription": "源命令会生成一个表,其中通常包含来自 Elasticsearch 的数据。ES|QL 支持以下源命令。",
+ "languageDocumentationPopover.documentationESQL.concat": "CONCAT",
+ "languageDocumentationPopover.documentationESQL.concat.markdown": "\n\n ### CONCAT\n 串联两个或多个字符串。\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fullname = CONCAT(first_name, \" \", last_name)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.cos": "COS",
+ "languageDocumentationPopover.documentationESQL.cos.markdown": "\n\n ### COS\n 返回角度的余弦。\n\n ```\n ROW a=1.8 \n | EVAL cos=COS(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.cosh": "COSH",
+ "languageDocumentationPopover.documentationESQL.cosh.markdown": "\n\n ### COSH\n 返回角度的双曲余弦。\n\n ```\n ROW a=1.8 \n | EVAL cosh=COSH(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_diff": "DATE_DIFF",
+ "languageDocumentationPopover.documentationESQL.date_diff.markdown": "\n\n ### DATE_DIFF\n 从 `endTimestamp` 中减去 `startTimestamp`,并以倍数 `unit` 返回差异。\n 如果 `startTimestamp` 晚于 `endTimestamp`,则返回负值。\n\n ```\n ROW date1 = TO_DATETIME(\"2023-12-02T11:00:00.000Z\"), date2 = TO_DATETIME(\"2023-12-02T11:00:00.001Z\")\n | EVAL dd_ms = DATE_DIFF(\"microseconds\", date1, date2)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_extract": "DATE_EXTRACT",
+ "languageDocumentationPopover.documentationESQL.date_extract.markdown": "\n\n ### DATE_EXTRACT\n 提取日期的某些部分,如年、月、日、小时。\n\n ```\n ROW date = DATE_PARSE(\"yyyy-MM-dd\", \"2022-05-06\")\n | EVAL year = DATE_EXTRACT(\"year\", date)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_format": "DATE_FORMAT",
+ "languageDocumentationPopover.documentationESQL.date_format.markdown": "\n\n ### DATE_FORMAT\n 以提供的格式返回日期的字符串表示形式。\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL hired = DATE_FORMAT(\"YYYY-MM-dd\", hire_date)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_parse": "DATE_PARSE",
+ "languageDocumentationPopover.documentationESQL.date_parse.markdown": "\n\n ### DATE_PARSE\n 通过使用在第一个参数中指定的格式来解析第二个参数,从而返回日期。\n\n ```\n ROW date_string = \"2022-05-06\"\n | EVAL date = DATE_PARSE(\"yyyy-MM-dd\", date_string)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.date_trunc": "DATE_TRUNC",
+ "languageDocumentationPopover.documentationESQL.date_trunc.markdown": "\n\n ### DATE_TRUNC\n 将日期向下舍入到最近的时间间隔。\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL year_hired = DATE_TRUNC(1 year, hire_date)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.dissect": "DISSECT",
+ "languageDocumentationPopover.documentationESQL.dissect.markdown": "### DISSECT\n使用 `DISSECT`,您可以从字符串中提取结构化数据。`DISSECT` 将根据基于分隔符的模式来匹配字符串,并提取指定键作为列。\n\n请参阅[分解处理器文档](https://www.elastic.co/guide/en/elasticsearch/reference/current/dissect-processor.html)了解分解模式的语法。\n\n```\nROW a = \"1953-01-23T12:15:00Z - some text - 127.0.0.1\"\n| DISSECT a \"%'{Y}-%{M}-%{D}T%{h}:%{m}:%{s}Z - %{msg} - %{ip}'\"\n``` ",
+ "languageDocumentationPopover.documentationESQL.drop": "DROP",
+ "languageDocumentationPopover.documentationESQL.drop.markdown": "### DROP\n使用 `DROP` 可从表中移除列:\n \n```\nFROM employees\n| DROP height\n```\n\n您不必按名称指定每个列,而可以使用通配符丢弃名称匹配某种模式的所有列:\n\n```\nFROM employees\n| DROP height*\n```\n ",
+ "languageDocumentationPopover.documentationESQL.e": "E",
+ "languageDocumentationPopover.documentationESQL.e.markdown": "\n\n ### E\n 返回 Euler 函数的编号。\n\n ```\n ROW E()\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.ends_with": "ENDS_WITH",
+ "languageDocumentationPopover.documentationESQL.ends_with.markdown": "\n\n ### ENDS_WITH\n 返回布尔值,指示关键字字符串是否以另一个字符串结尾。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_E = ENDS_WITH(last_name, \"d\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.enrich": "ENRICH",
+ "languageDocumentationPopover.documentationESQL.enrich.markdown": "### ENRICH\n您可以使用 `ENRICH` 将来自现有索引的数据添加到传入记录中。它类似于[采集扩充](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html),但作用于查询时间。\n\n```\nROW language_code = \"1\"\n| ENRICH languages_policy\n```\n\n执行 `ENRICH` 需要[扩充策略](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-policy)。扩充策略定义一个匹配字段(键字段)和一组扩充字段。\n\n`ENRICH` 将根据匹配字段值在[扩充索引](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-index)中查找记录。输入数据集中的匹配键可以使用 `ON ` 来定义;如果未指定,将对字段名称与在扩充策略中定义的匹配字段相同的字段执行匹配。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a\n```\n\n您可以使用 `WITH , ...` 语法指定必须将哪些属性(在那些在策略中定义为扩充字段的字段之间)添加到结果中。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH language_name\n```\n\n还可以使用 `WITH new_name=` 重命名属性\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH name = language_name\n```\n\n默认情况下(如果未定义任何 `WITH`),`ENRICH` 会将在扩充策略中定义的所有扩充字段添加到结果中。\n\n如果出现名称冲突,新创建的字段将覆盖现有字段。\n ",
+ "languageDocumentationPopover.documentationESQL.eval": "EVAL",
+ "languageDocumentationPopover.documentationESQL.eval.markdown": "### EVAL\n`EVAL` 允许您添加新列:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height_feet = height * 3.281, height_cm = height * 100\n```\n\n如果指定列已存在,将丢弃现有列,并将新列追加到表后面:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height = height * 3.281\n```\n\n#### 函数\n`EVAL` 支持各种用于计算值的函数。请参阅“函数”了解更多信息。\n ",
+ "languageDocumentationPopover.documentationESQL.floor": "FLOOR",
+ "languageDocumentationPopover.documentationESQL.floor.markdown": "\n\n ### FLOOR\n 将数字向下舍入到最近的整数。\n\n ```\n ROW a=1.8\n | EVAL a=FLOOR(a)\n ```\n 注意:对于 `long`(包括无符号值)和 `integer`,这相当于“无操作”。\n 对于 `double`,这会提取最接近整数的 `double` 值,\n 类似于 Math.floor。\n ",
+ "languageDocumentationPopover.documentationESQL.from": "FROM",
+ "languageDocumentationPopover.documentationESQL.from_base64": "FROM_BASE64",
+ "languageDocumentationPopover.documentationESQL.from_base64.markdown": "\n\n ### FROM_BASE64\n 解码 base64 字符串。\n\n ```\n row a = \"ZWxhc3RpYw==\" \n | eval d = from_base64(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.from.markdown": "### FROM\n`FROM` 源命令返回一个表,其中最多包含 10,000 个来自数据流、索引或别名的文档。生成的表中的每一行代表一个文档。每一列对应一个字段,并可以通过该字段的名称进行访问。\n\n```\nFROM employees\n```\n\n您可以使用[日期数学表达式](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-date-math-index-names)来引用索引、别名和数据流。这可能对时间序列数据非常有用。\n\n使用逗号分隔列表或通配符可查询多个数据流、索引或别名:\n\n```\nFROM employees-00001,employees-*\n```\n\n#### 元数据\n\nES|QL 可访问以下元数据字段:\n\n* `_index`:文档所属的索引。字段类型为 `keyword`.\n* `_id`:源文档的 ID。字段类型为 `keyword`.\n* `_version`:源文档的版本。字段类型为 `long`。\n\n使用 `METADATA` 指令可启用元数据字段:\n\n```\nFROM index [METADATA _index, _id]\n```\n\n元数据字段仅在数据源为索引时可用。因此,`FROM` 是唯一支持 `METADATA` 指令的源命令。\n\n启用后,这些字段将可用于后续处理命令,就像其他索引字段一样:\n\n```\nFROM ul_logs, apps [METADATA _index, _version]\n| WHERE id IN (13, 14) AND _version == 1\n| EVAL key = CONCAT(_index, \"_\", TO_STR(id))\n| SORT id, _index\n| KEEP id, _index, _version, key\n```\n\n此外,与索引字段类似,一旦执行了聚合,后续命令将无法再访问元数据字段,除非它用作分组字段:\n\n```\nFROM employees [METADATA _index, _id]\n| STATS max = MAX(emp_no) BY _index\n```\n ",
+ "languageDocumentationPopover.documentationESQL.functions": "函数",
+ "languageDocumentationPopover.documentationESQL.functionsDocumentationESQLDescription": "ROW、EVAL 和 WHERE 支持的函数。",
+ "languageDocumentationPopover.documentationESQL.greatest": "GREATEST",
+ "languageDocumentationPopover.documentationESQL.greatest.markdown": "\n\n ### GREATEST\n 返回多个列中的最大值。除了可一次对多个列运行以外,\n 此函数与 `MV_MAX` 类似。\n\n ```\n ROW a = 10, b = 20\n | EVAL g = GREATEST(a, b)\n ```\n 注意:对 `keyword` 或 `text` 字段运行时,此函数将按字母顺序返回最后一个字符串。对 `boolean` 列运行时,如果任何值为 `true`,此函数将返回 `true`。\n ",
+ "languageDocumentationPopover.documentationESQL.grok": "GROK",
+ "languageDocumentationPopover.documentationESQL.grok.markdown": "### GROK\n使用 `GROK`,您可以从字符串中提取结构化数据。`GROK` 将基于正则表达式根据模式来匹配字符串,并提取指定模式作为列。\n\n请参阅 [grok 处理器文档](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html)了解 grok 模式的语法。\n\n```\nROW a = \"12 15.5 15.6 true\"\n| GROK a \"%'{NUMBER:b:int}' %'{NUMBER:c:float}' %'{NUMBER:d:double}' %'{WORD:e:boolean}'\"\n```\n ",
+ "languageDocumentationPopover.documentationESQL.groupingFunctions": "分组函数",
+ "languageDocumentationPopover.documentationESQL.groupingFunctionsDocumentationESQLDescription": "这些分组函数可以与 `STATS...BY` 搭配使用:",
+ "languageDocumentationPopover.documentationESQL.inOperator": "IN",
+ "languageDocumentationPopover.documentationESQL.inOperator.markdown": "### IN\n`IN` 运算符允许测试字段或表达式是否等于文本、字段或表达式列表中的元素:\n\n```\nROW a = 1, b = 4, c = 3\n| WHERE c-a IN (3, b / 2, a)\n```\n ",
+ "languageDocumentationPopover.documentationESQL.ip_prefix": "IP_PREFIX",
+ "languageDocumentationPopover.documentationESQL.ip_prefix.markdown": "\n\n ### IP_PREFIX\n 截短 IP 至给定的前缀长度。\n\n ```\n row ip4 = to_ip(\"1.2.3.4\"), ip6 = to_ip(\"fe80::cae2:65ff:fece:feb9\")\n | eval ip4_prefix = ip_prefix(ip4, 24, 0), ip6_prefix = ip_prefix(ip6, 0, 112);\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.keep": "KEEP",
+ "languageDocumentationPopover.documentationESQL.keep.markdown": "### KEEP\n使用 `KEEP` 命令,您可以指定将返回哪些列以及返回这些列的顺序。\n\n要限制返回的列数,请使用列名的逗号分隔列表。将按指定顺序返回这些列:\n \n```\nFROM employees\n| KEEP first_name, last_name, height\n```\n\n您不必按名称指定每个列,而可以使用通配符返回名称匹配某种模式的所有列:\n\n```\nFROM employees\n| KEEP h*\n```\n\n星号通配符 (`*`) 自身将转换为不与其他参数匹配的所有列。此查询将首先返回所有名称以 h 开头的所有列,随后返回所有其他列:\n\n```\nFROM employees\n| KEEP h*, *\n```\n ",
+ "languageDocumentationPopover.documentationESQL.least": "LEAST",
+ "languageDocumentationPopover.documentationESQL.least.markdown": "\n\n ### LEAST\n 返回多个列中的最小值。除了可一次对多个列运行以外,此函数与 `MV_MIN` 类似。\n\n ```\n ROW a = 10, b = 20\n | EVAL l = LEAST(a, b)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.left": "LEFT",
+ "languageDocumentationPopover.documentationESQL.left.markdown": "\n\n ### LEFT\n 返回从“字符串”中提取“长度”字符的子字符串,从左侧开始。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL left = LEFT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.length": "LENGTH",
+ "languageDocumentationPopover.documentationESQL.length.markdown": "\n\n ### LENGTH\n 返回字符串的字符长度。\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fn_length = LENGTH(first_name)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.limit": "LIMIT",
+ "languageDocumentationPopover.documentationESQL.limit.markdown": "### LIMIT\n`LIMIT` 处理命令允许您限制行数:\n \n```\nFROM employees\n| LIMIT 5\n```\n ",
+ "languageDocumentationPopover.documentationESQL.locate": "LOCATE",
+ "languageDocumentationPopover.documentationESQL.locate.markdown": "\n\n ### LOCATE\n 返回一个整数,指示关键字子字符串在另一字符串中的位置\n\n ```\n row a = \"hello\"\n | eval a_ll = locate(a, \"ll\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.log": "LOG",
+ "languageDocumentationPopover.documentationESQL.log.markdown": "\n\n ### LOG\n 以某底数返回值的对数。输入可以为任何数字值,返回值始终为双精度值。\n\n 求零、负数的对数,以及底数为一时将返回 `null`,并显示警告。\n\n ```\n ROW base = 2.0, value = 8.0\n | EVAL s = LOG(base, value)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.log10": "LOG10",
+ "languageDocumentationPopover.documentationESQL.log10.markdown": "\n\n ### LOG10\n 以底数 10 返回值的对数。输入可以为任何数字值,返回值始终为双精度值。\n\n 求 0 和负数的对数时将返回 `null`,并显示警告。\n\n ```\n ROW d = 1000.0 \n | EVAL s = LOG10(d)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.ltrim": "LTRIM",
+ "languageDocumentationPopover.documentationESQL.ltrim.markdown": "\n\n ### LTRIM\n 从字符串中移除前导空格。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = LTRIM(message)\n | EVAL color = LTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.markdown": "## ES|QL\n\nES|QL(Elasticsearch 查询语言)查询包含一系列命令,它们用管道字符分隔:`|`。每个查询以**源命令**开头,它会生成一个表,其中通常包含来自 Elasticsearch 的数据。\n\n源命令可后接一个或多个**处理命令**。处理命令可通过添加、移除以及更改行和列来更改前一个命令的输出表。\n\n```\nsource-command\n| processing-command1\n| processing-command2\n```\n\n查询的结果为由最后的处理命令生成的表。 \n ",
+ "languageDocumentationPopover.documentationESQL.mv_append": "MV_APPEND",
+ "languageDocumentationPopover.documentationESQL.mv_append.markdown": "\n\n ### MV_APPEND\n 串联两个多值字段的值。\n\n ",
+ "languageDocumentationPopover.documentationESQL.mv_avg": "MV_AVG",
+ "languageDocumentationPopover.documentationESQL.mv_avg.markdown": "\n\n ### MV_AVG\n 将多值字段转换为包含所有值的平均值的单值字段。\n\n ```\n ROW a=[3, 5, 1, 6]\n | EVAL avg_a = MV_AVG(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_concat": "MV_CONCAT",
+ "languageDocumentationPopover.documentationESQL.mv_concat.markdown": "\n\n ### MV_CONCAT\n 将多值字符串表达式转换为单值列,其中包含由分隔符分隔的所有值的串联形式。\n\n ```\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL j = MV_CONCAT(a, \", \")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_count": "MV_COUNT",
+ "languageDocumentationPopover.documentationESQL.mv_count.markdown": "\n\n ### MV_COUNT\n 将多值表达式转换为包含值计数的单值列。\n\n ```\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL count_a = MV_COUNT(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_dedupe": "MV_DEDUPE",
+ "languageDocumentationPopover.documentationESQL.mv_dedupe.markdown": "\n\n ### MV_DEDUPE\n 移除多值字段中的重复值。\n\n ```\n ROW a=[\"foo\", \"foo\", \"bar\", \"foo\"]\n | EVAL dedupe_a = MV_DEDUPE(a)\n ```\n 注意:`MV_DEDUPE` 可能但不会始终对列中的值进行排序。\n ",
+ "languageDocumentationPopover.documentationESQL.mv_first": "MV_FIRST",
+ "languageDocumentationPopover.documentationESQL.mv_first.markdown": "\n\n ### MV_FIRST\n 将多值表达式转换为包含第一个值的\n 单值列。这在从按已知顺序发出多值列的\n 函数(如 `SPLIT`)中读取数据时尤其有用。\n\n 无法保证从底层存储\n 读取多值字段的顺序。它 *通常* 为升序,但不应\n 依赖于此。如果需要最小值,请使用 `MV_MIN` 而不是\n `MV_FIRST`。`MV_MIN` 针对排序值进行了优化,因此\n 对 `MV_FIRST` 没有性能优势。\n\n ```\n ROW a=\"foo;bar;baz\"\n | EVAL first_a = MV_FIRST(SPLIT(a, \";\"))\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_last": "MV_LAST",
+ "languageDocumentationPopover.documentationESQL.mv_last.markdown": "\n\n ### MV_LAST\n 将多值表达式转换为包含最后一个值的单值\n 列。这在从按已知顺序发出多值列的函数\n (如 `SPLIT`)中读取数据时尤其有用。\n\n 无法保证从底层存储\n 读取多值字段的顺序。它 *通常* 为升序,但不应\n 依赖于此。如果需要最大值,请使用 `MV_MAX` 而不是\n `MV_LAST`。`MV_MAX` 针对排序值进行了优化,因此\n 对 `MV_LAST` 没有性能优势。\n\n ```\n ROW a=\"foo;bar;baz\"\n | EVAL last_a = MV_LAST(SPLIT(a, \";\"))\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_max": "MV_MAX",
+ "languageDocumentationPopover.documentationESQL.mv_max.markdown": "\n\n ### MV_MAX\n 将多值表达式转换为包含最大值的单值列。\n\n ```\n ROW a=[3, 5, 1]\n | EVAL max_a = MV_MAX(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_median": "MV_MEDIAN",
+ "languageDocumentationPopover.documentationESQL.mv_median.markdown": "\n\n ### MV_MEDIAN\n 将多值字段转换为包含中位数值的单值字段。\n\n ```\n ROW a=[3, 5, 1]\n | EVAL median_a = MV_MEDIAN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_min": "MV_MIN",
+ "languageDocumentationPopover.documentationESQL.mv_min.markdown": "\n\n ### MV_MIN\n 将多值表达式转换为包含最小值的单值列。\n\n ```\n ROW a=[2, 1]\n | EVAL min_a = MV_MIN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_slice": "MV_SLICE",
+ "languageDocumentationPopover.documentationESQL.mv_slice.markdown": "\n\n ### MV_SLICE\n 使用起始和结束索引值返回多值字段的子集。\n\n ```\n row a = [1, 2, 2, 3]\n | eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_sort": "MV_SORT",
+ "languageDocumentationPopover.documentationESQL.mv_sort.markdown": "\n\n ### MV_SORT\n 按字典顺序对多值字段排序。\n\n ```\n ROW a = [4, 2, -3, 2]\n | EVAL sa = mv_sort(a), sd = mv_sort(a, \"DESC\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_sum": "MV_SUM",
+ "languageDocumentationPopover.documentationESQL.mv_sum.markdown": "\n\n ### MV_SUM\n 将多值字段转换为包含所有值的总和的单值字段。\n\n ```\n ROW a=[3, 5, 6]\n | EVAL sum_a = MV_SUM(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mv_zip": "MV_ZIP",
+ "languageDocumentationPopover.documentationESQL.mv_zip.markdown": "\n\n ### MV_ZIP\n 组合两个使用分隔符联接在一起的多值字段中的值。\n\n ```\n ROW a = [\"x\", \"y\", \"z\"], b = [\"1\", \"2\"]\n | EVAL c = mv_zip(a, b, \"-\")\n | KEEP a, b, c\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.mvExpand": "MV_EXPAND",
+ "languageDocumentationPopover.documentationESQL.mvExpand.markdown": "### MV_EXPAND\n`MV_EXPAND` 处理命令将多值字段扩展成每个值一行,从而复制其他字段: \n```\nROW a=[1,2,3], b=\"b\", j=[\"a\",\"b\"]\n| MV_EXPAND a\n```\n ",
+ "languageDocumentationPopover.documentationESQL.now": "NOW",
+ "languageDocumentationPopover.documentationESQL.now.markdown": "\n\n ### NOW\n 返回当前日期和时间。\n\n ```\n ROW current_date = NOW()\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.operators": "运算符",
+ "languageDocumentationPopover.documentationESQL.operatorsDocumentationESQLDescription": "ES|QL 支持以下运算符:",
+ "languageDocumentationPopover.documentationESQL.pi": "PI",
+ "languageDocumentationPopover.documentationESQL.pi.markdown": "\n\n ### PI\n 返回 Pi,即圆的周长与其直径的比率。\n\n ```\n ROW PI()\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.pow": "POW",
+ "languageDocumentationPopover.documentationESQL.pow.markdown": "\n\n ### POW\n 返回提升为 `exponent` 幂的 `base` 的值。\n\n ```\n ROW base = 2.0, exponent = 2\n | EVAL result = POW(base, exponent)\n ```\n 注意:此处仍可能使双精度结果溢出;在该情况下,将返回 null。\n ",
+ "languageDocumentationPopover.documentationESQL.predicates": "Null 值",
+ "languageDocumentationPopover.documentationESQL.predicates.markdown": "### NULL 值\n对于 NULL 比较,请使用 `IS NULL` 和 `IS NOT NULL` 谓词:\n\n```\nFROM employees\n| WHERE birth_date IS NULL\n| KEEP first_name, last_name\n| SORT first_name\n| LIMIT 3\n```\n\n```\nFROM employees\n| WHERE is_rehired IS NOT NULL\n| STATS count(emp_no)\n```\n ",
+ "languageDocumentationPopover.documentationESQL.processingCommands": "处理命令",
+ "languageDocumentationPopover.documentationESQL.processingCommandsDescription": "处理命令会通过添加、移除或更改行和列来更改输入表。ES|QL 支持以下处理命令。",
+ "languageDocumentationPopover.documentationESQL.rename": "RENAME",
+ "languageDocumentationPopover.documentationESQL.rename.markdown": "### RENAME\n请使用 `RENAME` 通过以下语法对列重命名:\n\n```\nRENAME AS \n```\n\n例如:\n\n```\nFROM employees\n| KEEP first_name, last_name, still_hired\n| RENAME still_hired AS employed\n```\n\n如果使用新名称的列已存在,将用新列替换该列。\n\n可以使用单个 `RENAME` 命令对多个列重命名:\n\n```\nFROM employees\n| KEEP first_name, last_name\n| RENAME first_name AS fn, last_name AS ln\n```\n ",
+ "languageDocumentationPopover.documentationESQL.repeat": "REPEAT",
+ "languageDocumentationPopover.documentationESQL.repeat.markdown": "\n\n ### REPEAT\n 返回通过串联 `string` 自身与指定次数 `number` 构造而成的字符串。\n\n ```\n ROW a = \"Hello!\"\n | EVAL triple_a = REPEAT(a, 3);\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.replace": "REPLACE",
+ "languageDocumentationPopover.documentationESQL.replace.markdown": "\n\n ### REPLACE\n 此函数将字符串 `str` 中正则表达式 `regex` 的任何匹配项\n 替换为替代字符串 `newStr`。\n\n ```\n ROW str = \"Hello World\"\n | EVAL str = REPLACE(str, \"World\", \"Universe\")\n | KEEP str\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.right": "RIGHT",
+ "languageDocumentationPopover.documentationESQL.right.markdown": "\n\n ### RIGHT\n 返回从“字符串”中提取“长度”字符的子字符串,从右侧开始。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL right = RIGHT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.round": "ROUND",
+ "languageDocumentationPopover.documentationESQL.round.markdown": "\n\n ### ROUND\n 将数字舍入到指定小数位数。\n 默认值为 0,即返回最近的整数。如果\n 精确度为负数,则将数字舍入到\n 小数点左侧的位数。\n\n ```\n FROM employees\n | KEEP first_name, last_name, height\n | EVAL height_ft = ROUND(height * 3.281, 1)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.row": "ROW",
+ "languageDocumentationPopover.documentationESQL.row.markdown": "### ROW\n`ROW` 源命令会生成一个行,其中包含一个或多个含有您指定的值的列。这可以用于测试。\n \n```\nROW a = 1, b = \"two\", c = null\n```\n\n请使用方括号创建多值列:\n\n```\nROW a = [2, 1]\n```\n\nROW 支持使用函数:\n\n```\nROW a = ROUND(1.23, 0)\n```\n ",
+ "languageDocumentationPopover.documentationESQL.rtrim": "RTRIM",
+ "languageDocumentationPopover.documentationESQL.rtrim.markdown": "\n\n ### RTRIM\n 从字符串中移除尾随空格。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = RTRIM(message)\n | EVAL color = RTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.show": "SHOW",
+ "languageDocumentationPopover.documentationESQL.show.markdown": "### SHOW\n`SHOW
- ` 源命令返回有关部署及其功能的信息:\n\n* 使用 `SHOW INFO` 可返回部署的版本、构建日期和哈希。\n* 使用 `SHOW FUNCTIONS` 可返回所有受支持函数的列表和每个函数的概要。\n ",
+ "languageDocumentationPopover.documentationESQL.signum": "SIGNUM",
+ "languageDocumentationPopover.documentationESQL.signum.markdown": "\n\n ### SIGNUM\n 返回给定数字的符号。\n 它对负数返回 `-1`,对 `0` 返回 `0`,对正数返回 `1`。\n\n ```\n ROW d = 100.0\n | EVAL s = SIGNUM(d)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.sin": "SIN",
+ "languageDocumentationPopover.documentationESQL.sin.markdown": "\n\n ### SIN\n 返回角度的正弦三角函数。\n\n ```\n ROW a=1.8 \n | EVAL sin=SIN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.sinh": "SINH",
+ "languageDocumentationPopover.documentationESQL.sinh.markdown": "\n\n ### SINH\n 返回角度的双曲正弦。\n\n ```\n ROW a=1.8 \n | EVAL sinh=SINH(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.sort": "SORT",
+ "languageDocumentationPopover.documentationESQL.sort.markdown": "### SORT\n使用 `SORT` 命令可对一个或多个字段上的行排序:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height\n```\n\n默认排序顺序为升序。请使用 `ASC` 或 `DESC` 设置显式排序顺序:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC\n```\n\n如果两个行具有相同的排序键,则保留原始顺序。您可以提供其他排序表达式充当连接断路器:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC, first_name ASC\n```\n\n#### `null` 值\n默认情况下,会将 `null` 值视为大于任何其他值。使用升序排序顺序时,会最后对 `null` 值排序,而使用降序排序顺序时,会首先对 `null` 值排序。您可以通过提供 `NULLS FIRST` 或 `NULLS LAST` 来更改该排序:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT first_name ASC NULLS FIRST\n```\n ",
+ "languageDocumentationPopover.documentationESQL.sourceCommands": "源命令",
+ "languageDocumentationPopover.documentationESQL.split": "SPLIT",
+ "languageDocumentationPopover.documentationESQL.split.markdown": "\n\n ### SPLIT\n 将单值字符串拆分成多个字符串。\n\n ```\n ROW words=\"foo;bar;baz;qux;quux;corge\"\n | EVAL word = SPLIT(words, \";\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.sqrt": "SQRT",
+ "languageDocumentationPopover.documentationESQL.sqrt.markdown": "\n\n ### SQRT\n 返回数字的平方根。输入可以为任何数字值,返回值始终为双精度值。\n 负数和无穷大的平方根为 null。\n\n ```\n ROW d = 100.0\n | EVAL s = SQRT(d)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_contains": "ST_CONTAINS",
+ "languageDocumentationPopover.documentationESQL.st_contains.markdown": "\n\n ### ST_CONTAINS\n 返回第一个几何形状是否包含第二个几何形状。\n 这是 `ST_WITHIN` 函数的反向函数。\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_CONTAINS(city_boundary, TO_GEOSHAPE(\"POLYGON((109.35 18.3, 109.45 18.3, 109.45 18.4, 109.35 18.4, 109.35 18.3))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_disjoint": "ST_DISJOINT",
+ "languageDocumentationPopover.documentationESQL.st_disjoint.markdown": "\n\n ### ST_DISJOINT\n 返回两个几何图形或几何图形列是否不相交。\n 这是 `ST_INTERSECTS` 函数的反向函数。\n 从数学上讲:ST_Disjoint(A, B) ⇔ A ⋂ B = ∅\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_DISJOINT(city_boundary, TO_GEOSHAPE(\"POLYGON((-10 -60, 120 -60, 120 60, -10 60, -10 -60))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_distance": "ST_DISTANCE",
+ "languageDocumentationPopover.documentationESQL.st_distance.markdown": "\n\n ### ST_DISTANCE\n 计算两点之间的距离。\n 对于笛卡尔几何形状,这是以相同单位作为原始坐标时的毕达哥拉斯距离。\n 对于地理几何形状而言,这是沿着地球大圆的圆周距离(以米为单位)。\n\n ```\n FROM airports\n | WHERE abbrev == \"CPH\"\n | EVAL distance = ST_DISTANCE(location, city_location)\n | KEEP abbrev, name, location, city_location, distance\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_intersects": "ST_INTERSECTS",
+ "languageDocumentationPopover.documentationESQL.st_intersects.markdown": "\n\n ### ST_INTERSECTS\n 如果两个几何形状相交,则返回 true。\n 如果它们有任何共同点,包括其内点\n (沿线的点或多边形内的点),则表示它们相交。\n 这是 `ST_DISJOINT` 函数的反向函数。\n 从数学上讲:ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅\n\n ```\n FROM airports\n | WHERE ST_INTERSECTS(location, TO_GEOSHAPE(\"POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))\"))\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_within": "ST_WITHIN",
+ "languageDocumentationPopover.documentationESQL.st_within.markdown": "\n\n ### ST_WITHIN\n 返回第一个几何形状是否在第二个几何形状内。\n 这是 `ST_CONTAINS` 函数的反向函数。\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_WITHIN(city_boundary, TO_GEOSHAPE(\"POLYGON((109.1 18.15, 109.6 18.15, 109.6 18.65, 109.1 18.65, 109.1 18.15))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_x": "ST_X",
+ "languageDocumentationPopover.documentationESQL.st_x.markdown": "\n\n ### ST_X\n 从提供的点中提取 `x` 坐标。\n 如果点的类型为 `geo_point`,则这等同于提取 `longitude` 值。\n\n ```\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.st_y": "ST_Y",
+ "languageDocumentationPopover.documentationESQL.st_y.markdown": "\n\n ### ST_Y\n 从提供的点中提取 `y` 坐标。\n 如果点的类型为 `geo_point`,则这等同于提取 `latitude` 值。\n\n ```\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.starts_with": "STARTS_WITH",
+ "languageDocumentationPopover.documentationESQL.starts_with.markdown": "\n\n ### STARTS_WITH\n 返回指示关键字字符串是否以另一个字符串开头的布尔值。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_S = STARTS_WITH(last_name, \"B\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.statsby": "STATS ...BY",
+ "languageDocumentationPopover.documentationESQL.statsby.markdown": "### STATS ...BY\n使用 `STATS ...BY` 可根据公共值对行分组,并计算已分组行中的一个或多个聚合值。\n\n**示例**:\n\n```\nFROM employees\n| STATS count = COUNT(emp_no) BY languages\n| SORT languages\n```\n\n如果省略 `BY`,输出表实际将包含一行,其中为应用于整个数据集的聚合:\n\n```\nFROM employees\n| STATS avg_lang = AVG(languages)\n```\n\n可以计算多个值:\n\n```\nFROM employees\n| STATS avg_lang = AVG(languages), max_lang = MAX(languages)\n```\n\n也可以按多个值分组(仅长整型和关键字家族字段支持):\n\n```\nFROM employees\n| EVAL hired = DATE_FORMAT(hire_date, \"YYYY\")\n| STATS avg_salary = AVG(salary) BY hired, languages.long\n| EVAL avg_salary = ROUND(avg_salary)\n| SORT hired, languages.long\n```\n\n请参阅**聚合函数**获取可与 `STATS ...BY` 搭配使用的函数列表。\n\n聚合函数和分组表达式均接受其他函数。这在对多值列使用 `STATS...BY` 时有用。例如,要计算平均工资变动,可以首先使用 `MV_AVG` 对每名员工的多个值求平均值,然后将结果用于 `AVG` 函数:\n\n```\nFROM employees\n| STATS avg_salary_change = AVG(MV_AVG(salary_change))\n```\n\n按表达式分组的示例为根据员工姓氏的第一个字母对其进行分组:\n\n```\nFROM employees\n| STATS my_count = COUNT() BY LEFT(last_name, 1)\n| SORT `LEFT(last_name, 1)`\n```\n\n指定输出列名称为可选操作。如果未指定,新列名称等于该表达式。以下查询将返回名为 `AVG(salary)` 的列:\n\n```\nFROM employees\n| STATS AVG(salary)\n```\n\n由于此名称包含特殊字符,在后续命令中使用该名称时,需要用反撇号 (`) 引用它:\n\n```\nFROM employees\n| STATS AVG(salary)\n| EVAL avg_salary_rounded = ROUND(`AVG(salary)`)\n```\n\n**注意**:不包含任何组的 `STATS` 比添加组更快。\n\n**注意**:当前,根据单一表达式进行分组比根据许多表达式进行分组更为优化。\n ",
+ "languageDocumentationPopover.documentationESQL.stringOperators": "LIKE 和 RLIKE",
+ "languageDocumentationPopover.documentationESQL.stringOperators.markdown": "### LIKE 和 RLIKE\n使用通配符或正则表达式比较字符串时,请使用 `LIKE` 或 `RLIKE`:\n\n使用 `LIKE` 时,可使用通配符来匹配字符串。支持以下通配符字符:\n\n* `*` 匹配零个或更多字符。\n* `?` 匹配一个字符。\n\n```\nFROM employees\n| WHERE first_name LIKE \"?b*\"\n| KEEP first_name, last_name\n```\n\n使用 `RLIKE` 时,可使用正则表达式来匹配字符串:\n\n```\nFROM employees\n| WHERE first_name RLIKE \".leja.*\"\n| KEEP first_name, last_name\n```\n ",
+ "languageDocumentationPopover.documentationESQL.substring": "SUBSTRING",
+ "languageDocumentationPopover.documentationESQL.substring.markdown": "\n\n ### SUBSTRING\n 返回字符串的子字符串,用起始位置和可选长度指定\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_sub = SUBSTRING(last_name, 1, 3)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.tan": "TAN",
+ "languageDocumentationPopover.documentationESQL.tan.markdown": "\n\n ### TAN\n 返回角度的正切三角函数。\n\n ```\n ROW a=1.8 \n | EVAL tan=TAN(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.tanh": "TANH",
+ "languageDocumentationPopover.documentationESQL.tanh.markdown": "\n\n ### TANH\n 返回角度的双曲正切函数。\n\n ```\n ROW a=1.8 \n | EVAL tanh=TANH(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.tau": "TAU",
+ "languageDocumentationPopover.documentationESQL.tau.markdown": "\n\n ### TAU\n 返回圆的圆周长与其半径的比率。\n\n ```\n ROW TAU()\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_base64": "TO_BASE64",
+ "languageDocumentationPopover.documentationESQL.to_base64.markdown": "\n\n ### TO_BASE64\n 将字符串编码为 base64 字符串。\n\n ```\n row a = \"elastic\" \n | eval e = to_base64(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_boolean": "TO_BOOLEAN",
+ "languageDocumentationPopover.documentationESQL.to_boolean.markdown": "\n\n ### TO_BOOLEAN\n 将输入值转换为布尔值。\n 字符串值 *true* 将不区分大小写并被转换为布尔值 *true*。\n 对于任何其他值,包括空字符串,此函数将返回 *false*。\n 数字值 *0* 将转换为 *false*,任何其他值将转换为 *true*。\n\n ```\n ROW str = [\"true\", \"TRuE\", \"false\", \"\", \"yes\", \"1\"]\n | EVAL bool = TO_BOOLEAN(str)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_cartesianpoint": "TO_CARTESIANPOINT",
+ "languageDocumentationPopover.documentationESQL.to_cartesianpoint.markdown": "\n\n ### TO_CARTESIANPOINT\n 将输入值转换为 `cartesian_point` 值。\n 字符串只有符合 WKT 点格式时,才能成功转换。\n\n ```\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POINT(7580.93 2272.77)\"]\n | MV_EXPAND wkt\n | EVAL pt = TO_CARTESIANPOINT(wkt)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_cartesianshape": "TO_CARTESIANSHAPE",
+ "languageDocumentationPopover.documentationESQL.to_cartesianshape.markdown": "\n\n ### TO_CARTESIANSHAPE\n 将输入值转换为 `cartesian_shape` 值。\n 字符串只有符合 WKT 格式时,才能成功转换。\n\n ```\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POLYGON ((3339584.72 1118889.97, 4452779.63 4865942.27, 2226389.81 4865942.27, 1113194.90 2273030.92, 3339584.72 1118889.97))\"]\n | MV_EXPAND wkt\n | EVAL geom = TO_CARTESIANSHAPE(wkt)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_datetime": "TO_DATETIME",
+ "languageDocumentationPopover.documentationESQL.to_datetime.markdown": "\n\n ### TO_DATETIME\n 将输入值转换为日期值。\n 仅当字符串采用 `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'` 格式时,才可进行成功转换。\n 要转换其他格式的日期,请使用 `DATE_PARSE`。\n\n ```\n ROW string = [\"1953-09-02T00:00:00.000Z\", \"1964-06-02T00:00:00.000Z\", \"1964-06-02 00:00:00\"]\n | EVAL datetime = TO_DATETIME(string)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_degrees": "TO_DEGREES",
+ "languageDocumentationPopover.documentationESQL.to_degrees.markdown": "\n\n ### TO_DEGREES\n 将弧度转换为度数。\n\n ```\n ROW rad = [1.57, 3.14, 4.71]\n | EVAL deg = TO_DEGREES(rad)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_double": "TO_DOUBLE",
+ "languageDocumentationPopover.documentationESQL.to_double.markdown": "\n\n ### TO_DOUBLE\n 将输入值转换为双精度值。如果输入参数为日期类型,\n 会将其值解析为自 Unix epoch 以来的毫秒数,\n 并转换为双精度值。布尔值 *true* 将转换为双精度值 *1.0*,*false* 转换为 *0.0*。\n\n ```\n ROW str1 = \"5.20128E11\", str2 = \"foo\"\n | EVAL dbl = TO_DOUBLE(\"520128000000\"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_geopoint": "TO_GEOPOINT",
+ "languageDocumentationPopover.documentationESQL.to_geopoint.markdown": "\n\n ### TO_GEOPOINT\n 将输入值转换为 `geo_point` 值。\n 字符串只有符合 WKT 点格式时,才能成功转换。\n\n ```\n ROW wkt = \"POINT(42.97109630194 14.7552534413725)\"\n | EVAL pt = TO_GEOPOINT(wkt)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_geoshape": "TO_GEOSHAPE",
+ "languageDocumentationPopover.documentationESQL.to_geoshape.markdown": "\n\n ### TO_GEOSHAPE\n 将输入值转换为 `geo_shape` 值。\n 字符串只有符合 WKT 格式时,才能成功转换。\n\n ```\n ROW wkt = \"POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))\"\n | EVAL geom = TO_GEOSHAPE(wkt)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_integer": "TO_INTEGER",
+ "languageDocumentationPopover.documentationESQL.to_integer.markdown": "\n\n ### TO_INTEGER\n 将输入值转换为整数值。\n 如果输入参数为日期类型,会将其值解析为自 Unix epoch 以来\n 的毫秒数,并转换为整数。\n 布尔值 *true* 将转换为整数 *1*,*false* 转换为 *0*。\n\n ```\n ROW long = [5013792, 2147483647, 501379200000]\n | EVAL int = TO_INTEGER(long)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_ip": "TO_IP",
+ "languageDocumentationPopover.documentationESQL.to_ip.markdown": "\n\n ### TO_IP\n 将输入字符串转换为 IP 值。\n\n ```\n ROW str1 = \"1.1.1.1\", str2 = \"foo\"\n | EVAL ip1 = TO_IP(str1), ip2 = TO_IP(str2)\n | WHERE CIDR_MATCH(ip1, \"1.0.0.0/8\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_long": "TO_LONG",
+ "languageDocumentationPopover.documentationESQL.to_long.markdown": "\n\n ### TO_LONG\n 将输入值转换为长整型值。如果输入参数为日期类型,\n 会将其值解析为自 Unix epoch 以来的毫秒数,并转换为长整型值。\n 布尔值 *true* 将转换为长整型值 *1*,*false* 转换为 *0*。\n\n ```\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_LONG(str1), long2 = TO_LONG(str2), long3 = TO_LONG(str3)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_lower": "TO_LOWER",
+ "languageDocumentationPopover.documentationESQL.to_lower.markdown": "\n\n ### TO_LOWER\n 返回一个新字符串,表示已将输入字符串转为小写。\n\n ```\n ROW message = \"Some Text\"\n | EVAL message_lower = TO_LOWER(message)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_radians": "TO_RADIANS",
+ "languageDocumentationPopover.documentationESQL.to_radians.markdown": "\n\n ### TO_RADIANS\n 将度数转换为弧度。\n\n ```\n ROW deg = [90.0, 180.0, 270.0]\n | EVAL rad = TO_RADIANS(deg)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_string": "TO_STRING",
+ "languageDocumentationPopover.documentationESQL.to_string.markdown": "\n\n ### TO_STRING\n 将输入值转换为字符串。\n\n ```\n ROW a=10\n | EVAL j = TO_STRING(a)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_unsigned_long": "TO_UNSIGNED_LONG",
+ "languageDocumentationPopover.documentationESQL.to_unsigned_long.markdown": "\n\n ### TO_UNSIGNED_LONG\n 将输入值转换为无符号长整型值。如果输入参数为日期类型,\n 会将其值解析为自 Unix epoch 以来的毫秒数,并转换为无符号长整型值。\n 布尔值 *true* 将转换为无符号长整型值 *1*,*false* 转换为 *0*。\n\n ```\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_UNSIGNED_LONG(str1), long2 = TO_ULONG(str2), long3 = TO_UL(str3)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_upper": "TO_UPPER",
+ "languageDocumentationPopover.documentationESQL.to_upper.markdown": "\n\n ### TO_UPPER\n 返回一个新字符串,表示已将输入字符串转为大写。\n\n ```\n ROW message = \"Some Text\"\n | EVAL message_upper = TO_UPPER(message)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.to_version": "TO_VERSION",
+ "languageDocumentationPopover.documentationESQL.to_version.markdown": "\n\n ### TO_VERSION\n 将输入字符串转换为版本值。\n\n ```\n ROW v = TO_VERSION(\"1.2.3\")\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.trim": "TRIM",
+ "languageDocumentationPopover.documentationESQL.trim.markdown": "\n\n ### TRIM\n 从字符串中移除前导和尾随空格。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = TRIM(message)\n | EVAL color = TRIM(color)\n ```\n ",
+ "languageDocumentationPopover.documentationESQL.where": "WHERE",
+ "languageDocumentationPopover.documentationESQL.where.markdown": "### WHERE\n使用 `WHERE` 可生成一个表,其中包含输入表中所提供的条件评估为 `true` 的所有行:\n \n```\nFROM employees\n| KEEP first_name, last_name, still_hired\n| WHERE still_hired == true\n```\n\n#### 运算符\n\n请参阅**运算符**了解所支持的运算符的概览。\n\n#### 函数\n`WHERE` 支持各种用于计算值的函数。请参阅**函数**了解更多信息。\n ",
"languageDocumentationPopover.documentationLinkLabel": "查看整个文档",
"languageDocumentationPopover.header": "{language} 参考",
"languageDocumentationPopover.searchPlaceholder": "搜索",
@@ -7090,253 +7327,17 @@
"telemetry.usageCollectionConstant": "使用情况收集",
"telemetry.usageDataTitle": "使用情况收集",
"textBasedEditor.query.textBasedLanguagesEditor.aborted": "请求已中止",
- "languageDocumentationPopover.documentationESQL.aggregationFunctions": "聚合函数",
- "languageDocumentationPopover.documentationESQL.aggregationFunctionsDocumentationESQLDescription": "这些函数可以与 STATS...BY 搭配使用:",
"textBasedEditor.query.textBasedLanguagesEditor.cancel": "取消",
"textBasedEditor.query.textBasedLanguagesEditor.collapseLabel": "折叠",
- "languageDocumentationPopover.documentationESQL.commandsDescription": "源命令会生成一个表,其中通常包含来自 Elasticsearch 的数据。ES|QL 支持以下源命令。",
"textBasedEditor.query.textBasedLanguagesEditor.disableWordWrapLabel": "移除管道符上的换行符",
- "languageDocumentationPopover.documentationESQL.abs": "ABS",
- "languageDocumentationPopover.documentationESQL.abs.markdown": "\n\n ### ABS\n 返回绝对值。\n\n ```\n ROW number = -1.0 \n | EVAL abs_number = ABS(number)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.acos": "ACOS",
- "languageDocumentationPopover.documentationESQL.acos.markdown": "\n\n ### ACOS\n 返回 `n` 的反余弦作为角度,以弧度表示。\n\n ```\n ROW a=.9\n | EVAL acos=ACOS(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.asin": "ASIN",
- "languageDocumentationPopover.documentationESQL.asin.markdown": "\n\n ### ASIN\n 返回输入数字表达式的反正弦\n 作为角度,以弧度表示。\n\n ```\n ROW a=.9\n | EVAL asin=ASIN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.atan": "ATAN",
- "languageDocumentationPopover.documentationESQL.atan.markdown": "\n\n ### ATAN\n 返回输入数字表达式的反正切\n 作为角度,以弧度表示。\n\n ```\n ROW a=12.9\n | EVAL atan=ATAN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.atan2": "ATAN2",
- "languageDocumentationPopover.documentationESQL.atan2.markdown": "\n\n ### ATAN2\n 笛卡儿平面中正 x 轴\n 与从原点到点 (x , y) 构成的射线之间的角度,以弧度表示。\n\n ```\n ROW y=12.9, x=.6\n | EVAL atan2=ATAN2(y, x)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.autoBucketFunction": "BUCKET",
- "languageDocumentationPopover.documentationESQL.autoBucketFunction.markdown": "### BUCKET\n用日期时间或数字输入创建值(存储桶)的分组。存储桶的大小可以直接提供,或基于建议的计数和值范围进行选择。\n\n`BUCKET` 以两种模式运行:\n\n1.在此模式下基于存储桶计数建议(四个参数)和范围计算存储桶的大小。\n2.在此模式下直接提供存储桶大小(两个参数)。\n\n使用存储桶的目标数量、起始范围和结束范围,`BUCKET` 将选取适当的存储桶大小以生成目标数量或更小数量的存储桶。\n\n例如,一年请求多达 20 个存储桶会按每月时间间隔组织数据:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT hire_date\n```\n\n**注意**:目标并不是提供存储桶的确切目标数量,而是选择一个范围,最多提供存储桶的目标数量。\n\n可以组合 `BUCKET` 与聚合以创建直方图:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_month = COUNT(*) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT month\n```\n\n**注意**:`BUCKET` 不会创建未匹配任何文档的存储桶。因此,上一示例缺少 `1985-03-01` 和其他日期。\n\n如果需要更多存储桶,可能导致更小的范围。例如,如果一年内最多请求 100 个存储桶,会导致周期为周的存储桶:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 100, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT week\n```\n\n**注意**:`AUTO_BUCKET` 不筛选任何行。它只会使用提供的范围来选取适当的存储桶大小。对于值超出范围的行,它会返回与超出范围的存储桶对应的存储桶值。组合 `BUCKET` 与 `WHERE` 可筛选行。\n\n如果提前已知所需存储桶大小,则只需提供它作为第二个参数,而忽略范围:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS hires_per_week = COUNT(*) BY week = BUCKET(hire_date, 1 week)\n| SORT week\n```\n\n**注意**:提供存储桶大小作为第二个参数时,它必须为持续时间或日期期间。\n\n`BUCKET` 还可对数字字段执行操作。例如,要创建工资直方图:\n\n```\nFROM employees\n| STATS COUNT(*) by bs = BUCKET(salary, 20, 25324, 74999)\n| SORT bs\n```\n\n与前面的有意筛选日期范围示例不同,您极少想要筛选数值范围。您必须分别查找最小值和最大值。ES|QL 尚未提供简便方法来自动执行此操作。\n\n如果提前已知所需存储桶大小,则可以忽略该范围。只需提供它作为第二个参数即可:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS c = COUNT(1) BY b = BUCKET(salary, 5000.)\n| SORT b\n```\n\n**注意**:提供存储桶大小作为第二个参数时,它必须为 **浮点类型**。\n\n这里提供了一个示例,用于为过去 24 小时创建小时存储桶,并计算每小时的事件数:\n\n```\nFROM sample_data\n| WHERE @timestamp >= NOW() - 1 day and @timestamp < NOW()\n| STATS COUNT(*) BY bucket = BUCKET(@timestamp, 25, NOW() - 1 day, NOW())\n```\n\n这里提供了一个示例,用于为 1985 年创建月度存储桶,并按聘用月份计算平均工资:\n\n```\nFROM employees\n| WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n| STATS AVG(salary) BY bucket = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n| SORT bucket\n```\n\n`BUCKET` 可用在 `STATS … BY …` 命令的聚合和分组部分, 前提是在聚合部分中,该函数 **由在分组部分中定义的别名引用**,或使用完全相同的表达式调用。\n\n例如:\n\n```\nFROM employees\n| STATS s1 = b1 + 1, s2 = BUCKET(salary / 1000 + 999, 50.) + 2 BY b1 = BUCKET(salary / 100 + 99, 50.), b2 = BUCKET(salary / 1000 + 999, 50.)\n| SORT b1, b2\n| KEEP s1, b1, s2, b2\n```\n ",
- "languageDocumentationPopover.documentationESQL.binaryOperators": "二进制运算符",
- "languageDocumentationPopover.documentationESQL.binaryOperators.markdown": "### 二进制运算符\n支持这些二进制比较运算符:\n\n* 等于:`==`\n* 不等于:`!=`\n* 小于:`<`\n* 小于或等于:`<=`\n* 大于:`>`\n* 大于或等于:`>=`\n* 加:`+`\n* 减:`-`\n* 乘:`*`\n* 除:`/`\n* 取模:`%`\n ",
- "languageDocumentationPopover.documentationESQL.booleanOperators": "布尔运算符",
- "languageDocumentationPopover.documentationESQL.booleanOperators.markdown": "### 布尔运算符\n支持以下布尔运算符:\n\n* `AND`\n* `OR`\n* `NOT`\n ",
- "languageDocumentationPopover.documentationESQL.bucket": "BUCKET",
- "languageDocumentationPopover.documentationESQL.bucket.markdown": "\n\n ### BUCKET\n 用日期时间或数字输入创建值(存储桶)的分组。\n 存储桶的大小可以直接提供,或基于建议的计数和值范围进行选择。\n\n ```\n FROM employees\n | WHERE hire_date >= \"1985-01-01T00:00:00Z\" AND hire_date < \"1986-01-01T00:00:00Z\"\n | STATS hire_date = MV_SORT(VALUES(hire_date)) BY month = BUCKET(hire_date, 20, \"1985-01-01T00:00:00Z\", \"1986-01-01T00:00:00Z\")\n | SORT hire_date\n ```\n ",
- "languageDocumentationPopover.documentationESQL.case": "CASE",
- "languageDocumentationPopover.documentationESQL.case.markdown": "\n\n ### CASE\n 接受成对的条件和值。此函数返回属于第一个\n 评估为 `true` 的条件的值。\n\n 如果参数数量为奇数,则最后一个参数为\n 在无条件匹配时返回的默认值。如果参数数量为偶数,且\n 无任何条件匹配,则此函数返回 `null`。\n\n ```\n FROM employees\n | EVAL type = CASE(\n languages <= 1, \"monolingual\",\n languages <= 2, \"bilingual\",\n \"polyglot\")\n | KEEP emp_no, languages, type\n ```\n ",
- "languageDocumentationPopover.documentationESQL.castOperator": "Cast (::)",
- "languageDocumentationPopover.documentationESQL.castOperator.markdown": "### CAST (`::`)\n`::` 运算符为 `TO_` 类型转换函数提供了实用的替代语法。\n\n例如:\n```\nROW ver = CONCAT((\"0\"::INT + 1)::STRING, \".2.3\")::VERSION\n```\n ",
- "languageDocumentationPopover.documentationESQL.cbrt": "CBRT",
- "languageDocumentationPopover.documentationESQL.cbrt.markdown": "\n\n ### CBRT\n 返回数字的立方根。输入可以为任何数字值,返回值始终为双精度值。\n 无穷大的立方根为 null。\n\n ```\n ROW d = 1000.0\n | EVAL c = cbrt(d)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.ceil": "CEIL",
- "languageDocumentationPopover.documentationESQL.ceil.markdown": "\n\n ### CEIL\n 将数字四舍五入为最近的整数。\n\n ```\n ROW a=1.8\n | EVAL a=CEIL(a)\n ```\n 注意:对于 `long`(包括无符号值)和 `integer`,这相当于“无操作”。对于 `double`,这会提取最接近整数的 `double` 值,类似于 Math.ceil。\n ",
- "languageDocumentationPopover.documentationESQL.cidr_match": "CIDR_MATCH",
- "languageDocumentationPopover.documentationESQL.cidr_match.markdown": "\n\n ### CIDR_MATCH\n 如果提供的 IP 包含在所提供的其中一个 CIDR 块中,则返回 true。\n\n ```\n FROM hosts \n | WHERE CIDR_MATCH(ip1, \"127.0.0.2/32\", \"127.0.0.3/32\") \n | KEEP card, host, ip0, ip1\n ```\n ",
- "languageDocumentationPopover.documentationESQL.coalesce": "COALESCE",
- "languageDocumentationPopover.documentationESQL.coalesce.markdown": "\n\n ### COALESCE\n 返回它的第一个不为 null 的参数。如果所有参数均为 null,则返回 `null`。\n\n ```\n ROW a=null, b=\"b\"\n | EVAL COALESCE(a, b)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.concat": "CONCAT",
- "languageDocumentationPopover.documentationESQL.concat.markdown": "\n\n ### CONCAT\n 串联两个或多个字符串。\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fullname = CONCAT(first_name, \" \", last_name)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.cos": "COS",
- "languageDocumentationPopover.documentationESQL.cos.markdown": "\n\n ### COS\n 返回角度的余弦。\n\n ```\n ROW a=1.8 \n | EVAL cos=COS(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.cosh": "COSH",
- "languageDocumentationPopover.documentationESQL.cosh.markdown": "\n\n ### COSH\n 返回角度的双曲余弦。\n\n ```\n ROW a=1.8 \n | EVAL cosh=COSH(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_diff": "DATE_DIFF",
- "languageDocumentationPopover.documentationESQL.date_diff.markdown": "\n\n ### DATE_DIFF\n 从 `endTimestamp` 中减去 `startTimestamp`,并以倍数 `unit` 返回差异。\n 如果 `startTimestamp` 晚于 `endTimestamp`,则返回负值。\n\n ```\n ROW date1 = TO_DATETIME(\"2023-12-02T11:00:00.000Z\"), date2 = TO_DATETIME(\"2023-12-02T11:00:00.001Z\")\n | EVAL dd_ms = DATE_DIFF(\"microseconds\", date1, date2)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_extract": "DATE_EXTRACT",
- "languageDocumentationPopover.documentationESQL.date_extract.markdown": "\n\n ### DATE_EXTRACT\n 提取日期的某些部分,如年、月、日、小时。\n\n ```\n ROW date = DATE_PARSE(\"yyyy-MM-dd\", \"2022-05-06\")\n | EVAL year = DATE_EXTRACT(\"year\", date)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_format": "DATE_FORMAT",
- "languageDocumentationPopover.documentationESQL.date_format.markdown": "\n\n ### DATE_FORMAT\n 以提供的格式返回日期的字符串表示形式。\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL hired = DATE_FORMAT(\"YYYY-MM-dd\", hire_date)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_parse": "DATE_PARSE",
- "languageDocumentationPopover.documentationESQL.date_parse.markdown": "\n\n ### DATE_PARSE\n 通过使用在第一个参数中指定的格式来解析第二个参数,从而返回日期。\n\n ```\n ROW date_string = \"2022-05-06\"\n | EVAL date = DATE_PARSE(\"yyyy-MM-dd\", date_string)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.date_trunc": "DATE_TRUNC",
- "languageDocumentationPopover.documentationESQL.date_trunc.markdown": "\n\n ### DATE_TRUNC\n 将日期向下舍入到最近的时间间隔。\n\n ```\n FROM employees\n | KEEP first_name, last_name, hire_date\n | EVAL year_hired = DATE_TRUNC(1 year, hire_date)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.dissect": "DISSECT",
- "languageDocumentationPopover.documentationESQL.dissect.markdown": "### DISSECT\n使用 `DISSECT`,您可以从字符串中提取结构化数据。`DISSECT` 将根据基于分隔符的模式来匹配字符串,并提取指定键作为列。\n\n请参阅[分解处理器文档](https://www.elastic.co/guide/en/elasticsearch/reference/current/dissect-processor.html)了解分解模式的语法。\n\n```\nROW a = \"1953-01-23T12:15:00Z - some text - 127.0.0.1\"\n| DISSECT a \"%'{Y}-%{M}-%{D}T%{h}:%{m}:%{s}Z - %{msg} - %{ip}'\"\n``` ",
- "languageDocumentationPopover.documentationESQL.drop": "DROP",
- "languageDocumentationPopover.documentationESQL.drop.markdown": "### DROP\n使用 `DROP` 可从表中移除列:\n \n```\nFROM employees\n| DROP height\n```\n\n您不必按名称指定每个列,而可以使用通配符丢弃名称匹配某种模式的所有列:\n\n```\nFROM employees\n| DROP height*\n```\n ",
- "languageDocumentationPopover.documentationESQL.e": "E",
- "languageDocumentationPopover.documentationESQL.e.markdown": "\n\n ### E\n 返回 Euler 函数的编号。\n\n ```\n ROW E()\n ```\n ",
- "languageDocumentationPopover.documentationESQL.ends_with": "ENDS_WITH",
- "languageDocumentationPopover.documentationESQL.ends_with.markdown": "\n\n ### ENDS_WITH\n 返回布尔值,指示关键字字符串是否以另一个字符串结尾。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_E = ENDS_WITH(last_name, \"d\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.enrich": "ENRICH",
- "languageDocumentationPopover.documentationESQL.enrich.markdown": "### ENRICH\n您可以使用 `ENRICH` 将来自现有索引的数据添加到传入记录中。它类似于[采集扩充](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html),但作用于查询时间。\n\n```\nROW language_code = \"1\"\n| ENRICH languages_policy\n```\n\n执行 `ENRICH` 需要[扩充策略](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-policy)。扩充策略定义一个匹配字段(键字段)和一组扩充字段。\n\n`ENRICH` 将根据匹配字段值在[扩充索引](https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest-enriching-data.html#enrich-index)中查找记录。输入数据集中的匹配键可以使用 `ON ` 来定义;如果未指定,将对字段名称与在扩充策略中定义的匹配字段相同的字段执行匹配。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a\n```\n\n您可以使用 `WITH , ...` 语法指定必须将哪些属性(在那些在策略中定义为扩充字段的字段之间)添加到结果中。\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH language_name\n```\n\n还可以使用 `WITH new_name=` 重命名属性\n\n```\nROW a = \"1\"\n| ENRICH languages_policy ON a WITH name = language_name\n```\n\n默认情况下(如果未定义任何 `WITH`),`ENRICH` 会将在扩充策略中定义的所有扩充字段添加到结果中。\n\n如果出现名称冲突,新创建的字段将覆盖现有字段。\n ",
- "languageDocumentationPopover.documentationESQL.eval": "EVAL",
- "languageDocumentationPopover.documentationESQL.eval.markdown": "### EVAL\n`EVAL` 允许您添加新列:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height_feet = height * 3.281, height_cm = height * 100\n```\n\n如果指定列已存在,将丢弃现有列,并将新列追加到表后面:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| EVAL height = height * 3.281\n```\n\n#### 函数\n`EVAL` 支持各种用于计算值的函数。请参阅“函数”了解更多信息。\n ",
- "languageDocumentationPopover.documentationESQL.floor": "FLOOR",
- "languageDocumentationPopover.documentationESQL.floor.markdown": "\n\n ### FLOOR\n 将数字向下舍入到最近的整数。\n\n ```\n ROW a=1.8\n | EVAL a=FLOOR(a)\n ```\n 注意:对于 `long`(包括无符号值)和 `integer`,这相当于“无操作”。\n 对于 `double`,这会提取最接近整数的 `double` 值,\n 类似于 Math.floor。\n ",
- "languageDocumentationPopover.documentationESQL.from": "FROM",
- "languageDocumentationPopover.documentationESQL.from_base64": "FROM_BASE64",
- "languageDocumentationPopover.documentationESQL.from_base64.markdown": "\n\n ### FROM_BASE64\n 解码 base64 字符串。\n\n ```\n row a = \"ZWxhc3RpYw==\" \n | eval d = from_base64(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.from.markdown": "### FROM\n`FROM` 源命令返回一个表,其中最多包含 10,000 个来自数据流、索引或别名的文档。生成的表中的每一行代表一个文档。每一列对应一个字段,并可以通过该字段的名称进行访问。\n\n```\nFROM employees\n```\n\n您可以使用[日期数学表达式](https://www.elastic.co/guide/en/elasticsearch/reference/current/api-conventions.html#api-date-math-index-names)来引用索引、别名和数据流。这可能对时间序列数据非常有用。\n\n使用逗号分隔列表或通配符可查询多个数据流、索引或别名:\n\n```\nFROM employees-00001,employees-*\n```\n\n#### 元数据\n\nES|QL 可访问以下元数据字段:\n\n* `_index`:文档所属的索引。字段类型为 `keyword`.\n* `_id`:源文档的 ID。字段类型为 `keyword`.\n* `_version`:源文档的版本。字段类型为 `long`。\n\n使用 `METADATA` 指令可启用元数据字段:\n\n```\nFROM index [METADATA _index, _id]\n```\n\n元数据字段仅在数据源为索引时可用。因此,`FROM` 是唯一支持 `METADATA` 指令的源命令。\n\n启用后,这些字段将可用于后续处理命令,就像其他索引字段一样:\n\n```\nFROM ul_logs, apps [METADATA _index, _version]\n| WHERE id IN (13, 14) AND _version == 1\n| EVAL key = CONCAT(_index, \"_\", TO_STR(id))\n| SORT id, _index\n| KEEP id, _index, _version, key\n```\n\n此外,与索引字段类似,一旦执行了聚合,后续命令将无法再访问元数据字段,除非它用作分组字段:\n\n```\nFROM employees [METADATA _index, _id]\n| STATS max = MAX(emp_no) BY _index\n```\n ",
- "languageDocumentationPopover.documentationESQL.greatest": "GREATEST",
- "languageDocumentationPopover.documentationESQL.greatest.markdown": "\n\n ### GREATEST\n 返回多个列中的最大值。除了可一次对多个列运行以外,\n 此函数与 `MV_MAX` 类似。\n\n ```\n ROW a = 10, b = 20\n | EVAL g = GREATEST(a, b)\n ```\n 注意:对 `keyword` 或 `text` 字段运行时,此函数将按字母顺序返回最后一个字符串。对 `boolean` 列运行时,如果任何值为 `true`,此函数将返回 `true`。\n ",
- "languageDocumentationPopover.documentationESQL.grok": "GROK",
- "languageDocumentationPopover.documentationESQL.grok.markdown": "### GROK\n使用 `GROK`,您可以从字符串中提取结构化数据。`GROK` 将基于正则表达式根据模式来匹配字符串,并提取指定模式作为列。\n\n请参阅 [grok 处理器文档](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok-processor.html)了解 grok 模式的语法。\n\n```\nROW a = \"12 15.5 15.6 true\"\n| GROK a \"%'{NUMBER:b:int}' %'{NUMBER:c:float}' %'{NUMBER:d:double}' %'{WORD:e:boolean}'\"\n```\n ",
- "languageDocumentationPopover.documentationESQL.inOperator": "IN",
- "languageDocumentationPopover.documentationESQL.inOperator.markdown": "### IN\n`IN` 运算符允许测试字段或表达式是否等于文本、字段或表达式列表中的元素:\n\n```\nROW a = 1, b = 4, c = 3\n| WHERE c-a IN (3, b / 2, a)\n```\n ",
- "languageDocumentationPopover.documentationESQL.ip_prefix": "IP_PREFIX",
- "languageDocumentationPopover.documentationESQL.ip_prefix.markdown": "\n\n ### IP_PREFIX\n 截短 IP 至给定的前缀长度。\n\n ```\n row ip4 = to_ip(\"1.2.3.4\"), ip6 = to_ip(\"fe80::cae2:65ff:fece:feb9\")\n | eval ip4_prefix = ip_prefix(ip4, 24, 0), ip6_prefix = ip_prefix(ip6, 0, 112);\n ```\n ",
- "languageDocumentationPopover.documentationESQL.keep": "KEEP",
- "languageDocumentationPopover.documentationESQL.keep.markdown": "### KEEP\n使用 `KEEP` 命令,您可以指定将返回哪些列以及返回这些列的顺序。\n\n要限制返回的列数,请使用列名的逗号分隔列表。将按指定顺序返回这些列:\n \n```\nFROM employees\n| KEEP first_name, last_name, height\n```\n\n您不必按名称指定每个列,而可以使用通配符返回名称匹配某种模式的所有列:\n\n```\nFROM employees\n| KEEP h*\n```\n\n星号通配符 (`*`) 自身将转换为不与其他参数匹配的所有列。此查询将首先返回所有名称以 h 开头的所有列,随后返回所有其他列:\n\n```\nFROM employees\n| KEEP h*, *\n```\n ",
- "languageDocumentationPopover.documentationESQL.least": "LEAST",
- "languageDocumentationPopover.documentationESQL.least.markdown": "\n\n ### LEAST\n 返回多个列中的最小值。除了可一次对多个列运行以外,此函数与 `MV_MIN` 类似。\n\n ```\n ROW a = 10, b = 20\n | EVAL l = LEAST(a, b)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.left": "LEFT",
- "languageDocumentationPopover.documentationESQL.left.markdown": "\n\n ### LEFT\n 返回从“字符串”中提取“长度”字符的子字符串,从左侧开始。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL left = LEFT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ```\n ",
- "languageDocumentationPopover.documentationESQL.length": "LENGTH",
- "languageDocumentationPopover.documentationESQL.length.markdown": "\n\n ### LENGTH\n 返回字符串的字符长度。\n\n ```\n FROM employees\n | KEEP first_name, last_name\n | EVAL fn_length = LENGTH(first_name)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.limit": "LIMIT",
- "languageDocumentationPopover.documentationESQL.limit.markdown": "### LIMIT\n`LIMIT` 处理命令允许您限制行数:\n \n```\nFROM employees\n| LIMIT 5\n```\n ",
- "languageDocumentationPopover.documentationESQL.locate": "LOCATE",
- "languageDocumentationPopover.documentationESQL.locate.markdown": "\n\n ### LOCATE\n 返回一个整数,指示关键字子字符串在另一字符串中的位置\n\n ```\n row a = \"hello\"\n | eval a_ll = locate(a, \"ll\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.log": "LOG",
- "languageDocumentationPopover.documentationESQL.log.markdown": "\n\n ### LOG\n 以某底数返回值的对数。输入可以为任何数字值,返回值始终为双精度值。\n\n 求零、负数的对数,以及底数为一时将返回 `null`,并显示警告。\n\n ```\n ROW base = 2.0, value = 8.0\n | EVAL s = LOG(base, value)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.log10": "LOG10",
- "languageDocumentationPopover.documentationESQL.log10.markdown": "\n\n ### LOG10\n 以底数 10 返回值的对数。输入可以为任何数字值,返回值始终为双精度值。\n\n 求 0 和负数的对数时将返回 `null`,并显示警告。\n\n ```\n ROW d = 1000.0 \n | EVAL s = LOG10(d)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.ltrim": "LTRIM",
- "languageDocumentationPopover.documentationESQL.ltrim.markdown": "\n\n ### LTRIM\n 从字符串中移除前导空格。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = LTRIM(message)\n | EVAL color = LTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.markdown": "## ES|QL\n\nES|QL(Elasticsearch 查询语言)查询包含一系列命令,它们用管道字符分隔:`|`。每个查询以**源命令**开头,它会生成一个表,其中通常包含来自 Elasticsearch 的数据。\n\n源命令可后接一个或多个**处理命令**。处理命令可通过添加、移除以及更改行和列来更改前一个命令的输出表。\n\n```\nsource-command\n| processing-command1\n| processing-command2\n```\n\n查询的结果为由最后的处理命令生成的表。 \n ",
- "languageDocumentationPopover.documentationESQL.mv_append": "MV_APPEND",
- "languageDocumentationPopover.documentationESQL.mv_append.markdown": "\n\n ### MV_APPEND\n 串联两个多值字段的值。\n\n ",
- "languageDocumentationPopover.documentationESQL.mv_avg": "MV_AVG",
- "languageDocumentationPopover.documentationESQL.mv_avg.markdown": "\n\n ### MV_AVG\n 将多值字段转换为包含所有值的平均值的单值字段。\n\n ```\n ROW a=[3, 5, 1, 6]\n | EVAL avg_a = MV_AVG(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_concat": "MV_CONCAT",
- "languageDocumentationPopover.documentationESQL.mv_concat.markdown": "\n\n ### MV_CONCAT\n 将多值字符串表达式转换为单值列,其中包含由分隔符分隔的所有值的串联形式。\n\n ```\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL j = MV_CONCAT(a, \", \")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_count": "MV_COUNT",
- "languageDocumentationPopover.documentationESQL.mv_count.markdown": "\n\n ### MV_COUNT\n 将多值表达式转换为包含值计数的单值列。\n\n ```\n ROW a=[\"foo\", \"zoo\", \"bar\"]\n | EVAL count_a = MV_COUNT(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_dedupe": "MV_DEDUPE",
- "languageDocumentationPopover.documentationESQL.mv_dedupe.markdown": "\n\n ### MV_DEDUPE\n 移除多值字段中的重复值。\n\n ```\n ROW a=[\"foo\", \"foo\", \"bar\", \"foo\"]\n | EVAL dedupe_a = MV_DEDUPE(a)\n ```\n 注意:`MV_DEDUPE` 可能但不会始终对列中的值进行排序。\n ",
- "languageDocumentationPopover.documentationESQL.mv_first": "MV_FIRST",
- "languageDocumentationPopover.documentationESQL.mv_first.markdown": "\n\n ### MV_FIRST\n 将多值表达式转换为包含第一个值的\n 单值列。这在从按已知顺序发出多值列的\n 函数(如 `SPLIT`)中读取数据时尤其有用。\n\n 无法保证从底层存储\n 读取多值字段的顺序。它 *通常* 为升序,但不应\n 依赖于此。如果需要最小值,请使用 `MV_MIN` 而不是\n `MV_FIRST`。`MV_MIN` 针对排序值进行了优化,因此\n 对 `MV_FIRST` 没有性能优势。\n\n ```\n ROW a=\"foo;bar;baz\"\n | EVAL first_a = MV_FIRST(SPLIT(a, \";\"))\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_last": "MV_LAST",
- "languageDocumentationPopover.documentationESQL.mv_last.markdown": "\n\n ### MV_LAST\n 将多值表达式转换为包含最后一个值的单值\n 列。这在从按已知顺序发出多值列的函数\n (如 `SPLIT`)中读取数据时尤其有用。\n\n 无法保证从底层存储\n 读取多值字段的顺序。它 *通常* 为升序,但不应\n 依赖于此。如果需要最大值,请使用 `MV_MAX` 而不是\n `MV_LAST`。`MV_MAX` 针对排序值进行了优化,因此\n 对 `MV_LAST` 没有性能优势。\n\n ```\n ROW a=\"foo;bar;baz\"\n | EVAL last_a = MV_LAST(SPLIT(a, \";\"))\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_max": "MV_MAX",
- "languageDocumentationPopover.documentationESQL.mv_max.markdown": "\n\n ### MV_MAX\n 将多值表达式转换为包含最大值的单值列。\n\n ```\n ROW a=[3, 5, 1]\n | EVAL max_a = MV_MAX(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_median": "MV_MEDIAN",
- "languageDocumentationPopover.documentationESQL.mv_median.markdown": "\n\n ### MV_MEDIAN\n 将多值字段转换为包含中位数值的单值字段。\n\n ```\n ROW a=[3, 5, 1]\n | EVAL median_a = MV_MEDIAN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_min": "MV_MIN",
- "languageDocumentationPopover.documentationESQL.mv_min.markdown": "\n\n ### MV_MIN\n 将多值表达式转换为包含最小值的单值列。\n\n ```\n ROW a=[2, 1]\n | EVAL min_a = MV_MIN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_slice": "MV_SLICE",
- "languageDocumentationPopover.documentationESQL.mv_slice.markdown": "\n\n ### MV_SLICE\n 使用起始和结束索引值返回多值字段的子集。\n\n ```\n row a = [1, 2, 2, 3]\n | eval a1 = mv_slice(a, 1), a2 = mv_slice(a, 2, 3)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_sort": "MV_SORT",
- "languageDocumentationPopover.documentationESQL.mv_sort.markdown": "\n\n ### MV_SORT\n 按字典顺序对多值字段排序。\n\n ```\n ROW a = [4, 2, -3, 2]\n | EVAL sa = mv_sort(a), sd = mv_sort(a, \"DESC\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_sum": "MV_SUM",
- "languageDocumentationPopover.documentationESQL.mv_sum.markdown": "\n\n ### MV_SUM\n 将多值字段转换为包含所有值的总和的单值字段。\n\n ```\n ROW a=[3, 5, 6]\n | EVAL sum_a = MV_SUM(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mv_zip": "MV_ZIP",
- "languageDocumentationPopover.documentationESQL.mv_zip.markdown": "\n\n ### MV_ZIP\n 组合两个使用分隔符联接在一起的多值字段中的值。\n\n ```\n ROW a = [\"x\", \"y\", \"z\"], b = [\"1\", \"2\"]\n | EVAL c = mv_zip(a, b, \"-\")\n | KEEP a, b, c\n ```\n ",
- "languageDocumentationPopover.documentationESQL.mvExpand": "MV_EXPAND",
- "languageDocumentationPopover.documentationESQL.mvExpand.markdown": "### MV_EXPAND\n`MV_EXPAND` 处理命令将多值字段扩展成每个值一行,从而复制其他字段: \n```\nROW a=[1,2,3], b=\"b\", j=[\"a\",\"b\"]\n| MV_EXPAND a\n```\n ",
- "languageDocumentationPopover.documentationESQL.now": "NOW",
- "languageDocumentationPopover.documentationESQL.now.markdown": "\n\n ### NOW\n 返回当前日期和时间。\n\n ```\n ROW current_date = NOW()\n ```\n ",
- "languageDocumentationPopover.documentationESQL.pi": "PI",
- "languageDocumentationPopover.documentationESQL.pi.markdown": "\n\n ### PI\n 返回 Pi,即圆的周长与其直径的比率。\n\n ```\n ROW PI()\n ```\n ",
- "languageDocumentationPopover.documentationESQL.pow": "POW",
- "languageDocumentationPopover.documentationESQL.pow.markdown": "\n\n ### POW\n 返回提升为 `exponent` 幂的 `base` 的值。\n\n ```\n ROW base = 2.0, exponent = 2\n | EVAL result = POW(base, exponent)\n ```\n 注意:此处仍可能使双精度结果溢出;在该情况下,将返回 null。\n ",
- "languageDocumentationPopover.documentationESQL.predicates": "Null 值",
- "languageDocumentationPopover.documentationESQL.predicates.markdown": "### NULL 值\n对于 NULL 比较,请使用 `IS NULL` 和 `IS NOT NULL` 谓词:\n\n```\nFROM employees\n| WHERE birth_date IS NULL\n| KEEP first_name, last_name\n| SORT first_name\n| LIMIT 3\n```\n\n```\nFROM employees\n| WHERE is_rehired IS NOT NULL\n| STATS count(emp_no)\n```\n ",
- "languageDocumentationPopover.documentationESQL.rename": "RENAME",
- "languageDocumentationPopover.documentationESQL.rename.markdown": "### RENAME\n请使用 `RENAME` 通过以下语法对列重命名:\n\n```\nRENAME AS \n```\n\n例如:\n\n```\nFROM employees\n| KEEP first_name, last_name, still_hired\n| RENAME still_hired AS employed\n```\n\n如果使用新名称的列已存在,将用新列替换该列。\n\n可以使用单个 `RENAME` 命令对多个列重命名:\n\n```\nFROM employees\n| KEEP first_name, last_name\n| RENAME first_name AS fn, last_name AS ln\n```\n ",
- "languageDocumentationPopover.documentationESQL.repeat": "REPEAT",
- "languageDocumentationPopover.documentationESQL.repeat.markdown": "\n\n ### REPEAT\n 返回通过串联 `string` 自身与指定次数 `number` 构造而成的字符串。\n\n ```\n ROW a = \"Hello!\"\n | EVAL triple_a = REPEAT(a, 3);\n ```\n ",
- "languageDocumentationPopover.documentationESQL.replace": "REPLACE",
- "languageDocumentationPopover.documentationESQL.replace.markdown": "\n\n ### REPLACE\n 此函数将字符串 `str` 中正则表达式 `regex` 的任何匹配项\n 替换为替代字符串 `newStr`。\n\n ```\n ROW str = \"Hello World\"\n | EVAL str = REPLACE(str, \"World\", \"Universe\")\n | KEEP str\n ```\n ",
- "languageDocumentationPopover.documentationESQL.right": "RIGHT",
- "languageDocumentationPopover.documentationESQL.right.markdown": "\n\n ### RIGHT\n 返回从“字符串”中提取“长度”字符的子字符串,从右侧开始。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL right = RIGHT(last_name, 3)\n | SORT last_name ASC\n | LIMIT 5\n ```\n ",
- "languageDocumentationPopover.documentationESQL.round": "ROUND",
- "languageDocumentationPopover.documentationESQL.round.markdown": "\n\n ### ROUND\n 将数字舍入到指定小数位数。\n 默认值为 0,即返回最近的整数。如果\n 精确度为负数,则将数字舍入到\n 小数点左侧的位数。\n\n ```\n FROM employees\n | KEEP first_name, last_name, height\n | EVAL height_ft = ROUND(height * 3.281, 1)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.row": "ROW",
- "languageDocumentationPopover.documentationESQL.row.markdown": "### ROW\n`ROW` 源命令会生成一个行,其中包含一个或多个含有您指定的值的列。这可以用于测试。\n \n```\nROW a = 1, b = \"two\", c = null\n```\n\n请使用方括号创建多值列:\n\n```\nROW a = [2, 1]\n```\n\nROW 支持使用函数:\n\n```\nROW a = ROUND(1.23, 0)\n```\n ",
- "languageDocumentationPopover.documentationESQL.rtrim": "RTRIM",
- "languageDocumentationPopover.documentationESQL.rtrim.markdown": "\n\n ### RTRIM\n 从字符串中移除尾随空格。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = RTRIM(message)\n | EVAL color = RTRIM(color)\n | EVAL message = CONCAT(\"'\", message, \"'\")\n | EVAL color = CONCAT(\"'\", color, \"'\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.show": "SHOW",
- "languageDocumentationPopover.documentationESQL.show.markdown": "### SHOW\n`SHOW
- ` 源命令返回有关部署及其功能的信息:\n\n* 使用 `SHOW INFO` 可返回部署的版本、构建日期和哈希。\n* 使用 `SHOW FUNCTIONS` 可返回所有受支持函数的列表和每个函数的概要。\n ",
- "languageDocumentationPopover.documentationESQL.signum": "SIGNUM",
- "languageDocumentationPopover.documentationESQL.signum.markdown": "\n\n ### SIGNUM\n 返回给定数字的符号。\n 它对负数返回 `-1`,对 `0` 返回 `0`,对正数返回 `1`。\n\n ```\n ROW d = 100.0\n | EVAL s = SIGNUM(d)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.sin": "SIN",
- "languageDocumentationPopover.documentationESQL.sin.markdown": "\n\n ### SIN\n 返回角度的正弦三角函数。\n\n ```\n ROW a=1.8 \n | EVAL sin=SIN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.sinh": "SINH",
- "languageDocumentationPopover.documentationESQL.sinh.markdown": "\n\n ### SINH\n 返回角度的双曲正弦。\n\n ```\n ROW a=1.8 \n | EVAL sinh=SINH(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.sort": "SORT",
- "languageDocumentationPopover.documentationESQL.sort.markdown": "### SORT\n使用 `SORT` 命令可对一个或多个字段上的行排序:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height\n```\n\n默认排序顺序为升序。请使用 `ASC` 或 `DESC` 设置显式排序顺序:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC\n```\n\n如果两个行具有相同的排序键,则保留原始顺序。您可以提供其他排序表达式充当连接断路器:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT height DESC, first_name ASC\n```\n\n#### `null` 值\n默认情况下,会将 `null` 值视为大于任何其他值。使用升序排序顺序时,会最后对 `null` 值排序,而使用降序排序顺序时,会首先对 `null` 值排序。您可以通过提供 `NULLS FIRST` 或 `NULLS LAST` 来更改该排序:\n\n```\nFROM employees\n| KEEP first_name, last_name, height\n| SORT first_name ASC NULLS FIRST\n```\n ",
- "languageDocumentationPopover.documentationESQL.split": "SPLIT",
- "languageDocumentationPopover.documentationESQL.split.markdown": "\n\n ### SPLIT\n 将单值字符串拆分成多个字符串。\n\n ```\n ROW words=\"foo;bar;baz;qux;quux;corge\"\n | EVAL word = SPLIT(words, \";\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.sqrt": "SQRT",
- "languageDocumentationPopover.documentationESQL.sqrt.markdown": "\n\n ### SQRT\n 返回数字的平方根。输入可以为任何数字值,返回值始终为双精度值。\n 负数和无穷大的平方根为 null。\n\n ```\n ROW d = 100.0\n | EVAL s = SQRT(d)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_contains": "ST_CONTAINS",
- "languageDocumentationPopover.documentationESQL.st_contains.markdown": "\n\n ### ST_CONTAINS\n 返回第一个几何形状是否包含第二个几何形状。\n 这是 `ST_WITHIN` 函数的反向函数。\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_CONTAINS(city_boundary, TO_GEOSHAPE(\"POLYGON((109.35 18.3, 109.45 18.3, 109.45 18.4, 109.35 18.4, 109.35 18.3))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_disjoint": "ST_DISJOINT",
- "languageDocumentationPopover.documentationESQL.st_disjoint.markdown": "\n\n ### ST_DISJOINT\n 返回两个几何图形或几何图形列是否不相交。\n 这是 `ST_INTERSECTS` 函数的反向函数。\n 从数学上讲:ST_Disjoint(A, B) ⇔ A ⋂ B = ∅\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_DISJOINT(city_boundary, TO_GEOSHAPE(\"POLYGON((-10 -60, 120 -60, 120 60, -10 60, -10 -60))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_distance": "ST_DISTANCE",
- "languageDocumentationPopover.documentationESQL.st_distance.markdown": "\n\n ### ST_DISTANCE\n 计算两点之间的距离。\n 对于笛卡尔几何形状,这是以相同单位作为原始坐标时的毕达哥拉斯距离。\n 对于地理几何形状而言,这是沿着地球大圆的圆周距离(以米为单位)。\n\n ```\n FROM airports\n | WHERE abbrev == \"CPH\"\n | EVAL distance = ST_DISTANCE(location, city_location)\n | KEEP abbrev, name, location, city_location, distance\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_intersects": "ST_INTERSECTS",
- "languageDocumentationPopover.documentationESQL.st_intersects.markdown": "\n\n ### ST_INTERSECTS\n 如果两个几何形状相交,则返回 true。\n 如果它们有任何共同点,包括其内点\n (沿线的点或多边形内的点),则表示它们相交。\n 这是 `ST_DISJOINT` 函数的反向函数。\n 从数学上讲:ST_Intersects(A, B) ⇔ A ⋂ B ≠ ∅\n\n ```\n FROM airports\n | WHERE ST_INTERSECTS(location, TO_GEOSHAPE(\"POLYGON((42 14, 43 14, 43 15, 42 15, 42 14))\"))\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_within": "ST_WITHIN",
- "languageDocumentationPopover.documentationESQL.st_within.markdown": "\n\n ### ST_WITHIN\n 返回第一个几何形状是否在第二个几何形状内。\n 这是 `ST_CONTAINS` 函数的反向函数。\n\n ```\n FROM airport_city_boundaries\n | WHERE ST_WITHIN(city_boundary, TO_GEOSHAPE(\"POLYGON((109.1 18.15, 109.6 18.15, 109.6 18.65, 109.1 18.65, 109.1 18.15))\"))\n | KEEP abbrev, airport, region, city, city_location\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_x": "ST_X",
- "languageDocumentationPopover.documentationESQL.st_x.markdown": "\n\n ### ST_X\n 从提供的点中提取 `x` 坐标。\n 如果点的类型为 `geo_point`,则这等同于提取 `longitude` 值。\n\n ```\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.st_y": "ST_Y",
- "languageDocumentationPopover.documentationESQL.st_y.markdown": "\n\n ### ST_Y\n 从提供的点中提取 `y` 坐标。\n 如果点的类型为 `geo_point`,则这等同于提取 `latitude` 值。\n\n ```\n ROW point = TO_GEOPOINT(\"POINT(42.97109629958868 14.7552534006536)\")\n | EVAL x = ST_X(point), y = ST_Y(point)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.starts_with": "STARTS_WITH",
- "languageDocumentationPopover.documentationESQL.starts_with.markdown": "\n\n ### STARTS_WITH\n 返回指示关键字字符串是否以另一个字符串开头的布尔值。\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_S = STARTS_WITH(last_name, \"B\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.statsby": "STATS ...BY",
- "languageDocumentationPopover.documentationESQL.statsby.markdown": "### STATS ...BY\n使用 `STATS ...BY` 可根据公共值对行分组,并计算已分组行中的一个或多个聚合值。\n\n**示例**:\n\n```\nFROM employees\n| STATS count = COUNT(emp_no) BY languages\n| SORT languages\n```\n\n如果省略 `BY`,输出表实际将包含一行,其中为应用于整个数据集的聚合:\n\n```\nFROM employees\n| STATS avg_lang = AVG(languages)\n```\n\n可以计算多个值:\n\n```\nFROM employees\n| STATS avg_lang = AVG(languages), max_lang = MAX(languages)\n```\n\n也可以按多个值分组(仅长整型和关键字家族字段支持):\n\n```\nFROM employees\n| EVAL hired = DATE_FORMAT(hire_date, \"YYYY\")\n| STATS avg_salary = AVG(salary) BY hired, languages.long\n| EVAL avg_salary = ROUND(avg_salary)\n| SORT hired, languages.long\n```\n\n请参阅**聚合函数**获取可与 `STATS ...BY` 搭配使用的函数列表。\n\n聚合函数和分组表达式均接受其他函数。这在对多值列使用 `STATS...BY` 时有用。例如,要计算平均工资变动,可以首先使用 `MV_AVG` 对每名员工的多个值求平均值,然后将结果用于 `AVG` 函数:\n\n```\nFROM employees\n| STATS avg_salary_change = AVG(MV_AVG(salary_change))\n```\n\n按表达式分组的示例为根据员工姓氏的第一个字母对其进行分组:\n\n```\nFROM employees\n| STATS my_count = COUNT() BY LEFT(last_name, 1)\n| SORT `LEFT(last_name, 1)`\n```\n\n指定输出列名称为可选操作。如果未指定,新列名称等于该表达式。以下查询将返回名为 `AVG(salary)` 的列:\n\n```\nFROM employees\n| STATS AVG(salary)\n```\n\n由于此名称包含特殊字符,在后续命令中使用该名称时,需要用反撇号 (`) 引用它:\n\n```\nFROM employees\n| STATS AVG(salary)\n| EVAL avg_salary_rounded = ROUND(`AVG(salary)`)\n```\n\n**注意**:不包含任何组的 `STATS` 比添加组更快。\n\n**注意**:当前,根据单一表达式进行分组比根据许多表达式进行分组更为优化。\n ",
- "languageDocumentationPopover.documentationESQL.stringOperators": "LIKE 和 RLIKE",
- "languageDocumentationPopover.documentationESQL.stringOperators.markdown": "### LIKE 和 RLIKE\n使用通配符或正则表达式比较字符串时,请使用 `LIKE` 或 `RLIKE`:\n\n使用 `LIKE` 时,可使用通配符来匹配字符串。支持以下通配符字符:\n\n* `*` 匹配零个或更多字符。\n* `?` 匹配一个字符。\n\n```\nFROM employees\n| WHERE first_name LIKE \"?b*\"\n| KEEP first_name, last_name\n```\n\n使用 `RLIKE` 时,可使用正则表达式来匹配字符串:\n\n```\nFROM employees\n| WHERE first_name RLIKE \".leja.*\"\n| KEEP first_name, last_name\n```\n ",
- "languageDocumentationPopover.documentationESQL.substring": "SUBSTRING",
- "languageDocumentationPopover.documentationESQL.substring.markdown": "\n\n ### SUBSTRING\n 返回字符串的子字符串,用起始位置和可选长度指定\n\n ```\n FROM employees\n | KEEP last_name\n | EVAL ln_sub = SUBSTRING(last_name, 1, 3)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.tan": "TAN",
- "languageDocumentationPopover.documentationESQL.tan.markdown": "\n\n ### TAN\n 返回角度的正切三角函数。\n\n ```\n ROW a=1.8 \n | EVAL tan=TAN(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.tanh": "TANH",
- "languageDocumentationPopover.documentationESQL.tanh.markdown": "\n\n ### TANH\n 返回角度的双曲正切函数。\n\n ```\n ROW a=1.8 \n | EVAL tanh=TANH(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.tau": "TAU",
- "languageDocumentationPopover.documentationESQL.tau.markdown": "\n\n ### TAU\n 返回圆的圆周长与其半径的比率。\n\n ```\n ROW TAU()\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_base64": "TO_BASE64",
- "languageDocumentationPopover.documentationESQL.to_base64.markdown": "\n\n ### TO_BASE64\n 将字符串编码为 base64 字符串。\n\n ```\n row a = \"elastic\" \n | eval e = to_base64(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_boolean": "TO_BOOLEAN",
- "languageDocumentationPopover.documentationESQL.to_boolean.markdown": "\n\n ### TO_BOOLEAN\n 将输入值转换为布尔值。\n 字符串值 *true* 将不区分大小写并被转换为布尔值 *true*。\n 对于任何其他值,包括空字符串,此函数将返回 *false*。\n 数字值 *0* 将转换为 *false*,任何其他值将转换为 *true*。\n\n ```\n ROW str = [\"true\", \"TRuE\", \"false\", \"\", \"yes\", \"1\"]\n | EVAL bool = TO_BOOLEAN(str)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_cartesianpoint": "TO_CARTESIANPOINT",
- "languageDocumentationPopover.documentationESQL.to_cartesianpoint.markdown": "\n\n ### TO_CARTESIANPOINT\n 将输入值转换为 `cartesian_point` 值。\n 字符串只有符合 WKT 点格式时,才能成功转换。\n\n ```\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POINT(7580.93 2272.77)\"]\n | MV_EXPAND wkt\n | EVAL pt = TO_CARTESIANPOINT(wkt)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_cartesianshape": "TO_CARTESIANSHAPE",
- "languageDocumentationPopover.documentationESQL.to_cartesianshape.markdown": "\n\n ### TO_CARTESIANSHAPE\n 将输入值转换为 `cartesian_shape` 值。\n 字符串只有符合 WKT 格式时,才能成功转换。\n\n ```\n ROW wkt = [\"POINT(4297.11 -1475.53)\", \"POLYGON ((3339584.72 1118889.97, 4452779.63 4865942.27, 2226389.81 4865942.27, 1113194.90 2273030.92, 3339584.72 1118889.97))\"]\n | MV_EXPAND wkt\n | EVAL geom = TO_CARTESIANSHAPE(wkt)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_datetime": "TO_DATETIME",
- "languageDocumentationPopover.documentationESQL.to_datetime.markdown": "\n\n ### TO_DATETIME\n 将输入值转换为日期值。\n 仅当字符串采用 `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'` 格式时,才可进行成功转换。\n 要转换其他格式的日期,请使用 `DATE_PARSE`。\n\n ```\n ROW string = [\"1953-09-02T00:00:00.000Z\", \"1964-06-02T00:00:00.000Z\", \"1964-06-02 00:00:00\"]\n | EVAL datetime = TO_DATETIME(string)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_degrees": "TO_DEGREES",
- "languageDocumentationPopover.documentationESQL.to_degrees.markdown": "\n\n ### TO_DEGREES\n 将弧度转换为度数。\n\n ```\n ROW rad = [1.57, 3.14, 4.71]\n | EVAL deg = TO_DEGREES(rad)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_double": "TO_DOUBLE",
- "languageDocumentationPopover.documentationESQL.to_double.markdown": "\n\n ### TO_DOUBLE\n 将输入值转换为双精度值。如果输入参数为日期类型,\n 会将其值解析为自 Unix epoch 以来的毫秒数,\n 并转换为双精度值。布尔值 *true* 将转换为双精度值 *1.0*,*false* 转换为 *0.0*。\n\n ```\n ROW str1 = \"5.20128E11\", str2 = \"foo\"\n | EVAL dbl = TO_DOUBLE(\"520128000000\"), dbl1 = TO_DOUBLE(str1), dbl2 = TO_DOUBLE(str2)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_geopoint": "TO_GEOPOINT",
- "languageDocumentationPopover.documentationESQL.to_geopoint.markdown": "\n\n ### TO_GEOPOINT\n 将输入值转换为 `geo_point` 值。\n 字符串只有符合 WKT 点格式时,才能成功转换。\n\n ```\n ROW wkt = \"POINT(42.97109630194 14.7552534413725)\"\n | EVAL pt = TO_GEOPOINT(wkt)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_geoshape": "TO_GEOSHAPE",
- "languageDocumentationPopover.documentationESQL.to_geoshape.markdown": "\n\n ### TO_GEOSHAPE\n 将输入值转换为 `geo_shape` 值。\n 字符串只有符合 WKT 格式时,才能成功转换。\n\n ```\n ROW wkt = \"POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))\"\n | EVAL geom = TO_GEOSHAPE(wkt)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_integer": "TO_INTEGER",
- "languageDocumentationPopover.documentationESQL.to_integer.markdown": "\n\n ### TO_INTEGER\n 将输入值转换为整数值。\n 如果输入参数为日期类型,会将其值解析为自 Unix epoch 以来\n 的毫秒数,并转换为整数。\n 布尔值 *true* 将转换为整数 *1*,*false* 转换为 *0*。\n\n ```\n ROW long = [5013792, 2147483647, 501379200000]\n | EVAL int = TO_INTEGER(long)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_ip": "TO_IP",
- "languageDocumentationPopover.documentationESQL.to_ip.markdown": "\n\n ### TO_IP\n 将输入字符串转换为 IP 值。\n\n ```\n ROW str1 = \"1.1.1.1\", str2 = \"foo\"\n | EVAL ip1 = TO_IP(str1), ip2 = TO_IP(str2)\n | WHERE CIDR_MATCH(ip1, \"1.0.0.0/8\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_long": "TO_LONG",
- "languageDocumentationPopover.documentationESQL.to_long.markdown": "\n\n ### TO_LONG\n 将输入值转换为长整型值。如果输入参数为日期类型,\n 会将其值解析为自 Unix epoch 以来的毫秒数,并转换为长整型值。\n 布尔值 *true* 将转换为长整型值 *1*,*false* 转换为 *0*。\n\n ```\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_LONG(str1), long2 = TO_LONG(str2), long3 = TO_LONG(str3)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_lower": "TO_LOWER",
- "languageDocumentationPopover.documentationESQL.to_lower.markdown": "\n\n ### TO_LOWER\n 返回一个新字符串,表示已将输入字符串转为小写。\n\n ```\n ROW message = \"Some Text\"\n | EVAL message_lower = TO_LOWER(message)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_radians": "TO_RADIANS",
- "languageDocumentationPopover.documentationESQL.to_radians.markdown": "\n\n ### TO_RADIANS\n 将度数转换为弧度。\n\n ```\n ROW deg = [90.0, 180.0, 270.0]\n | EVAL rad = TO_RADIANS(deg)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_string": "TO_STRING",
- "languageDocumentationPopover.documentationESQL.to_string.markdown": "\n\n ### TO_STRING\n 将输入值转换为字符串。\n\n ```\n ROW a=10\n | EVAL j = TO_STRING(a)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_unsigned_long": "TO_UNSIGNED_LONG",
- "languageDocumentationPopover.documentationESQL.to_unsigned_long.markdown": "\n\n ### TO_UNSIGNED_LONG\n 将输入值转换为无符号长整型值。如果输入参数为日期类型,\n 会将其值解析为自 Unix epoch 以来的毫秒数,并转换为无符号长整型值。\n 布尔值 *true* 将转换为无符号长整型值 *1*,*false* 转换为 *0*。\n\n ```\n ROW str1 = \"2147483648\", str2 = \"2147483648.2\", str3 = \"foo\"\n | EVAL long1 = TO_UNSIGNED_LONG(str1), long2 = TO_ULONG(str2), long3 = TO_UL(str3)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_upper": "TO_UPPER",
- "languageDocumentationPopover.documentationESQL.to_upper.markdown": "\n\n ### TO_UPPER\n 返回一个新字符串,表示已将输入字符串转为大写。\n\n ```\n ROW message = \"Some Text\"\n | EVAL message_upper = TO_UPPER(message)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.to_version": "TO_VERSION",
- "languageDocumentationPopover.documentationESQL.to_version.markdown": "\n\n ### TO_VERSION\n 将输入字符串转换为版本值。\n\n ```\n ROW v = TO_VERSION(\"1.2.3\")\n ```\n ",
- "languageDocumentationPopover.documentationESQL.trim": "TRIM",
- "languageDocumentationPopover.documentationESQL.trim.markdown": "\n\n ### TRIM\n 从字符串中移除前导和尾随空格。\n\n ```\n ROW message = \" some text \", color = \" red \"\n | EVAL message = TRIM(message)\n | EVAL color = TRIM(color)\n ```\n ",
- "languageDocumentationPopover.documentationESQL.where": "WHERE",
- "languageDocumentationPopover.documentationESQL.where.markdown": "### WHERE\n使用 `WHERE` 可生成一个表,其中包含输入表中所提供的条件评估为 `true` 的所有行:\n \n```\nFROM employees\n| KEEP first_name, last_name, still_hired\n| WHERE still_hired == true\n```\n\n#### 运算符\n\n请参阅**运算符**了解所支持的运算符的概览。\n\n#### 函数\n`WHERE` 支持各种用于计算值的函数。请参阅**函数**了解更多信息。\n ",
"textBasedEditor.query.textBasedLanguagesEditor.EnableWordWrapLabel": "在管道符上添加换行符",
"textBasedEditor.query.textBasedLanguagesEditor.errorCount": "{count} 个{count, plural, other {错误}}",
"textBasedEditor.query.textBasedLanguagesEditor.errorsTitle": "错误",
"textBasedEditor.query.textBasedLanguagesEditor.expandLabel": "展开",
"textBasedEditor.query.textBasedLanguagesEditor.feedback": "反馈",
- "languageDocumentationPopover.documentationESQL.functions": "函数",
- "languageDocumentationPopover.documentationESQL.functionsDocumentationESQLDescription": "ROW、EVAL 和 WHERE 支持的函数。",
- "languageDocumentationPopover.documentationESQL.groupingFunctions": "分组函数",
- "languageDocumentationPopover.documentationESQL.groupingFunctionsDocumentationESQLDescription": "这些分组函数可以与 `STATS...BY` 搭配使用:",
"textBasedEditor.query.textBasedLanguagesEditor.hideQueriesLabel": "隐藏最近查询",
"textBasedEditor.query.textBasedLanguagesEditor.lineCount": "{count} {count, plural, other {行}}",
"textBasedEditor.query.textBasedLanguagesEditor.lineNumber": "第 {lineNumber} 行",
- "languageDocumentationPopover.documentationESQL.operators": "运算符",
- "languageDocumentationPopover.documentationESQL.operatorsDocumentationESQLDescription": "ES|QL 支持以下运算符:",
- "languageDocumentationPopover.documentationESQL.processingCommands": "处理命令",
- "languageDocumentationPopover.documentationESQL.processingCommandsDescription": "处理命令会通过添加、移除或更改行和列来更改输入表。ES|QL 支持以下处理命令。",
"textBasedEditor.query.textBasedLanguagesEditor.querieshistory.error": "查询失败",
"textBasedEditor.query.textBasedLanguagesEditor.querieshistory.success": "已成功运行查询",
"textBasedEditor.query.textBasedLanguagesEditor.querieshistoryCopy": "复制查询到剪贴板",
@@ -7345,7 +7346,6 @@
"textBasedEditor.query.textBasedLanguagesEditor.recentQueriesColumnLabel": "最近查询",
"textBasedEditor.query.textBasedLanguagesEditor.runQuery": "运行查询",
"textBasedEditor.query.textBasedLanguagesEditor.showQueriesLabel": "显示最近查询",
- "languageDocumentationPopover.documentationESQL.sourceCommands": "源命令",
"textBasedEditor.query.textBasedLanguagesEditor.submitFeedback": "提交反馈",
"textBasedEditor.query.textBasedLanguagesEditor.timeRanColumnLabel": "运行时间",
"textBasedEditor.query.textBasedLanguagesEditor.timestampNotDetected": "未找到 @timestamp",
From f03682119ce4463e77833a0df7f41d525519a82e Mon Sep 17 00:00:00 2001
From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Date: Sat, 21 Sep 2024 15:01:35 +1000
Subject: [PATCH 36/42] [api-docs] 2024-09-21 Daily api_docs build (#193649)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/837
---
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/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_security_posture.mdx | 2 +-
api_docs/console.mdx | 2 +-
api_docs/content_management.mdx | 2 +-
api_docs/controls.devdocs.json | 86 ++--
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.devdocs.json | 8 -
api_docs/data.mdx | 2 +-
api_docs/data_quality.mdx | 2 +-
api_docs/data_query.mdx | 2 +-
api_docs/data_search.mdx | 2 +-
api_docs/data_usage.devdocs.json | 111 +++++
api_docs/data_usage.mdx | 46 ++
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.devdocs.json | 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 | 23 +-
api_docs/deprecations_by_plugin.mdx | 24 +-
api_docs/deprecations_by_team.mdx | 3 +-
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.mdx | 2 +-
api_docs/embeddable_enhanced.mdx | 2 +-
api_docs/encrypted_saved_objects.mdx | 2 +-
api_docs/enterprise_search.mdx | 2 +-
api_docs/entities_data_access.mdx | 2 +-
api_docs/entity_manager.mdx | 2 +-
api_docs/es_ui_shared.mdx | 2 +-
api_docs/esql.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.devdocs.json | 76 +++-
api_docs/event_log.mdx | 4 +-
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/inference.mdx | 2 +-
api_docs/infra.mdx | 2 +-
api_docs/ingest_pipelines.mdx | 2 +-
api_docs/inspector.mdx | 2 +-
api_docs/integration_assistant.mdx | 2 +-
api_docs/interactive_setup.mdx | 2 +-
api_docs/inventory.mdx | 2 +-
api_docs/investigate.mdx | 2 +-
api_docs/investigate_app.mdx | 2 +-
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_grouping.mdx | 2 +-
api_docs/kbn_alerts_ui_shared.devdocs.json | 2 +-
api_docs/kbn_alerts_ui_shared.mdx | 2 +-
api_docs/kbn_analytics.mdx | 2 +-
api_docs/kbn_analytics_collection_utils.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_types.devdocs.json | 6 +-
api_docs/kbn_apm_types.mdx | 2 +-
api_docs/kbn_apm_utils.mdx | 2 +-
api_docs/kbn_avc_banner.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_cbor.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_cloud_security_posture.mdx | 2 +-
...cloud_security_posture_common.devdocs.json | 107 +++++
.../kbn_cloud_security_posture_common.mdx | 4 +-
api_docs/kbn_code_editor.mdx | 2 +-
api_docs/kbn_code_editor_mock.mdx | 2 +-
api_docs/kbn_code_owners.devdocs.json | 19 +
api_docs/kbn_code_owners.mdx | 4 +-
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 +-
...ent_management_content_insights_public.mdx | 2 +-
...ent_management_content_insights_server.mdx | 2 +-
...bn_content_management_favorites_public.mdx | 2 +-
...bn_content_management_favorites_server.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 +-
.../kbn_content_management_user_profiles.mdx | 2 +-
api_docs/kbn_content_management_utils.mdx | 2 +-
.../kbn_core_analytics_browser.devdocs.json | 12 +
api_docs/kbn_core_analytics_browser.mdx | 2 +-
.../kbn_core_analytics_browser_internal.mdx | 2 +-
api_docs/kbn_core_analytics_browser_mocks.mdx | 2 +-
.../kbn_core_analytics_server.devdocs.json | 12 +
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_feature_flags_browser.mdx | 2 +-
...bn_core_feature_flags_browser_internal.mdx | 2 +-
.../kbn_core_feature_flags_browser_mocks.mdx | 2 +-
api_docs/kbn_core_feature_flags_server.mdx | 2 +-
...kbn_core_feature_flags_server_internal.mdx | 2 +-
.../kbn_core_feature_flags_server_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 +-
.../kbn_core_lifecycle_browser.devdocs.json | 4 -
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 +-
...ore_saved_objects_api_browser.devdocs.json | 120 +-----
.../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 +-
...kbn_core_saved_objects_common.devdocs.json | 128 ++----
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.devdocs.json | 56 ++-
api_docs/kbn_elastic_agent_utils.mdx | 4 +-
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_grid_layout.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 +-
.../kbn_index_management_shared_types.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_investigation_shared.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_json_schemas.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 +-
...n_management_cards_navigation.devdocs.json | 4 +-
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.devdocs.json | 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_object_versioning_utils.mdx | 2 +-
api_docs/kbn_observability_alert_details.mdx | 2 +-
.../kbn_observability_alerting_rule_utils.mdx | 2 +-
.../kbn_observability_alerting_test_data.mdx | 2 +-
...ility_get_padded_alert_time_range_util.mdx | 2 +-
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_recently_accessed.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 +-
.../kbn_response_ops_feature_flag_service.mdx | 2 +-
api_docs/kbn_rison.mdx | 2 +-
api_docs/kbn_rollup.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_screenshotting_server.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_api_key_management.mdx | 2 +-
api_docs/kbn_security_authorization_core.mdx | 2 +-
api_docs/kbn_security_form_components.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 +-
.../kbn_security_role_management_model.mdx | 2 +-
api_docs/kbn_security_solution_common.mdx | 2 +-
...kbn_security_solution_distribution_bar.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 +-
api_docs/kbn_security_ui_components.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 +-
.../kbn_server_route_repository_client.mdx | 2 +-
.../kbn_server_route_repository_utils.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_table_persist.mdx | 2 +-
api_docs/kbn_shared_ux_utility.mdx | 2 +-
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_sse_utils.mdx | 2 +-
api_docs/kbn_sse_utils_client.mdx | 2 +-
api_docs/kbn_sse_utils_server.mdx | 2 +-
api_docs/kbn_std.devdocs.json | 50 ---
api_docs/kbn_std.mdx | 4 +-
api_docs/kbn_stdio_dev_helpers.mdx | 2 +-
api_docs/kbn_storybook.mdx | 2 +-
api_docs/kbn_synthetics_e2e.mdx | 2 +-
api_docs/kbn_synthetics_private_location.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 +-
api_docs/kbn_unsaved_changes_prompt.mdx | 2 +-
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.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.mdx | 2 +-
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.mdx | 2 +-
api_docs/observability_a_i_assistant.mdx | 2 +-
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 | 21 +-
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.devdocs.json | 395 +-----------------
api_docs/saved_objects.mdx | 10 +-
api_docs/saved_objects_finder.mdx | 2 +-
api_docs/saved_objects_management.mdx | 2 +-
api_docs/saved_objects_tagging.mdx | 2 +-
.../saved_objects_tagging_oss.devdocs.json | 172 --------
api_docs/saved_objects_tagging_oss.mdx | 4 +-
api_docs/saved_search.mdx | 2 +-
api_docs/screenshot_mode.mdx | 2 +-
api_docs/screenshotting.mdx | 2 +-
api_docs/search_assistant.mdx | 2 +-
api_docs/search_connectors.mdx | 2 +-
api_docs/search_homepage.mdx | 2 +-
api_docs/search_indices.mdx | 2 +-
api_docs/search_inference_endpoints.mdx | 2 +-
api_docs/search_notebooks.mdx | 2 +-
api_docs/search_playground.mdx | 2 +-
api_docs/security.mdx | 2 +-
api_docs/security_solution.devdocs.json | 12 +-
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.mdx | 2 +-
api_docs/snapshot_restore.mdx | 2 +-
api_docs/spaces.mdx | 2 +-
api_docs/stack_alerts.mdx | 2 +-
api_docs/stack_connectors.mdx | 2 +-
api_docs/task_manager.mdx | 2 +-
api_docs/telemetry.mdx | 2 +-
api_docs/telemetry_collection_manager.mdx | 2 +-
api_docs/telemetry_collection_xpack.mdx | 2 +-
api_docs/telemetry_management_section.mdx | 2 +-
api_docs/threat_intelligence.mdx | 2 +-
api_docs/timelines.mdx | 2 +-
api_docs/transform.mdx | 2 +-
api_docs/triggers_actions_ui.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 +-
762 files changed, 1301 insertions(+), 1692 deletions(-)
create mode 100644 api_docs/data_usage.devdocs.json
create mode 100644 api_docs/data_usage.mdx
diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx
index e4e0104f1491f..95bac427d4ac9 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-09-20
+date: 2024-09-21
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 1cb3a87f9e883..bbf9b50a6d723 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-09-20
+date: 2024-09-21
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 dfc340739e4d5..368580cc2892d 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-09-20
+date: 2024-09-21
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 b161052452d05..9bfafcb88cc98 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-09-20
+date: 2024-09-21
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 b9277e60a8c21..55d6955da7d58 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-09-20
+date: 2024-09-21
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 89dcfb4015864..bb21088b77285 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-09-20
+date: 2024-09-21
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 c7ed4fad1b0b4..ce4b7784e3021 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess']
---
import apmDataAccessObj from './apm_data_access.devdocs.json';
diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx
index 13af2ccc3f215..a8addacf50af4 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-09-20
+date: 2024-09-21
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 3843c9535ccd6..6b7407bf1e2f0 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-09-20
+date: 2024-09-21
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 12f4f0a614412..900647b53a972 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-09-20
+date: 2024-09-21
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 da82fe3364d26..80e53ad76b066 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-09-20
+date: 2024-09-21
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 f87336b8ff83c..da1ced613cac6 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-09-20
+date: 2024-09-21
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 52f7f8b9460e3..0477b1d3d3aef 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-09-20
+date: 2024-09-21
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 00da0feb4b77a..ade912800bc84 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-09-20
+date: 2024-09-21
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 b549df3505d93..38f74fc00a004 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend']
---
import cloudDefendObj from './cloud_defend.devdocs.json';
diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx
index 1f75ab142868d..028c4130708b3 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-09-20
+date: 2024-09-21
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 8a9219f181280..bece0ab881678 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-09-20
+date: 2024-09-21
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 099962d6a9822..403ade571bec6 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement']
---
import contentManagementObj from './content_management.devdocs.json';
diff --git a/api_docs/controls.devdocs.json b/api_docs/controls.devdocs.json
index 98a9926f2f4d5..a683c8bf221a3 100644
--- a/api_docs/controls.devdocs.json
+++ b/api_docs/controls.devdocs.json
@@ -21,7 +21,7 @@
},
") => JSX.Element"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer_lazy.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer_lazy.tsx",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -41,7 +41,7 @@
"text": "ControlGroupRendererProps"
}
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer_lazy.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer_lazy.tsx",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -59,7 +59,7 @@
"tags": [],
"label": "ControlGroupCreationOptions",
"description": [],
- "path": "src/plugins/controls/public/react_controls/external_api/types.ts",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -89,7 +89,7 @@
},
">> | undefined"
],
- "path": "src/plugins/controls/public/react_controls/external_api/types.ts",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/types.ts",
"deprecated": false,
"trackAdoption": false
},
@@ -110,7 +110,7 @@
},
" | undefined"
],
- "path": "src/plugins/controls/public/react_controls/external_api/types.ts",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/types.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -124,7 +124,7 @@
"tags": [],
"label": "ControlGroupRendererProps",
"description": [],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -146,7 +146,7 @@
},
") => void"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -166,7 +166,7 @@
"text": "ControlGroupRendererApi"
}
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -284,7 +284,7 @@
},
">>) | undefined"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -314,7 +314,7 @@
},
">>"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -405,7 +405,7 @@
},
">>, controlId?: string | undefined) => void; }"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -430,7 +430,7 @@
},
" | undefined"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false
},
@@ -451,7 +451,7 @@
},
"[] | undefined"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false
},
@@ -472,7 +472,7 @@
},
" | undefined"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false
},
@@ -493,7 +493,7 @@
},
" | undefined"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false
},
@@ -507,7 +507,7 @@
"signature": [
"boolean | undefined"
],
- "path": "src/plugins/controls/public/react_controls/external_api/control_group_renderer.tsx",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/control_group_renderer.tsx",
"deprecated": false,
"trackAdoption": false
}
@@ -797,7 +797,7 @@
"ControlFactory",
""
],
- "path": "src/plugins/controls/public/react_controls/controls/data_controls/types.ts",
+ "path": "src/plugins/controls/public/controls/data_controls/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -819,7 +819,7 @@
},
") => boolean"
],
- "path": "src/plugins/controls/public/react_controls/controls/data_controls/types.ts",
+ "path": "src/plugins/controls/public/controls/data_controls/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -839,7 +839,7 @@
"text": "DataViewField"
}
],
- "path": "src/plugins/controls/public/react_controls/controls/data_controls/types.ts",
+ "path": "src/plugins/controls/public/controls/data_controls/types.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -859,7 +859,7 @@
"CustomOptionsComponentProps",
"> | undefined"
],
- "path": "src/plugins/controls/public/react_controls/controls/data_controls/types.ts",
+ "path": "src/plugins/controls/public/controls/data_controls/types.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -1373,7 +1373,7 @@
},
") => void; }"
],
- "path": "src/plugins/controls/public/react_controls/control_group/types.ts",
+ "path": "src/plugins/controls/public/control_group/types.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
@@ -1659,7 +1659,7 @@
},
">>; }"
],
- "path": "src/plugins/controls/public/react_controls/external_api/types.ts",
+ "path": "src/plugins/controls/public/control_group/control_group_renderer/types.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
@@ -1750,7 +1750,7 @@
},
">>, controlId?: string | undefined) => void; }"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
@@ -1780,7 +1780,7 @@
"signature": [
"(newState: Partial, controlType: string) => Partial"
],
- "path": "src/plugins/controls/public/react_controls/control_group/types.ts",
+ "path": "src/plugins/controls/public/control_group/types.ts",
"deprecated": false,
"trackAdoption": false,
"returnComment": [],
@@ -1795,7 +1795,7 @@
"signature": [
"{ [P in keyof State]?: State[P] | undefined; }"
],
- "path": "src/plugins/controls/public/react_controls/control_group/types.ts",
+ "path": "src/plugins/controls/public/control_group/types.ts",
"deprecated": false,
"trackAdoption": false
},
@@ -1806,7 +1806,7 @@
"tags": [],
"label": "controlType",
"description": [],
- "path": "src/plugins/controls/public/react_controls/control_group/types.ts",
+ "path": "src/plugins/controls/public/control_group/types.ts",
"deprecated": false,
"trackAdoption": false
}
@@ -1972,7 +1972,7 @@
},
" & { untilFiltersReady: () => Promise; }"
],
- "path": "src/plugins/controls/public/react_controls/controls/data_controls/types.ts",
+ "path": "src/plugins/controls/public/controls/data_controls/types.ts",
"deprecated": false,
"trackAdoption": false,
"initialIsOpen": false
@@ -2031,7 +2031,7 @@
"tags": [],
"label": "controlGroupStateBuilder",
"description": [],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -2069,7 +2069,7 @@
},
", controlId?: string | undefined) => Promise"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -2099,7 +2099,7 @@
},
">>"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -2120,7 +2120,7 @@
"text": "DefaultDataControlState"
}
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -2135,7 +2135,7 @@
"signature": [
"string | undefined"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": false
@@ -2171,7 +2171,7 @@
"OptionsListControlState",
", controlId?: string | undefined) => void"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -2201,7 +2201,7 @@
},
">>"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -2216,7 +2216,7 @@
"signature": [
"OptionsListControlState"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -2231,7 +2231,7 @@
"signature": [
"string | undefined"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": false
@@ -2267,7 +2267,7 @@
"RangesliderControlState",
", controlId?: string | undefined) => void"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -2297,7 +2297,7 @@
},
">>"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -2312,7 +2312,7 @@
"signature": [
"RangesliderControlState"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -2327,7 +2327,7 @@
"signature": [
"string | undefined"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": false
@@ -2361,7 +2361,7 @@
},
">>, controlId?: string | undefined) => void"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
@@ -2391,7 +2391,7 @@
},
">>"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
@@ -2406,7 +2406,7 @@
"signature": [
"string | undefined"
],
- "path": "src/plugins/controls/public/react_controls/control_group/utils/control_group_state_builder.ts",
+ "path": "src/plugins/controls/public/control_group/utils/control_group_state_builder.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": false
diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx
index 0d2c150dd21ad..fd6c18eccde3c 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-09-20
+date: 2024-09-21
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 ffaa52c43f2b9..36791f92c08d3 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-09-20
+date: 2024-09-21
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 348c49d3c7a02..38dbda9470468 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-09-20
+date: 2024-09-21
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 7497c10d3dd1b..ca12278d6126c 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced']
---
import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json';
diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json
index a5d021e9a0505..fc81984f7b688 100644
--- a/api_docs/data.devdocs.json
+++ b/api_docs/data.devdocs.json
@@ -11731,14 +11731,6 @@
{
"plugin": "securitySolution",
"path": "x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts"
- },
- {
- "plugin": "savedObjects",
- "path": "src/plugins/saved_objects/public/saved_object/saved_object.test.ts"
- },
- {
- "plugin": "savedObjects",
- "path": "src/plugins/saved_objects/public/saved_object/saved_object.test.ts"
}
]
},
diff --git a/api_docs/data.mdx b/api_docs/data.mdx
index 83a4cf8af4b4d..814b5c4d9a559 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data']
---
import dataObj from './data.devdocs.json';
diff --git a/api_docs/data_quality.mdx b/api_docs/data_quality.mdx
index 64637a749f066..eed55313dcb00 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-09-20
+date: 2024-09-21
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 af0dff28b917f..ec9938b881d7e 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query']
---
import dataQueryObj from './data_query.devdocs.json';
diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx
index 8114e3510911e..ab2feb7d3a093 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search']
---
import dataSearchObj from './data_search.devdocs.json';
diff --git a/api_docs/data_usage.devdocs.json b/api_docs/data_usage.devdocs.json
new file mode 100644
index 0000000000000..835cb7f1ef9a3
--- /dev/null
+++ b/api_docs/data_usage.devdocs.json
@@ -0,0 +1,111 @@
+{
+ "id": "dataUsage",
+ "client": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": [],
+ "setup": {
+ "parentPluginId": "dataUsage",
+ "id": "def-public.DataUsagePublicSetup",
+ "type": "Interface",
+ "tags": [],
+ "label": "DataUsagePublicSetup",
+ "description": [],
+ "path": "x-pack/plugins/data_usage/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "lifecycle": "setup",
+ "initialIsOpen": true
+ },
+ "start": {
+ "parentPluginId": "dataUsage",
+ "id": "def-public.DataUsagePublicStart",
+ "type": "Interface",
+ "tags": [],
+ "label": "DataUsagePublicStart",
+ "description": [],
+ "path": "x-pack/plugins/data_usage/public/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "lifecycle": "start",
+ "initialIsOpen": true
+ }
+ },
+ "server": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [],
+ "objects": [],
+ "setup": {
+ "parentPluginId": "dataUsage",
+ "id": "def-server.DataUsageServerSetup",
+ "type": "Interface",
+ "tags": [],
+ "label": "DataUsageServerSetup",
+ "description": [],
+ "path": "x-pack/plugins/data_usage/server/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "lifecycle": "setup",
+ "initialIsOpen": true
+ },
+ "start": {
+ "parentPluginId": "dataUsage",
+ "id": "def-server.DataUsageServerStart",
+ "type": "Interface",
+ "tags": [],
+ "label": "DataUsageServerStart",
+ "description": [],
+ "path": "x-pack/plugins/data_usage/server/types.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [],
+ "lifecycle": "start",
+ "initialIsOpen": true
+ }
+ },
+ "common": {
+ "classes": [],
+ "functions": [],
+ "interfaces": [],
+ "enums": [],
+ "misc": [
+ {
+ "parentPluginId": "dataUsage",
+ "id": "def-common.PLUGIN_ID",
+ "type": "string",
+ "tags": [],
+ "label": "PLUGIN_ID",
+ "description": [],
+ "signature": [
+ "\"data_usage\""
+ ],
+ "path": "x-pack/plugins/data_usage/common/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ },
+ {
+ "parentPluginId": "dataUsage",
+ "id": "def-common.PLUGIN_NAME",
+ "type": "string",
+ "tags": [],
+ "label": "PLUGIN_NAME",
+ "description": [],
+ "path": "x-pack/plugins/data_usage/common/index.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "initialIsOpen": false
+ }
+ ],
+ "objects": []
+ }
+}
\ No newline at end of file
diff --git a/api_docs/data_usage.mdx b/api_docs/data_usage.mdx
new file mode 100644
index 0000000000000..0c01cb43b0c17
--- /dev/null
+++ b/api_docs/data_usage.mdx
@@ -0,0 +1,46 @@
+---
+####
+#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system.
+#### Reach out in #docs-engineering for more info.
+####
+id: kibDataUsagePluginApi
+slug: /kibana-dev-docs/api/dataUsage
+title: "dataUsage"
+image: https://source.unsplash.com/400x175/?github
+description: API docs for the dataUsage plugin
+date: 2024-09-21
+tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataUsage']
+---
+import dataUsageObj from './data_usage.devdocs.json';
+
+
+
+Contact [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) for questions regarding this plugin.
+
+**Code health stats**
+
+| Public API count | Any count | Items lacking comments | Missing exports |
+|-------------------|-----------|------------------------|-----------------|
+| 6 | 0 | 6 | 0 |
+
+## Client
+
+### Setup
+
+
+### Start
+
+
+## Server
+
+### Setup
+
+
+### Start
+
+
+## Common
+
+### Consts, variables and types
+
+
diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx
index e217389b8c69c..5cb4763c105ec 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-09-20
+date: 2024-09-21
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 ea9afd08ef7c9..a42db16c14343 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-09-20
+date: 2024-09-21
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 2952e866888b8..1150debadf006 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement']
---
import dataViewManagementObj from './data_view_management.devdocs.json';
diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json
index 1015fb02d2144..f9b5b93e81fe8 100644
--- a/api_docs/data_views.devdocs.json
+++ b/api_docs/data_views.devdocs.json
@@ -14080,7 +14080,7 @@
},
{
"plugin": "controls",
- "path": "src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts"
+ "path": "src/plugins/controls/public/controls/data_controls/options_list_control/options_list_fetch_cache.ts"
},
{
"plugin": "@kbn/lens-embeddable-utils",
diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx
index 22284b7b5f66c..9051da10c3da9 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-09-20
+date: 2024-09-21
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 6dd527a489757..b0730004e5958 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-09-20
+date: 2024-09-21
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 6a1a10337af1c..8843c8bbd695d 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-09-20
+date: 2024-09-21
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 fd1c958327037..e4604146a13d9 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -21,10 +21,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | ml, securitySolution | - |
| | actions, savedObjectsTagging, ml, enterpriseSearch | - |
| | @kbn/core-saved-objects-browser-internal, @kbn/core, savedObjects, visualizations, aiops, dataVisualizer, ml, dashboardEnhanced, graph, lens, securitySolution, eventAnnotation, @kbn/core-saved-objects-browser-mocks | - |
-| | @kbn/core, savedObjects, embeddable, visualizations, canvas, graph, ml | - |
+| | @kbn/core, embeddable, savedObjects, visualizations, canvas, graph, ml | - |
| | @kbn/core-saved-objects-base-server-internal, @kbn/core-saved-objects-migration-server-internal, @kbn/core-saved-objects-server-internal, @kbn/core-ui-settings-server-internal, @kbn/core-usage-data-server-internal, taskManager, spaces, actions, @kbn/core-saved-objects-migration-server-mocks, share, dataViews, data, alerting, lens, cases, savedSearch, canvas, fleet, cloudSecurityPosture, ml, logsShared, graph, lists, maps, visualizations, infra, apmDataAccess, securitySolution, apm, slo, synthetics, uptime, dashboard, eventAnnotation, links, savedObjectsManagement, @kbn/core-test-helpers-so-type-serializer, @kbn/core-saved-objects-api-server-internal | - |
| | stackAlerts, alerting, securitySolution, inputControlVis | - |
-| | graph, stackAlerts, inputControlVis, securitySolution, savedObjects | - |
+| | graph, stackAlerts, inputControlVis, securitySolution | - |
| | dashboard, dataVisualizer, stackAlerts, expressionPartitionVis | - |
| | stackAlerts, alerting, securitySolution, inputControlVis | - |
| | triggersActionsUi | - |
@@ -69,18 +69,18 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | alerting, observabilityAIAssistant, fleet, cloudSecurityPosture, entityManager, serverlessSearch, transform, upgradeAssistant, apm, synthetics, security | - |
| | actions, alerting | - |
| | monitoring | - |
-| | @kbn/core-saved-objects-api-browser, @kbn/core, savedObjects, savedObjectsManagement, visualizations, savedObjectsTagging, eventAnnotation, lens, maps, graph, dashboard, savedObjectsTaggingOss, kibanaUtils, expressions, data, embeddable, uiActionsEnhanced, canvas, dashboardEnhanced, globalSearchProviders, controls | - |
+| | @kbn/core-saved-objects-api-browser, @kbn/core, savedObjectsManagement, savedObjects, visualizations, savedObjectsTagging, eventAnnotation, lens, maps, graph, dashboard, kibanaUtils, expressions, data, savedObjectsTaggingOss, embeddable, uiActionsEnhanced, canvas, dashboardEnhanced, globalSearchProviders, controls | - |
| | @kbn/core-saved-objects-browser, @kbn/core-saved-objects-browser-internal, @kbn/core, home, savedObjects, visualizations, lens, visTypeTimeseries, @kbn/core-saved-objects-browser-mocks | - |
| | @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, savedObjects | - |
| | @kbn/core-saved-objects-browser-mocks, home, @kbn/core-saved-objects-browser-internal | - |
-| | @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, savedObjects, visualizations | - |
+| | @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, visualizations | - |
| | @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-browser-internal | - |
| | @kbn/core-saved-objects-browser-mocks, savedObjects, dashboardEnhanced, @kbn/core-saved-objects-browser-internal | - |
-| | @kbn/core-saved-objects-browser-mocks, savedObjects, dashboardEnhanced, @kbn/core-saved-objects-browser-internal | - |
-| | @kbn/core-saved-objects-browser-mocks, savedObjects, @kbn/core-saved-objects-browser-internal | - |
+| | @kbn/core-saved-objects-browser-mocks, dashboardEnhanced, savedObjects, @kbn/core-saved-objects-browser-internal | - |
+| | @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-browser-internal | - |
| | @kbn/core-saved-objects-browser-mocks, discover, @kbn/core-saved-objects-browser-internal | - |
| | @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-browser-internal | - |
-| | @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, savedObjects | - |
+| | @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks | - |
| | @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-browser-internal | - |
| | @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-browser-internal | - |
| | @kbn/core-saved-objects-browser-internal | - |
@@ -109,8 +109,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | graph, visTypeTimeseries, dataViewManagement | - |
| | visualizations, graph | - |
| | kubernetesSecurity, osquery, threatIntelligence | - |
-| | @kbn/core-plugins-browser-internal, @kbn/core-root-browser-internal, home, savedObjects, unifiedSearch, visualizations, fileUpload, dashboardEnhanced, transform, discover, dataVisualizer | - |
-| | @kbn/core, lens, savedObjects | - |
| | lens, dashboard, canvas | - |
| | lens, dashboard | - |
| | lens, dashboard, investigateApp | - |
@@ -118,6 +116,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | dashboard | - |
| | embeddable, dashboard | - |
| | dashboard, maps | - |
+| | @kbn/core-plugins-browser-internal, @kbn/core-root-browser-internal, home, unifiedSearch, visualizations, fileUpload, dashboardEnhanced, transform, discover, dataVisualizer | - |
| | dataViews, maps | - |
| | dataViews, dataViewManagement | - |
| | dataViews, dataViewManagement | - |
@@ -133,6 +132,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | unifiedSearch | - |
| | unifiedSearch | - |
| | lens | - |
+| | @kbn/core, lens, savedObjects | - |
| | canvas | - |
| | canvas | - |
| | canvas | - |
@@ -182,7 +182,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| | security, @kbn/security-role-management-model | 8.8.0 |
| | apm | 8.8.0 |
| | mapsEms | 8.8.0 |
-| | savedObjectsTaggingOss | 8.8.0 |
| | @kbn/core-plugins-server-internal, @kbn/core | 8.8.0 |
| | security | 8.8.0
@@ -236,7 +235,7 @@ Safe to remove.
| | lists |
| | lists |
| | lists |
-| | savedObjects |
+| | savedObjects |
| | security |
| | serverless |
| | taskManager |
diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx
index 9fe0f439213df..0cf37023e2876 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -623,7 +623,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
-| | [options_list_fetch_cache.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts#:~:text=title) | - |
+| | [options_list_fetch_cache.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/public/controls/data_controls/options_list_control/options_list_fetch_cache.ts#:~:text=title) | - |
| | [control_group_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/control_group/control_group_persistable_state.ts#:~:text=SavedObjectReference), [control_group_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/control_group/control_group_persistable_state.ts#:~:text=SavedObjectReference), [control_group_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/control_group/control_group_persistable_state.ts#:~:text=SavedObjectReference), [options_list_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/options_list/options_list_persistable_state.ts#:~:text=SavedObjectReference), [options_list_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/options_list/options_list_persistable_state.ts#:~:text=SavedObjectReference), [options_list_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/options_list/options_list_persistable_state.ts#:~:text=SavedObjectReference), [range_slider_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/range_slider/range_slider_persistable_state.ts#:~:text=SavedObjectReference), [range_slider_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/range_slider/range_slider_persistable_state.ts#:~:text=SavedObjectReference), [range_slider_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/range_slider/range_slider_persistable_state.ts#:~:text=SavedObjectReference), [time_slider_persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/controls/server/time_slider/time_slider_persistable_state.ts#:~:text=SavedObjectReference)+ 2 more | - |
@@ -1227,20 +1227,15 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
-| | [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=indexPatterns), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=indexPatterns) | - |
-| | [plugin.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/plugin.ts#:~:text=savedObjects) | - |
-| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectsClientContract), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectsClientContract), [initialize_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/initialize_saved_object.ts#:~:text=SavedObjectsClientContract), [initialize_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/initialize_saved_object.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectsClientContract), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=SavedObjectsClientContract), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=SavedObjectsClientContract)+ 5 more | - |
-| | [create_source.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/create_source.ts#:~:text=create), [create_source.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/create_source.ts#:~:text=create), [save_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_saved_object.ts#:~:text=create), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=create), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=create), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=create), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=create), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=create), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=create), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=create)+ 9 more | - |
-| | [build_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/build_saved_object.ts#:~:text=delete) | - |
-| | [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=find), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=find), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=find), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=find) | - |
-| | [initialize_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/initialize_saved_object.ts#:~:text=get), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=get) | - |
-| | [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=bulkGet) | - |
-| | [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=update) | - |
-| | [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SimpleSavedObject), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SimpleSavedObject), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SimpleSavedObject), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=SimpleSavedObject), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=SimpleSavedObject), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=SimpleSavedObject), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=SimpleSavedObject), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=SimpleSavedObject), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=SimpleSavedObject), [saved_object.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/saved_object.test.ts#:~:text=SimpleSavedObject)+ 4 more | - |
+| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectsClientContract), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectsClientContract), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=SavedObjectsClientContract), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=SavedObjectsClientContract), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=SavedObjectsClientContract)+ 5 more | - |
+| | [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=create), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=create), [create_source.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/create_source.ts#:~:text=create), [create_source.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/create_source.ts#:~:text=create), [save_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_saved_object.ts#:~:text=create), [save_with_confirmation.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.test.ts#:~:text=create), [save_with_confirmation.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.test.ts#:~:text=create), [save_with_confirmation.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.test.ts#:~:text=create), [save_with_confirmation.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.test.ts#:~:text=create), [save_with_confirmation.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.test.ts#:~:text=create)+ 1 more | - |
+| | [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=find), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=find), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=find) | - |
+| | [initialize_saved_object.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/initialize_saved_object.ts#:~:text=get) | - |
+| | [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SimpleSavedObject), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SimpleSavedObject), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SimpleSavedObject) | - |
| | [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=SavedObjectsCreateOptions), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=SavedObjectsCreateOptions), [save_with_confirmation.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.test.ts#:~:text=SavedObjectsCreateOptions), [save_with_confirmation.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.test.ts#:~:text=SavedObjectsCreateOptions), [save_with_confirmation.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.test.ts#:~:text=SavedObjectsCreateOptions) | - |
| | [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=simpleSavedObjectMock), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=simpleSavedObjectMock) | - |
| | [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=SavedObject), [find_object_by_title.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.test.ts#:~:text=SavedObject) | - |
-| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [create_source.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/create_source.ts#:~:text=SavedObjectAttributes), [create_source.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/create_source.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectAttributes), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=SavedObjectAttributes)+ 15 more | - |
+| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectAttributes), [find_object_by_title.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/find_object_by_title.ts#:~:text=SavedObjectAttributes), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=SavedObjectAttributes), [save_with_confirmation.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/save_with_confirmation.ts#:~:text=SavedObjectAttributes), [create_source.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/saved_object/helpers/create_source.ts#:~:text=SavedObjectAttributes)+ 4 more | - |
| | [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectReference), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects/public/types.ts#:~:text=SavedObjectReference) | - |
@@ -1272,9 +1267,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| Deprecated API | Reference location(s) | Remove By |
| ---------------|-----------|-----------|
-| | [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject) | 8.8.0 |
| | [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject) | - |
-| | [extract_tag_references.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts#:~:text=SavedObjectReference), [extract_tag_references.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts#:~:text=SavedObjectReference), [extract_tag_references.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts#:~:text=SavedObjectReference), [extract_tag_references.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts#:~:text=SavedObjectReference), [extract_tag_references.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts#:~:text=SavedObjectReference), [extract_tag_references.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/extract_tag_references.test.ts#:~:text=SavedObjectReference), [inject_tag_references.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.test.ts#:~:text=SavedObjectReference), [inject_tag_references.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/inject_tag_references.test.ts#:~:text=SavedObjectReference), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObjectReference), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObjectReference)+ 2 more | - |
+| | [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObjectReference), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObjectReference), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObjectReference), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObjectReference) | - |
diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx
index 115dd57a9eec7..011a72f6597b6 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana']
---
@@ -16,7 +16,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana']
| Plugin | Deprecated API | Reference location(s) | Remove By |
| --------|-------|-----------|-----------|
-| savedObjectsTaggingOss | | [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/decorator/types.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject), [api.ts](https://github.com/elastic/kibana/tree/main/src/plugins/saved_objects_tagging_oss/public/api.ts#:~:text=SavedObject) | 8.8.0 |
| kibanaOverview | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/kibana_overview/public/application.tsx#:~:text=appBasePath) | 8.8.0 |
diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx
index c7c734f1a1b49..2ab09dc2e9ea8 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-09-20
+date: 2024-09-21
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 98bd4052fe516..849514c5cdf9c 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-09-20
+date: 2024-09-21
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 95a6e526ced5e..2b6c7b41335a8 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-09-20
+date: 2024-09-21
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 32c4067ee0dd7..de60152aac882 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-09-20
+date: 2024-09-21
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 fcbbb8be61d85..6e90d4fd7008e 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-09-20
+date: 2024-09-21
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 c74acbf576eb0..46064df292e30 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant']
---
import elasticAssistantObj from './elastic_assistant.devdocs.json';
diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx
index f85002d7080ca..5340a6e2010ea 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-09-20
+date: 2024-09-21
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 e06f75a1a48e3..d20adbca416f3 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-09-20
+date: 2024-09-21
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 3b0a8c43ead37..6351e3f07660f 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-09-20
+date: 2024-09-21
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 251ac77b529d2..564699d7f3ab9 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch']
---
import enterpriseSearchObj from './enterprise_search.devdocs.json';
diff --git a/api_docs/entities_data_access.mdx b/api_docs/entities_data_access.mdx
index 8425d4a8ca448..3c560671f8db3 100644
--- a/api_docs/entities_data_access.mdx
+++ b/api_docs/entities_data_access.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/entitiesDataAccess
title: "entitiesDataAccess"
image: https://source.unsplash.com/400x175/?github
description: API docs for the entitiesDataAccess plugin
-date: 2024-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'entitiesDataAccess']
---
import entitiesDataAccessObj from './entities_data_access.devdocs.json';
diff --git a/api_docs/entity_manager.mdx b/api_docs/entity_manager.mdx
index e109d16be264b..bf5ab2e633c1c 100644
--- a/api_docs/entity_manager.mdx
+++ b/api_docs/entity_manager.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/entityManager
title: "entityManager"
image: https://source.unsplash.com/400x175/?github
description: API docs for the entityManager plugin
-date: 2024-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'entityManager']
---
import entityManagerObj from './entity_manager.devdocs.json';
diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx
index a409e799903ea..02d19d63960fc 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared']
---
import esUiSharedObj from './es_ui_shared.devdocs.json';
diff --git a/api_docs/esql.mdx b/api_docs/esql.mdx
index f75e7f1381f11..1faae878fd703 100644
--- a/api_docs/esql.mdx
+++ b/api_docs/esql.mdx
@@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esql
title: "esql"
image: https://source.unsplash.com/400x175/?github
description: API docs for the esql plugin
-date: 2024-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esql']
---
import esqlObj from './esql.devdocs.json';
diff --git a/api_docs/esql_data_grid.mdx b/api_docs/esql_data_grid.mdx
index c66e49807aa01..8ef97b9647e17 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-09-20
+date: 2024-09-21
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 b484324656592..d659c77345625 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-09-20
+date: 2024-09-21
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 4a6c490d6efe4..0e4c39dbe75d2 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-09-20
+date: 2024-09-21
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing']
---
import eventAnnotationListingObj from './event_annotation_listing.devdocs.json';
diff --git a/api_docs/event_log.devdocs.json b/api_docs/event_log.devdocs.json
index 87e2bf5cae0ac..5a66164ffcf07 100644
--- a/api_docs/event_log.devdocs.json
+++ b/api_docs/event_log.devdocs.json
@@ -222,6 +222,53 @@
],
"returnComment": []
},
+ {
+ "parentPluginId": "eventLog",
+ "id": "def-server.ClusterClientAdapter.updateIndexTemplate",
+ "type": "Function",
+ "tags": [],
+ "label": "updateIndexTemplate",
+ "description": [],
+ "signature": [
+ "(name: string, template: Record) => Promise"
+ ],
+ "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "children": [
+ {
+ "parentPluginId": "eventLog",
+ "id": "def-server.ClusterClientAdapter.updateIndexTemplate.$1",
+ "type": "string",
+ "tags": [],
+ "label": "name",
+ "description": [],
+ "signature": [
+ "string"
+ ],
+ "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ },
+ {
+ "parentPluginId": "eventLog",
+ "id": "def-server.ClusterClientAdapter.updateIndexTemplate.$2",
+ "type": "Object",
+ "tags": [],
+ "label": "template",
+ "description": [],
+ "signature": [
+ "Record"
+ ],
+ "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts",
+ "deprecated": false,
+ "trackAdoption": false,
+ "isRequired": true
+ }
+ ],
+ "returnComment": []
+ },
{
"parentPluginId": "eventLog",
"id": "def-server.ClusterClientAdapter.getExistingLegacyIndexTemplates",
@@ -495,7 +542,7 @@
"label": "createDataStream",
"description": [],
"signature": [
- "(name: string, body?: Record